[alsa-devel] [PATCH v4] ASoC: soc-compress: add config item for soc-compress to make it compiled only when needed

Jie, Yang yang.jie at intel.com
Mon Oct 19 16:22:40 CEST 2015


> -----Original Message-----
> From: Charles Keepax [mailto:ckeepax at opensource.wolfsonmicro.com]
> Sent: Wednesday, October 14, 2015 8:47 PM
> To: Jie, Yang
> Cc: broonie at kernel.org; alsa-devel at alsa-project.org; Girdwood, Liam R
> Subject: Re: [alsa-devel] [PATCH v4] ASoC: soc-compress: add config item for
> soc-compress to make it compiled only when needed
> 
> On Wed, Oct 14, 2015 at 12:57:38PM +0000, Jie, Yang wrote:
> > > >  	int (*suspend)(struct snd_soc_dai *dai);
> > > >  	int (*resume)(struct snd_soc_dai *dai);
> > > >  	/* compress dai */
> > > > -	bool compress_dai;
> > > > +	int (*compress_new)(struct snd_soc_pcm_runtime *rtd, int num);
> > >
> > > This feels a little awkward to be using a function pointer here.
> > > It somewhat implies I might want to customise this function but am I
> > > every going to want to set this to something other than
> snd_soc_new_compress?
> >
> > Hi Charles, we used compress_dai bool before(in v2), but for that we
> > need add empty inline soc_compress_new(), Takashi suggest we use
> > callback func pointer here, it can be compress_new or any other creation
> here.
> > This is flexible and can be extended if any new stuff has to be handled.
> 
> If everyone else is happy with it, then I don't mind. It obviously works, just
> felt a little odd to me.

Umm, maybe we can extend it in the future when new stuff emerge. 

Hi Mark, sorry to bother you, do you have any more comment about this patch?

Thanks,
~Keyon

> 
> Thanks,
> Charles


More information about the Alsa-devel mailing list