diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-11-23 11:53:14 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-11-23 17:12:26 +0300 |
commit | f6581c0e5d297cc1e0d7eb7c2603097f532e629a (patch) | |
tree | af46db60939f5b822042db7083f30fe8a9e084cf /sound/usb/stream.c | |
parent | e93e890e16ef5a0605b7cdc52b3bde50d88d7207 (diff) | |
download | linux-f6581c0e5d297cc1e0d7eb7c2603097f532e629a.tar.xz |
ALSA: usb-audio: Track implicit fb sync endpoint in audioformat list
Instead of parsing and evaluating the sync endpoint and the implicit
feedback mode at each time the audio stream is opened, let's parse it
once at the probe time, as the all needed information can be obtained
statically from the descriptor or from the quirk.
This patch extends audioformat struct to record the sync endpoint,
interface and altsetting as well as the implicit feedback flag, which
are filled at parsing the streams. Then, set_sync_endpoint() is much
simplified just to follow the already parsed data.
Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/stream.c')
-rw-r--r-- | sound/usb/stream.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/stream.c b/sound/usb/stream.c index f17913e0b5b4..7087ee2c8174 100644 --- a/sound/usb/stream.c +++ b/sound/usb/stream.c @@ -1193,6 +1193,8 @@ static int __snd_usb_parse_audio_interface(struct snd_usb_audio *chip, continue; } + snd_usb_audioformat_set_sync_ep(chip, fp); + dev_dbg(&dev->dev, "%u:%d: add audio endpoint %#x\n", iface_no, altno, fp->endpoint); if (protocol == UAC_VERSION_3) err = snd_usb_add_audio_stream_v3(chip, stream, fp, pd); |