aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/smartq_wm8987.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/samsung/smartq_wm8987.c')
-rw-r--r--sound/soc/samsung/smartq_wm8987.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index c3b2adafb7b5..9b0ffacab790 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -162,8 +162,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
162 snd_soc_dapm_nc_pin(dapm, "ROUT1"); 162 snd_soc_dapm_nc_pin(dapm, "ROUT1");
163 163
164 /* set endpoints to default off mode */ 164 /* set endpoints to default off mode */
165 snd_soc_dapm_enable_pin(dapm, "Internal Speaker");
166 snd_soc_dapm_enable_pin(dapm, "Internal Mic");
167 snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); 165 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
168 166
169 /* Headphone jack detection */ 167 /* Headphone jack detection */
@@ -184,6 +182,14 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
184 return err; 182 return err;
185} 183}
186 184
185static int smartq_wm8987_card_remove(struct snd_soc_card *card)
186{
187 snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
188 smartq_jack_gpios);
189
190 return 0;
191}
192
187static struct snd_soc_dai_link smartq_dai[] = { 193static struct snd_soc_dai_link smartq_dai[] = {
188 { 194 {
189 .name = "wm8987", 195 .name = "wm8987",
@@ -200,6 +206,7 @@ static struct snd_soc_dai_link smartq_dai[] = {
200static struct snd_soc_card snd_soc_smartq = { 206static struct snd_soc_card snd_soc_smartq = {
201 .name = "SmartQ", 207 .name = "SmartQ",
202 .owner = THIS_MODULE, 208 .owner = THIS_MODULE,
209 .remove = smartq_wm8987_card_remove,
203 .dai_link = smartq_dai, 210 .dai_link = smartq_dai,
204 .num_links = ARRAY_SIZE(smartq_dai), 211 .num_links = ARRAY_SIZE(smartq_dai),
205 212
@@ -261,8 +268,6 @@ err_unregister_device:
261static void __exit smartq_exit(void) 268static void __exit smartq_exit(void)
262{ 269{
263 gpio_free(S3C64XX_GPK(12)); 270 gpio_free(S3C64XX_GPK(12));
264 snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
265 smartq_jack_gpios);
266 271
267 platform_device_unregister(smartq_snd_device); 272 platform_device_unregister(smartq_snd_device);
268} 273}