[alsa-devel] Using simple-card to replace kirkwood-t5325.c

Andrew Lunn andrew at lunn.ch
Wed Apr 16 13:13:33 CEST 2014


On Tue, Apr 15, 2014 at 08:40:49PM +0200, Lars-Peter Clausen wrote:
> On 04/15/2014 06:13 PM, Andrew Lunn wrote:
> >Hi Folks
> 
> Adding a few people to Cc.
> 
> >
> >I'm an ALSA newbie, so if i say anything stupid, please let me know.
> >
> >I'm trying to replace sound/soc/kirkwood/kirkwood-t5325.c with DT,
> >using simple-card. I can get near, but i'm missing two things:
> >
> >There does not appear to be a way to represent this in DT:
> >
> >static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd)
> >{
> >	struct snd_soc_codec *codec = rtd->codec;
> >	struct snd_soc_dapm_context *dapm = &codec->dapm;
> >
> >	snd_soc_dapm_enable_pin(dapm, "Mic Jack");
> >	snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
> >	snd_soc_dapm_enable_pin(dapm, "Speaker");
> >
> >	return 0;
> >}
> >
> >It appears that quite a few drivers need to enable pins.
> 
> I'm not sure where this got started, but this mostly seems to be
> cargo-culting. External pins are enabled by default, there is no
> need to call snd_soc_dapm_enable_pin() unless
> snd_soc_dapm_disable_pin() has been called before for the same pin.

Ah, thanks for saying this. I just tested without, and all is good.

Thanks
	Andrew


More information about the Alsa-devel mailing list