aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_rt5640.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-03 05:39:59 -0400
committerMark Brown <broonie@linaro.org>2014-06-03 05:39:59 -0400
commit325394434f4e581291e086c30b7be2e76a96d1ae (patch)
treef8d57a8c98e7d898fdbaa6474c353e7ccc6bbacb /sound/soc/tegra/tegra_rt5640.c
parent39b47b599e417afc7b94dcdf248457f3e45dc17c (diff)
parentfb6b8e71448aef58628eb9da007c30e731925260 (diff)
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next
Diffstat (limited to 'sound/soc/tegra/tegra_rt5640.c')
-rw-r--r--sound/soc/tegra/tegra_rt5640.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/soc/tegra/tegra_rt5640.c b/sound/soc/tegra/tegra_rt5640.c
index 4511c5a875ec..4feb16a99e02 100644
--- a/sound/soc/tegra/tegra_rt5640.c
+++ b/sound/soc/tegra/tegra_rt5640.c
@@ -128,6 +128,18 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
128 return 0; 128 return 0;
129} 129}
130 130
131static int tegra_rt5640_card_remove(struct snd_soc_card *card)
132{
133 struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
134
135 if (gpio_is_valid(machine->gpio_hp_det)) {
136 snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1,
137 &tegra_rt5640_hp_jack_gpio);
138 }
139
140 return 0;
141}
142
131static struct snd_soc_dai_link tegra_rt5640_dai = { 143static struct snd_soc_dai_link tegra_rt5640_dai = {
132 .name = "RT5640", 144 .name = "RT5640",
133 .stream_name = "RT5640 PCM", 145 .stream_name = "RT5640 PCM",
@@ -141,6 +153,7 @@ static struct snd_soc_dai_link tegra_rt5640_dai = {
141static struct snd_soc_card snd_soc_tegra_rt5640 = { 153static struct snd_soc_card snd_soc_tegra_rt5640 = {
142 .name = "tegra-rt5640", 154 .name = "tegra-rt5640",
143 .owner = THIS_MODULE, 155 .owner = THIS_MODULE,
156 .remove = tegra_rt5640_card_remove,
144 .dai_link = &tegra_rt5640_dai, 157 .dai_link = &tegra_rt5640_dai,
145 .num_links = 1, 158 .num_links = 1,
146 .controls = tegra_rt5640_controls, 159 .controls = tegra_rt5640_controls,
@@ -224,9 +237,6 @@ static int tegra_rt5640_remove(struct platform_device *pdev)
224 struct snd_soc_card *card = platform_get_drvdata(pdev); 237 struct snd_soc_card *card = platform_get_drvdata(pdev);
225 struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card); 238 struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
226 239
227 snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1,
228 &tegra_rt5640_hp_jack_gpio);
229
230 snd_soc_unregister_card(card); 240 snd_soc_unregister_card(card);
231 241
232 tegra_asoc_utils_fini(&machine->util_data); 242 tegra_asoc_utils_fini(&machine->util_data);