linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Shuming [范書銘]" <shumingf@realtek.com>
To: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Cc: "Oder Chiou" <oder_chiou@realtek.com>,
	"Sunil-kumar.Dommati@amd.com" <Sunil-kumar.Dommati@amd.com>,
	"open list" <linux-kernel@vger.kernel.org>,
	"Basavaraj.Hiregoudar@amd.com" <Basavaraj.Hiregoudar@amd.com>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Vijendar.Mukunda@amd.com" <Vijendar.Mukunda@amd.com>,
	"Alexander.Deucher@amd.com" <Alexander.Deucher@amd.com>,
	"Jack Yu" <jack.yu@realtek.com>,
	"Derek [方德義]" <derek.fang@realtek.com>,
	"Flove(HsinFu)" <flove@realtek.com>,
	"Albert Chen" <albertchen@realtek.com>
Subject: RE: [PATCH v2 1/1] ASoC: rt5682s: Add dapm switch to mute/unmute HP playback output
Date: Thu, 9 Dec 2021 02:25:56 +0000	[thread overview]
Message-ID: <126eab881bb540bc84ecc5cb9c6865a8@realtek.com> (raw)
In-Reply-To: <20211208185517.1555884-2-AjitKumar.Pandey@amd.com>

> Subject: [PATCH v2 1/1] ASoC: rt5682s: Add dapm switch to mute/unmute HP
> playback output
> 
> Add dapm switch in playback path to mute or unmute HP output data.
> We will set and reset MUTE_SFT bit in RT5682S_HP_CTRL_1 register based on
> switch value to mute or unmute respective channel.
> 
> Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
> ---
>  sound/soc/codecs/rt5682s.c | 19 +++++++++++++++++--
>  1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c index
> d49a4f68566d..21ab5f7df422 100644
> --- a/sound/soc/codecs/rt5682s.c
> +++ b/sound/soc/codecs/rt5682s.c
> @@ -1573,6 +1573,14 @@ static const char * const
> rt5682s_adcdat_pin_select[] = {
>  	"ADCDAT1", "ADCDAT2",
>  };
> 
> +/* Out Switch */
> +static const struct snd_kcontrol_new hpol_switch =
> +	SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT5682S_HP_CTRL_1,
> +		RT5682S_L_MUTE_SFT, 1, 1);
> +static const struct snd_kcontrol_new hpor_switch =
> +	SOC_DAPM_SINGLE_AUTODISABLE("Switch", RT5682S_HP_CTRL_1,
> +		RT5682S_R_MUTE_SFT, 1, 1);
> +
>  static SOC_VALUE_ENUM_SINGLE_DECL(rt5682s_adcdat_pin_enum,
>  	RT5682S_GPIO_CTRL_1, RT5682S_GP4_PIN_SFT,
> RT5682S_GP4_PIN_MASK,
>  	rt5682s_adcdat_pin_select, rt5682s_adcdat_pin_values); @@ -1746,6
> +1754,11 @@ static const struct snd_soc_dapm_widget
> rt5682s_dapm_widgets[] = {
>  	SND_SOC_DAPM_PGA_S("HP Amp", 1, SND_SOC_NOPM, 0, 0,
> rt5682s_hp_amp_event,
>  		SND_SOC_DAPM_POST_PMD | SND_SOC_DAPM_POST_PMU),
> 
> +	SND_SOC_DAPM_SWITCH("HPOL Playback", SND_SOC_NOPM, 0, 0,
> +		&hpol_switch),
> +	SND_SOC_DAPM_SWITCH("HPOR Playback", SND_SOC_NOPM, 0, 0,
> +		&hpor_switch),
> +
>  	/* CLK DET */
>  	SND_SOC_DAPM_SUPPLY("CLKDET SYS", RT5682S_CLK_DET,
>  		RT5682S_SYS_CLK_DET_SFT, 0, NULL, 0), @@ -1895,8 +1908,10 @@
> static const struct snd_soc_dapm_route rt5682s_dapm_routes[] = {
>  	{"HP Amp", NULL, "CLKDET SYS"},
>  	{"HP Amp", NULL, "SAR"},
> 
> -	{"HPOL", NULL, "HP Amp"},
> -	{"HPOR", NULL, "HP Amp"},
> +	{"HPOL Playback", "Switch", "HP Amp"},
> +	{"HPOR Playback", "Switch", "HP Amp"},
> +	{"HPOL", NULL, "HPOL Playback"},
> +	{"HPOR", NULL, "HPOR Playback"},
>  };

RT5682S enables the 1 bit control for HP output.
Therefore, the setting of RT5682S_HP_CTRL_1[15][7] will be not effective.



  reply	other threads:[~2021-12-09  2:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211208185517.1555884-1-AjitKumar.Pandey@amd.com>
2021-12-08 18:55 ` [PATCH v2 1/1] ASoC: rt5682s: Add dapm switch to mute/unmute HP playback output Ajit Kumar Pandey
2021-12-09  2:25   ` Shuming [范書銘] [this message]
2021-12-16 11:43     ` Ajit Kumar Pandey
2021-12-17  2:25       ` Derek [方德義]

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=126eab881bb540bc84ecc5cb9c6865a8@realtek.com \
    --to=shumingf@realtek.com \
    --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=albertchen@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=derek.fang@realtek.com \
    --cc=flove@realtek.com \
    --cc=jack.yu@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oder_chiou@realtek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).