ASoC: rt5645: Perform the initial jack detect at probe
Subsystems (3)
PATCH 1/1 ASoC: rt5645: Perform the initial jack detect at probe
The only initial jack detect is the rt5645_irq(0, rt5645) at the end of rt5645_set_jack_detect(). A card described with simple-audio-card has no machine driver to call that, so jack state is only ever sampled from an edge on hp-detect-gpios.
A headphone already in the socket at boot is therefore never noticed, and the card is silent with every mixer control set correctly. rt5645_jack_detect() is what force enables the "LDO2" and "Mic Det Power" supplies that the "HP amp" widget depends on, and what programs RT5645_CHARGE_PUMP away from its reset value, so without it "HP amp" cannot power up. Unplugging and replugging the jack is the only way to recover.
Do the detect at the end of the component probe when the driver owns a hp-detect GPIO and the codec's own jack detect is unused, which is the case that has no other trigger. A machine driver calling rt5645_set_jack_detect() later just repeats it.
--- sound/soc/codecs/rt5645.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/codecs/rt5645.c +4 -0
@@ -3496,6 +3496,10 @@ static int rt5645_probe(struct snd_soc_component *component)if (!rt5645->eq_param)return -ENOMEM ; +/* no machine driver to call rt5645_set_jack_detect(), so detect here */ +if (!rt5645->pdata.jd_mode && rt5645->gpiod_hp_det) +rt5645_irq (0 , rt5645); +return 0 ; }
Signature · 1 line
2.53.0
Mark Brown
maintainerQuoted 1 line · Rudi Heitbaum
ASoC: rt5645: Perform the initial jack detect at probe
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: rt5645: Perform the initial jack detect at probe
https://git.kernel.org/broonie/sound/c/54b279699279
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark