alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs
@ 2013-12-19  9:30 Charles Keepax
  2013-12-19  9:30 ` [PATCH 2/2] ASoC: wm5110: Add support for ASRC RATE 1 Charles Keepax
  2013-12-19 10:20 ` [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Charles Keepax @ 2013-12-19  9:30 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, patches, lgirdwood

Currently, the driver only supports configuration of the lower sample
rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
patch adds support for configuring the higher sample rate (FSH).

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c |   16 ++++++++++++++++
 sound/soc/codecs/arizona.h |    1 +
 sound/soc/codecs/wm5110.c  |    3 +++
 3 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 6bfd803..56d3ff5 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -498,6 +498,22 @@ const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE] = {
 EXPORT_SYMBOL_GPL(arizona_rate_val);
 
 
+const struct soc_enum arizona_isrc_fsh[] = {
+	SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_1,
+			      ARIZONA_ISRC1_FSH_SHIFT, 0xf,
+			      ARIZONA_RATE_ENUM_SIZE,
+			      arizona_rate_text, arizona_rate_val),
+	SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_2_CTRL_1,
+			      ARIZONA_ISRC2_FSH_SHIFT, 0xf,
+			      ARIZONA_RATE_ENUM_SIZE,
+			      arizona_rate_text, arizona_rate_val),
+	SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_3_CTRL_1,
+			      ARIZONA_ISRC3_FSH_SHIFT, 0xf,
+			      ARIZONA_RATE_ENUM_SIZE,
+			      arizona_rate_text, arizona_rate_val),
+};
+EXPORT_SYMBOL_GPL(arizona_isrc_fsh);
+
 const struct soc_enum arizona_isrc_fsl[] = {
 	SOC_VALUE_ENUM_SINGLE(ARIZONA_ISRC_1_CTRL_2,
 			      ARIZONA_ISRC1_FSL_SHIFT, 0xf,
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index 6641f3d..99a97c0 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -186,6 +186,7 @@ extern const char *arizona_rate_text[ARIZONA_RATE_ENUM_SIZE];
 extern const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE];
 
 extern const struct soc_enum arizona_isrc_fsl[];
+extern const struct soc_enum arizona_isrc_fsh[];
 
 extern const struct soc_enum arizona_in_vi_ramp;
 extern const struct soc_enum arizona_in_vd_ramp;
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 7fb8599..18c7e1f 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -280,6 +280,9 @@ SOC_ENUM("LHPF4 Mode", arizona_lhpf4_mode),
 SOC_VALUE_ENUM("ISRC1 FSL", arizona_isrc_fsl[0]),
 SOC_VALUE_ENUM("ISRC2 FSL", arizona_isrc_fsl[1]),
 SOC_VALUE_ENUM("ISRC3 FSL", arizona_isrc_fsl[2]),
+SOC_VALUE_ENUM("ISRC1 FSH", arizona_isrc_fsh[0]),
+SOC_VALUE_ENUM("ISRC2 FSH", arizona_isrc_fsh[1]),
+SOC_VALUE_ENUM("ISRC3 FSH", arizona_isrc_fsh[2]),
 
 ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE),
 ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE),
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] ASoC: wm5110: Add support for ASRC RATE 1
  2013-12-19  9:30 [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Charles Keepax
@ 2013-12-19  9:30 ` Charles Keepax
  2013-12-19 10:20 ` [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2013-12-19  9:30 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, patches, lgirdwood

Add support for configuring the sample rate on the SYSCLK side of the
ASRC.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c |    7 +++++++
 sound/soc/codecs/arizona.h |    1 +
 sound/soc/codecs/wm5110.c  |    1 +
 3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 56d3ff5..e4295fe 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -530,6 +530,13 @@ const struct soc_enum arizona_isrc_fsl[] = {
 };
 EXPORT_SYMBOL_GPL(arizona_isrc_fsl);
 
+const struct soc_enum arizona_asrc_rate1 =
+	SOC_VALUE_ENUM_SINGLE(ARIZONA_ASRC_RATE1,
+			      ARIZONA_ASRC_RATE1_SHIFT, 0xf,
+			      ARIZONA_RATE_ENUM_SIZE - 1,
+			      arizona_rate_text, arizona_rate_val);
+EXPORT_SYMBOL_GPL(arizona_asrc_rate1);
+
 static const char *arizona_vol_ramp_text[] = {
 	"0ms/6dB", "0.5ms/6dB", "1ms/6dB", "2ms/6dB", "4ms/6dB", "8ms/6dB",
 	"15ms/6dB", "30ms/6dB",
diff --git a/sound/soc/codecs/arizona.h b/sound/soc/codecs/arizona.h
index 99a97c0..10b3984 100644
--- a/sound/soc/codecs/arizona.h
+++ b/sound/soc/codecs/arizona.h
@@ -187,6 +187,7 @@ extern const int arizona_rate_val[ARIZONA_RATE_ENUM_SIZE];
 
 extern const struct soc_enum arizona_isrc_fsl[];
 extern const struct soc_enum arizona_isrc_fsh[];
+extern const struct soc_enum arizona_asrc_rate1;
 
 extern const struct soc_enum arizona_in_vi_ramp;
 extern const struct soc_enum arizona_in_vd_ramp;
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 18c7e1f..b0ed2e6 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -283,6 +283,7 @@ SOC_VALUE_ENUM("ISRC3 FSL", arizona_isrc_fsl[2]),
 SOC_VALUE_ENUM("ISRC1 FSH", arizona_isrc_fsh[0]),
 SOC_VALUE_ENUM("ISRC2 FSH", arizona_isrc_fsh[1]),
 SOC_VALUE_ENUM("ISRC3 FSH", arizona_isrc_fsh[2]),
+SOC_VALUE_ENUM("ASRC RATE 1", arizona_asrc_rate1),
 
 ARIZONA_MIXER_CONTROLS("DSP1L", ARIZONA_DSP1LMIX_INPUT_1_SOURCE),
 ARIZONA_MIXER_CONTROLS("DSP1R", ARIZONA_DSP1RMIX_INPUT_1_SOURCE),
-- 
1.7.2.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs
  2013-12-19  9:30 [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Charles Keepax
  2013-12-19  9:30 ` [PATCH 2/2] ASoC: wm5110: Add support for ASRC RATE 1 Charles Keepax
@ 2013-12-19 10:20 ` Mark Brown
  2013-12-19 10:32   ` Charles Keepax
  1 sibling, 1 reply; 4+ messages in thread
From: Mark Brown @ 2013-12-19 10:20 UTC (permalink / raw)
  To: Charles Keepax; +Cc: alsa-devel, patches, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 416 bytes --]

On Thu, Dec 19, 2013 at 09:30:12AM +0000, Charles Keepax wrote:
> Currently, the driver only supports configuration of the lower sample
> rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
> patch adds support for configuring the higher sample rate (FSH).

Applied both but you guys should really be doing some work to support
this within the framework and propagate rates through the devices.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs
  2013-12-19 10:20 ` [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Mark Brown
@ 2013-12-19 10:32   ` Charles Keepax
  0 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2013-12-19 10:32 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, patches, lgirdwood

On Thu, Dec 19, 2013 at 10:20:23AM +0000, Mark Brown wrote:
> On Thu, Dec 19, 2013 at 09:30:12AM +0000, Charles Keepax wrote:
> > Currently, the driver only supports configuration of the lower sample
> > rate (FSL) on the ISRCs. With the higher rate being fixed a SYSCLK, this
> > patch adds support for configuring the higher sample rate (FSH).
> 
> Applied both but you guys should really be doing some work to support
> this within the framework and propagate rates through the devices.

Yeah I agree, we have scheduled some time in January to look at
doing so, so with a bit of luck you should start to see something
moving on that front around then.

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-19 10:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19  9:30 [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Charles Keepax
2013-12-19  9:30 ` [PATCH 2/2] ASoC: wm5110: Add support for ASRC RATE 1 Charles Keepax
2013-12-19 10:20 ` [PATCH 1/2] ASoC: wm5110: Add FSH for ISRCs Mark Brown
2013-12-19 10:32   ` Charles Keepax

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).