diff options
-rw-r--r-- | sound/soc/codecs/wm8904.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c index 8310e5d14b83..e44ee31c2184 100644 --- a/sound/soc/codecs/wm8904.c +++ b/sound/soc/codecs/wm8904.c | |||
@@ -1503,6 +1503,23 @@ static int wm8904_hw_params(struct snd_pcm_substream *substream, | |||
1503 | wm8904->bclk = snd_soc_params_to_bclk(params); | 1503 | wm8904->bclk = snd_soc_params_to_bclk(params); |
1504 | } | 1504 | } |
1505 | 1505 | ||
1506 | switch (params_format(params)) { | ||
1507 | case SNDRV_PCM_FORMAT_S16_LE: | ||
1508 | break; | ||
1509 | case SNDRV_PCM_FORMAT_S20_3LE: | ||
1510 | aif1 |= 0x40; | ||
1511 | break; | ||
1512 | case SNDRV_PCM_FORMAT_S24_LE: | ||
1513 | aif1 |= 0x80; | ||
1514 | break; | ||
1515 | case SNDRV_PCM_FORMAT_S32_LE: | ||
1516 | aif1 |= 0xc0; | ||
1517 | break; | ||
1518 | default: | ||
1519 | return -EINVAL; | ||
1520 | } | ||
1521 | |||
1522 | |||
1506 | dev_dbg(codec->dev, "Target BCLK is %dHz\n", wm8904->bclk); | 1523 | dev_dbg(codec->dev, "Target BCLK is %dHz\n", wm8904->bclk); |
1507 | 1524 | ||
1508 | ret = wm8904_configure_clocking(codec); | 1525 | ret = wm8904_configure_clocking(codec); |