summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRahul Mittal <rmittal@nvidia.com>2013-03-15 17:16:57 +0530
committerRiham Haidar <rhaidar@nvidia.com>2013-03-18 17:25:02 -0700
commit582e35277137204fe41c0a174683d4b75de0b20d (patch)
tree577065fb33652730042296619f15d89f0f7ef7fe /sound
parent29105b44ca749a2ac82349be9bf06a083a80877a (diff)
asoc: tegra: aic326x: Fix LP1 power for VDDIO_AUDIO
- Register DAPM map/widgets with snd_soc_card structure - Enable idle bias off for TI codec - Correct an error in handling bias level setting Bug 1251424 Change-Id: Id1ed89955a2b8e705c3fd8b0557ca51afeef616d Signed-off-by: Rahul Mittal <rmittal@nvidia.com> Reviewed-on: http://git-master/r/209997 Reviewed-by: Vijay Mali <vmali@nvidia.com> Reviewed-by: Scott Peterson <speterson@nvidia.com> Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/tlv320aic326x.c4
-rw-r--r--sound/soc/tegra/tegra_aic326x.c27
2 files changed, 16 insertions, 15 deletions
diff --git a/sound/soc/codecs/tlv320aic326x.c b/sound/soc/codecs/tlv320aic326x.c
index 38380a80c1b4..6b0fcbde476d 100644
--- a/sound/soc/codecs/tlv320aic326x.c
+++ b/sound/soc/codecs/tlv320aic326x.c
@@ -2574,6 +2574,9 @@ static int aic3262_codec_probe(struct snd_soc_codec *codec)
AIC3262_HEADSET_IN_MASK, AIC3262_HEADSET_IN_MASK);
}
}
+
+ codec->dapm.idle_bias_off = 1;
+
/* Keep the reference voltage ON while in$
STANDBY mode for fast power up */
@@ -2658,6 +2661,7 @@ static struct snd_soc_codec_driver soc_codec_driver_aic326x = {
.dapm_routes = aic3262_dapm_routes,
.num_dapm_routes = ARRAY_SIZE(aic3262_dapm_routes),
.set_bias_level = aic3262_set_bias_level,
+ .idle_bias_off = true,
.reg_cache_size = 0,
.reg_word_size = sizeof(u8),
.reg_cache_default = NULL,
diff --git a/sound/soc/tegra/tegra_aic326x.c b/sound/soc/tegra/tegra_aic326x.c
index d66fcba2afe2..9f3119fa9d2b 100644
--- a/sound/soc/tegra/tegra_aic326x.c
+++ b/sound/soc/tegra/tegra_aic326x.c
@@ -1301,17 +1301,6 @@ static int tegra_aic326x_init(struct snd_soc_pcm_runtime *rtd)
gpio_direction_output(pdata->gpio_ext_mic_en, 0);
}
- ret = snd_soc_add_card_controls(card, tegra_aic326x_controls,
- ARRAY_SIZE(tegra_aic326x_controls));
- if (ret < 0)
- return ret;
-
- snd_soc_dapm_new_controls(dapm, tegra_aic326x_dapm_widgets,
- ARRAY_SIZE(tegra_aic326x_dapm_widgets));
-
- snd_soc_dapm_add_routes(dapm, aic326x_audio_map,
- ARRAY_SIZE(aic326x_audio_map));
-
ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET,
&tegra_aic326x_hp_jack);
if (ret < 0)
@@ -1355,6 +1344,8 @@ static int tegra_aic326x_init(struct snd_soc_pcm_runtime *rtd)
if (ret < 0)
return ret;
+ snd_soc_dapm_sync(dapm);
+
return 0;
}
@@ -1483,15 +1474,12 @@ static int tegra_aic326x_set_bias_level_post(struct snd_soc_card *card,
level == SND_SOC_BIAS_OFF && machine->clock_enabled) {
machine->clock_enabled = 0;
tegra_asoc_utils_clk_disable(&machine->util_data);
+ machine->bias_level = level;
}
- machine->bias_level = level;
-
return 0 ;
}
-
-
static struct snd_soc_card snd_soc_tegra_aic326x = {
.name = "tegra-aic326x",
.owner = THIS_MODULE,
@@ -1501,6 +1489,13 @@ static struct snd_soc_card snd_soc_tegra_aic326x = {
.set_bias_level_post = tegra_aic326x_set_bias_level_post,
.suspend_post = tegra_aic326x_suspend_post,
.resume_pre = tegra_aic326x_resume_pre,
+ .controls = tegra_aic326x_controls,
+ .num_controls = ARRAY_SIZE(tegra_aic326x_controls),
+ .dapm_widgets = tegra_aic326x_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(tegra_aic326x_dapm_widgets),
+ .dapm_routes = aic326x_audio_map,
+ .num_dapm_routes = ARRAY_SIZE(aic326x_audio_map),
+ .fully_routed = true,
};
static __devinit int tegra_aic326x_driver_probe(struct platform_device *pdev)
@@ -1527,6 +1522,8 @@ static __devinit int tegra_aic326x_driver_probe(struct platform_device *pdev)
}
machine->pdata = pdata;
+ machine->bias_level = SND_SOC_BIAS_STANDBY;
+ machine->clock_enabled = 1;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev, card);
if (ret)