lkml.org 
[lkml]   [2021]   [Dec]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] ASoC: add ES8156 codec driver
On Fri, Dec 10, 2021 at 09:53:39AM -0600, Pierre-Louis Bossart wrote:
> On 12/10/21 9:10 AM, Shumin Chen wrote:

> > +static int es8156_resume(struct snd_soc_component *codec)
> > +{
> > + return 0;

> es8156_set_bias_level(codec, SND_SOC_BIAS_ON);

> for symmetry with suspend?

Shouldn't be _ON since we're resuming so there should be no running
audio - _STANDBY would be more normal.

> > +static int es8156_probe(struct snd_soc_component *codec)
> > +{
> > + struct es8156_priv *es8156 = snd_soc_component_get_drvdata(codec);
> > + int ret = 0;
> > +
> > + es8156_codec = codec;
> > +
> > +#if MCLK
> > + es8156->mclk = devm_clk_get(codec->dev, "mclk");
> > + if (PTR_ERR(es8156->mclk) == -EPROBE_DEFER)
> > + return -EPROBE_DEFER;
> > + ret = clk_prepare_enable(es8156->mclk);
> > +#endif

> Unclear how MCLK will be enabled in a build, did you mean

> es8156->mclk = devm_clk_get_optional(codec->dev, "mclk");

Please also move all resource acquisition to the I2C level probe, that
means we don't get the card trying to instantiate repeatedly while the
CODEC isn't ready.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2021-12-10 17:29    [W:0.188 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site