From: Charles Keepax <ckeepax@opensource.cirrus.com> To: <broonie@kernel.org> Cc: <james.schulman@cirrus.com>, <david.rhodes@cirrus.com>, <lgirdwood@gmail.com>, <alsa-devel@alsa-project.org>, <patches@opensource.cirrus.com>, <linux-kernel@vger.kernel.org> Subject: [PATCH 3/6] ASoC: cs47l15: Fix event generation for low power mux control Date: Thu, 23 Jun 2022 11:51:17 +0100 [thread overview] Message-ID: <20220623105120.1981154-3-ckeepax@opensource.cirrus.com> (raw) In-Reply-To: <20220623105120.1981154-1-ckeepax@opensource.cirrus.com> cs47l15_in1_adc_put always returns zero regardless of if the control value was updated. This results in missing notifications to user-space of the control change. Update the handling to return 1 when the value is changed. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- sound/soc/codecs/cs47l15.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs47l15.c b/sound/soc/codecs/cs47l15.c index 391fd7da331fd..1c7d52bef8935 100644 --- a/sound/soc/codecs/cs47l15.c +++ b/sound/soc/codecs/cs47l15.c @@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, snd_soc_kcontrol_component(kcontrol); struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); + if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode) + return 0; + switch (ucontrol->value.integer.value[0]) { case 0: /* Set IN1 to normal mode */ @@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, break; } - return 0; + return 1; } static const struct snd_kcontrol_new cs47l15_snd_controls[] = { -- 2.30.2
WARNING: multiple messages have this Message-ID (diff)
From: Charles Keepax <ckeepax@opensource.cirrus.com> To: <broonie@kernel.org> Cc: alsa-devel@alsa-project.org, patches@opensource.cirrus.com, lgirdwood@gmail.com, david.rhodes@cirrus.com, james.schulman@cirrus.com, linux-kernel@vger.kernel.org Subject: [PATCH 3/6] ASoC: cs47l15: Fix event generation for low power mux control Date: Thu, 23 Jun 2022 11:51:17 +0100 [thread overview] Message-ID: <20220623105120.1981154-3-ckeepax@opensource.cirrus.com> (raw) In-Reply-To: <20220623105120.1981154-1-ckeepax@opensource.cirrus.com> cs47l15_in1_adc_put always returns zero regardless of if the control value was updated. This results in missing notifications to user-space of the control change. Update the handling to return 1 when the value is changed. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> --- sound/soc/codecs/cs47l15.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs47l15.c b/sound/soc/codecs/cs47l15.c index 391fd7da331fd..1c7d52bef8935 100644 --- a/sound/soc/codecs/cs47l15.c +++ b/sound/soc/codecs/cs47l15.c @@ -122,6 +122,9 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, snd_soc_kcontrol_component(kcontrol); struct cs47l15 *cs47l15 = snd_soc_component_get_drvdata(component); + if (!!ucontrol->value.integer.value[0] == cs47l15->in1_lp_mode) + return 0; + switch (ucontrol->value.integer.value[0]) { case 0: /* Set IN1 to normal mode */ @@ -150,7 +153,7 @@ static int cs47l15_in1_adc_put(struct snd_kcontrol *kcontrol, break; } - return 0; + return 1; } static const struct snd_kcontrol_new cs47l15_snd_controls[] = { -- 2.30.2
next prev parent reply other threads:[~2022-06-23 10:51 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-23 10:51 [PATCH 1/6] ASoC: dapm: Initialise kcontrol data for mux/demux controls Charles Keepax 2022-06-23 10:51 ` Charles Keepax 2022-06-23 10:51 ` [PATCH 2/6] ASoC: cs35l41: Add ASP TX3/4 source to register patch Charles Keepax 2022-06-23 10:51 ` Charles Keepax 2022-06-23 10:51 ` Charles Keepax [this message] 2022-06-23 10:51 ` [PATCH 3/6] ASoC: cs47l15: Fix event generation for low power mux control Charles Keepax 2022-06-23 10:51 ` [PATCH 4/6] ASoC: madera: Fix event generation for OUT1 demux Charles Keepax 2022-06-23 10:51 ` Charles Keepax 2022-06-23 10:51 ` [PATCH 5/6] ASoC: madera: Fix event generation for rate controls Charles Keepax 2022-06-23 10:51 ` Charles Keepax 2022-06-23 10:51 ` [PATCH 6/6] ASoC: dapm: Move stereo autodisable check Charles Keepax 2022-06-23 10:51 ` Charles Keepax 2022-06-23 13:58 ` (subset) [PATCH 1/6] ASoC: dapm: Initialise kcontrol data for mux/demux controls Mark Brown 2022-06-23 13:58 ` Mark Brown
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=20220623105120.1981154-3-ckeepax@opensource.cirrus.com \ --to=ckeepax@opensource.cirrus.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=david.rhodes@cirrus.com \ --cc=james.schulman@cirrus.com \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=patches@opensource.cirrus.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: linkBe 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.