From: Herve Codina <herve.codina@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v2 2/3] ASoC: codecs: Add support for the Renesas IDT821034 codec
Date: Fri, 20 Jan 2023 14:13:59 +0100 [thread overview]
Message-ID: <20230120141359.4606b617@bootlin.com> (raw)
In-Reply-To: <Y8qFPBEYJ1gH/Ycv@sirena.org.uk>
Hi Mark,
On Fri, 20 Jan 2023 12:12:44 +0000
Mark Brown <broonie@kernel.org> wrote:
> On Fri, Jan 20, 2023 at 10:50:35AM +0100, Herve Codina wrote:
>
> > +static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
> > + struct snd_ctl_elem_value *ucontrol)
> > +{
> > + struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
> > + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> > + struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component);
> > + struct idt821034_amp *amp;
>
> > +
> > + amp->gain = val;
> > + ret = 0;
> > +end:
> > + mutex_unlock(&idt821034->mutex);
> > + return ret;
>
> _put() methods should return 1 if the value changed to generate
> events - if you use the mixer-test selftest it'll spot this and
> other issues for you.
>
Thanks for pointing this. I will look at mixer-test and fix the _put()
methods return code in v3.
> Otherwise this looks fine.
Thanks for the review.
Best regards,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
WARNING: multiple messages have this Message-ID (diff)
From: Herve Codina <herve.codina@bootlin.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v2 2/3] ASoC: codecs: Add support for the Renesas IDT821034 codec
Date: Fri, 20 Jan 2023 14:13:59 +0100 [thread overview]
Message-ID: <20230120141359.4606b617@bootlin.com> (raw)
In-Reply-To: <Y8qFPBEYJ1gH/Ycv@sirena.org.uk>
Hi Mark,
On Fri, 20 Jan 2023 12:12:44 +0000
Mark Brown <broonie@kernel.org> wrote:
> On Fri, Jan 20, 2023 at 10:50:35AM +0100, Herve Codina wrote:
>
> > +static int idt821034_kctrl_gain_put(struct snd_kcontrol *kcontrol,
> > + struct snd_ctl_elem_value *ucontrol)
> > +{
> > + struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value;
> > + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> > + struct idt821034 *idt821034 = snd_soc_component_get_drvdata(component);
> > + struct idt821034_amp *amp;
>
> > +
> > + amp->gain = val;
> > + ret = 0;
> > +end:
> > + mutex_unlock(&idt821034->mutex);
> > + return ret;
>
> _put() methods should return 1 if the value changed to generate
> events - if you use the mixer-test selftest it'll spot this and
> other issues for you.
>
Thanks for pointing this. I will look at mixer-test and fix the _put()
methods return code in v3.
> Otherwise this looks fine.
Thanks for the review.
Best regards,
Hervé
--
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2023-01-20 13:15 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 9:50 [PATCH v2 0/3] Add the Renesas IDT821034 codec support Herve Codina
2023-01-20 9:50 ` Herve Codina
2023-01-20 9:50 ` [PATCH v2 1/3] dt-bindings: sound: Add Renesas IDT821034 codec Herve Codina
2023-01-20 9:50 ` Herve Codina
2023-01-22 13:46 ` Krzysztof Kozlowski
2023-01-22 13:46 ` Krzysztof Kozlowski
2023-01-20 9:50 ` [PATCH v2 2/3] ASoC: codecs: Add support for the " Herve Codina
2023-01-20 9:50 ` Herve Codina
2023-01-20 12:12 ` Mark Brown
2023-01-20 12:12 ` Mark Brown
2023-01-20 13:13 ` Herve Codina [this message]
2023-01-20 13:13 ` Herve Codina
2023-01-23 7:53 ` Christophe Leroy
2023-01-23 7:53 ` Christophe Leroy
2023-01-23 8:56 ` Herve Codina
2023-01-23 8:56 ` Herve Codina
2023-01-23 10:47 ` Christophe Leroy
2023-01-23 10:47 ` Christophe Leroy
2023-01-23 11:13 ` Christophe Leroy
2023-01-23 11:13 ` Christophe Leroy
2023-01-23 12:17 ` Herve Codina
2023-01-23 12:17 ` Herve Codina
2023-01-23 12:30 ` Christophe Leroy
2023-01-23 12:30 ` Christophe Leroy
2023-01-23 12:59 ` Herve Codina
2023-01-23 12:59 ` Herve Codina
2023-01-23 13:53 ` Christophe Leroy
2023-01-23 13:53 ` Christophe Leroy
2023-01-20 9:50 ` [PATCH v2 3/3] MAINTAINERS: add the Renesas IDT821034 codec entry Herve Codina
2023-01-20 9:50 ` Herve Codina
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=20230120141359.4606b617@bootlin.com \
--to=herve.codina@bootlin.com \
--cc=alsa-devel@alsa-project.org \
--cc=brgl@bgdev.pl \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=tiwai@suse.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.