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>
This commit is contained in:
Родитель
f4d5932806
Коммит
55abb59c9a
|
@ -889,6 +889,10 @@ static void dac33_calculate_times(struct snd_pcm_substream *substream)
|
||||||
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
|
||||||
unsigned int nsample_limit;
|
unsigned int nsample_limit;
|
||||||
|
|
||||||
|
/* In bypass mode we don't need to calculate */
|
||||||
|
if (!dac33->fifo_mode)
|
||||||
|
return;
|
||||||
|
|
||||||
/* Number of samples (16bit, stereo) in one period */
|
/* Number of samples (16bit, stereo) in one period */
|
||||||
dac33->nsample_min = snd_pcm_lib_period_bytes(substream) / 4;
|
dac33->nsample_min = snd_pcm_lib_period_bytes(substream) / 4;
|
||||||
|
|
||||||
|
@ -1244,6 +1248,7 @@ static int __devinit dac33_i2c_probe(struct i2c_client *client,
|
||||||
dac33->keep_bclk = pdata->keep_bclk;
|
dac33->keep_bclk = pdata->keep_bclk;
|
||||||
dac33->irq = client->irq;
|
dac33->irq = client->irq;
|
||||||
dac33->nsample = NSAMPLE_MAX;
|
dac33->nsample = NSAMPLE_MAX;
|
||||||
|
dac33->nsample_max = NSAMPLE_MAX;
|
||||||
/* Disable FIFO use by default */
|
/* Disable FIFO use by default */
|
||||||
dac33->fifo_mode = DAC33_FIFO_BYPASS;
|
dac33->fifo_mode = DAC33_FIFO_BYPASS;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче