From: Tagir Garaev <tgaraev653@gmail.com>
To: cezary.rojewski@intel.com, pierre-louis.bossart@linux.dev,
broonie@kernel.org
Cc: liam.r.girdwood@linux.intel.com, peter.ujfalusi@linux.intel.com,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
Tagir Garaev <tgaraev653@gmail.com>
Subject: [PATCH] ASoC: Intel: sof_es8336: Fix headphone GPIO inversion logic
Date: Wed, 17 Dec 2025 18:51:39 +0300 [thread overview]
Message-ID: <20251217155139.185006-1-tgaraev653@gmail.com> (raw)
The headphone GPIO should be set to the inverse of speaker_en.
When speakers are enabled, headphones should be disabled and vice versa.
Currently both GPIOs are set to the same value (speaker_en), causing
audio to play through both speakers and headphones simultaneously
when headphones are plugged in.
Tested on Huawei Matebook (BOD-WXX9) with ES8336 codec.
Fixes: commit_sha ("ASoC: Intel: sof_es8336: add headphone GPIO
support")
Signed-off-by: Tagir Garaev <tgaraev653@gmail.com>
---
sound/soc/intel/boards/sof_es8336.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index 774fff58d..fce50fd9f 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -120,7 +120,7 @@ static void pcm_pop_work_events(struct work_struct *work)
gpiod_set_value_cansleep(priv->gpio_speakers, priv->speaker_en);
if (quirk & SOF_ES8336_HEADPHONE_GPIO)
- gpiod_set_value_cansleep(priv->gpio_headphone, priv->speaker_en);
+ gpiod_set_value_cansleep(priv->gpio_headphone, !priv->speaker_en);
}
--
2.52.0
reply other threads:[~2025-12-17 15:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20251217155139.185006-1-tgaraev653@gmail.com \
--to=tgaraev653@gmail.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.dev \
/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