summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sit Wei Hong <michael.wei.hong.sit@intel.com>2020-07-30 13:53:16 +0800
committerMark Brown <broonie@kernel.org>2020-07-30 20:13:40 +0100
commitb81f8df8039e6dca8f9533fe0b549139b907e61f (patch)
treeee67f739ad2a85e71c92cb6cb7b817bf84176a7f
parent6617cff6a05e7e7a679499cb1d5cd2d3bc6390c3 (diff)
ASoC: Intel: KMB: Add 8kHz audio support
Enable 8kHz audio support for Intel Keem Bay platform. Signed-off-by: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com> Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200730055319.1522-2-michael.wei.hong.sit@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--sound/soc/intel/keembay/kmb_platform.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/sound/soc/intel/keembay/kmb_platform.c b/sound/soc/intel/keembay/kmb_platform.c
index 44798832c2f9..dcc5ac561545 100644
--- a/sound/soc/intel/keembay/kmb_platform.c
+++ b/sound/soc/intel/keembay/kmb_platform.c
@@ -28,8 +28,10 @@ static const struct snd_pcm_hardware kmb_pcm_hardware = {
SNDRV_PCM_INFO_MMAP_VALID |
SNDRV_PCM_INFO_BATCH |
SNDRV_PCM_INFO_BLOCK_TRANSFER,
- .rates = SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000,
- .rate_min = 16000,
+ .rates = SNDRV_PCM_RATE_8000 |
+ SNDRV_PCM_RATE_16000 |
+ SNDRV_PCM_RATE_48000,
+ .rate_min = 8000,
.rate_max = 48000,
.formats = SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S24_LE |
@@ -533,8 +535,10 @@ static struct snd_soc_dai_driver intel_kmb_platform_dai[] = {
.playback = {
.channels_min = 2,
.channels_max = 2,
- .rates = SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000,
- .rate_min = 16000,
+ .rates = SNDRV_PCM_RATE_8000 |
+ SNDRV_PCM_RATE_16000 |
+ SNDRV_PCM_RATE_48000,
+ .rate_min = 8000,
.rate_max = 48000,
.formats = (SNDRV_PCM_FMTBIT_S32_LE |
SNDRV_PCM_FMTBIT_S24_LE |
@@ -543,8 +547,14 @@ static struct snd_soc_dai_driver intel_kmb_platform_dai[] = {
.capture = {
.channels_min = 2,
.channels_max = 2,
- .rates = SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_48000,
- .rate_min = 16000,
+ /*
+ * .channels_max will be overwritten
+ * if provided by Device Tree
+ */
+ .rates = SNDRV_PCM_RATE_8000 |
+ SNDRV_PCM_RATE_16000 |
+ SNDRV_PCM_RATE_48000,
+ .rate_min = 8000,
.rate_max = 48000,
.formats = (SNDRV_PCM_FMTBIT_S32_LE |
SNDRV_PCM_FMTBIT_S24_LE |