Commit 1b6b0dfa authored by Mark Brown's avatar Mark Brown

ASoC: cs42l51: Use params_width() rather than memory format

Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 2dad2283
...@@ -423,21 +423,17 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream, ...@@ -423,21 +423,17 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
intf_ctl |= CS42L51_INTF_CTL_DAC_FORMAT(CS42L51_DAC_DIF_LJ24); intf_ctl |= CS42L51_INTF_CTL_DAC_FORMAT(CS42L51_DAC_DIF_LJ24);
break; break;
case SND_SOC_DAIFMT_RIGHT_J: case SND_SOC_DAIFMT_RIGHT_J:
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
case SNDRV_PCM_FORMAT_S16_BE:
fmt = CS42L51_DAC_DIF_RJ16; fmt = CS42L51_DAC_DIF_RJ16;
break; break;
case SNDRV_PCM_FORMAT_S18_3LE: case 18:
case SNDRV_PCM_FORMAT_S18_3BE:
fmt = CS42L51_DAC_DIF_RJ18; fmt = CS42L51_DAC_DIF_RJ18;
break; break;
case SNDRV_PCM_FORMAT_S20_3LE: case 20:
case SNDRV_PCM_FORMAT_S20_3BE:
fmt = CS42L51_DAC_DIF_RJ20; fmt = CS42L51_DAC_DIF_RJ20;
break; break;
case SNDRV_PCM_FORMAT_S24_LE: case 24:
case SNDRV_PCM_FORMAT_S24_BE:
fmt = CS42L51_DAC_DIF_RJ24; fmt = CS42L51_DAC_DIF_RJ24;
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment