alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>
To: alsa-devel@alsa-project.org
Cc: cezary.rojewski@intel.com, andriy.shevchenko@intel.com,
	tiwai@suse.com, jee.heng.sia@intel.com,
	pierre-louis.bossart@linux.intel.com,
	liam.r.girdwood@linux.intel.com, broonie@kernel.org
Subject: [PATCH 1/4] ASoC: Intel: KMB: Add 8kHz audio support
Date: Thu, 30 Jul 2020 13:53:16 +0800	[thread overview]
Message-ID: <20200730055319.1522-2-michael.wei.hong.sit@intel.com> (raw)
In-Reply-To: <20200730055319.1522-1-michael.wei.hong.sit@intel.com>

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>
---
 sound/soc/intel/keembay/kmb_platform.c | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/sound/soc/intel/keembay/kmb_platform.c b/sound/soc/intel/keembay/kmb_platform.c
index 2ce21336c06b..f94eb5b7598d 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 |
-- 
2.17.1


  reply	other threads:[~2020-07-30  6:00 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30  5:53 [PATCH 0/4] ASoC: Intel: KMB: TDM Enablement patches Michael Sit Wei Hong
2020-07-30  5:53 ` Michael Sit Wei Hong [this message]
2020-07-30  5:53 ` [PATCH 2/4] ASoC: Intel: KMB: Rework disable channel function Michael Sit Wei Hong
2020-07-30  5:53 ` [PATCH 3/4] ASoC: Intel: KMB: Enable TDM audio capture Michael Sit Wei Hong
2020-07-30  5:53 ` [PATCH 4/4] dt-bindings: sound: intel, keembay-i2s: Add channel-max property Michael Sit Wei Hong
2020-07-30 11:29   ` [PATCH 4/4] dt-bindings: sound: intel,keembay-i2s: " Mark Brown
2020-08-03  1:59     ` Sit, Michael Wei Hong
2020-08-03 10:49       ` Mark Brown
2020-08-04  1:57         ` Sit, Michael Wei Hong
2020-08-04 11:50           ` Mark Brown
2020-08-05  6:21             ` Sit, Michael Wei Hong
2020-08-07 14:31               ` Mark Brown
2020-08-10  9:47                 ` Sit, Michael Wei Hong
2020-08-10 12:26                   ` Mark Brown
2020-07-30 22:28 ` [PATCH 0/4] ASoC: Intel: KMB: TDM Enablement patches Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200730055319.1522-2-michael.wei.hong.sit@intel.com \
    --to=michael.wei.hong.sit@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=andriy.shevchenko@intel.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=jee.heng.sia@intel.com \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).