linux-stable/sound
chihhao.chen 4511781f95 ALSA: usb-audio: fix incorrect clock source setting
The following scenario describes an echo test for
Samsung USBC Headset (AKG) with VID/PID (0x04e8/0xa051).

We first start a capture stream(USB IN transfer) in 96Khz/24bit/1ch mode.
In clock find source function, we get value 0x2 for clock selector
and 0x1 for clock source.

Kernel-4.14 behavior
Since clock source is valid so clock selector was not set again.
We pass through this function and start a playback stream(USB OUT transfer)
in 48Khz/32bit/2ch mode. This time we get value 0x1 for clock selector
and 0x1 for clock source. Finally clock id with this setting is 0x9.

Kernel-5.10 behavior
Clock selector was always set one more time even it is valid.
When we start a playback stream, we will get 0x2 for clock selector
and 0x1 for clock source. In this case clock id becomes 0xA.
This is an incorrect clock source setting and results in severe noises.
We see wrong data rate in USB IN transfer.
(From 288 bytes/ms becomes 144 bytes/ms) It should keep in 288 bytes/ms.

This earphone works fine on older kernel version load because
this is a newly-added behavior.

Fixes: d2e8f64125 ("ALSA: usb-audio: Explicitly set up the clock selector")
Signed-off-by: chihhao.chen <chihhao.chen@mediatek.com>
Link: https://lore.kernel.org/r/1627100621-19225-1-git-send-email-chihhao.chen@mediatek.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2021-07-24 10:06:52 +02:00
..
ac97 ALSA: ac97: fix PM reference leak in ac97_bus_remove() 2021-05-25 08:59:08 +02:00
aoa ALSA: aoa: remove unnecessary oom message 2021-06-17 17:31:38 +02:00
arm ALSA: arm: Remove unnecessary variables 2021-06-10 09:51:21 +02:00
atmel
core ALSA: pcm: Fix mmap without buffer preallocation 2021-07-20 11:28:33 +02:00
drivers ALSA: serial: Fix assignment in if condition 2021-06-09 17:30:34 +02:00
firewire ALSA: bebob: correct duplicated entries with TerraTec OUI 2021-07-05 19:31:12 +02:00
hda ALSA: hda: intel-dsp-cfg: add missing ElkhartLake PCI ID 2021-07-20 09:10:55 +02:00
i2c ALSA: i2c: tea6330t: Remove redundant initialization of variable err 2021-06-12 09:32:14 +02:00
isa ALSA: sb: Fix potential ABBA deadlock in CSP driver 2021-07-17 09:55:10 +02:00
mips ALSA: n64: check return value after calling platform_get_resource() 2021-06-12 09:31:13 +02:00
oss sound/oss/dmasound: Remove superfluous "break" 2021-05-27 08:24:23 +02:00
parisc ALSA: parisc: Fix assignment in if condition 2021-06-09 17:30:39 +02:00
pci ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10 2021-07-20 17:40:56 +02:00
pcmcia ALSA: pcmcia: Fix assignment in if condition 2021-06-09 17:30:28 +02:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-06-16 08:52:29 +02:00
sh
soc ASoC: Fixes for v5.14 2021-07-21 19:48:09 +02:00
sparc ALSA: sparc: Fix assignment in if condition 2021-06-09 17:30:29 +02:00
spi
synth ALSA: emux: fix spelling mistakes 2021-07-05 19:34:22 +02:00
usb ALSA: usb-audio: fix incorrect clock source setting 2021-07-24 10:06:52 +02:00
virtio ALSA: virtio: fix kernel-doc 2021-04-27 08:39:39 +02:00
x86 ALSA: x86: fix spelling mistakes 2021-07-05 19:29:28 +02:00
xen
ac97_bus.c
Kconfig
last.c
Makefile
sound_core.c