Skip to content

Commit 0e85a22

Browse files
FrostyCoolSlugtiwai
authored andcommitted
ALSA: usb-audio: Configure sync endpoints before data
Devices such as the TC-Helicon GoXLR require the sync endpoint to be configured in advance of the data endpoint in order for sound output to work. This patch simply changes the ordering of EP configuration to resolve this. Fixes: bf6313a ("ALSA: usb-audio: Refactor endpoint management") BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=215079 Signed-off-by: Craig McLure <craig@mclure.net> Reviewed-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20220524062115.25968-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 0163717 commit 0e85a22

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

sound/usb/pcm.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,16 +439,21 @@ static int configure_endpoints(struct snd_usb_audio *chip,
439439
/* stop any running stream beforehand */
440440
if (stop_endpoints(subs, false))
441441
sync_pending_stops(subs);
442+
if (subs->sync_endpoint) {
443+
err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
444+
if (err < 0)
445+
return err;
446+
}
442447
err = snd_usb_endpoint_configure(chip, subs->data_endpoint);
443448
if (err < 0)
444449
return err;
445450
snd_usb_set_format_quirk(subs, subs->cur_audiofmt);
446-
}
447-
448-
if (subs->sync_endpoint) {
449-
err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
450-
if (err < 0)
451-
return err;
451+
} else {
452+
if (subs->sync_endpoint) {
453+
err = snd_usb_endpoint_configure(chip, subs->sync_endpoint);
454+
if (err < 0)
455+
return err;
456+
}
452457
}
453458

454459
return 0;

0 commit comments

Comments
 (0)