All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: Curtis Malainey <cujomalainey@chromium.org>
Cc: Oder Chiou <oder_chiou@realtek.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	alsa-devel@alsa-project.org,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Ben Zhang <benzh@chromium.org>, Takashi Iwai <tiwai@suse.com>,
	Jie Yang <yang.jie@linux.intel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Richard Fontana <rfontana@redhat.com>,
	Mark Brown <broonie@kernel.org>, Bard Liao <bardliao@realtek.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [alsa-devel] [PATCH v2 11/12] ASoC: rt5677: Set ADC clock to use PLL and enable ASRC
Date: Sun, 20 Oct 2019 22:38:33 +0200	[thread overview]
Message-ID: <6be89c8d-e3d4-311f-667c-8e7096f76fab@intel.com> (raw)
In-Reply-To: <20191018200449.141123-12-cujomalainey@chromium.org>

On 2019-10-18 22:04, Curtis Malainey wrote:
> Use the PLL to kept the correct 24M clock rate so frequency shift does
> not occur when using the DSP VAD.
> 

> +static int bdw_rt5677_dsp_hw_params(struct snd_pcm_substream *substream,
> +	struct snd_pcm_hw_params *params)
> +{
> +	struct snd_soc_pcm_runtime *rtd = substream->private_data;
> +	struct snd_soc_dai *codec_dai = rtd->codec_dai;
> +	int ret;
> +
> +	ret = snd_soc_dai_set_sysclk(codec_dai, RT5677_SCLK_S_PLL1, 24576000,
> +		SND_SOC_CLOCK_IN);
> +	if (ret < 0) {
> +		dev_err(rtd->dev, "can't set codec sysclk configuration\n");
> +		return ret;
> +	}
> +	ret = snd_soc_dai_set_pll(codec_dai, 0, RT5677_PLL1_S_MCLK,
> +		24000000, 24576000);
> +	if (ret < 0) {
> +		dev_err(rtd->dev, "can't set codec pll configuration\n");
> +		return ret;

nitpick: you may skip "return ret" here and drop parenthesis as 
function's final line does the job.

> +	}
> +
> +	return ret;

If you decide to stick with leaving above as is, explicitly returning 0 
would be preferred.

> +}
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2019-10-20 20:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-18 20:04 [alsa-devel] [PATCH v2 00/12] Add Samus Hotwording for RT5677 Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 01/12] ASoC: rt5677: Add a PCM device for streaming hotword via SPI Curtis Malainey
2019-10-22 18:15   ` [alsa-devel] Applied "ASoC: rt5677: Add a PCM device for streaming hotword via SPI" to the asoc tree Mark Brown
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 02/12] ASoC: rt5677: Load firmware via SPI using delayed work Curtis Malainey
2019-10-22 16:13   ` Mark Brown
2019-10-22 18:28     ` Curtis Malainey
2019-10-22 19:01       ` Mark Brown
2019-10-25 23:34         ` Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 03/12] ASoC: bdw-rt5677: Add a DAI link for rt5677 SPI PCM device Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 04/12] ASoC: rt5677: Enable jack detect while DSP is running Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 05/12] ASoC: rt5677: Add DAPM audio path for hotword stream Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 06/12] ASoC: rt5677: Mark reg RT5677_PWR_ANLG2 as volatile Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 07/12] ASoC: rt5677: Stop and restart DSP over suspend/resume Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 08/12] ASoC: rt5677: Disable irq at suspend Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 09/12] ASoC: rt5677: Allow VAD to be shut on/off at all times Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 10/12] ASoC: bdw-rt5677: Turn on MCLK1 for DSP via DAPM Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 11/12] ASoC: rt5677: Set ADC clock to use PLL and enable ASRC Curtis Malainey
2019-10-20 20:38   ` Cezary Rojewski [this message]
2019-10-21 19:38     ` Curtis Malainey
2019-10-18 20:04 ` [alsa-devel] [PATCH v2 12/12] ASoC: rt5677: Wait for DSP to boot before loading firmware Curtis Malainey

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=6be89c8d-e3d4-311f-667c-8e7096f76fab@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=benzh@chromium.org \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@chromium.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rfontana@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tiwai@suse.com \
    --cc=yang.jie@linux.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.