* [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support
@ 2019-07-31 5:40 ` chunguo feng
0 siblings, 0 replies; 3+ messages in thread
From: chunguo feng @ 2019-07-31 5:40 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, RyanS.Lee, bleung, pierre-louis.bossart,
grundler, alsa-devel, linux-kernel, chunguo.feng
From: fengchunguo <chunguo.feng@amlogic.com>
88200 and 96000 sampling rate was not enabled on driver, so can't be played.
The error information:
max98373 3-0031:rate 96000 not supported
max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22
Signed-off-by: fengchunguo <chunguo.feng@amlogic.com>
---
sound/soc/codecs/max98373.c | 6 ++++++
sound/soc/codecs/max98373.h | 2 ++
2 files changed, 8 insertions(+)
mode change 100644 => 100755 sound/soc/codecs/max98373.c
mode change 100644 => 100755 sound/soc/codecs/max98373.h
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
old mode 100644
new mode 100755
index 528695cd6a1c..8c601a3ebc27
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -267,6 +267,12 @@ static int max98373_dai_hw_params(struct snd_pcm_substream *substream,
case 48000:
sampling_rate = MAX98373_PCM_SR_SET1_SR_48000;
break;
+ case 88200:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_88200;
+ break;
+ case 96000:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_96000;
+ break;
default:
dev_err(component->dev, "rate %d not supported\n",
params_rate(params));
diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h
old mode 100644
new mode 100755
index f6a37aa02f26..a59e51355a84
--- a/sound/soc/codecs/max98373.h
+++ b/sound/soc/codecs/max98373.h
@@ -130,6 +130,8 @@
#define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0)
#define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0)
#define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0)
+#define MAX98373_PCM_SR_SET1_SR_88200 (0x9 << 0)
+#define MAX98373_PCM_SR_SET1_SR_96000 (0xA << 0)
/* MAX98373_R2028_PCM_SR_SETUP_2 */
#define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4)
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support
@ 2019-07-31 5:40 ` chunguo feng
0 siblings, 0 replies; 3+ messages in thread
From: chunguo feng @ 2019-07-31 5:40 UTC (permalink / raw)
To: lgirdwood
Cc: broonie, perex, tiwai, RyanS.Lee, bleung, pierre-louis.bossart,
grundler, alsa-devel, linux-kernel, chunguo.feng
From: fengchunguo <chunguo.feng@amlogic.com>
88200 and 96000 sampling rate was not enabled on driver, so can't be played.
The error information:
max98373 3-0031:rate 96000 not supported
max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22
Signed-off-by: fengchunguo <chunguo.feng@amlogic.com>
---
sound/soc/codecs/max98373.c | 6 ++++++
sound/soc/codecs/max98373.h | 2 ++
2 files changed, 8 insertions(+)
mode change 100644 => 100755 sound/soc/codecs/max98373.c
mode change 100644 => 100755 sound/soc/codecs/max98373.h
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
old mode 100644
new mode 100755
index 528695cd6a1c..8c601a3ebc27
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -267,6 +267,12 @@ static int max98373_dai_hw_params(struct snd_pcm_substream *substream,
case 48000:
sampling_rate = MAX98373_PCM_SR_SET1_SR_48000;
break;
+ case 88200:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_88200;
+ break;
+ case 96000:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_96000;
+ break;
default:
dev_err(component->dev, "rate %d not supported\n",
params_rate(params));
diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h
old mode 100644
new mode 100755
index f6a37aa02f26..a59e51355a84
--- a/sound/soc/codecs/max98373.h
+++ b/sound/soc/codecs/max98373.h
@@ -130,6 +130,8 @@
#define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0)
#define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0)
#define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0)
+#define MAX98373_PCM_SR_SET1_SR_88200 (0x9 << 0)
+#define MAX98373_PCM_SR_SET1_SR_96000 (0xA << 0)
/* MAX98373_R2028_PCM_SR_SETUP_2 */
#define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4)
--
2.22.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support
2019-07-31 5:40 ` chunguo feng
(?)
@ 2019-07-31 7:47 ` chunguo.feng
-1 siblings, 0 replies; 3+ messages in thread
From: chunguo.feng @ 2019-07-31 7:47 UTC (permalink / raw)
To: lgirdwood
Cc: alsa-devel, RyanS.Lee, grundler, linux-kernel,
pierre-louis.bossart, tiwai, broonie, bleung
Hi All,
Please kindly waiver this patch, because max98383 was writed incorrectly, it should be max98373.
I have modified it, then submit new patch again.
Thanks,
BRs,
Gary.
From: chunguo feng
Date: 2019-07-31 13:40
To: lgirdwood@gmail.com
CC: broonie@kernel.org; perex@perex.cz; tiwai@suse.com; RyanS.Lee@maximintegrated.com; bleung@chromium.org; pierre-louis.bossart@linux.intel.com; grundler@chromium.org; alsa-devel@alsa-project.org; linux-kernel@vger.kernel.org; chunguo.feng@amlogic.com
Subject: [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support
From: fengchunguo <chunguo.feng@amlogic.com>
88200 and 96000 sampling rate was not enabled on driver, so can't be played.
The error information:
max98373 3-0031:rate 96000 not supported
max98373 3-0031:ASoC: can't set max98373-aif1 hw params: -22
Signed-off-by: fengchunguo <chunguo.feng@amlogic.com>
---
sound/soc/codecs/max98373.c | 6 ++++++
sound/soc/codecs/max98373.h | 2 ++
2 files changed, 8 insertions(+)
mode change 100644 => 100755 sound/soc/codecs/max98373.c
mode change 100644 => 100755 sound/soc/codecs/max98373.h
diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c
old mode 100644
new mode 100755
index 528695cd6a1c..8c601a3ebc27
--- a/sound/soc/codecs/max98373.c
+++ b/sound/soc/codecs/max98373.c
@@ -267,6 +267,12 @@ static int max98373_dai_hw_params(struct snd_pcm_substream *substream,
case 48000:
sampling_rate = MAX98373_PCM_SR_SET1_SR_48000;
break;
+ case 88200:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_88200;
+ break;
+ case 96000:
+ sampling_rate = MAX98373_PCM_SR_SET1_SR_96000;
+ break;
default:
dev_err(component->dev, "rate %d not supported\n",
params_rate(params));
diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h
old mode 100644
new mode 100755
index f6a37aa02f26..a59e51355a84
--- a/sound/soc/codecs/max98373.h
+++ b/sound/soc/codecs/max98373.h
@@ -130,6 +130,8 @@
#define MAX98373_PCM_SR_SET1_SR_32000 (0x6 << 0)
#define MAX98373_PCM_SR_SET1_SR_44100 (0x7 << 0)
#define MAX98373_PCM_SR_SET1_SR_48000 (0x8 << 0)
+#define MAX98373_PCM_SR_SET1_SR_88200 (0x9 << 0)
+#define MAX98373_PCM_SR_SET1_SR_96000 (0xA << 0)
/* MAX98373_R2028_PCM_SR_SETUP_2 */
#define MAX98373_PCM_SR_SET2_SR_MASK (0xF << 4)
--
2.22.0
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-31 7:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 5:40 [PATCH] ASoC: max98383: add 88200 and 96000 sampling rate support chunguo feng
2019-07-31 5:40 ` chunguo feng
2019-07-31 7:47 ` chunguo.feng
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.