diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-02-13 12:20:59 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-02-17 15:30:16 +0100 |
commit | 60081b35c68ba6a466dee08de581be06999c930a (patch) | |
tree | 6ca474dacb98db239941d4c6dba293082c966b17 /sound/usb/mixer.c | |
parent | usb: audio-v2: Add uac2_effect_unit_descriptor definition (diff) | |
download | linux-60081b35c68ba6a466dee08de581be06999c930a.tar.xz linux-60081b35c68ba6a466dee08de581be06999c930a.zip |
ALSA: usb-audio: Parse source ID of UAC2 effect unit
During parsing the input source, we currently cut off at the Effect
Unit node without parsing further its source id. It's no big problem,
so far, but it should be more consistent to parse it properly.
This patch adds the recursive parsing in parse_term_effect_unit().
It doesn't add anything in the audio unit parser itself, and the
effect unit itself is still skipped, though.
BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206147
Link: https://lore.kernel.org/r/20200213112059.18745-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index 81b2db0edd5f..56d0878e4999 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c @@ -901,6 +901,12 @@ static int parse_term_effect_unit(struct mixer_build *state, struct usb_audio_term *term, void *p1, int id) { + struct uac2_effect_unit_descriptor *d = p1; + int err; + + err = __check_input_term(state, d->bSourceID, term); + if (err < 0) + return err; term->type = UAC3_EFFECT_UNIT << 16; /* virtual type */ term->id = id; return 0; |