aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2010-04-23 03:09:58 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-04-26 10:16:23 -0400
commit55abb59c9a03d3aceda61e97b5ff19d9274fc611 (patch)
treef18d386422691c636c0d3ffd76aaa4a873b84641 /sound/soc
parentf4d593280652025f797d432e90f49d49b9334689 (diff)
ASoC: tlv320dac33: Skip calculations in FIFO Bypass mode
There is no need for calculations for FIFO bypass mode. Just in case set the nsample maximum limit, which has been done in the calculation phase. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/tlv320dac33.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index 520377bdb61c..b101cbd95740 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -889,6 +889,10 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
889 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); 889 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
890 unsigned int nsample_limit; 890 unsigned int nsample_limit;
891 891
892 /* In bypass mode we don't need to calculate */
893 if (!dac33->fifo_mode)
894 return;
895
892 /* Number of samples (16bit, stereo) in one period */ 896 /* Number of samples (16bit, stereo) in one period */
893 dac33->nsample_min = snd_pcm_lib_period_bytes(substream) / 4; 897 dac33->nsample_min = snd_pcm_lib_period_bytes(substream) / 4;
894 898
@@ -1244,6 +1248,7 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client,
1244 dac33->keep_bclk = pdata->keep_bclk; 1248 dac33->keep_bclk = pdata->keep_bclk;
1245 dac33->irq = client->irq; 1249 dac33->irq = client->irq;
1246 dac33->nsample = NSAMPLE_MAX; 1250 dac33->nsample = NSAMPLE_MAX;
1251 dac33->nsample_max = NSAMPLE_MAX;
1247 /* Disable FIFO use by default */ 1252 /* Disable FIFO use by default */
1248 dac33->fifo_mode = DAC33_FIFO_BYPASS; 1253 dac33->fifo_mode = DAC33_FIFO_BYPASS;
1249 1254