]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 27 Oct 2021 02:18:16 +0000 (10:18 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 15 Nov 2021 13:26:51 +0000 (13:26 +0000)
commitba873390da87f1094dfe77693664af9863264741
tree1309923eb86f33c1b60b726b68c286b9424a128d
parent4629ff885e12be26c9c0ea94661f9240a2e549e7
ASoC: Intel: sof_sdw: fix jack detection on HP Spectre x360 convertible

Tests on device show the JD2 mode does not work at all, the 'Headphone
Jack' and 'Headset Mic Jack' are shown as 'on' always.

JD1 seems to be the better option, with at least a change between the
two cases.

Jack not plugged-in:
[root@fedora ~]# amixer -Dhw:0 cget numid=12
numid=12,iface=CARD,name='Headphone Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=off

Jack plugged-in:
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on
[root@fedora ~]# amixer -Dhw:0 cget numid=13
numid=13,iface=CARD,name='Headset Mic Jack'
  ; type=BOOLEAN,access=r-------,values=1
  : values=on

The 'Headset Mic Jack' is updated with a delay which seems normal with
additional calibration needed.

Fixes: 993d796b0e8a ('ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20211027021824.24776-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/sof_sdw.c