提交 e231cab0 编写于 作者: M Mark Brown

ASoC: Convert WM8580 hw_params to use snd_soc_update_bits()

All the cool kids are using snd_soc_update_bits() these days.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
上级 eaae183f
...@@ -485,9 +485,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, ...@@ -485,9 +485,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct snd_soc_codec *codec = rtd->codec; struct snd_soc_codec *codec = rtd->codec;
u16 paifb = snd_soc_read(codec, WM8580_PAIF3 + dai->driver->id); u16 paifb = 0;
paifb &= ~WM8580_AIF_LENGTH_MASK;
/* bit size */ /* bit size */
switch (params_format(params)) { switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case SNDRV_PCM_FORMAT_S16_LE:
...@@ -505,7 +504,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream, ...@@ -505,7 +504,8 @@ static int wm8580_paif_hw_params(struct snd_pcm_substream *substream,
return -EINVAL; return -EINVAL;
} }
snd_soc_write(codec, WM8580_PAIF3 + dai->driver->id, paifb); snd_soc_update_bits(codec, WM8580_PAIF3 + dai->driver->id,
WM8580_AIF_LENGTH_MASK, paifb);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册