On Fri, Apr 08, 2022 at 02:16:41AM +0900, Akihiko Odaki wrote:
On 2022/04/08 1:37, Mark Brown wrote:
Look at how other devices with jack detection hardware handle this and follow a similar pattern.
The situation actually seems quite a mess. You can find many drivers not using DAPM pins by searching for snd_soc_card_jack_new() calls with num_pins argument is 0. ams-delta-audio is exceptional as it adds DAPM pins later with snd_soc_jack_add_pins().
Sure, I'm not surprised there's some buggy drivers.
They do not have kcontrols for the jacks. The only exception is skl_hda_dsp_generic which calls snd_jack_add_new_kctl() as my patch does. Looking at other devices is probably not helpful to find an alternative in this case.
The first driver I randomly picked when searching was sound/soc/intel/boards/skl_rt286.c which seems to DTRT here, you can also see sound/soc/samsung/speyside.c for another example.