linux/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 ALSA: sound/usb: remove CONFIG_EXPERIMENTAL 2012-10-25 00:17:47 +02:00
Makefile ALSA: snd-usb: move code from urb.c to endpoint.c 2011-09-14 17:07:03 +02:00
card.c ALSA: usb-audio: Fix autopm error during probing 2013-04-25 07:46:51 +02:00
card.h ALSA: snd-usb: add support for bit-reversed byte formats 2013-04-18 10:03:47 +02:00
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 ALSA: usb-audio: UAC2: do clock validity check earlier 2013-04-04 08:30:59 +02:00
debug.h ALSA: usb-audio: make hwc_debug a noop in case HW_CONST_DEBUG is not set 2011-05-18 11:44:35 +02:00
endpoint.c ALSA: USB: adjust for changed 3.8 USB API 2013-04-29 10:57:35 +02:00
endpoint.h ALSA: usb-audio: spelling correction 2013-04-04 08:30:30 +02:00
format.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
format.h ALSA: snd-usb: handle the bmFormats field as unsigned int 2013-03-18 08:47:04 +01:00
helper.c ALSA: snd-usb-audio: set the timeout for usb control set messages to 5000 ms 2013-04-22 10:45:02 +02:00
helper.h ALSA: usb-audio: increase control transfer timeout 2011-09-27 09:21:48 +02:00
midi.c ALSA: usb-audio: disable autopm for MIDI devices 2013-04-15 16:03:57 +02:00
midi.h ALSA: usb-audio: add support for Akai MPD16 2010-05-21 17:12:30 +02:00
mixer.c ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() 2013-03-20 08:43:00 +01:00
mixer.h ALSA: usb-audio: add control index offset 2012-11-29 08:43:12 +01:00
mixer_maps.c ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
mixer_quirks.c ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* 2013-04-07 09:44:08 +02:00
mixer_quirks.h ALSA: usb-mixer: factor out quirks 2010-03-12 12:20:26 +01:00
pcm.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
pcm.h ALSA: usb: refine delay information with USB frame counter 2011-09-12 10:30:20 +02:00
power.h ALSA: usbaudio: implement USB autosuspend 2011-03-11 14:59:29 +01:00
proc.c ALSA: pcm_format_to_bits strong-typed conversion 2013-04-29 13:36:15 +02:00
proc.h ALSA: usb-audio: refactor code 2010-03-05 08:17:14 +01:00
quirks-table.h ALSA: usb-audio: USB quirk for Yamaha THR10C 2013-04-25 07:48:21 +02:00
quirks.c ASoC: More updates for v3.10 2013-04-18 16:24:31 +02:00
quirks.h ALSA: snd-usb: add quirks handler for DSD streams 2013-04-18 10:03:53 +02:00
stream.c ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT 2013-04-25 07:33:20 +02:00
stream.h ALSA: snd-usb: re-order code 2011-09-14 17:07:02 +02:00
usbaudio.h ALSA: usb-audio: UAC2: auto clock selection module param 2013-04-04 08:31:32 +02:00