Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Derek [方德義]" <derek.fang@realtek.com>
To: Bard liao <yung-chuan.liao@linux.intel.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>
Cc: "Oder Chiou" <oder_chiou@realtek.com>,
	"Jack Yu" <jack.yu@realtek.com>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"lars@metafoo.de" <lars@metafoo.de>,
	"Albert Chen" <albertchen@realtek.com>,
	"Shuming [范書銘]" <shumingf@realtek.com>,
	"Flove(HsinFu)" <flove@realtek.com>
Subject: RE: [PATCH 1/2] ASoC: rt5682s: Add driver for ALC5682I-VS codec
Date: Tue, 31 Aug 2021 12:37:36 +0000	[thread overview]
Message-ID: <f78bb0bcf2f84e9592aa7bba48860fa3@realtek.com> (raw)
In-Reply-To: <8d4c9eed-e641-36c9-6727-ac744e87ff45@linux.intel.com>


> Subject: Re: [PATCH 1/2] ASoC: rt5682s: Add driver for ALC5682I-VS codec
> 
> On 8/26/2021 4:09 PM, derek.fang@realtek.com wrote:
> > +
> > +static int is_sys_clk_from_plla(struct snd_soc_dapm_widget *w,
> > +		struct snd_soc_dapm_widget *sink)
> > +{
> > +	struct snd_soc_component *component =
> snd_soc_dapm_to_component(w->dapm);
> > +	struct rt5682s_priv *rt5682s =
> snd_soc_component_get_drvdata(component);
> > +
> > +	if ((rt5682s->sysclk_src == RT5682S_CLK_SRC_PLL1) ||
> > +	    (rt5682s->sysclk_src == RT5682S_CLK_SRC_PLL2 &&
> > +	     rt5682s->pll_comb == USE_PLLAB))
> 
> 
> What about rt5682s->pll_comb == USE_PLLA?

Thanks for review.

My design thought of this check function is that
pll_comb would be set via snd_soc_dai_set_pll and 
sysclk_src would be set via snd_soc_dai_set_sysclk.

So I want to make sure the two settings are both correct first
and then power PLLA/B.
Otherwise, not power, although the chance of mistake is rare.

   ___   +-->[PLLA]-+-------------------> PLL1 out
  |Clk|  |          |    ___
  |Mux|--|          +-->|Clk|
  |___|  |	        |Mux|-->[PLLB]--> PLL2 out
	 +------------->|___|

> 
> > +		return 1;
> > +
> > +	return 0;
> > +}
> > +
> > +static int is_sys_clk_from_pllb(struct snd_soc_dapm_widget *w,
> > +		struct snd_soc_dapm_widget *sink)
> > +{
> > +	struct snd_soc_component *component =
> snd_soc_dapm_to_component(w->dapm);
> > +	struct rt5682s_priv *rt5682s =
> snd_soc_component_get_drvdata(component);
> > +
> > +	if (rt5682s->sysclk_src == RT5682S_CLK_SRC_PLL2)
> 
> 
> Should we also test rt5682s->pll_comb here?
> 
> 
> > +		return 1;
> > +
> > +	return 0;
> > +}
> >
> ------Please consider the environment before printing this e-mail.

      reply	other threads:[~2021-08-31 12:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26  8:09 [PATCH 1/2] ASoC: rt5682s: Add driver for ALC5682I-VS codec derek.fang
2021-08-26  8:09 ` [PATCH 2/2] ASoC: dt-bindings: rt5682s: add bindings for rt5682s derek.fang
2021-08-26 11:34   ` Mark Brown
2021-08-26 12:14 ` [PATCH 1/2] ASoC: rt5682s: Add driver for ALC5682I-VS codec Mark Brown
     [not found]   ` <e2ad57c54ea0422d8083bbf2b116563c@realtek.com>
2021-09-03 12:30     ` Mark Brown
2021-08-26 16:57 ` kernel test robot
2021-08-26 21:25 ` kernel test robot
2021-08-31 10:56 ` Bard liao
2021-08-31 12:37   ` Derek [方德義] [this message]

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=f78bb0bcf2f84e9592aa7bba48860fa3@realtek.com \
    --to=derek.fang@realtek.com \
    --cc=albertchen@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=jack.yu@realtek.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    --cc=shumingf@realtek.com \
    --cc=yung-chuan.liao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox