alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] mfd: wm5110: Expose DRE control registers
@ 2013-12-19  9:11 Charles Keepax
  2013-12-19  9:11 ` [PATCH 2/2] ASoC: wm5110: Expose switch controls for DRE Charles Keepax
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Charles Keepax @ 2013-12-19  9:11 UTC (permalink / raw)
  To: lee.jones; +Cc: alsa-devel, sameo, patches, linux-kernel, lgirdwood, broonie

Certain use-cases require the DRE to be disabled so expose registers
necessary to control the DRE enables.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
---
 drivers/mfd/wm5110-tables.c           |    2 ++
 include/linux/mfd/arizona/registers.h |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/mfd/wm5110-tables.c b/drivers/mfd/wm5110-tables.c
index 338cfbe..abd6713 100644
--- a/drivers/mfd/wm5110-tables.c
+++ b/drivers/mfd/wm5110-tables.c
@@ -601,6 +601,7 @@ static const struct reg_default wm5110_reg_default[] = {
 	{ 0x0000043D, 0x0180 },    /* R1085  - DAC Digital Volume 6R */
 	{ 0x0000043E, 0x0080 },    /* R1086  - DAC Volume Limit 6R */
 	{ 0x0000043F, 0x0800 },    /* R1087  - Noise Gate Select 6R */
+	{ 0x00000440, 0x8FFF },    /* R1088  - DRE Enable */
 	{ 0x00000450, 0x0000 },    /* R1104  - DAC AEC Control 1 */
 	{ 0x00000458, 0x0000 },    /* R1112  - Noise Gate Control */
 	{ 0x00000480, 0x0040 },    /* R1152  - Class W ANC Threshold 1 */
@@ -1631,6 +1632,7 @@ static bool wm5110_readable_register(struct device *dev, unsigned int reg)
 	case ARIZONA_DAC_DIGITAL_VOLUME_6R:
 	case ARIZONA_DAC_VOLUME_LIMIT_6R:
 	case ARIZONA_NOISE_GATE_SELECT_6R:
+	case ARIZONA_DRE_ENABLE:
 	case ARIZONA_DAC_AEC_CONTROL_1:
 	case ARIZONA_NOISE_GATE_CONTROL:
 	case ARIZONA_PDM_SPK1_CTRL_1:
diff --git a/include/linux/mfd/arizona/registers.h b/include/linux/mfd/arizona/registers.h
index 8987814..22916c0 100644
--- a/include/linux/mfd/arizona/registers.h
+++ b/include/linux/mfd/arizona/registers.h
@@ -3207,6 +3207,10 @@
 /*
  * R1088 (0x440) - DRE Enable
  */
+#define ARIZONA_DRE3R_ENA                        0x0020  /* DRE3R_ENA */
+#define ARIZONA_DRE3R_ENA_MASK                   0x0020  /* DRE3R_ENA */
+#define ARIZONA_DRE3R_ENA_SHIFT                       5  /* DRE3R_ENA */
+#define ARIZONA_DRE3R_ENA_WIDTH                       1  /* DRE3R_ENA */
 #define ARIZONA_DRE3L_ENA                        0x0010  /* DRE3L_ENA */
 #define ARIZONA_DRE3L_ENA_MASK                   0x0010  /* DRE3L_ENA */
 #define ARIZONA_DRE3L_ENA_SHIFT                       4  /* DRE3L_ENA */
-- 
1.7.2.5

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

* [PATCH 2/2] ASoC: wm5110: Expose switch controls for DRE
  2013-12-19  9:11 [PATCH 1/2] mfd: wm5110: Expose DRE control registers Charles Keepax
@ 2013-12-19  9:11 ` Charles Keepax
  2013-12-19  9:39 ` [PATCH 1/2] mfd: wm5110: Expose DRE control registers Lee Jones
  2013-12-19 10:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2013-12-19  9:11 UTC (permalink / raw)
  To: lee.jones; +Cc: broonie, sameo, lgirdwood, patches, linux-kernel, alsa-devel

Certain use-cases require the DRE to be disabled so expose controls for
the enables.

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

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 7fb8599..3fb9abb 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -346,6 +346,13 @@ SOC_DOUBLE("SPKDAT1 Switch", ARIZONA_PDM_SPK1_CTRL_1, ARIZONA_SPK1L_MUTE_SHIFT,
 SOC_DOUBLE("SPKDAT2 Switch", ARIZONA_PDM_SPK2_CTRL_1, ARIZONA_SPK2L_MUTE_SHIFT,
 	   ARIZONA_SPK2R_MUTE_SHIFT, 1, 1),
 
+SOC_DOUBLE("HPOUT1 DRE Switch", ARIZONA_DRE_ENABLE,
+	   ARIZONA_DRE1L_ENA_SHIFT, ARIZONA_DRE1R_ENA_SHIFT, 1, 0),
+SOC_DOUBLE("HPOUT2 DRE Switch", ARIZONA_DRE_ENABLE,
+	   ARIZONA_DRE2L_ENA_SHIFT, ARIZONA_DRE2R_ENA_SHIFT, 1, 0),
+SOC_DOUBLE("HPOUT3 DRE Switch", ARIZONA_DRE_ENABLE,
+	   ARIZONA_DRE3L_ENA_SHIFT, ARIZONA_DRE3R_ENA_SHIFT, 1, 0),
+
 SOC_ENUM("Output Ramp Up", arizona_out_vi_ramp),
 SOC_ENUM("Output Ramp Down", arizona_out_vd_ramp),
 
-- 
1.7.2.5

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

* Re: [PATCH 1/2] mfd: wm5110: Expose DRE control registers
  2013-12-19  9:11 [PATCH 1/2] mfd: wm5110: Expose DRE control registers Charles Keepax
  2013-12-19  9:11 ` [PATCH 2/2] ASoC: wm5110: Expose switch controls for DRE Charles Keepax
@ 2013-12-19  9:39 ` Lee Jones
  2013-12-19 10:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Lee Jones @ 2013-12-19  9:39 UTC (permalink / raw)
  To: Charles Keepax
  Cc: broonie, sameo, lgirdwood, patches, linux-kernel, alsa-devel

On Thu, 19 Dec 2013, Charles Keepax wrote:

> Certain use-cases require the DRE to be disabled so expose registers
> necessary to control the DRE enables.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
> ---
>  drivers/mfd/wm5110-tables.c           |    2 ++
>  include/linux/mfd/arizona/registers.h |    4 ++++
>  2 files changed, 6 insertions(+), 0 deletions(-)

Acked-by: Lee Jones <lee.jones@linaro.org>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 1/2] mfd: wm5110: Expose DRE control registers
  2013-12-19  9:11 [PATCH 1/2] mfd: wm5110: Expose DRE control registers Charles Keepax
  2013-12-19  9:11 ` [PATCH 2/2] ASoC: wm5110: Expose switch controls for DRE Charles Keepax
  2013-12-19  9:39 ` [PATCH 1/2] mfd: wm5110: Expose DRE control registers Lee Jones
@ 2013-12-19 10:18 ` Mark Brown
  2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-12-19 10:18 UTC (permalink / raw)
  To: Charles Keepax
  Cc: alsa-devel, sameo, patches, linux-kernel, lgirdwood, lee.jones


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

On Thu, Dec 19, 2013 at 09:11:01AM +0000, Charles Keepax wrote:
> Certain use-cases require the DRE to be disabled so expose registers
> necessary to control the DRE enables.

Applied both, thanks.

[-- 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

end of thread, other threads:[~2013-12-19 10:18 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:11 [PATCH 1/2] mfd: wm5110: Expose DRE control registers Charles Keepax
2013-12-19  9:11 ` [PATCH 2/2] ASoC: wm5110: Expose switch controls for DRE Charles Keepax
2013-12-19  9:39 ` [PATCH 1/2] mfd: wm5110: Expose DRE control registers Lee Jones
2013-12-19 10:18 ` Mark Brown

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