Patchwork [quantal,SRU] ALSA: usb: Parse UAC2 extension unit like for UAC1

login
register
mail settings
Submitter Chris J Arges
Date Aug. 14, 2013, 9:31 p.m.
Message ID <520BF726.6000206@canonical.com>
Download mbox | patch
Permalink /patch/267204/
State New
Headers show

Comments

Chris J Arges - Aug. 14, 2013, 9:31 p.m.
BugLink: http://bugs.launchpad.net/bugs/1212430

SRU Justification:

    Impact: Users of the 3.5 kernel may not be able to use their
usbaudio devices.
    Fix: commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream. This
is already applied to 3.2 and 3.8 kernels via stable updates.
    Testcase: Build with the fix, attach affected usbaudio devices. See
if those devices work after the patch.
Stefan Bader - Aug. 15, 2013, 7:29 a.m.
On 14.08.2013 23:31, Chris J Arges wrote:
> BugLink: http://bugs.launchpad.net/bugs/1212430
> 
> SRU Justification:
> 
>     Impact: Users of the 3.5 kernel may not be able to use their
> usbaudio devices.
>     Fix: commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream. This
> is already applied to 3.2 and 3.8 kernels via stable updates.
>     Testcase: Build with the fix, attach affected usbaudio devices. See
> if those devices work after the patch.
> 
> 
> 
Looks to be reasonable. Though I guess Luis will just pick that up into 3.5
anyway...
Luis Henriques - Aug. 15, 2013, 9:20 a.m.
Hi Chris,

Chris J Arges <chris.j.arges@canonical.com> writes:

> BugLink: http://bugs.launchpad.net/bugs/1212430
>
> SRU Justification:
>
>     Impact: Users of the 3.5 kernel may not be able to use their
> usbaudio devices.
>     Fix: commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream. This
> is already applied to 3.2 and 3.8 kernels via stable updates.
>     Testcase: Build with the fix, attach affected usbaudio devices. See
> if those devices work after the patch.

This commit is tagged for stable but it looks like I missed it for the
3.5 kernel.  So, as Stefan already hinted, I'll queue it for the 3.5
kernel.

Btw, I can see this patch is in 3.8 kernel (and thus in Raring) but I
couldn't find in 3.2.  If you think its relevant for this kernel,
maybe its worth sending a request to stable mailing list.

Cheers,
Tim Gardner - Aug. 15, 2013, 12:20 p.m.

Chris J Arges - Aug. 15, 2013, 12:27 p.m.
On 08/15/2013 04:20 AM, Luis Henriques wrote:
> Hi Chris,
> 
> Chris J Arges <chris.j.arges@canonical.com> writes:
> 
>> BugLink: http://bugs.launchpad.net/bugs/1212430
>>
>> SRU Justification:
>>
>>     Impact: Users of the 3.5 kernel may not be able to use their
>> usbaudio devices.
>>     Fix: commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b upstream. This
>> is already applied to 3.2 and 3.8 kernels via stable updates.
>>     Testcase: Build with the fix, attach affected usbaudio devices. See
>> if those devices work after the patch.
> 
> This commit is tagged for stable but it looks like I missed it for the
> 3.5 kernel.  So, as Stefan already hinted, I'll queue it for the 3.5
> kernel.
> 
> Btw, I can see this patch is in 3.8 kernel (and thus in Raring) but I
> couldn't find in 3.2.  If you think its relevant for this kernel,
> maybe its worth sending a request to stable mailing list.
> 
> Cheers,

Looking at this in the morning I don't see the patch either in
precise/3.2. I'll work on pushing this patch to stable 3.2 as well if it
is relevant.
Thanks,
--chris

Patch

From 37f4387da71adc84a723f6d7a036cfefa0e59a2d Mon Sep 17 00:00:00 2001
From: Torstein Hegge <hegge@resisty.net>
Date: Tue, 19 Mar 2013 17:12:14 +0100
Subject: [PATCH] ALSA: usb: Parse UAC2 extension unit like for UAC1

BugLink: http://bugs.launchpad.net/bugs/1212430

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>
Acked-by: Daniel Mack <zonque@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 61ac51301e6c6d4ed977d7674ce2b8e713619a9b)

Conflicts:

	sound/usb/mixer.c

Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
---
 sound/usb/mixer.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 3e513a8..9c6a7fe 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -720,7 +720,10 @@  static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
 			return 0;
 		}
 		case UAC1_PROCESSING_UNIT:
-		case UAC1_EXTENSION_UNIT: {
+		case UAC1_EXTENSION_UNIT:
+		/* UAC2_PROCESSING_UNIT_V2 */
+		/* UAC2_EFFECT_UNIT */
+		case UAC2_EXTENSION_UNIT_V2: {
 			struct uac_processing_unit_descriptor *d = p1;
 			if (d->bNrInPins) {
 				id = d->baSourceID[0];
@@ -1983,6 +1986,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.9.5