From: Mark Brown <broonie@kernel.org>
To: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Cc: alsa-devel@alsa-project.org, Vijendar.Mukunda@amd.com,
Alexander.Deucher@amd.com, Basavaraj.Hiregoudar@amd.com,
Sunil-kumar.Dommati@amd.com, Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: max98357a: Add mixer control to mute/unmute speaker
Date: Wed, 8 Dec 2021 20:21:25 +0000 [thread overview]
Message-ID: <YbETxcwa83U8WXTO@sirena.org.uk> (raw)
In-Reply-To: <20211208185850.1555996-1-AjitKumar.Pandey@amd.com>
[-- Attachment #1: Type: text/plain, Size: 859 bytes --]
On Thu, Dec 09, 2021 at 12:28:49AM +0530, Ajit Kumar Pandey wrote:
> +static int speaker_mute_put(struct snd_kcontrol *kcontrol,
> + struct snd_ctl_elem_value *ucontrol)
> +{
> + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
> + struct max98357a_priv *max98357a = snd_soc_component_get_drvdata(component);
> + int mode = ucontrol->value.enumerated.item[0];
> +
> + max98357a->sdmode_switch = mode;
> + gpiod_set_value_cansleep(max98357a->sdmode, mode);
> + dev_dbg(component->dev, "set sdmode to %d", mode);
This looks like it should just be a DAPM widget - it's just a generic
GPIO control, there's no connection with the CODEC that I can see so it
definitely shouldn't be in the CODEC driver. Often trivial stuff like
this is done in the machine driver, though the simple-amplifier driver
is probably a good fit here.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2021-12-08 20:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 18:58 [PATCH] ASoC: max98357a: Add mixer control to mute/unmute speaker Ajit Kumar Pandey
2021-12-08 20:21 ` Mark Brown [this message]
2021-12-08 20:40 ` Mark Brown
2021-12-16 12:24 ` Ajit Kumar Pandey
2021-12-16 13:30 ` Mark Brown
2021-12-17 13:58 ` Ajit Kumar Pandey
2021-12-08 20:25 ` Jaroslav Kysela
2021-12-08 20:33 ` 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=YbETxcwa83U8WXTO@sirena.org.uk \
--to=broonie@kernel.org \
--cc=AjitKumar.Pandey@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Vijendar.Mukunda@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox