Skip to content

Commit afe3772

Browse files
mstrozekbroonie
authored andcommitted
ASoC: cs42l43: Increase default type detect time and button delay
Some problematic headsets have been discovered, to help with correctly identifying these, the detect time must be increased. Also improve the reliability of the impedance value from the button detect by slightly increasing the button detect delay. Fixes: 686b8f7 ("ASoC: cs42l43: Lower default type detect time") Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://msgid.link/r/20240604132843.3309114-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 65909a7 commit afe3772

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

sound/soc/codecs/cs42l43-jack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ int cs42l43_set_jack(struct snd_soc_component *component,
121121
priv->buttons[3] = 735;
122122
}
123123

124-
ret = cs42l43_find_index(priv, "cirrus,detect-us", 1000, &priv->detect_us,
124+
ret = cs42l43_find_index(priv, "cirrus,detect-us", 50000, &priv->detect_us,
125125
cs42l43_accdet_us, ARRAY_SIZE(cs42l43_accdet_us));
126126
if (ret < 0)
127127
goto error;
@@ -433,7 +433,7 @@ irqreturn_t cs42l43_button_press(int irq, void *data)
433433

434434
// Wait for 2 full cycles of comb filter to ensure good reading
435435
queue_delayed_work(system_wq, &priv->button_press_work,
436-
msecs_to_jiffies(10));
436+
msecs_to_jiffies(20));
437437

438438
return IRQ_HANDLED;
439439
}

0 commit comments

Comments
 (0)