From: Daniel Mack <daniel@caiaq.de>
To: alsa-devel@alsa-project.org
Cc: tiwai@suse.de, alexlee188@gmail.com, clemens@ladisch.de
Subject: [PATCH 1/4] ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2()
Date: Fri, 11 Jun 2010 17:34:19 +0200 [thread overview]
Message-ID: <1276270462-12901-1-git-send-email-daniel@caiaq.de> (raw)
In-Reply-To: <20100611151829.GE17833@buzzloop.caiaq.de>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
---
sound/usb/format.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 5367cd1..df5b29f 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -218,6 +218,12 @@ static int parse_audio_format_rates_v2(struct snd_usb_audio *chip,
int i, nr_rates, data_size, ret = 0;
int clock = snd_usb_clock_find_source(chip, chip->ctrl_intf, fp->clock);
+ if (clock < 0) {
+ snd_printk(KERN_ERR "%s(): unable to find clock source (clock %d)\n",
+ __func__, clock);
+ goto err;
+ }
+
/* get the number of sample rates first by only fetching 2 bytes */
ret = snd_usb_ctl_msg(dev, usb_rcvctrlpipe(dev, 0), UAC2_CS_RANGE,
USB_TYPE_CLASS | USB_RECIP_INTERFACE | USB_DIR_IN,
--
1.7.1
next prev parent reply other threads:[~2010-06-11 15:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 13:33 usb-audio: some UAC2 fixes Daniel Mack
2010-06-11 13:33 ` [PATCH 1/4] ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2() Daniel Mack
2010-06-11 13:33 ` [PATCH 2/4] ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE Daniel Mack
2010-06-11 13:33 ` [PATCH 3/4] ALSA: usb-audio: parse UAC2 sample rate ranges correctly Daniel Mack
[not found] ` <AANLkTin3LMCu_f2emsh6kAT8H6G3zKF8Ud-ZUMpZjbmg@mail.gmail.com>
2010-06-11 15:04 ` Daniel Mack
2010-06-11 15:14 ` Clemens Ladisch
2010-06-11 15:18 ` Daniel Mack
2010-06-11 15:34 ` Daniel Mack [this message]
2010-06-11 16:10 ` [PATCH 1/4] ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2() Takashi Iwai
2010-06-11 15:34 ` [PATCH 2/4] ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE Daniel Mack
2010-06-11 15:34 ` [PATCH 3/4] ALSA: usb-audio: parse UAC2 sample rate ranges correctly Daniel Mack
2010-06-11 15:43 ` Takashi Iwai
2010-06-11 15:46 ` Daniel Mack
2010-06-11 15:54 ` Takashi Iwai
2010-06-11 15:34 ` [PATCH 4/4] ALSA: usb-audio: fix UAC2 control value queries Daniel Mack
2010-06-11 15:18 ` [PATCH 3/4] ALSA: usb-audio: parse UAC2 sample rate ranges correctly Mark Brown
2010-06-14 12:41 ` Daniel Mack
2010-06-11 13:33 ` [PATCH 4/4] ALSA: usb-audio: fix UAC2 control value queries Daniel Mack
2010-06-11 13:51 ` Daniel Mack
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=1276270462-12901-1-git-send-email-daniel@caiaq.de \
--to=daniel@caiaq.de \
--cc=alexlee188@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=clemens@ladisch.de \
--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;
as well as URLs for NNTP newsgroup(s).