]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints
authorTakashi Iwai <tiwai@suse.de>
Mon, 18 Jan 2021 07:58:14 +0000 (08:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 18 Jan 2021 08:37:53 +0000 (09:37 +0100)
commit86699e240f77dac52a72d1e06738d0acae821dc0
tree2a4d6216e51be7c1177cc4b7f9293faa6c03c926
parent961890c18436f0585699a4fa59156650ecbf952d
ALSA: usb-audio: Fix UAC1 rate setup for secondary endpoints

The current sample rate setup function for UAC1 assumes only the first
endpoint retrieved from the interface:altset pair, but the rate set up
may be needed also for the secondary endpoint.  Also, retrieving the
endpoint number from the interface descriptor is redundant; we have
already the target endpoint in the given audioformat object.

This patch simplifies the code and corrects the target endpoint as
described in the above.  It simply refers to fmt->endpoint directly.

Also, this patch drops the pioneer_djm_set_format_quirk() that is
caleld from snd_usb_set_format_quirk(); this function does the sample
rate setup but for the capture endpoint (0x82), and that's exactly
what the change above fixes.

Link: https://lore.kernel.org/r/20210118075816.25068-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/clock.c
sound/usb/quirks.c