diff mbox

[1/2] ASoC: ssm2518: Convert to params_width()

Message ID 1406809099-18597-1-git-send-email-broonie@kernel.org
State New
Headers show

Commit Message

Mark Brown July 31, 2014, 12:18 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/ssm2518.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Lars-Peter Clausen July 31, 2014, 12:19 p.m. UTC | #1
On 07/31/2014 02:18 PM, Mark Brown wrote:
> 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>

Acked-by: Lars-Peter Clausen <lars@metafoo.de>

Thanks.

> ---
>   sound/soc/codecs/ssm2518.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
> index 56adb3e2def9..e8680bea5f86 100644
> --- a/sound/soc/codecs/ssm2518.c
> +++ b/sound/soc/codecs/ssm2518.c
> @@ -361,11 +361,11 @@ static int ssm2518_hw_params(struct snd_pcm_substream *substream,
>   		return -EINVAL;
>
>   	if (ssm2518->right_j) {
> -		switch (params_format(params)) {
> -		case SNDRV_PCM_FORMAT_S16_LE:
> +		switch (params_width(params)) {
> +		case 16:
>   			ctrl1 |= SSM2518_SAI_CTRL1_FMT_RJ_16BIT;
>   			break;
> -		case SNDRV_PCM_FORMAT_S24_LE:
> +		case 24:
>   			ctrl1 |= SSM2518_SAI_CTRL1_FMT_RJ_24BIT;
>   			break;
>   		default:
>
diff mbox

Patch

diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c
index 56adb3e2def9..e8680bea5f86 100644
--- a/sound/soc/codecs/ssm2518.c
+++ b/sound/soc/codecs/ssm2518.c
@@ -361,11 +361,11 @@  static int ssm2518_hw_params(struct snd_pcm_substream *substream,
 		return -EINVAL;
 
 	if (ssm2518->right_j) {
-		switch (params_format(params)) {
-		case SNDRV_PCM_FORMAT_S16_LE:
+		switch (params_width(params)) {
+		case 16:
 			ctrl1 |= SSM2518_SAI_CTRL1_FMT_RJ_16BIT;
 			break;
-		case SNDRV_PCM_FORMAT_S24_LE:
+		case 24:
 			ctrl1 |= SSM2518_SAI_CTRL1_FMT_RJ_24BIT;
 			break;
 		default: