Title: [6701] trunk/sound/soc/codecs/ssm2602.c: task[#2424]set the constraints only if the parameter value is not 0
Revision
6701
Author
cliff
Date
2009-06-14 21:51:58 -0500 (Sun, 14 Jun 2009)

Log Message

task[#2424]set the constraints only if the parameter value is not 0

Modified Paths

Diff

Modified: trunk/sound/soc/codecs/ssm2602.c (6700 => 6701)


--- trunk/sound/soc/codecs/ssm2602.c	2009-06-15 02:48:07 UTC (rev 6700)
+++ trunk/sound/soc/codecs/ssm2602.c	2009-06-15 02:51:58 UTC (rev 6701)
@@ -335,13 +335,13 @@
 		dev_dbg(&i2c->dev, "Constraining to %d bits at %dHz\n",
 			master_runtime->sample_bits,
 			master_runtime->rate);
-
-		snd_pcm_hw_constraint_minmax(substream->runtime,
+		if (master_runtime->rate != 0)
+			snd_pcm_hw_constraint_minmax(substream->runtime,
 					     SNDRV_PCM_HW_PARAM_RATE,
 					     master_runtime->rate,
 					     master_runtime->rate);
-
-		snd_pcm_hw_constraint_minmax(substream->runtime,
+		if (master_runtime->sample_bits != 0)
+			snd_pcm_hw_constraint_minmax(substream->runtime,
 					     SNDRV_PCM_HW_PARAM_SAMPLE_BITS,
 					     master_runtime->sample_bits,
 					     master_runtime->sample_bits);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to