All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Torstein Hegge <hegge@resisty.net>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: usb: Parse UAC2 extension unit like for	UAC1
Date: Tue, 19 Mar 2013 18:08:15 +0100	[thread overview]
Message-ID: <s5h7gl3l3ls.wl%tiwai@suse.de> (raw)
In-Reply-To: <20130319161214.GB7539@pvv.ntnu.no>

At Tue, 19 Mar 2013 17:12:14 +0100,
Torstein Hegge wrote:
> 
> UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in
> the same way when parsing the unit. Otherwise parse_audio_unit() fails when it
> sees an extension unit on a UAC2 device.
> 
> UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1.
> 
> Signed-off-by: Torstein Hegge <hegge@resisty.net>

Does this bug hit on any existing device with 3.9-rc kernel?
If it does, it'd be nice to have a bit actual description.  Then I'm
going to merge this for the next 3.9-rc.  Otherwise it'll go to
for-next branch.


thanks,

Takashi


> ---
>  sound/usb/mixer.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
> index 638e7f7..8eb84c0 100644
> --- a/sound/usb/mixer.c
> +++ b/sound/usb/mixer.c
> @@ -725,7 +725,8 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
>  		case UAC1_PROCESSING_UNIT:
>  		case UAC1_EXTENSION_UNIT:
>  		/* UAC2_PROCESSING_UNIT_V2 */
> -		/* UAC2_EFFECT_UNIT */ {
> +		/* UAC2_EFFECT_UNIT */
> +		case UAC2_EXTENSION_UNIT_V2: {
>  			struct uac_processing_unit_descriptor *d = p1;
>  
>  			if (state->mixer->protocol == UAC_VERSION_2 &&
> @@ -2052,6 +2053,8 @@ static int parse_audio_unit(struct mixer_build *state, int unitid)
>  			return parse_audio_extension_unit(state, unitid, p1);
>  		else /* UAC_VERSION_2 */
>  			return parse_audio_processing_unit(state, unitid, p1);
> +	case UAC2_EXTENSION_UNIT_V2:
> +		return parse_audio_extension_unit(state, unitid, p1);
>  	default:
>  		snd_printk(KERN_ERR "usbaudio: unit %u: unexpected type 0x%02x\n", unitid, p1[2]);
>  		return -EINVAL;
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

  parent reply	other threads:[~2013-03-19 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 16:12 [PATCH] ALSA: usb: Parse UAC2 extension unit like for UAC1 Torstein Hegge
2013-03-19 16:24 ` Daniel Mack
2013-03-19 17:08 ` Takashi Iwai [this message]
2013-03-19 18:10   ` Torstein Hegge
2013-03-19 19:26     ` Daniel Mack
2013-03-20  7:12       ` Takashi Iwai
2013-03-20  7:45 ` Takashi Iwai

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=s5h7gl3l3ls.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=hegge@resisty.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.