Re: [linux-sunxi] Re: [PATCH v2 2/4] ASoC: sun4i-codec: Add support for PA gpio pin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux