[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yr2Eq0BUmi6mZsRY@sirena.org.uk>
Date: Thu, 30 Jun 2022 12:10:35 +0100
From: Mark Brown <broonie@...nel.org>
To: Vijendar Mukunda <Vijendar.Mukunda@....com>
Cc: alsa-devel@...a-project.org, dri-devel@...ts.freedesktop.org,
amd-gfx@...ts.freedesktop.org, Alexander.Deucher@....com,
Basavaraj.Hiregoudar@....com, Sunil-kumar.Dommati@....com,
zhuning@...rest-semi.com, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] ASoC: amd: add Machine driver for Jadeite platform
On Thu, Jun 30, 2022 at 08:47:54AM +0530, Vijendar Mukunda wrote:
> +static int st_es8336_hw_params(struct snd_pcm_substream *substream,
> + struct snd_pcm_hw_params *params)
> +{
> + int ret = 0;
> + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream);
> + struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
> +
> + ret = snd_soc_dai_set_sysclk(codec_dai, 0, params_rate(params) * 256, SND_SOC_CLOCK_IN);
> + if (ret < 0) {
> + dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
> + return ret;
> + }
> + return ret;
> +}
> +static const unsigned int st_channels[] = {
> + DUAL_CHANNEL,
> +};
> +
> +static const unsigned int st_rates[] = {
> + 48000,
> +};
If the clock rate is fixed why not just set the sysclk once at startup
too?
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists