diff options
author | Rahul Mittal <rmittal@nvidia.com> | 2013-03-15 17:16:57 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:05:59 -0700 |
commit | df72b77d87e281b970fb72002bb0e8a0aa3ad7c0 (patch) | |
tree | aa92a8e861f80178e181f1ee8d826f5c70b3bedd | |
parent | 27b0ea44dea9033d4b54dc7b141bd9160e748a46 (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
Reviewed-on: http://git-master/r/209997
(cherry picked from commit 582e35277137204fe41c0a174683d4b75de0b20d)
Change-Id: I68da9e3f0f62707a54894d2340b9a85b4943e767
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/214021
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>
-rw-r--r-- | sound/soc/codecs/tlv320aic326x.c | 4 | ||||
-rw-r--r-- | sound/soc/tegra/tegra_aic326x.c | 27 |
2 files changed, 16 insertions, 15 deletions
diff --git a/sound/soc/codecs/tlv320aic326x.c b/sound/soc/codecs/tlv320aic326x.c index 1e409ee40056..46ebaef79eaa 100644 --- a/sound/soc/codecs/tlv320aic326x.c +++ b/sound/soc/codecs/tlv320aic326x.c @@ -2575,6 +2575,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 */ @@ -2659,6 +2662,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 314ab4489d3b..c98a0e7f909f 100644 --- a/sound/soc/tegra/tegra_aic326x.c +++ b/sound/soc/tegra/tegra_aic326x.c @@ -1297,17 +1297,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) @@ -1351,6 +1340,8 @@ static int tegra_aic326x_init(struct snd_soc_pcm_runtime *rtd) if (ret < 0) return ret; + snd_soc_dapm_sync(dapm); + return 0; } @@ -1479,15 +1470,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, @@ -1497,6 +1485,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 int tegra_aic326x_driver_probe(struct platform_device *pdev) @@ -1523,6 +1518,8 @@ static 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) |