ac108:Support 16bit format with capture.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
#define AC108_RATES (SNDRV_PCM_RATE_8000_96000 & \
~(SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_64000 | \
SNDRV_PCM_RATE_88200 | SNDRV_PCM_RATE_96000))
-#define AC108_FORMATS (/*SNDRV_PCM_FMTBIT_S16_LE | \
- SNDRV_PCM_FMTBIT_S20_3LE | \
+#define AC108_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
+ /*SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_LE |*/ \
SNDRV_PCM_FMTBIT_S32_LE)
switch (params_format(params)) {
case SNDRV_PCM_FORMAT_S16_LE:
- if (config->sample_rate == 8000) {
+ if ((config->sample_rate == 8000) && (txrx == SNDRV_PCM_STREAM_PLAYBACK)) {
dev_err(dev->dev, "I2S: unsupported 8000 rate with S16_LE, Stereo.\n");
return -EINVAL;
}