提交 c60f23cb 编写于 作者: M Mark Brown

ASoC: tlv320dac33: Convert to params_width()

The CODEC doesn't care how data is laid out in memory.
Signed-off-by: NMark Brown <broonie@linaro.org>
Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
上级 bd8a5711
......@@ -832,18 +832,18 @@ static int dac33_hw_params(struct snd_pcm_substream *substream,
return -EINVAL;
}
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
switch (params_width(params)) {
case 16:
dac33->fifo_size = DAC33_FIFO_SIZE_16BIT;
dac33->burst_rate = CALC_BURST_RATE(dac33->burst_bclkdiv, 32);
break;
case SNDRV_PCM_FORMAT_S32_LE:
case 32:
dac33->fifo_size = DAC33_FIFO_SIZE_24BIT;
dac33->burst_rate = CALC_BURST_RATE(dac33->burst_bclkdiv, 64);
break;
default:
dev_err(codec->dev, "unsupported format %d\n",
params_format(params));
dev_err(codec->dev, "unsupported width %d\n",
params_width(params));
return -EINVAL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册