]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: work around Android accessory firmware bug
authorClemens Ladisch <clemens@ladisch.de>
Sat, 15 Jun 2013 09:21:09 +0000 (11:21 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 17 Jun 2013 07:56:52 +0000 (09:56 +0200)
commit20f223f26e1789803e4f9d7b9f5d350954c0a432
treef8cf67d4967a15d35089bf750f0ff82a90ed1725
parentb7a4958df1d998e2390d8df55709088b430da7c9
ALSA: usb-audio: work around Android accessory firmware bug

When the Android firmware enables the audio interfaces in accessory
mode, it always declares in the control interface's baInterfaceNr array
that interfaces 0 and 1 belong to the audio function.  However, the
accessory interface itself, if also enabled, already is at index 0 and
shifts the actual audio interface numbers to 1 and 2, which prevents the
PCM streaming interface from being seen by the host driver.

To get the PCM interface interface to work, detect when the descriptors
point to the (for this driver useless) accessory interface, and redirect
to the correct one.

Reported-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Tested-by: Jeremy Rosen <jeremy.rosen@openwide.fr>
Cc: <stable@vger.kernel.org>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/card.c