[alsa-devel] [RFC 2/4] ASoC: Intel: Add merrifield machine driver

Vinod Koul vinod.koul at intel.com
Tue May 6 18:49:45 CEST 2014


On Tue, May 06, 2014 at 04:17:19PM +0100, Liam Girdwood wrote:
> On Mon, 2014-05-05 at 23:31 +0530, Vinod Koul wrote:

> > +/* TODO: find better way of doing this */
> > +static struct snd_soc_dai *find_codec_dai(struct snd_soc_card *card, const char *dai_name)
> > +{
> > +	int i;
> > +	for (i = 0; i < card->num_rtd; i++) {
> > +		if (!strcmp(card->rtd[i].codec_dai->name, dai_name))
> > +			return card->rtd[i].codec_dai;
> > +	}
> > +	pr_err("%s: unable to find codec dai\n", __func__);
> > +	/* this should never occur */
> > +	WARN_ON(1);
> > +	return NULL;
> > +}
> > +
> 
> It would be good if we could eventually make the above 2 calls generic
> in core. Seem to be quite useful functions.
Yes I didnt do that as I wanted to check if we have a better method or not. With
multi-codec systems we dont have single codec for the card so finding this would
need lookup or else... Somehow I think we should have simpler solution, Mark??


> > +static int mrfld_wm8958_compr_set_params(struct snd_compr_stream *cstream)
> > +{
> > +	return 0;
> > +}
> 
> Do we need to implement this if it's not used ?
My bad, this was supposed to be removed but... :)

-- 
~Vinod


More information about the Alsa-devel mailing list