From: Mark Brown Date: Thu, 31 Jul 2014 11:28:24 +0000 (+0100) Subject: ASoC: adau17x1: Convert to params_width() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2a9b1c1f4a339b8f4baf04669e63b094a255bed;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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 --- 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: