Star64_linux/sound
Takashi Iwai 65c18b3cdb ALSA: usb-audio: Fix init call orders for UAC1
commit 5fadc941d0 upstream.

There have been reports of USB-audio driver spewing errors at the
probe time on a few devices like Jabra and Logitech.  The suggested
fix there couldn't be applied as is, unfortunately, because it'll
likely break other devices.

But, the patch suggested an interesting point: looking at the current
init code in stream.c, one may notice that it does initialize
differently from the device setup in endpoint.c.  Namely, for UAC1, we
should call snd_usb_init_pitch() and snd_usb_init_sample_rate() after
setting the interface, while the init sequence at parsing calls them
before setting the interface blindly.

This patch changes the init sequence at parsing for UAC1 (and other
devices that need a similar behavior) to be aligned with the rest of
the code, setting the interface at first.  And, this fixes the
long-standing problems on a few UAC1 devices like Jabra / Logitech,
as reported, too.

Reported-and-tested-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Closes: https://lore.kernel.org/r/202bbbc0f51522e8545783c4c5577d12a8e2d56d.camel@infinera.com
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20230821111857.28926-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-19 13:37:16 +08:00
..
ac97 bus: Make remove callback return void 2021-07-21 11:53:42 +02:00
aoa ALSA: aoa: Fix I2S device accounting 2023-04-19 17:55:53 +08:00
arm ALSA: pxa2xx: Use managed PCM buffer allocation 2021-08-04 08:08:21 +02:00
atmel ALSA: atmel: ac97: clarify operator precedence 2020-09-03 09:27:34 +02:00
core ALSA: pcm: Fix potential data race at PCM memory allocation helpers 2023-09-05 01:25:04 +08:00
drivers ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt 2023-04-19 17:57:29 +08:00
firewire ALSA: firewire-digi00x: prevent potential use after free 2023-06-06 18:39:36 +08:00
hda ALSA: hda: fix a possible null-pointer dereference due to data race in snd_hdac_regmap_sync() 2023-08-28 23:26:57 +08:00
i2c ALSA: i2c/cs8427: fix iec958 mixer control deactivation 2023-06-06 18:04:35 +08:00
isa ALSA: wavefront: Proper check of get_user() error 2023-04-19 17:48:55 +08:00
mips ALSA: n64: check return value after calling platform_get_resource() 2021-06-12 09:31:13 +02:00
oss sound/oss/dmasound: fix 'dmasound_setup' defined but not used 2023-06-06 18:37:33 +08:00
parisc parisc architecture updates for kernel 5.15: 2021-09-02 13:16:00 -07:00
pci ALSA: ymfpci: Fix the missing snd_card_free() call at probe error 2023-09-05 01:25:07 +08:00
pcmcia ALSA: vx: Manage vx_core object with devres 2021-07-19 16:17:09 +02:00
ppc ALSA: ppc: fix error return code in snd_pmac_probe() 2021-06-16 08:52:29 +02:00
sh module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
soc sound:simple card: fix cannot register pwmdac and hdmi snd card 2023-09-05 01:24:01 +08:00
sparc ALSA: sparc: Fix assignment in if condition 2021-06-09 17:30:29 +02:00
spi ALSA: spi: Add check for clk_enable() 2023-04-19 17:46:50 +08:00
synth ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control() 2023-04-19 17:59:18 +08:00
usb ALSA: usb-audio: Fix init call orders for UAC1 2023-09-19 13:37:16 +08:00
virtio ALSA: virtio: fix kernel-doc 2021-04-27 08:39:39 +02:00
x86 ALSA: intel_hdmi: Fix the missing snd_card_free() call at probe error 2023-04-19 17:47:56 +08:00
xen module: remove never implemented MODULE_SUPPORTED_DEVICE 2021-03-17 13:16:18 -07:00
ac97_bus.c ALSA: ac97: Treat snd_ac97_bus_ops as const 2020-01-03 09:24:08 +01:00
Kconfig ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
last.c [Audio: I2S & WM8960] Porting i2s to match wm8960 driver 2022-06-20 18:55:45 -07:00
Makefile ALSA: virtio: add virtio sound driver 2021-03-07 09:07:16 +01:00
sound_core.c sound: fix a memory leak bug 2019-08-08 08:18:32 +02:00