[alsa-devel] [PATCH 2/2] ASoC: uda134x: fix bias level setup on initialization

Vladimir Zapolskiy vzapolskiy at gmail.com
Thu Jun 24 15:38:51 CEST 2010


On initialization ADC/DAC are enabled only for UDA1341, that's why
bias_level shall be set to off explicitly, otherwise dapm is
misinformed about bias_level on startup.

Signed-off-by: Vladimir Zapolskiy <vzapolskiy at gmail.com>
---
 sound/soc/codecs/uda134x.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c
index 5c7b054..ed13515 100644
--- a/sound/soc/codecs/uda134x.c
+++ b/sound/soc/codecs/uda134x.c
@@ -547,10 +547,6 @@ static int uda134x_soc_probe(struct platform_device *pdev)
 	codec->read = uda134x_read_reg_cache;
 	codec->write = uda134x_write;
 
-	if (!pd->is_powered_on_standby) {
-		codec->set_bias_level = uda134x_set_bias_level;
-	}
-
 	INIT_LIST_HEAD(&codec->dapm_widgets);
 	INIT_LIST_HEAD(&codec->dapm_paths);
 
@@ -561,6 +557,14 @@ static int uda134x_soc_probe(struct platform_device *pdev)
 
 	uda134x_reset(codec);
 
+	if (pd->is_powered_on_standby) {
+		codec->set_bias_level = NULL;
+		uda134x_set_bias_level(codec, SND_SOC_BIAS_ON);
+	} else {
+		codec->set_bias_level = uda134x_set_bias_level;
+		uda134x_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
+	}
+
 	/* register pcms */
 	ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
 	if (ret < 0) {
-- 
1.7.0.4



More information about the Alsa-devel mailing list