|
@@ -155,25 +155,14 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
- /* Add specific widgets */
|
|
|
|
- snd_soc_dapm_new_controls(dapm, at91sam9g20ek_dapm_widgets,
|
|
|
|
- ARRAY_SIZE(at91sam9g20ek_dapm_widgets));
|
|
|
|
- /* Set up specific audio path interconnects */
|
|
|
|
- snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
|
|
|
|
-
|
|
|
|
/* not connected */
|
|
/* not connected */
|
|
snd_soc_dapm_nc_pin(dapm, "RLINEIN");
|
|
snd_soc_dapm_nc_pin(dapm, "RLINEIN");
|
|
snd_soc_dapm_nc_pin(dapm, "LLINEIN");
|
|
snd_soc_dapm_nc_pin(dapm, "LLINEIN");
|
|
|
|
|
|
-#ifdef ENABLE_MIC_INPUT
|
|
|
|
- snd_soc_dapm_enable_pin(dapm, "Int Mic");
|
|
|
|
-#else
|
|
|
|
- snd_soc_dapm_nc_pin(dapm, "Int Mic");
|
|
|
|
|
|
+#ifndef ENABLE_MIC_INPUT
|
|
|
|
+ snd_soc_dapm_nc_pin(&rtd->card->dapm, "Int Mic");
|
|
#endif
|
|
#endif
|
|
|
|
|
|
- /* always connected */
|
|
|
|
- snd_soc_dapm_enable_pin(dapm, "Ext Spk");
|
|
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -194,6 +183,11 @@ static struct snd_soc_card snd_soc_at91sam9g20ek = {
|
|
.dai_link = &at91sam9g20ek_dai,
|
|
.dai_link = &at91sam9g20ek_dai,
|
|
.num_links = 1,
|
|
.num_links = 1,
|
|
.set_bias_level = at91sam9g20ek_set_bias_level,
|
|
.set_bias_level = at91sam9g20ek_set_bias_level,
|
|
|
|
+
|
|
|
|
+ .dapm_widgets = at91sam9g20ek_dapm_widgets,
|
|
|
|
+ .num_dapm_widgets = ARRAY_SIZE(at91sam9g20ek_dapm_widgets),
|
|
|
|
+ .dapm_routes = intercon,
|
|
|
|
+ .num_dapm_routes = ARRAY_SIZE(intercon),
|
|
};
|
|
};
|
|
|
|
|
|
static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
|
|
static int at91sam9g20ek_audio_probe(struct platform_device *pdev)
|