alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Shreyas NC <shreyas.nc@intel.com>
To: Charles Keepax <ckeepax@opensource.cirrus.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"kuninori.morimoto.gx@renesas.com"
	<kuninori.morimoto.gx@renesas.com>,
	Patches Audio <patches.audio@intel.com>,
	"liam.r.girdwood@linux.intel.com"
	<liam.r.girdwood@linux.intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>
Subject: Re: [PATCH 1/3] ASoC: Add initial support for multiple CPU DAIs
Date: Mon, 12 Mar 2018 10:32:57 +0530	[thread overview]
Message-ID: <20180312050256.GA2887@snc-desk> (raw)
In-Reply-To: <20180309145043.lmdw5r3x7rhplk6x@localhost.localdomain>

Thanks for the review,

On Fri, Mar 09, 2018 at 08:20:43PM +0530, Charles Keepax wrote:
> > @@ -679,13 +687,17 @@ int snd_soc_suspend(struct device *dev)
> >  		card->suspend_pre(card);
> >  
> >  	list_for_each_entry(rtd, &card->rtd_list, list) {
> > -		struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
> > +		struct snd_soc_dai *cpu_dai;
> >  
> >  		if (rtd->dai_link->ignore_suspend)
> >  			continue;
> >  
> > -		if (cpu_dai->driver->suspend && !cpu_dai->driver->bus_control)
> > -			cpu_dai->driver->suspend(cpu_dai);
> > +		for (i = 0; i < rtd->num_cpu_dai; i++) {
> > +			cpu_dai = rtd->cpu_dais[i];
> > +			if (cpu_dai->driver->suspend &&
> > +					!cpu_dai->driver->bus_control)
> > +				cpu_dai->driver->suspend(cpu_dai);
> > +		}
> >  	}
> >  
> >  	/* close any waiting streams */
> > @@ -793,13 +805,18 @@ static void soc_resume_deferred(struct work_struct *work)
> 
> Is there not another call to cpu_dai->driver->suspend at the
> bottom of snd_soc_suspend you need to handle?
> 

Yes. Thanks for pointing out :)

> > @@ -1680,9 +1760,11 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
> >  	/* set default power off timeout */
> >  	rtd->pmdown_time = pmdown_time;
> >  
> > -	ret = soc_probe_dai(cpu_dai, order);
> > -	if (ret)
> > -		return ret;
> > +	for (i = 0; i < rtd->num_cpu_dai; i++) {
> > +		ret = soc_probe_dai(rtd->cpu_dais[i], order);
> > +		if (ret)
> > +			return ret;
> > +	}
> >  
> >  	/* probe the CODEC DAI */
> >  	for (i = 0; i < rtd->num_codecs; i++) {
> > @@ -1718,9 +1800,9 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
> >  		soc_dpcm_debugfs_add(rtd);
> >  #endif
> >  
> > -	if (cpu_dai->driver->compress_new) {
> > +	if (rtd->cpu_dais[0]->driver->compress_new) {
> >  		/*create compress_device"*/
> > -		ret = cpu_dai->driver->compress_new(rtd, rtd->num);
> > +		ret = rtd->cpu_dais[0]->driver->compress_new(rtd, rtd->num);
> >  		if (ret < 0) {
> >  			dev_err(card->dev, "ASoC: can't create compress %s\n",
> >  					 dai_link->stream_name);
> 
> Is it worth throwing an error or printing a warning to say that
> we don't support multiple DAIs on the compressed framework? Not
> sure if here is were we should do that though.
> 

Sure, makes sense. Let me check the right place to add that.

> > @@ -1736,7 +1818,8 @@ static int soc_probe_link_dais(struct snd_soc_card *card,
> >  				       dai_link->stream_name, ret);
> >  				return ret;
> >  			}
> > -			ret = soc_link_dai_pcm_new(&cpu_dai, 1, rtd);
> > +			ret = soc_link_dai_pcm_new(rtd->cpu_dais,
> > +					rtd->num_cpu_dai, rtd);
> >  			if (ret < 0)
> >  				return ret;
> >  			ret = soc_link_dai_pcm_new(rtd->codec_dais,
> > @@ -2361,10 +2444,11 @@ int snd_soc_poweroff(struct device *dev)
> 
> Do we need to update the handling in snd_soc_runtime_set_dai_fmt?
> Seems like we skipped over that.
> 

Yes, that is a miss as well :(
Thanks for pointing out, I'll fix and send v2.

--Shreyas

-- 

  reply	other threads:[~2018-03-12  5:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 11:00 [PATCH 0/3] ASoC: Add Multi CPU DAI support Shreyas NC
2018-03-06 11:00 ` [PATCH 1/3] ASoC: Add initial support for multiple CPU DAIs Shreyas NC
2018-03-09 14:50   ` Charles Keepax
2018-03-12  5:02     ` Shreyas NC [this message]
2018-03-06 11:00 ` [PATCH 2/3] ASoC: Add Multi CPU DAI support for PCM ops Shreyas NC
2018-03-09 15:53   ` Charles Keepax
2018-03-12  5:36     ` Shreyas NC
2018-03-06 11:00 ` [PATCH 3/3] ASoC: Add Multi CPU DAI support in DAPM Shreyas NC
2018-03-09 16:31   ` Charles Keepax
2018-03-12  5:37     ` Shreyas NC
2018-03-12  9:21       ` Charles Keepax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180312050256.GA2887@snc-desk \
    --to=shreyas.nc@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lars@metafoo.de \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=patches.audio@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).