[alsa-devel] [PATCH v3 3/7] ASoC: hda - adds SoC controller and stream operations

Takashi Iwai tiwai at suse.de
Thu Apr 30 11:49:34 CEST 2015


At Thu, 30 Apr 2015 15:05:04 +0530,
Vinod Koul wrote:
> 
> On Wed, Apr 29, 2015 at 02:26:40PM +0200, Takashi Iwai wrote:
> > At Wed, 29 Apr 2015 01:24:26 +0530,
> > Vinod Koul wrote:
> > > 
> > > +struct soc_hdac_stream {
> > > +	struct hdac_stream hstream;
> > > +	unsigned int decoupled:1;
> > > +	void __iomem *pphc_addr; /* processing pipe host stream reg pointer */
> > > +	void __iomem *pplc_addr; /* processing pipe link stream reg pointer */
> > > +	bool link_locked:1;
> > > +	struct snd_pcm_substream *link_substream;
> > > +	bool link_prepared;
> > 
> > The bit fields should be gathered into the same place so that the
> > struct can be packed better.  Also, use bool consistently for bit
> > fields, too.
> Sure, btw should we use bitfields or bool alone. I dont see much reason to
> use bitfields here?

You can use a bit field for boolean instead of unsigned int, e.g.
	bool foo:1;

> > > +			continue;
> > > +
> > > +		if (hlink->lsdiid && (0x1 << addr)) {
> > > +			snprintf(hlink->codec[addr],
> > > +					sizeof(hlink->codec[addr]),
> > > +					"codec#%03x.%d", addr, addr);
> > 
> > Does repeating the address twice make sense?
> It doesnt :)

Looking at the codec side, it might be that the ASoC core appends the
dot automatically?  If so, we may accept it, of course.


Takashi


More information about the Alsa-devel mailing list