Commit 4dc9c1e8 authored by Jan Schär's avatar Jan Schär Committed by Greg Kroah-Hartman
Browse files

ALSA: usb-audio: Support jack detection on Dell dock



[ Upstream commit 4b8ea38f ]

The Dell WD15 dock has a headset and a line out port. Add support for
detecting if a jack is inserted into one of these ports.
For the headset jack, additionally determine if a mic is present.

The WD15 contains an ALC4020 USB audio controller and ALC3263 audio codec
from Realtek. It is a UAC 1 device, and UAC 1 does not support jack
detection. Instead, jack detection works by sending HD Audio commands over
vendor-type USB messages.

I found out how it works by looking at USB captures on Windows.
The audio codec is very similar to the one supported by
sound/soc/codecs/rt298.c / rt298.h, some constant names and the mic
detection are adapted from there. The realtek_add_jack function is adapted
from build_connector_control in sound/usb/mixer.c.

I tested this on a WD15 dock with the latest firmware.

Signed-off-by: default avatarJan Schär <jan@jschaer.ch>
Link: https://lore.kernel.org/r/20220627171855.42338-1-jan@jschaer.ch


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Stable-dep-of: 4413665d ("ALSA: usb-audio: Add quirks for Dell WD19 dock")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6a7e6dcf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment