summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorVijay Mali <vmali@nvidia.com>2012-11-05 20:15:04 +0530
committerSimone Willett <swillett@nvidia.com>2012-11-06 18:28:23 -0800
commitced821b8d07e6d6453b1bc6c6c01301b3472000c (patch)
tree1a3b767674f0d3d8120fd85d009007db7ea0e43b /sound
parentf7326d7d486720fb41891736a1a75700c70adeea (diff)
asoc: tegra: Rt5640: modify DAPM route table
a) register DAPM route table with snd_soc_card structure and remove the open-coded DAPM add route calls. b) set card.fully_routed flag to request the ASoC core calculated unused codec pins, and call snd_soc_dapm_nc_pin() for them. Bug 1054060 Change-Id: I512b6329bf1328eff172f40d4cc6b59c763f1323 Signed-off-by: Vijay Mali <vmali@nvidia.com> Reviewed-on: http://git-master/r/161249 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sumit Bhattacharya <sumitb@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Dara Ramesh <dramesh@nvidia.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/tegra/tegra_rt5640.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index 525b28bac04b..82e9c6753815 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -586,17 +586,6 @@ static int tegra_rt5640_init(struct snd_soc_pcm_runtime *rtd)
machine->bias_level = SND_SOC_BIAS_STANDBY;
machine->clock_enabled = 1;
- ret = snd_soc_add_card_controls(card, cardhu_controls,
- ARRAY_SIZE(cardhu_controls));
- if (ret < 0)
- return ret;
-
- snd_soc_dapm_new_controls(dapm, cardhu_dapm_widgets,
- ARRAY_SIZE(cardhu_dapm_widgets));
-
- snd_soc_dapm_add_routes(dapm, cardhu_audio_map,
- ARRAY_SIZE(cardhu_audio_map));
-
ret = tegra_asoc_utils_register_ctls(&machine->util_data);
if (ret < 0)
return ret;
@@ -694,6 +683,13 @@ static struct snd_soc_card snd_soc_tegra_rt5640 = {
.resume_pre = tegra_rt5640_resume_pre,
.set_bias_level = tegra_rt5640_set_bias_level,
.set_bias_level_post = tegra_rt5640_set_bias_level_post,
+ .controls = cardhu_controls,
+ .num_controls = ARRAY_SIZE(cardhu_controls),
+ .dapm_widgets = cardhu_dapm_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(cardhu_dapm_widgets),
+ .dapm_routes = cardhu_audio_map,
+ .num_dapm_routes = ARRAY_SIZE(cardhu_audio_map),
+ .fully_routed = true,
};
static __devinit int tegra_rt5640_driver_probe(struct platform_device *pdev)