[alsa-devel] usbaudio: Support for USB audio v2.0 devices
Daniel Mack
daniel at caiaq.de
Sat May 8 11:19:47 CEST 2010
On Sat, May 08, 2010 at 11:26:03AM +0400, The Source wrote:
> 08.05.2010 00:12, Daniel Mack пишет:
> >On Fri, May 07, 2010 at 05:19:24PM +0400, The Source wrote:
> >>Bisect results:
> >>
> >>23caaf19b11eda7054348452e1618d4512a86907 is the first bad commit
> >>commit 23caaf19b11eda7054348452e1618d4512a86907
> >>Author: Daniel Mack<daniel at caiaq.de>
> >>Date: Thu Mar 11 21:13:25 2010 +0100
> >>
> >> ALSA: usb-mixer: Add support for Audio Class v2.0
> >>
> >> USB Audio Class v2.0 compliant devices have different descriptors and a
> >> different way of setting/getting min/max/res/cur properties. This patch
> >> adds support for them.
> >>
> >> Signed-off-by: Daniel Mack<daniel at caiaq.de>
> >> Cc: Clemens Ladisch<clemens at ladisch.de>
> >> Signed-off-by: Takashi Iwai<tiwai at suse.de>
> >>
> >I've found two changes in this commit that are obviously wrong.
> >Could you try the patch below please?
> >
> >Sorry for the trouble.
> >
> >Daniel
> >
> >
> >diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h
> >index 905a87c..57f2055 100644
> >--- a/include/linux/usb/audio.h
> >+++ b/include/linux/usb/audio.h
> >@@ -244,7 +244,7 @@ struct uac_selector_unit_descriptor {
> > static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc)
> > {
> > __u8 *raw = (__u8 *) desc;
> >- return raw[desc->bLength - 1];
> >+ return raw[9 + desc->bLength - 1];
> > }
> >
> > /* 4.3.2.5 Feature Unit Descriptor */
> >diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
> >index 21613fe..fa0fb77 100644
> >--- a/sound/usb/mixer.c
> >+++ b/sound/usb/mixer.c
> >@@ -656,7 +656,7 @@ static int check_input_term(struct mixer_build *state, int id, struct usb_audio_
> > case UAC_FEATURE_UNIT: {
> > /* the header is the same for v1 and v2 */
> > struct uac_feature_unit_descriptor *d = p1;
> >- id = d->bUnitID;
> >+ id = d->bSourceID;
> > break; /* continue to parse */
> > }
> > case UAC_MIXER_UNIT: {
> >
> The patch did it (applied to latest git, or so I think - I used 'git
> bisect reset' to return to latest), now the card works properly
> (both playback and record), thank you very much.
Thank you for helping - much appreciated!
Daniel
More information about the Alsa-devel
mailing list