~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to sound/usb/card.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
                return -EINVAL;
151
151
        }
152
152
 
 
153
        alts = &iface->altsetting[0];
 
154
        altsd = get_iface_desc(alts);
 
155
 
 
156
        /*
 
157
         * Android with both accessory and audio interfaces enabled gets the
 
158
         * interface numbers wrong.
 
159
         */
 
160
        if ((chip->usb_id == USB_ID(0x18d1, 0x2d04) ||
 
161
             chip->usb_id == USB_ID(0x18d1, 0x2d05)) &&
 
162
            interface == 0 &&
 
163
            altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC &&
 
164
            altsd->bInterfaceSubClass == USB_SUBCLASS_VENDOR_SPEC) {
 
165
                interface = 2;
 
166
                iface = usb_ifnum_to_if(dev, interface);
 
167
                if (!iface)
 
168
                        return -EINVAL;
 
169
                alts = &iface->altsetting[0];
 
170
                altsd = get_iface_desc(alts);
 
171
        }
 
172
 
153
173
        if (usb_interface_claimed(iface)) {
154
174
                snd_printdd(KERN_INFO "%d:%d:%d: skipping, already claimed\n",
155
175
                                                dev->devnum, ctrlif, interface);
156
176
                return -EINVAL;
157
177
        }
158
178
 
159
 
        alts = &iface->altsetting[0];
160
 
        altsd = get_iface_desc(alts);
161
179
        if ((altsd->bInterfaceClass == USB_CLASS_AUDIO ||
162
180
             altsd->bInterfaceClass == USB_CLASS_VENDOR_SPEC) &&
163
181
            altsd->bInterfaceSubClass == USB_SUBCLASS_MIDISTREAMING) {