From d2a9b1c1f4a339b8f4baf04669e63b094a255bed Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 31 Jul 2014 12:28:24 +0100 Subject: [PATCH] ASoC: adau17x1: 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 --- sound/soc/codecs/adau17x1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/adau17x1.c b/sound/soc/codecs/adau17x1.c index 2961fae9670a..0b659704e60c 100644 --- a/sound/soc/codecs/adau17x1.c +++ b/sound/soc/codecs/adau17x1.c @@ -359,14 +359,14 @@ static int adau17x1_hw_params(struct snd_pcm_substream *substream, if (adau->dai_fmt != SND_SOC_DAIFMT_RIGHT_J) return 0; - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: + switch (params_width(params)) { + case 16: val = ADAU17X1_SERIAL_PORT1_DELAY16; break; - case SNDRV_PCM_FORMAT_S24_LE: + case 24: val = ADAU17X1_SERIAL_PORT1_DELAY8; break; - case SNDRV_PCM_FORMAT_S32_LE: + case 32: val = ADAU17X1_SERIAL_PORT1_DELAY0; break; default: