aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-08 14:48:20 -0500
committerMark Brown <broonie@linaro.org>2014-01-13 06:45:50 -0500
commit1b6b0dfac283635eebf92b3bbb62ae5be898cea0 (patch)
tree445194625202631bacaf0035fb22115db5fbcc11
parent2dad2283c5c1aaef5467e4cda67110ee236d7726 (diff)
ASoC: cs42l51: Use params_width() rather than memory format
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/cs42l51.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 1e0fa3b5f79a..6e9ea8379a91 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -423,21 +423,17 @@ static int cs42l51_hw_params(struct snd_pcm_substream *substream,
423 intf_ctl |= CS42L51_INTF_CTL_DAC_FORMAT(CS42L51_DAC_DIF_LJ24); 423 intf_ctl |= CS42L51_INTF_CTL_DAC_FORMAT(CS42L51_DAC_DIF_LJ24);
424 break; 424 break;
425 case SND_SOC_DAIFMT_RIGHT_J: 425 case SND_SOC_DAIFMT_RIGHT_J:
426 switch (params_format(params)) { 426 switch (params_width(params)) {
427 case SNDRV_PCM_FORMAT_S16_LE: 427 case 16:
428 case SNDRV_PCM_FORMAT_S16_BE:
429 fmt = CS42L51_DAC_DIF_RJ16; 428 fmt = CS42L51_DAC_DIF_RJ16;
430 break; 429 break;
431 case SNDRV_PCM_FORMAT_S18_3LE: 430 case 18:
432 case SNDRV_PCM_FORMAT_S18_3BE:
433 fmt = CS42L51_DAC_DIF_RJ18; 431 fmt = CS42L51_DAC_DIF_RJ18;
434 break; 432 break;
435 case SNDRV_PCM_FORMAT_S20_3LE: 433 case 20:
436 case SNDRV_PCM_FORMAT_S20_3BE:
437 fmt = CS42L51_DAC_DIF_RJ20; 434 fmt = CS42L51_DAC_DIF_RJ20;
438 break; 435 break;
439 case SNDRV_PCM_FORMAT_S24_LE: 436 case 24:
440 case SNDRV_PCM_FORMAT_S24_BE:
441 fmt = CS42L51_DAC_DIF_RJ24; 437 fmt = CS42L51_DAC_DIF_RJ24;
442 break; 438 break;
443 default: 439 default: