aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/format.c
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2013-03-17 08:07:24 -0400
committerTakashi Iwai <tiwai@suse.de>2013-03-18 03:47:04 -0400
commit2fcdb06d4919da89ed6d52742dcc83ae4669ac30 (patch)
tree02cefac4b439af920296a6e9d6a0655ef0bc5dee /sound/usb/format.c
parent59ea586f54f27fde1202214f1525713356a44918 (diff)
ALSA: snd-usb: handle the bmFormats field as unsigned int
This field may use up to 32 bits, so it should be handled as unsigned int. Signed-off-by: Daniel Mack <zonque@gmail.com> Reported-by: Andreas Koch <andreas@akdesigninc.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/format.c')
-rw-r--r--sound/usb/format.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/usb/format.c b/sound/usb/format.c
index e831ee4238bb..b30d6fb89b40 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -43,7 +43,7 @@
43 */ 43 */
44static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, 44static u64 parse_audio_format_i_type(struct snd_usb_audio *chip,
45 struct audioformat *fp, 45 struct audioformat *fp,
46 int format, void *_fmt, 46 unsigned int format, void *_fmt,
47 int protocol) 47 int protocol)
48{ 48{
49 int sample_width, sample_bytes; 49 int sample_width, sample_bytes;
@@ -353,7 +353,7 @@ err:
353 * parse the format type I and III descriptors 353 * parse the format type I and III descriptors
354 */ 354 */
355static int parse_audio_format_i(struct snd_usb_audio *chip, 355static int parse_audio_format_i(struct snd_usb_audio *chip,
356 struct audioformat *fp, int format, 356 struct audioformat *fp, unsigned int format,
357 struct uac_format_type_i_continuous_descriptor *fmt, 357 struct uac_format_type_i_continuous_descriptor *fmt,
358 struct usb_host_interface *iface) 358 struct usb_host_interface *iface)
359{ 359{
@@ -473,8 +473,9 @@ static int parse_audio_format_ii(struct snd_usb_audio *chip,
473 return ret; 473 return ret;
474} 474}
475 475
476int snd_usb_parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp, 476int snd_usb_parse_audio_format(struct snd_usb_audio *chip,
477 int format, struct uac_format_type_i_continuous_descriptor *fmt, 477 struct audioformat *fp, unsigned int format,
478 struct uac_format_type_i_continuous_descriptor *fmt,
478 int stream, struct usb_host_interface *iface) 479 int stream, struct usb_host_interface *iface)
479{ 480{
480 int err; 481 int err;