From: Gregor Jasny <jasny@vidsoft.de>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: Need help with patch for #2724 (usbaudio, core)
Date: Wed, 31 Jan 2007 12:22:19 +0100 [thread overview]
Message-ID: <45C07BEB.1050209@vidsoft.de> (raw)
In-Reply-To: <s5hbqkgv4eu.wl%tiwai@suse.de>
[-- Attachment #1: Type: text/plain, Size: 618 bytes --]
Takashi Iwai wrote:
> This is the right fix, too. Of course, pcm-core should be more
> robust, but the cause of the bug is the bogus entry.
Your patch does not change anything. I've enabled
CONFIG_SND_VERBOSE_PRINTK, CONFIG_SND_DEBUG and CONFIG_SND_DEBUG_DETECT
in the kernel config.
None of your snd_printd output gets triggered. I've placed a test output
in pcm-native, so debugging works.
Note that I've applied your patch to 2.6.19.2.
> The patch looks fine to me. Please provide a proper changelog and a
> sign-off for merging.
Done. The patch is against the current hg snapshot of alsa-kernel.
Gregor
[-- Attachment #2: prevent-zero-rates.diff --]
[-- Type: text/plain, Size: 1239 bytes --]
From: Gregor Jasny <gjasny@web.de>
This is a patch for ALSA Bug #2724. Some webcams provide bogus
settings with no valid rates. With this patch those are skipped.
Signed-off-by: Gregor Jasny <gjasny@web.de>
diff -r b4265ee02e26 usb/usbaudio.c
--- a/usb/usbaudio.c Wed Jan 31 10:35:19 2007 +0100
+++ b/usb/usbaudio.c Wed Jan 31 12:20:29 2007 +0100
@@ -2463,6 +2463,7 @@ static int parse_audio_format_rates(stru
* build the rate table and bitmap flags
*/
int r, idx, c;
+ unsigned int nonzero_rates = 0;
/* this table corresponds to the SNDRV_PCM_RATE_XXX bit */
static unsigned int conv_rates[] = {
5512, 8000, 11025, 16000, 22050, 32000, 44100, 48000,
@@ -2485,6 +2486,7 @@ static int parse_audio_format_rates(stru
fp->altsetting == 5 && fp->maxpacksize == 392)
rate = 96000;
fp->rate_table[r] = rate;
+ nonzero_rates |= rate;
if (rate < fp->rate_min)
fp->rate_min = rate;
else if (rate > fp->rate_max)
@@ -2499,6 +2501,10 @@ static int parse_audio_format_rates(stru
}
if (!found)
fp->needs_knot = 1;
+ }
+ if (!nonzero_rates) {
+ hwc_debug("All rates were zero. Skipping format!\n");
+ return -1;
}
if (fp->needs_knot)
fp->rates |= SNDRV_PCM_RATE_KNOT;
[-- Attachment #3: Type: text/plain, Size: 347 bytes --]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[-- Attachment #4: Type: text/plain, Size: 161 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel
next prev parent reply other threads:[~2007-01-31 11:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-27 13:24 Need help with patch for #2724 (usbaudio, core) Gregor Jasny
2007-01-30 16:57 ` Takashi Iwai
2007-01-31 11:22 ` Gregor Jasny [this message]
2007-01-31 11:34 ` Takashi Iwai
2007-01-31 13:14 ` Gregor Jasny
2007-01-31 13:22 ` 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=45C07BEB.1050209@vidsoft.de \
--to=jasny@vidsoft.de \
--cc=alsa-devel@lists.sourceforge.net \
--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).