From 2fcdb06d4919da89ed6d52742dcc83ae4669ac30 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Sun, 17 Mar 2013 20:07:24 +0800 Subject: 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 Reported-by: Andreas Koch Signed-off-by: Takashi Iwai --- sound/usb/format.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sound/usb/format.c') 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 @@ */ static u64 parse_audio_format_i_type(struct snd_usb_audio *chip, struct audioformat *fp, - int format, void *_fmt, + unsigned int format, void *_fmt, int protocol) { int sample_width, sample_bytes; @@ -353,7 +353,7 @@ err: * parse the format type I and III descriptors */ static int parse_audio_format_i(struct snd_usb_audio *chip, - struct audioformat *fp, int format, + struct audioformat *fp, unsigned int format, struct uac_format_type_i_continuous_descriptor *fmt, struct usb_host_interface *iface) { @@ -473,8 +473,9 @@ static int parse_audio_format_ii(struct snd_usb_audio *chip, return ret; } -int snd_usb_parse_audio_format(struct snd_usb_audio *chip, struct audioformat *fp, - int format, struct uac_format_type_i_continuous_descriptor *fmt, +int snd_usb_parse_audio_format(struct snd_usb_audio *chip, + struct audioformat *fp, unsigned int format, + struct uac_format_type_i_continuous_descriptor *fmt, int stream, struct usb_host_interface *iface) { int err; -- cgit v1.2.3