OSDN Git Service

ALSA: usb-audio: UAC3 Add support for connector insertion.
authorJorge Sanjuan <jorge.sanjuan@codethink.co.uk>
Fri, 11 May 2018 15:25:36 +0000 (16:25 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 15 May 2018 05:35:34 +0000 (07:35 +0200)
commit1d38f5d828b45546e53095a172c77556642a8a04
treecad99da467f95943f8a5008313c2aa914fffd2dc
parent6cfd839ae78ec3fac5ddbf7148155898727e90c3
ALSA: usb-audio: UAC3 Add support for connector insertion.

This adds support for the UAC3 insertion controls. The status
is reported as a boolean value in the same way it used to do
for UAC2. Hence, the presence of any connector in the response
will make the control saying the jack is connected.

The UAC2 support for this control has been moved to a dedicated
control for connectors as both UAC2 and UAC3 follow a specific
Control Request Parameter Block for this control. This parameter
block for UAC3 could not be read in the same simplistic
manner as in UAC2.

This implementation is not requesting additional information
from the HIGH CAPABILITY Connectors descriptor.

Tested with an UAC3 device with UAC2 as legacy configuration.
The connector status can be read with `amixer` and the interrupt
is also caught with `alsactl monitor`.

Signed-off-by: Jorge Sanjuan <jorge.sanjuan@codethink.co.uk>
Reviewed-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Tested-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/linux/usb/audio-v2.h
include/linux/usb/audio-v3.h
sound/usb/mixer.c