diff mbox series

[1/2] Revert "ASoC: amd: acp: Set gpio_spkr_en to None for max speaker amplifer in machine driver"

Message ID 20220512154023.1185311-1-Vsujithkumar.Reddy@amd.com
State Superseded
Headers show
Series [1/2] Revert "ASoC: amd: acp: Set gpio_spkr_en to None for max speaker amplifer in machine driver" | expand

Commit Message

V sujith kumar Reddy May 12, 2022, 3:40 p.m. UTC
RT1019 codec has two ways of controlling the en_spkr.
one way is controlling through gpio pin method the another way is through codec register update.

Now Speaker enable/disable is controlled  through register update in BIOS.
So this patch reverse gpio logic, which is no longer in use.

This reverts commit 7fa5c33d043160eba3be9fb8e21588dff2a467c7.

Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
---
 sound/soc/amd/acp/acp-mach.h     | 1 +
 sound/soc/amd/acp/acp-sof-mach.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

V sujith kumar Reddy May 16, 2022, 3:41 p.m. UTC | #1
On 5/12/22 23:36, Mark Brown wrote:
> On Thu, May 12, 2022 at 09:10:22PM +0530, V sujith kumar Reddy wrote:
>> RT1019 codec has two ways of controlling the en_spkr.
>> one way is controlling through gpio pin method the another way is through codec register update.
>>
>> Now Speaker enable/disable is controlled  through register update in BIOS.
>> So this patch reverse gpio logic, which is no longer in use.
> Surely this needs to be keyed off BIOS version otherwise we'll break
> things for systems where the user hasn't updated their BIOS?
> 
> Please submit patches using subject lines reflecting the style for the
> subsystem, this makes it easier for people to identify relevant patches.
> Look at what existing commits in the area you're changing are doing and
> make sure your subject lines visually resemble what they're doing.
> There's no need to resubmit to fix this alone.


Hi Mark,

There is a mistake in commit message,Speaker enable and disable is 
controlled through rt1019 codec driver not through Bios.

Apologies for the inconvenience. We will update the commit message and 
resend.
diff mbox series

Patch

diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h
index c855f50d6b34..fd6299844ebe 100644
--- a/sound/soc/amd/acp/acp-mach.h
+++ b/sound/soc/amd/acp/acp-mach.h
@@ -21,6 +21,7 @@ 
 #include <linux/gpio/consumer.h>
 
 #define EN_SPKR_GPIO_GB                0x11F
+#define EN_SPKR_GPIO_NK                0x146
 #define EN_SPKR_GPIO_NONE      -EINVAL
 
 enum be_id {
diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-mach.c
index bf61a1726f0e..8243765d490f 100644
--- a/sound/soc/amd/acp/acp-sof-mach.c
+++ b/sound/soc/amd/acp/acp-sof-mach.c
@@ -37,7 +37,7 @@  static struct acp_card_drvdata sof_rt5682_max_data = {
 	.hs_codec_id = RT5682,
 	.amp_codec_id = MAX98360A,
 	.dmic_codec_id = DMIC,
-	.gpio_spkr_en = EN_SPKR_GPIO_NONE,
+	.gpio_spkr_en = EN_SPKR_GPIO_NK,
 };
 
 static struct acp_card_drvdata sof_rt5682s_rt1019_data = {
@@ -56,7 +56,7 @@  static struct acp_card_drvdata sof_rt5682s_max_data = {
 	.hs_codec_id = RT5682S,
 	.amp_codec_id = MAX98360A,
 	.dmic_codec_id = DMIC,
-	.gpio_spkr_en = EN_SPKR_GPIO_NONE,
+	.gpio_spkr_en = EN_SPKR_GPIO_NK,
 };
 
 static const struct snd_kcontrol_new acp_controls[] = {