summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2009-11-06 23:44:53 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-08 11:16:55 -0800
commit9d4cf8bdc0b80550a2c7befff56b8f57acf0f9f7 (patch)
treef0ad173cf697ce4fdbcf14de9233b60d3f159d90 /sound
parentec80577e2e409977d33649197c2ced7269d2c7c2 (diff)
ALSA: usb-audio: fix combine_word problem
commit f495088210c8b9e20791d995a8210170c68d2deb upstream. Fix combine_word problem where first octet is not read properly. The only affected place seems to be the INPUT_TERMINAL type. Before now, sound controls can be created with the output terminal's name which is a fallback mechanism used only for unknown input terminal types. For example, Line can wrongly appear as Speaker. After the change it should appear as Line. The side effect of this change can be that users can expect the wrong control name in their scripts or programs while now we return the correct one. Probably, these defines should use get_unaligned_le16 and friends. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/usbaudio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/usbaudio.h b/sound/usb/usbaudio.h
index 7191d8270c4d..c45600414e0f 100644
--- a/sound/usb/usbaudio.h
+++ b/sound/usb/usbaudio.h
@@ -209,7 +209,7 @@ struct snd_usb_midi_endpoint_info {
/*
*/
-#define combine_word(s) ((*s) | ((unsigned int)(s)[1] << 8))
+#define combine_word(s) ((*(s)) | ((unsigned int)(s)[1] << 8))
#define combine_triple(s) (combine_word(s) | ((unsigned int)(s)[2] << 16))
#define combine_quad(s) (combine_triple(s) | ((unsigned int)(s)[3] << 24))