* [PATCH] ASoC: wm5102: Implement OSR support
@ 2013-03-27 12:52 Mark Brown
2013-03-27 15:13 ` Charles Keepax
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2013-03-27 12:52 UTC (permalink / raw)
To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm5102.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index b7a3fdc..99972a5 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -612,6 +612,26 @@ static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
return 0;
}
+static const char *wm5102_osr_text[] = {
+ "Low power", "Normal", "High performance",
+};
+
+static const unsigned int wm5102_osr_val[] = {
+ 0x0, 0x3, 0x5,
+};
+
+static const struct soc_enum wm5102_hpout_osr[] = {
+ SOC_VALUE_ENUM_SINGLE(ARIZONA_OUTPUT_PATH_CONFIG_1L,
+ ARIZONA_OUT1_OSR_SHIFT, 0xe00, 3,
+ wm5102_osr_text, wm5102_osr_val),
+ SOC_VALUE_ENUM_SINGLE(ARIZONA_OUTPUT_PATH_CONFIG_2L,
+ ARIZONA_OUT2_OSR_SHIFT, 0xe00, 3,
+ wm5102_osr_text, wm5102_osr_val),
+ SOC_VALUE_ENUM_SINGLE(ARIZONA_OUTPUT_PATH_CONFIG_3L,
+ ARIZONA_OUT3_OSR_SHIFT, 0xe00, 3,
+ wm5102_osr_text, wm5102_osr_val),
+};
+
#define WM5102_NG_SRC(name, base) \
SOC_SINGLE(name " NG HPOUT1L Switch", base, 0, 1, 0), \
SOC_SINGLE(name " NG HPOUT1R Switch", base, 1, 1, 0), \
@@ -761,6 +781,8 @@ ARIZONA_MIXER_CONTROLS("SPKOUTR", ARIZONA_OUT4RMIX_INPUT_1_SOURCE),
ARIZONA_MIXER_CONTROLS("SPKDAT1L", ARIZONA_OUT5LMIX_INPUT_1_SOURCE),
ARIZONA_MIXER_CONTROLS("SPKDAT1R", ARIZONA_OUT5RMIX_INPUT_1_SOURCE),
+SOC_SINGLE("Speaker High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_4L,
+ ARIZONA_OUT4_OSR_SHIFT, 1, 0),
SOC_SINGLE("SPKDAT1 High Performance Switch", ARIZONA_OUTPUT_PATH_CONFIG_5L,
ARIZONA_OUT5_OSR_SHIFT, 1, 0),
@@ -790,6 +812,10 @@ SOC_DOUBLE_R_TLV("SPKDAT1 Digital Volume", ARIZONA_DAC_DIGITAL_VOLUME_5L,
ARIZONA_DAC_DIGITAL_VOLUME_5R, ARIZONA_OUT5L_VOL_SHIFT,
0xbf, 0, digital_tlv),
+SOC_VAL_ENUM("HPOUT1 OSR", wm5102_hpout_osr[0]),
+SOC_VAL_ENUM("HPOUT2 OSR", wm5102_hpout_osr[1]),
+SOC_VAL_ENUM("HPOUT3 OSR", wm5102_hpout_osr[2]),
+
SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp),
SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: wm5102: Implement OSR support
2013-03-27 12:52 [PATCH] ASoC: wm5102: Implement OSR support Mark Brown
@ 2013-03-27 15:13 ` Charles Keepax
2013-03-27 15:43 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Charles Keepax @ 2013-03-27 15:13 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, patches, Liam Girdwood
On Wed, Mar 27, 2013 at 12:52:42PM +0000, Mark Brown wrote:
> +static const struct soc_enum wm5102_hpout_osr[] = {
> + SOC_VALUE_ENUM_SINGLE(ARIZONA_OUTPUT_PATH_CONFIG_1L,
> + ARIZONA_OUT1_OSR_SHIFT, 0xe00, 3,
^^^^^
The mask here shouldn't be shifted just 0x7.
Charles
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: wm5102: Implement OSR support
2013-03-27 15:13 ` Charles Keepax
@ 2013-03-27 15:43 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-03-27 15:43 UTC (permalink / raw)
To: Charles Keepax; +Cc: alsa-devel, patches, Liam Girdwood
[-- Attachment #1.1: Type: text/plain, Size: 396 bytes --]
On Wed, Mar 27, 2013 at 03:13:00PM +0000, Charles Keepax wrote:
> On Wed, Mar 27, 2013 at 12:52:42PM +0000, Mark Brown wrote:
> > +static const struct soc_enum wm5102_hpout_osr[] = {
> > + SOC_VALUE_ENUM_SINGLE(ARIZONA_OUTPUT_PATH_CONFIG_1L,
> > + ARIZONA_OUT1_OSR_SHIFT, 0xe00, 3,
> The mask here shouldn't be shifted just 0x7.
Right, a mixup in the mail rather than git fortunately.
[-- 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] 3+ messages in thread
end of thread, other threads:[~2013-03-27 15:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-27 12:52 [PATCH] ASoC: wm5102: Implement OSR support Mark Brown
2013-03-27 15:13 ` Charles Keepax
2013-03-27 15:43 ` Mark Brown
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.