提交 0caf3eb7 编写于 作者: M Mark Brown

ASoC: 88pm860x: Convert to params_width()

The CODEC doesn't care how data is laid out in memory.
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 7171511e
...@@ -945,11 +945,11 @@ static int pm860x_pcm_hw_params(struct snd_pcm_substream *substream, ...@@ -945,11 +945,11 @@ static int pm860x_pcm_hw_params(struct snd_pcm_substream *substream,
unsigned char inf = 0, mask = 0; unsigned char inf = 0, mask = 0;
/* bit size */ /* bit size */
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
inf &= ~PCM_INF2_18WL; inf &= ~PCM_INF2_18WL;
break; break;
case SNDRV_PCM_FORMAT_S18_3LE: case 18:
inf |= PCM_INF2_18WL; inf |= PCM_INF2_18WL;
break; break;
default: default:
...@@ -1044,11 +1044,11 @@ static int pm860x_i2s_hw_params(struct snd_pcm_substream *substream, ...@@ -1044,11 +1044,11 @@ static int pm860x_i2s_hw_params(struct snd_pcm_substream *substream,
unsigned char inf; unsigned char inf;
/* bit size */ /* bit size */
switch (params_format(params)) { switch (params_width(params)) {
case SNDRV_PCM_FORMAT_S16_LE: case 16:
inf = 0; inf = 0;
break; break;
case SNDRV_PCM_FORMAT_S18_3LE: case 18:
inf = PCM_INF2_18WL; inf = PCM_INF2_18WL;
break; break;
default: default:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册