forked from Minki/linux
ASoC: wm8741: Convert to params_width()
The CODEC doesn't care how data is laid out in memory. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
This commit is contained in:
parent
a5d0de23b2
commit
34967ad242
@ -241,26 +241,26 @@ static int wm8741_hw_params(struct snd_pcm_substream *substream,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* bit size */
|
/* bit size */
|
||||||
switch (params_format(params)) {
|
switch (params_width(params)) {
|
||||||
case SNDRV_PCM_FORMAT_S16_LE:
|
case 16:
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_FORMAT_S20_3LE:
|
case 20:
|
||||||
iface |= 0x0001;
|
iface |= 0x0001;
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_FORMAT_S24_LE:
|
case 24:
|
||||||
iface |= 0x0002;
|
iface |= 0x0002;
|
||||||
break;
|
break;
|
||||||
case SNDRV_PCM_FORMAT_S32_LE:
|
case 32:
|
||||||
iface |= 0x0003;
|
iface |= 0x0003;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d",
|
dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d",
|
||||||
params_format(params));
|
params_width(params));
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(codec->dev, "wm8741_hw_params: bit size param = %d",
|
dev_dbg(codec->dev, "wm8741_hw_params: bit size param = %d",
|
||||||
params_format(params));
|
params_width(params));
|
||||||
|
|
||||||
snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface);
|
snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user