18 Dec
2015
18 Dec
'15
9:53 p.m.
On Mon, Dec 14, 2015 at 05:07:47PM +0100, Hans de Goede wrote:
+static int sun4i_codec_spk_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
+{
- struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card);
- if (scodec->gpio_pa)
gpiod_set_value_cansleep(scodec->gpio_pa,
!!SND_SOC_DAPM_EVENT_ON(event));
- return 0;
+}
+static const struct snd_soc_dapm_widget sun4i_codec_card_dapm_widgets[] = {
- SND_SOC_DAPM_SPK("Speaker", sun4i_codec_spk_event),
+};
+static const struct snd_soc_dapm_route sun4i_codec_card_dapm_routes[] = {
- { "Speaker", NULL, "Power Amplifier" },
+};
Shouldn't it be tied to the HP outputs instead?
You're right, the HP outputs are the final outputs, and since this is for enabling an external amplifier you're right. Since Mark has already merged this patch I will do a follow up patch to fix this.
Great, thanks!
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com