Skip to content

Commit fe773b8

Browse files
committed
ALSA: usb-audio: workaround for iface reset issue
The recently introduced sample rate validation code seems causing a problem on some devices; namely, after performing this, the bus gets screwed and it influences even on other USB devices. As a quick workaround, perform it only for the necessary devices; currently MOTU devices are known to need the valid altset checks, so filter out other devices. Fixes: 93db51d ("ALSA: usb-audio: Check valid altsetting at parsing rates for UAC2/3") Reported-by: Jamie Heilman <[email protected]> BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1178203 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 23b53d4 commit fe773b8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sound/usb/format.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,17 @@ static int validate_sample_rate_table_v2v3(struct snd_usb_audio *chip,
466466
unsigned int nr_rates;
467467
int i, err;
468468

469+
/* performing the rate verification may lead to unexpected USB bus
470+
* behavior afterwards by some unknown reason. Do this only for the
471+
* known devices.
472+
*/
473+
switch (USB_ID_VENDOR(chip->usb_id)) {
474+
case 0x07fd: /* MOTU */
475+
break;
476+
default:
477+
return 0; /* don't perform the validation as default */
478+
}
479+
469480
table = kcalloc(fp->nr_rates, sizeof(*table), GFP_KERNEL);
470481
if (!table)
471482
return -ENOMEM;

0 commit comments

Comments
 (0)