linux_dsm_epyc7002/sound/soc
Hans de Goede 1310e737a6
ASoC: rt5651: Enable LDO and micbias1 supplies for jack-type detection
To determine if a plugged in jack is a headset (speakers + mic) or
headphones (mic contact shorted to ground) we use the micbias1 OVer Current
Detect (OVCD) functionality.

For this to work we need to have a micbias current to actually cause an
overcurrent condition when headphones are plugged in, so jack-type
detection requires both the LDO and micbias1 supplies to be on.

Before this commit there were 2 issues with the handling of this:
1) The LDO supply was force-enabled twice and never disabled again even
though it only needs to be forced on when doing jack-type detection
2) micbias1 was not force-enabled, and thus may be off when doing jack-type
detection

This commit fixes both by force-enabling the LDO and micbias1 supplies
before checking for an overcurrent condition and disabling them afterwards.

Note that both supplies will still get turned on normally (and OVCD will
protect against overcurrent) when the micbias1 is enabled normally because
the user has activated a sound stream recording from the mic.

Tested-by: Carlo Caione <carlo@endlessm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-01 19:15:36 +00:00
..
adi
amd ASoC: amd: added error checks in dma driver 2017-12-04 18:02:00 +00:00
atmel Merge remote-tracking branches 'asoc/topic/sam9x5_wm8731', 'asoc/topic/sgtl5000' and 'asoc/topic/sun8i-codec' into asoc-next 2018-02-07 11:25:47 +00:00
au1x ASoC: au1x: Fix timeout tests in au1xac97c_ac97_read() 2018-01-15 18:46:04 +00:00
bcm ASoC: bcm2835: fix hw_params error when device is in prepared state 2018-01-18 11:21:17 +00:00
blackfin License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
cirrus ASoC: ep93xx-ac97: Fix platform_get_irq's error checking 2017-12-01 13:04:51 +00:00
codecs ASoC: rt5651: Enable LDO and micbias1 supplies for jack-type detection 2018-03-01 19:15:36 +00:00
davinci ASoC: davinci-mcasp: Add rule to constrain the minimum period size 2018-01-05 11:48:51 +00:00
dwc
fsl Merge remote-tracking branches 'asoc/topic/fsl', 'asoc/topic/fsl-ssi', 'asoc/topic/fsl_asrc' and 'asoc/topic/hdac_hdmi' into asoc-next 2018-01-18 11:55:56 +00:00
generic Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next 2017-11-10 21:31:13 +00:00
hisilicon ASoC: hisilicon: remove duplicate includes 2017-12-06 17:48:23 +00:00
img Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/img' and 'asoc/topic/kirkwood' into asoc-next 2017-11-10 21:31:17 +00:00
intel ASoC: rt5651: Use standard component set_jack callback 2018-03-01 17:32:24 +00:00
jz4740
kirkwood
mediatek Merge remote-tracking branches 'asoc/topic/max98373', 'asoc/topic/mtk', 'asoc/topic/pcm', 'asoc/topic/rockchip' and 'asoc/topic/sam9g20_wm8731' into asoc-next 2018-02-07 11:25:44 +00:00
mxs Merge remote-tracking branches 'asoc/topic/mxs', 'asoc/topic/mxs-sgtl5000', 'asoc/topic/nau8540', 'asoc/topic/nau8824' and 'asoc/topic/nau8825' into asoc-next 2018-01-18 11:56:05 +00:00
nuc900 ASoC: nuc900: Fix a loop timeout test 2017-12-11 11:42:04 +00:00
omap Driver Core updates for 4.16-rc1 2018-02-01 10:00:28 -08:00
pxa Merge remote-tracking branches 'asoc/topic/ac97', 'asoc/topic/ac97-mfd', 'asoc/topic/amd' and 'asoc/topic/arizona-mfd' into asoc-next 2017-11-10 21:31:02 +00:00
qcom ASoC: don't use rtd->codec on qcom/apq8016_sbc 2017-12-05 12:44:23 +00:00
rockchip Merge remote-tracking branches 'asoc/topic/max98373', 'asoc/topic/mtk', 'asoc/topic/pcm', 'asoc/topic/rockchip' and 'asoc/topic/sam9g20_wm8731' into asoc-next 2018-02-07 11:25:44 +00:00
samsung ASoC: don't use rtd->codec on samsung/bells 2017-12-05 12:44:52 +00:00
sh Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next 2018-01-18 11:55:37 +00:00
sirf License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
spear License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sti
stm ASoC: stm32: add of dependency for stm32 drivers 2018-02-07 11:19:53 +00:00
sunxi Merge remote-tracking branches 'asoc/topic/sam9x5_wm8731', 'asoc/topic/sgtl5000' and 'asoc/topic/sun8i-codec' into asoc-next 2018-02-07 11:25:47 +00:00
tegra License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
txx9 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uniphier ASoC: uniphier: add support for UniPhier EVEA codec 2017-12-04 18:36:15 +00:00
ux500 ASoC: ux500: add MODULE_LICENSE tag 2018-01-10 16:42:10 +00:00
xtensa locking/atomics: COCCINELLE/treewide: Convert trivial ACCESS_ONCE() patterns to READ_ONCE()/WRITE_ONCE() 2017-10-25 11:01:08 +02:00
zte
Kconfig ASoC: uniphier: add support for UniPhier EVEA codec 2017-12-04 18:36:15 +00:00
Makefile ASoC: uniphier: add support for UniPhier EVEA codec 2017-12-04 18:36:15 +00:00
soc-ac97.c
soc-acpi.c ASoC: Intel - Convert to use acpi_dev_get_first_match_name() 2018-01-12 21:20:29 +00:00
soc-cache.c
soc-compress.c Merge remote-tracking branches 'asoc/fix/compress', 'asoc/fix/core', 'asoc/fix/dapm', 'asoc/fix/mtk' and 'asoc/fix/stm' into asoc-next 2018-02-07 11:21:02 +00:00
soc-core.c ASoC: Updates for v4.16 2018-02-07 12:11:09 -08:00
soc-dapm.c ASoC: Updates for v4.16 2018-02-07 12:11:09 -08:00
soc-devres.c
soc-generic-dmaengine-pcm.c
soc-io.c ASoC: add Component level .read/.write 2018-01-16 13:26:42 +00:00
soc-jack.c
soc-ops.c ASoC: change mask in snd_soc_get/put_volsw_sx to unsigned int 2018-01-03 12:32:04 +00:00
soc-pcm.c Merge remote-tracking branches 'asoc/topic/max98373', 'asoc/topic/mtk', 'asoc/topic/pcm', 'asoc/topic/rockchip' and 'asoc/topic/sam9g20_wm8731' into asoc-next 2018-02-07 11:25:44 +00:00
soc-topology.c
soc-utils.c ASoC: soc-utils: add const to dummy_codec 2017-11-29 10:48:45 +00:00