[PATCH 2/2] ASoC: max98390: Added Amplifier Driver

Mark Brown broonie at kernel.org
Tue May 12 12:33:16 CEST 2020


On Tue, May 12, 2020 at 06:13:05PM +0900, Steve Lee wrote:
> On Mon, May 11, 2020 at 8:03 PM Mark Brown <broonie at kernel.org> wrote:

> > > +static const char * const max98390_current_limit_text[] = {
> > > +     "0.00A", "0.50A", "1.00A", "1.05A", "1.10A", "1.15A", "1.20A", "1.25A",
> > > +     "1.30A", "1.35A", "1.40A", "1.45A", "1.50A", "1.55A", "1.60A", "1.65A",

> > This looks like it should be in DT too.

> Since this control  is needed while running system according to system
> battery situation.
> I'd keep this mixer for further use.

That's...  interesting for a current limit, and sounds like it would
have issues for the common case use of current limits to protect the
hardware.

> > > +static int max98390_dsm_calib_get(struct snd_kcontrol *kcontrol,
> > > +             struct snd_ctl_elem_value *ucontrol)
> > > +{
> > > +     struct snd_soc_component *component =
> > > +             snd_soc_kcontrol_component(kcontrol);
> > > +
> > > +     dev_warn(component->dev, "Get dsm_calib_get not supported\n");
> > > +
> > > +     return 0;
> > > +}

> > Just don't implement the operation if you can't implement it.

> If this not exist as dummy operation and all mixer was not working and
> could not implement better idea.

Could you be more specific about what you mean by "not working" or how
simply not initializing the value returned fixes things please?

> Could you consider it as with warn message ?

No, if there's a problem here we should fix it properly.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20200512/e643e0fc/attachment.sig>


More information about the Alsa-devel mailing list