linux/sound/usb
Eldad Zack 889d66848b ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_*
The usb_control_msg() function expects __u16 types and performs
the endianness conversions by itself.
However, in three places, a conversion is performed before it is
handed over to usb_control_msg(), which leads to a double conversion
(= no conversion):
* snd_usb_nativeinstruments_boot_quirk()
* snd_nativeinstruments_control_get()
* snd_nativeinstruments_control_put()

Caught by sparse:

sound/usb/mixer_quirks.c:512:38: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:512:38:    expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:512:38:    got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:35: warning: incorrect type in argument 5 (different base types)
sound/usb/mixer_quirks.c:543:35:    expected unsigned short [unsigned] [usertype] value
sound/usb/mixer_quirks.c:543:35:    got restricted __le16 [usertype] <noident>
sound/usb/mixer_quirks.c:543:56: warning: incorrect type in argument 6 (different base types)
sound/usb/mixer_quirks.c:543:56:    expected unsigned short [unsigned] [usertype] index
sound/usb/mixer_quirks.c:543:56:    got restricted __le16 [usertype] <noident>
sound/usb/quirks.c:502:35: warning: incorrect type in argument 5 (different base types)
sound/usb/quirks.c:502:35:    expected unsigned short [unsigned] [usertype] value
sound/usb/quirks.c:502:35:    got restricted __le16 [usertype] <noident>

Signed-off-by: Eldad Zack <eldad@fogrefinery.com>
Acked-by: Daniel Mack <zonque@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-04-07 09:44:08 +02:00
..
6fire
caiaq
misc
usx2y
card.c ALSA: usb-audio: add a workaround for the NuForce UDH-100 2013-03-12 08:35:30 +01:00
card.h
clock.c ALSA: usb: Work around CM6631 sample rate change bug 2013-04-03 17:05:44 +02:00
clock.h
debug.h
endpoint.c
endpoint.h
format.c
format.h
helper.c
helper.h
Kconfig
Makefile
midi.c
midi.h
mixer.c ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() 2013-03-20 08:43:00 +01:00
mixer.h
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
pcm.c ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
pcm.h
power.h
proc.c
proc.h
quirks-table.h ALSA: usb-audio: add support for M-Audio FT C600 2013-02-11 14:02:27 +01:00
quirks.c ALSA: usb-audio: fix endianness bug in snd_nativeinstruments_* 2013-04-07 09:44:08 +02:00
quirks.h
stream.c
stream.h
usbaudio.h