diff mbox

[6/7] ASoC: tlv320dac33: Convert to params_width()

Message ID 1406808978-16175-6-git-send-email-broonie@kernel.org
State New
Headers show

Commit Message

Mark Brown July 31, 2014, 12:16 p.m. UTC
From: Mark Brown <broonie@linaro.org>

The CODEC doesn't care how data is laid out in memory.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/codecs/tlv320dac33.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Peter Ujfalusi July 31, 2014, 12:40 p.m. UTC | #1
On 07/31/2014 03:16 PM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> The CODEC doesn't care how data is laid out in memory.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  sound/soc/codecs/tlv320dac33.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
> index ff006cc95520..e21ed934bdbf 100644
> --- a/sound/soc/codecs/tlv320dac33.c
> +++ b/sound/soc/codecs/tlv320dac33.c
> @@ -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;
>  	}
>  
>
diff mbox

Patch

diff --git a/sound/soc/codecs/tlv320dac33.c b/sound/soc/codecs/tlv320dac33.c
index ff006cc95520..e21ed934bdbf 100644
--- a/sound/soc/codecs/tlv320dac33.c
+++ b/sound/soc/codecs/tlv320dac33.c
@@ -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;
 	}