Re: [ASoC] bug in soc_pcm_open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Tue, 12 Jun 2007 11:21:47 +0530,
Nobin Mathew wrote:
> 
> Same will cause problems in ALSA also, because nobody is checking
> whether channel_min/max is zero; it is used in pcm_native.c
> 
> http://mailman.alsa-project.org/pipermail/alsa-devel/2007-June/001400.html

Yes, ALSA core layer assumes that the driver shall pass the correct
value.  Does the patch like below fix the problem?


(BTW, it'd be aprreciated if you can avoid top-citation...)

Takashi

diff -r 640ed49a540d soc/soc-core.c
--- a/soc/soc-core.c	Tue Jun 12 11:27:46 2007 +0200
+++ b/soc/soc-core.c	Tue Jun 12 14:52:25 2007 +0200
@@ -213,6 +213,7 @@ static int soc_pcm_open(struct snd_pcm_s
 			codec_dai->capture.rates & cpu_dai->capture.rates;
 	}
 
+	ret = -EINVAL; /* passed to machine_err */
 	snd_pcm_limit_hw_rates(runtime);
 	if (!runtime->hw.rates) {
 		printk(KERN_ERR "asoc: %s <-> %s No matching rates\n",
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux