[alsa-devel] [PATCH v1 9/9] ASoC: Intel: Boards: add support for HDA codecs

Takashi Iwai tiwai at suse.de
Tue Feb 27 18:16:40 CET 2018


On Tue, 27 Feb 2018 18:06:50 +0100,
Ughreja, Rakesh A wrote:
> 
> 
> 
> >-----Original Message-----
> >From: Takashi Iwai [mailto:tiwai at suse.de]
> >Sent: Tuesday, February 27, 2018 10:25 PM
> >To: Ughreja, Rakesh A <rakesh.a.ughreja at intel.com>
> >Cc: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>; alsa-devel at alsa-
> >project.org; broonie at kernel.org; liam.r.girdwood at linux.intel.com; Koul, Vinod
> ><vinod.koul at intel.com>; Patches Audio <patches.audio at intel.com>
> >Subject: Re: [alsa-devel] [PATCH v1 9/9] ASoC: Intel: Boards: add support for HDA
> >codecs
> >
> >On Tue, 27 Feb 2018 17:20:05 +0100,
> >Ughreja, Rakesh A wrote:
> >>
> >> >> The hdac_hda is just a wrapper around the legacy codec driver
> >> >> and so it relies on the functionality of the legacy HDA codec driver
> >> >> for all the functionality including pin re-tasking.
> >> >>
> >> >> The widget names that you see above is just to complete the
> >> >> DAPM route. Based on your comment I am planning to rename it as
> >> >> following
> >> >>
> >> >> Analog In Endpoint
> >> >> Analog Output Endpoint
> >> >> Digital In Endpoint
> >> >> Digital Out Endpoint
> >> >>
> >> >> and will connect it to the Codec Pins.
> >> >>
> >> >> Also I think it makes sense to rename the codec Pin names accordingly
> >> >>
> >> >> Codec Analog Input Pin
> >> >> Codec Analog Output Pin
> >> >> Codec Digital Input Pin
> >> >> Codec Digital Output Pin
> >> >
> >> >Humm, what if you have more than one analog input? It's almost as if
> >> >this list should be created dynamically based on what is exposed by the
> >> >codec, I don't see how a static list will cover all configurations.
> >>
> >> If it is really required it can be done, the codec->pcm_list_head has got
> >> entries stored.
> >>
> >> But I am not sure what is the behavior of the legacy HDA codec driver
> >> when it sees more than one Analog inputs.
> >>
> >> Takashi, will I see two Analog entries in the pcm_list_head ?
> >
> >Yes, in a few cases, the generic parser creates another PCM for analog
> >I/O as "Alt Analog":
> 
> But this again is static and its named as "Alt Analog". 
> So, in the current code if I just create one more as "Alt Analog" DAI
> it should be fine ?

For the generic parser, it should be fine to up to three PCMs, yes.

> I do map them by searching the pcm_list_head when the application
> opens them.
> 
> Will I see more than one "Analog" and "Alt Analog" ever in the
> pcm_list_head ? or at max I am going to see one "Analog" and an
> additional "Alt Analog" PCM.

At least, not done by the generic parser.  If the codec has own parser
and handles differently, it's a different story.  For example, the
HDMI has quite different mechanisms, and it can give far more streams
for DP MST.  But you're not dealing with these types for now, so it
should be OK for Intel machines.


Takashi


More information about the Alsa-devel mailing list