public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Vijendar Mukunda <Vijendar.Mukunda@amd.com>,
	broonie@kernel.org, alsa-devel@alsa-project.org
Cc: Alexander.Deucher@amd.com, Murali-krishna.Vemuri@amd.com,
	Virendra-Pratap.Arya@amd.com, Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Ravulapati Vishnu vardhan rao 
	<Vishnuvardhanrao.Ravulapati@amd.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Chuhong Yuan <hslester96@gmail.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] ASoC: amd: add support for rt5682 codec in machine driver
Date: Mon, 15 Mar 2021 11:00:57 -0500	[thread overview]
Message-ID: <efa02319-2abf-4fb9-efec-13b6279f3d78@linux.intel.com> (raw)
In-Reply-To: <1615824133-21553-1-git-send-email-Vijendar.Mukunda@amd.com>


> +static int rt5682_clk_enable(struct snd_pcm_substream *substream)
> +{
> +	int ret;
> +	struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
> +
> +	/*
> +	 * Set wclk to 48000 because the rate constraint of this driver is
> +	 * 48000. ADAU7002 spec: "The ADAU7002 requires a BCLK rate that is
> +	 * minimum of 64x the LRCLK sample rate." RT5682 is the only clk
> +	 * source so for all codecs we have to limit bclk to 64X lrclk.
> +	 */
> +	clk_set_rate(rt5682_dai_wclk, 48000);
> +	clk_set_rate(rt5682_dai_bclk, 48000 * 64);
> +	ret = clk_prepare_enable(rt5682_dai_bclk);
> +	if (ret < 0) {
> +		dev_err(rtd->dev, "can't enable master clock %d\n", ret);
> +		return ret;
> +	}
> +	return ret;
> +}

Out of curiosity, is there a reason why you use clk_prepare_enable() for 
the bclk but not for the wclk?

  reply	other threads:[~2021-03-15 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 16:01 [PATCH v3] ASoC: amd: add support for rt5682 codec in machine driver Vijendar Mukunda
2021-03-15 16:00 ` Pierre-Louis Bossart [this message]
2021-03-16 13:37   ` Mukunda,Vijendar
2021-03-16 14:53     ` Pierre-Louis Bossart
2021-03-17  5:57       ` Shuming [范書銘]

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=efa02319-2abf-4fb9-efec-13b6279f3d78@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Murali-krishna.Vemuri@amd.com \
    --cc=Vijendar.Mukunda@amd.com \
    --cc=Virendra-Pratap.Arya@amd.com \
    --cc=Vishnuvardhanrao.Ravulapati@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=hslester96@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.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