[alsa-devel] [PATCH 01/12] ALSA: hdac: Add codec helper library

Takashi Iwai tiwai at suse.de
Mon Aug 29 14:55:41 CEST 2016


On Mon, 29 Aug 2016 14:47:33 +0200,
Subhransu S. Prusty wrote:
> 
> On Mon, Aug 29, 2016 at 10:41:22AM +0200, Takashi Iwai wrote:
> > On Mon, 29 Aug 2016 08:23:15 +0200,
> > Subhransu S. Prusty wrote:
> > > 
> > > Add hdac helpers to enumerate the HDA widgets and fill connection
> > > lists for each.
> > > 
> > > Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty at intel.com>
> > > Signed-off-by: Vinod Koul <vinod.koul at intel.com>
> > > ---
> > >  include/sound/hdaudio.h    |   1 +
> > >  sound/hda/ext/Makefile     |   3 +-
> > >  sound/hda/ext/hdac_codec.c | 182 +++++++++++++++++++++++++++++++++++++++++++++
> > >  sound/hda/ext/hdac_codec.h |  53 +++++++++++++
> > >  4 files changed, 238 insertions(+), 1 deletion(-)
> > >  create mode 100644 sound/hda/ext/hdac_codec.c
> > >  create mode 100644 sound/hda/ext/hdac_codec.h
> > > 
> > > diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
> > > index 93e63c5..79502dc 100644
> > > --- a/include/sound/hdaudio.h
> > > +++ b/include/sound/hdaudio.h
> > > @@ -71,6 +71,7 @@ struct hdac_device {
> > >  			 unsigned int flags, unsigned int *res);
> > >  
> > >  	/* widgets */
> > > +	struct list_head widget_list;
> > >  	unsigned int num_nodes;
> > >  	hda_nid_t start_nid, end_nid;
> > 
> > Any reason to add this to hdac_device although it's used only by
> > hda/ext?
> 
> Hi Takashi,
> 
> Added this in the hdac_device, as this looked to be the more suitable data
> structure for the widget_list and is more specific to the hdac device. 

Doesn't struct hdac_ext_device fit better?


Takashi


More information about the Alsa-devel mailing list