From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ALSA: usb-audio: Parse source ID of UAC2 effect unit
Date: Thu, 13 Feb 2020 12:20:59 +0100 [thread overview]
Message-ID: <20200213112059.18745-3-tiwai@suse.de> (raw)
In-Reply-To: <20200213112059.18745-1-tiwai@suse.de>
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
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
sound/usb/mixer.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
--
2.16.4
prev parent reply other threads:[~2020-02-13 11:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-13 11:20 [PATCH 0/2] ALSA: usb-audio: UAC2 effect unit parsing Takashi Iwai
2020-02-13 11:20 ` [PATCH 1/2] usb: audio-v2: Add uac2_effect_unit_descriptor definition Takashi Iwai
2020-02-17 14:18 ` Takashi Iwai
2020-02-17 14:22 ` Greg Kroah-Hartman
2020-02-17 14:25 ` Takashi Iwai
2020-02-13 11:20 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200213112059.18745-3-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).