ac108:Support 32k sampling rate.
Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
/* AC108 definition */
#define AC108_CHANNELS_MAX 8 /* range[1, 16] */
#define AC108_RATES (SNDRV_PCM_RATE_8000_96000 & \
- ~(SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_64000 | \
+ ~(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 | \
break;
case SNDRV_PCM_FORMAT_S32_LE:
- if ((config->sample_rate == 16000) && (config->chan_nr == 1)) {
+ if ((config->sample_rate == 16000) && (config->chan_nr == 1) &&
+ (txrx == SNDRV_PCM_STREAM_PLAYBACK)) {
dev_err(dev->dev, "I2S: unsupported 16000 rate with S32_LE, Mono.\n");
return -EINVAL;
}