From: Daniel Mack <zonque@gmail.com>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, clemens@ladisch.de, Daniel Mack <zonque@gmail.com>,
demian@auraliti.com, ray@auraliti.com, andreas@akdesigninc.com
Subject: [PATCH 1/3] ALSA: snd-usb: handle the bmFormats field as unsigned int
Date: Sun, 17 Mar 2013 20:07:24 +0800 [thread overview]
Message-ID: <1363522047-7515-2-git-send-email-zonque@gmail.com> (raw)
In-Reply-To: <1363522047-7515-1-git-send-email-zonque@gmail.com>
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>
---
sound/usb/format.c | 9 +++++----
sound/usb/format.h | 2 +-
sound/usb/stream.c | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/usb/format.c b/sound/usb/format.c
index e831ee4..b30d6fb 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;
diff --git a/sound/usb/format.h b/sound/usb/format.h
index 387924f..6f31522 100644
--- a/sound/usb/format.h
+++ b/sound/usb/format.h
@@ -2,7 +2,7 @@
#define __USBAUDIO_FORMAT_H
int snd_usb_parse_audio_format(struct snd_usb_audio *chip,
- struct audioformat *fp, int format,
+ struct audioformat *fp, unsigned int format,
struct uac_format_type_i_continuous_descriptor *fmt,
int stream, struct usb_host_interface *iface);
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index ad181d5..ad07046 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -463,7 +463,7 @@ int snd_usb_parse_audio_interface(struct snd_usb_audio *chip, int iface_no)
struct usb_host_interface *alts;
struct usb_interface_descriptor *altsd;
int i, altno, err, stream;
- int format = 0, num_channels = 0;
+ unsigned int format = 0, num_channels = 0;
struct audioformat *fp = NULL;
int num, protocol, clock = 0;
struct uac_format_type_i_continuous_descriptor *fmt;
--
1.7.10.4
next prev parent reply other threads:[~2013-03-17 12:07 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-17 12:07 [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Daniel Mack
2013-03-17 12:07 ` Daniel Mack [this message]
2013-03-17 12:07 ` [PATCH 2/3] ALSA: snd-usb: handle raw data format of UAC2 devices Daniel Mack
2013-03-17 12:07 ` [PATCH 3/3] ALSA: snd-usb: add delay quirk for "Playback Design" products Daniel Mack
2013-03-18 9:07 ` [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Takashi Iwai
2013-03-18 9:15 ` Daniel Mack
2013-03-18 9:30 ` Takashi Iwai
2013-03-18 13:49 ` Daniel Mack
2013-03-19 2:51 ` Gabriel M. Beddingfield
2013-03-19 6:48 ` Takashi Iwai
2013-03-21 21:21 ` Jussi Laako
2013-03-22 8:11 ` Daniel Mack
2013-03-22 19:37 ` Jussi Laako
2013-03-23 11:31 ` Support for DSD streams (was: Re: [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work) Daniel Mack
2013-03-23 19:53 ` Support for DSD streams Jussi Laako
[not found] ` <7.0.0.16.2.20130322082602.0605cbc0@akdesigninc.com>
2013-03-23 11:50 ` Support for DSD streams (was: Re: [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work) Daniel Mack
[not found] ` <7.0.0.16.2.20130323101939.0605d748@akdesigninc.com>
2013-03-23 18:43 ` Support for DSD streams Daniel Mack
[not found] ` <7.0.0.16.2.20130323182911.0605db20@akdesigninc.com>
2013-03-27 9:53 ` Daniel Mack
2013-03-23 20:01 ` [PATCH 0/3] ALSA: snd-usb: Some small fixes to make Playback Design products work Jussi Laako
[not found] ` <7.0.0.16.2.20130323183543.0605ddb0@akdesigninc.com>
2013-03-24 10:50 ` Jussi Laako
2013-03-26 19:34 ` Daniel Mack
2013-03-28 0:10 ` Jussi Laako
2013-03-26 19:58 ` Daniel Mack
[not found] ` <7.0.0.16.2.20130326224120.13b063e0@akdesigninc.com>
2013-03-27 9:45 ` Clemens Ladisch
2013-03-27 9:48 ` Daniel Mack
[not found] ` <7.0.0.16.2.20130327080219.13b06900@akdesigninc.com>
2013-03-27 18:22 ` Daniel Mack
2013-03-27 23:48 ` Jussi Laako
2013-03-28 0:00 ` Jussi Laako
2013-03-27 19:02 ` Daniel Mack
[not found] ` <7.0.0.16.2.20130321181551.0605bc60@akdesigninc.com>
2013-03-22 10:15 ` Jussi Laako
2013-03-22 10:23 ` Takashi Iwai
2013-03-22 11:08 ` Jussi Laako
2013-03-19 2:37 ` Gabriel M. Beddingfield
2013-03-19 6:49 ` Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363522047-7515-2-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=andreas@akdesigninc.com \
--cc=clemens@ladisch.de \
--cc=demian@auraliti.com \
--cc=ray@auraliti.com \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox