diff options
author | Mark Brown <broonie@linaro.org> | 2014-07-31 12:46:05 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-31 13:30:06 +0100 |
commit | dacc2aefcc8bf019af0d559561339dfef8829a10 (patch) | |
tree | 457ff3211f7c4e9ba526a79af7bbeec96a47d520 /sound | |
parent | 794f33d2fb9823adbcd99d002ea3f9eb4379ae4d (diff) | |
download | blackbird-obmc-linux-dacc2aefcc8bf019af0d559561339dfef8829a10.tar.gz blackbird-obmc-linux-dacc2aefcc8bf019af0d559561339dfef8829a10.zip |
ASoC: sgtl5000: Convert to params_width()
The CODEC doesn't care how data is laid out in memory.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 3d39f0b5b4a8..a0e1f9c67ab2 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -724,25 +724,25 @@ static int sgtl5000_pcm_hw_params(struct snd_pcm_substream *substream, return ret; /* set i2s data format */ - switch (params_format(params)) { - case SNDRV_PCM_FORMAT_S16_LE: + switch (params_width(params)) { + case 16: if (sgtl5000->fmt == SND_SOC_DAIFMT_RIGHT_J) return -EINVAL; i2s_ctl |= SGTL5000_I2S_DLEN_16 << SGTL5000_I2S_DLEN_SHIFT; i2s_ctl |= SGTL5000_I2S_SCLKFREQ_32FS << SGTL5000_I2S_SCLKFREQ_SHIFT; break; - case SNDRV_PCM_FORMAT_S20_3LE: + case 20: i2s_ctl |= SGTL5000_I2S_DLEN_20 << SGTL5000_I2S_DLEN_SHIFT; i2s_ctl |= SGTL5000_I2S_SCLKFREQ_64FS << SGTL5000_I2S_SCLKFREQ_SHIFT; break; - case SNDRV_PCM_FORMAT_S24_LE: + case 24: i2s_ctl |= SGTL5000_I2S_DLEN_24 << SGTL5000_I2S_DLEN_SHIFT; i2s_ctl |= SGTL5000_I2S_SCLKFREQ_64FS << SGTL5000_I2S_SCLKFREQ_SHIFT; break; - case SNDRV_PCM_FORMAT_S32_LE: + case 32: if (sgtl5000->fmt == SND_SOC_DAIFMT_RIGHT_J) return -EINVAL; i2s_ctl |= SGTL5000_I2S_DLEN_32 << SGTL5000_I2S_DLEN_SHIFT; |