Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281416 > unrolled thread

Re: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver

Started bySimran Rai <ssimran@broadcom.com>
First post2015-12-02 03:20 +0100
Last post2015-12-02 11:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver Simran Rai <ssimran@broadcom.com> - 2015-12-02 03:20 +0100
    Re: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver Mark Brown <broonie@kernel.org> - 2015-12-02 11:50 +0100

#1281416 — Re: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver

FromSimran Rai <ssimran@broadcom.com>
Date2015-12-02 03:20 +0100
SubjectRe: [PATCH v4 2/3] ASoC: cygnus: Add Cygnus audio DAI driver
Message-ID<qB5br-11k-11@gated-at.bofh.it>

On 11/22/2015 5:44 AM, Mark Brown wrote:
> On Mon, Nov 09, 2015 at 04:17:43PM -0800, Simran Rai wrote:
>
>> +#ifdef CONFIG_PM_SLEEP
>> +static int cygnus_ssp_suspend(struct snd_soc_dai *cpu_dai)
>> +{
>> +	struct cygnus_aio_port *aio = cygnus_dai_get_portinfo(cpu_dai);
>> +	struct cygnus_audio *cygaud = snd_soc_dai_get_drvdata(cpu_dai);
>> +
>> +	audio_ssp_out_disable(aio);
>> +	audio_ssp_in_disable(aio);
>> +	if (cygaud->active_ports > 0)
>> +		cygaud->active_ports--;
>> +
>> +	return 0;
>> +}
>> +
>> +static int cygnus_ssp_resume(struct snd_soc_dai *cpu_dai)
>> +{
>> +	return 0;
>> +}
> I'm a bit confused here - why do we need to disable things on suspend
> but not reenable them on resume?  I'd expect that the core would have
> quiesced any streams that need to be suspended before we get as far as
> suspending the drivers.
>
> Please also remove empty functions.
>
> Now I check I see that I'm repeating the questions I had on my previous
> review:
>
> | Blank line between functions and remove empty functions.  Though I'm not
> | clear why the result doesn't undo what the suspend did...
>
> Please don't ignore review comments.

Let me investigate this further and debug why the core did not 
quiescence the streams.

>
>> +	parent = clk_get_parent(cygaud->audio_clk[0]);
>> +	if (IS_ERR(parent)) {
>> +		error = PTR_ERR(parent);
>> +		goto err_get_parent;
>> +	}
>> +
>> +	/* Set PLL VCO Frequency (Hz) to default */
>> +	error = clk_set_rate(parent, DEFAULT_VCO);
>> +	if (error) {
>> +		dev_err(&pdev->dev,
>> +			"%s Set PLL VCO rate failed: %d\n", __func__, error);
>> +		goto err_get_parent;
>> +	}
> I would expect any initialisationn of clocks beyond the ones that the
> device directly interacts with to be handled within the clock API
> configuration rather than in a specific driver, this avoids the driver
> being dependent on a particular system integration.

I will have to figure out a way to propagate the frequency from leaf clocks to the parent
clock. Will send out another patch with the fix.

Thanks,
Simran

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1281620

FromMark Brown <broonie@kernel.org>
Date2015-12-02 11:50 +0100
Message-ID<qBd8Z-60F-15@gated-at.bofh.it>
In reply to#1281416

[Multipart message — attachments visible in raw view] — view raw

On Tue, Dec 01, 2015 at 06:17:54PM -0800, Simran Rai wrote:
> On 11/22/2015 5:44 AM, Mark Brown wrote:

> >I would expect any initialisationn of clocks beyond the ones that the
> >device directly interacts with to be handled within the clock API
> >configuration rather than in a specific driver, this avoids the driver
> >being dependent on a particular system integration.

> I will have to figure out a way to propagate the frequency from leaf clocks to the parent
> clock. Will send out another patch with the fix.

The idea is that the clock API should take care of this.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web