Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag
@ 2011-06-22 12:20 Mark Brown
  2011-06-22 12:20 ` [PATCH 2/2] ASoC: Allow suppression of series updates on wm_hubs devices Mark Brown
  2011-06-23 12:17 ` [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Liam Girdwood
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2011-06-22 12:20 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Allowing the two to be used independently.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8993.c  |    1 +
 sound/soc/codecs/wm8994.c  |    1 +
 sound/soc/codecs/wm_hubs.c |    3 +--
 sound/soc/codecs/wm_hubs.h |    1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 9e5ff78..03af7ad 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -1434,6 +1434,7 @@ static int wm8993_probe(struct snd_soc_codec *codec)
 
 	wm8993->hubs_data.hp_startup_mode = 1;
 	wm8993->hubs_data.dcs_codes = -2;
+	wm8993->hubs_data.series_startup = 1;
 
 	ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
 	if (ret != 0) {
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 86e67e7..44153be 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -2918,6 +2918,7 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec)
 			wm8994->hubs.dcs_codes = -5;
 			wm8994->hubs.hp_startup_mode = 1;
 			wm8994->hubs.dcs_readback_mode = 1;
+			wm8994->hubs.series_startup = 1;
 			break;
 		default:
 			wm8994->hubs.dcs_readback_mode = 1;
diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 586265b..8042999 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -107,8 +107,7 @@ static void calibrate_dc_servo(struct snd_soc_codec *codec)
 		return;
 	}
 
-	/* Devices not using a DCS code correction have startup mode */
-	if (hubs->dcs_codes) {
+	if (hubs->series_startup) {
 		/* Set for 32 series updates */
 		snd_soc_update_bits(codec, WM8993_DC_SERVO_1,
 				    WM8993_DCS_SERIES_NO_01_MASK,
diff --git a/sound/soc/codecs/wm_hubs.h b/sound/soc/codecs/wm_hubs.h
index f8a5e97..aeb5871 100644
--- a/sound/soc/codecs/wm_hubs.h
+++ b/sound/soc/codecs/wm_hubs.h
@@ -23,6 +23,7 @@ struct wm_hubs_data {
 	int dcs_codes;
 	int dcs_readback_mode;
 	int hp_startup_mode;
+	int series_startup;
 
 	bool class_w;
 	u16 class_w_dcs;
-- 
1.7.5.4

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

* [PATCH 2/2] ASoC: Allow suppression of series updates on wm_hubs devices
  2011-06-22 12:20 [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Mark Brown
@ 2011-06-22 12:20 ` Mark Brown
  2011-06-23 12:17 ` [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2011-06-22 12:20 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: alsa-devel, patches, Mark Brown

Some devices do not support manual updates of the DC servo.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm_hubs.c |    2 +-
 sound/soc/codecs/wm_hubs.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 8042999..2d6c88b 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -194,7 +194,7 @@ static int wm8993_put_dc_servo(struct snd_kcontrol *kcontrol,
 
 	/* If we're applying an offset correction then updating the
 	 * callibration would be likely to introduce further offsets. */
-	if (hubs->dcs_codes)
+	if (hubs->dcs_codes || hubs->no_series_update)
 		return ret;
 
 	/* Only need to do this if the outputs are active */
diff --git a/sound/soc/codecs/wm_hubs.h b/sound/soc/codecs/wm_hubs.h
index aeb5871..0d290d2 100644
--- a/sound/soc/codecs/wm_hubs.h
+++ b/sound/soc/codecs/wm_hubs.h
@@ -24,6 +24,7 @@ struct wm_hubs_data {
 	int dcs_readback_mode;
 	int hp_startup_mode;
 	int series_startup;
+	int no_series_update;
 
 	bool class_w;
 	u16 class_w_dcs;
-- 
1.7.5.4

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

* Re: [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag
  2011-06-22 12:20 [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Mark Brown
  2011-06-22 12:20 ` [PATCH 2/2] ASoC: Allow suppression of series updates on wm_hubs devices Mark Brown
@ 2011-06-23 12:17 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2011-06-23 12:17 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel@alsa-project.org, patches@opensource.wolfsonmicro.com

On 22/06/11 13:20, Mark Brown wrote:
> Allowing the two to be used independently.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
>  sound/soc/codecs/wm8993.c  |    1 +
>  sound/soc/codecs/wm8994.c  |    1 +
>  sound/soc/codecs/wm_hubs.c |    3 +--
>  sound/soc/codecs/wm_hubs.h |    1 +
>  4 files changed, 4 insertions(+), 2 deletions(-)
> 

Both

Acked-by: Liam Girdwood <lrg@ti.com>

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

end of thread, other threads:[~2011-06-23 12:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-22 12:20 [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Mark Brown
2011-06-22 12:20 ` [PATCH 2/2] ASoC: Allow suppression of series updates on wm_hubs devices Mark Brown
2011-06-23 12:17 ` [PATCH 1/2] ASoC: Trigger wm_hubs series update startup off a separate flag Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox