From: Mark Brown Date: Thu, 31 Jul 2014 11:47:05 +0000 (+0100) Subject: ASoC: ssm2518: Convert to params_width() X-Git-Tag: v4.9.8~5643^2~37^2~1^3~44 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=560cfb14c6d7f219904ba4b81c0a581ffd7870ea;p=platform%2Fkernel%2Flinux-rpi3.git ASoC: ssm2518: Convert to params_width() The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown Acked-by: Lars-Peter Clausen --- diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index 56adb3e..e8680be 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: