acrn-kernel/sound/usb
Alexander Tsoy dee697ac53 ALSA: usb-audio: Ignore clock selector errors for single connection
[ Upstream commit eaa1b01fe709d6a236a9cec74813e0400601fd23 ]

For devices with multiple clock sources connected to a selector, we need
to check what a clock selector control request has returned. This is
needed to ensure that a requested clock source is indeed selected and for
autoclock feature to work.

For devices with single clock source connected, if we get an error there
is nothing else we can do about it. We can't skip clock selector setup as
it is required by some devices. So lets just ignore error in this case.

This should fix various buggy Mackie devices:

[  649.109785] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)
[  649.111946] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)
[  649.113822] usb 1-1.3: parse_audio_format_rates_v2v3(): unable to find clock source (clock -32)

There is also interesting info from the Windows documentation [1] (this
is probably why manufacturers dont't even test this feature):

"The USB Audio 2.0 driver doesn't support clock selection. The driver
uses the Clock Source Entity, which is selected by default and never
issues a Clock Selector Control SET CUR request."

Link: https://learn.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers [1]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217314
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218175
Link: https://bugzilla.kernel.org/show_bug.cgi?id=218342
Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Link: https://lore.kernel.org/r/20240201115308.17838-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-01 13:26:27 +01:00
..
6fire
bcd2000
caiaq
hiface
line6
misc
usx2y
Kconfig
Makefile
card.c
card.h
clock.c ALSA: usb-audio: Ignore clock selector errors for single connection 2024-03-01 13:26:27 +01:00
clock.h
endpoint.c
endpoint.h
format.c ALSA: usb-audio: Check presence of valid altsetting control 2024-03-01 13:26:27 +01:00
format.h
helper.c
helper.h
implicit.c
implicit.h
media.c
media.h
midi.c
midi.h
mixer.c
mixer.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
mixer_s1810c.c
mixer_s1810c.h
mixer_scarlett.c
mixer_scarlett.h
mixer_scarlett_gen2.c ALSA: scarlett2: Add clamp() in scarlett2_mixer_ctl_put() 2024-01-25 15:27:37 -08:00
mixer_scarlett_gen2.h
mixer_us16x08.c
mixer_us16x08.h
pcm.c
pcm.h
power.c
power.h
proc.c
proc.h
quirks-table.h
quirks.c ALSA: usb-audio: Sort quirk table entries 2024-02-16 19:06:31 +01:00
quirks.h
stream.c
stream.h
usbaudio.h
validate.c