]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: cs42l43: Correct report for forced microphone jack
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Wed, 8 Jul 2026 10:34:30 +0000 (11:34 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 8 Jul 2026 16:06:20 +0000 (17:06 +0100)
Currently if the jack is forced to the microphone mode, it will report
as line in. Correct the report to microphone.

Fixes: fc918cbe874e ("ASoC: cs42l43: Add support for the cs42l43")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260708103430.1395207-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs42l43-jack.c

index 934666295ee307cfc8991996f5fadb647bf808b2..dbf45cabfffe3b9876e552bb73af1cba9689df82 100644 (file)
@@ -310,6 +310,7 @@ irqreturn_t cs42l43_bias_detect_clamp(int irq, void *data)
 #define CS42L43_JACK_ABSENT 0x0
 
 #define CS42L43_JACK_OPTICAL (SND_JACK_MECHANICAL | SND_JACK_AVOUT)
+#define CS42L43_JACK_MICROPHONE (SND_JACK_MECHANICAL | SND_JACK_MICROPHONE)
 #define CS42L43_JACK_HEADPHONE (SND_JACK_MECHANICAL | SND_JACK_HEADPHONE)
 #define CS42L43_JACK_HEADSET (SND_JACK_MECHANICAL | SND_JACK_HEADSET)
 #define CS42L43_JACK_LINEOUT (SND_JACK_MECHANICAL | SND_JACK_LINEOUT)
@@ -871,7 +872,7 @@ static const struct cs42l43_jack_override_mode {
                .hsdet_mode = CS42L43_JACK_3_POLE_SWITCHES,
                .mic_ctrl = (0x3 << CS42L43_JACK_STEREO_CONFIG_SHIFT) |
                            CS42L43_HS1_BIAS_EN_MASK | CS42L43_HS2_BIAS_EN_MASK,
-               .report = CS42L43_JACK_LINEIN,
+               .report = CS42L43_JACK_MICROPHONE,
        },
        [CS42L43_JACK_RAW_OPTICAL] = {
                .hsdet_mode = CS42L43_JACK_3_POLE_SWITCHES,