Skip to content

Commit 213c4e5

Browse files
Tydik42broonie
authored andcommitted
ASoC: Intel: sof_es8336: fix headphone GPIO logic inversion
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: 6e1ff14 ("ASoC: Intel: sof_es8336: support a separate gpio to control headphone") Signed-off-by: Tagir Garaev <tgaraev653@gmail.com> Link: https://patch.msgid.link/20260121152435.101698-1-tgaraev653@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 9502b7d commit 213c4e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/intel/boards/sof_es8336.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static void pcm_pop_work_events(struct work_struct *work)
120120
gpiod_set_value_cansleep(priv->gpio_speakers, priv->speaker_en);
121121

122122
if (quirk & SOF_ES8336_HEADPHONE_GPIO)
123-
gpiod_set_value_cansleep(priv->gpio_headphone, priv->speaker_en);
123+
gpiod_set_value_cansleep(priv->gpio_headphone, !priv->speaker_en);
124124

125125
}
126126

0 commit comments

Comments
 (0)