original_kernel/sound/usb
Eldad Zack 4ca231b2e6 ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch
Current code does this:

  be16_to_cpu(buf[i * 2] << 8 | buf[(i * 2) + 1])

Which is effectively (neglecting the index):

  be16_to_cpu(be16_to_cpu(*((u16 *) buf)))

This means the int16 in the buffer is not converted at all.

Daniel Mack confirmed that the driver works on little endian
CPUs, leading to the conclusion that the device-side structure
is actually little endian.
This changes the code to use le16_to_cpu().

Caught by sparse.

Acked-by: Daniel Mack <zonque@gmail.com>
Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-30 09:19:02 +02:00
..
6fire ALSA: USB: adjust for changed 3.8 USB API 2013-04-29 10:57:35 +02:00
caiaq ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch 2013-04-30 09:19:02 +02:00
misc ALSA: USB: adjust for changed 3.8 USB API 2013-04-29 10:57:35 +02:00
usx2y ALSA: USB: adjust for changed 3.8 USB API 2013-04-29 10:57:35 +02:00
Kconfig
Makefile
card.c ALSA: usb-audio: Fix autopm error during probing 2013-04-25 07:46:51 +02:00
card.h
clock.c ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources 2013-04-26 07:37:09 +02:00
clock.h
debug.h
endpoint.c ALSA: USB: adjust for changed 3.8 USB API 2013-04-29 10:57:35 +02:00
endpoint.h
format.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
format.h
helper.c
helper.h
midi.c
midi.h
mixer.c
mixer.h
mixer_maps.c
mixer_quirks.c
mixer_quirks.h
pcm.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
pcm.h
power.h
proc.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
proc.h
quirks-table.h ALSA: usb-audio: USB quirk for Yamaha THR10C 2013-04-25 07:48:21 +02:00
quirks.c
quirks.h
stream.c ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT 2013-04-25 07:33:20 +02:00
stream.h
usbaudio.h