summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wcd-mbhc-v2.h
AgeCommit message (Collapse)AuthorFilesLines
2025-04-07ASoC: codecs: wcd-mbhc: cleanup swap_gnd_mic apiSrinivas Kandagatla1-1/+1
Remove confusing and unused argument in swap_gnd_mic api, the second argument active is not really used, and always set to true in the mbhc drivers. The callback itself is used to toggle the gnd_mic lines when a cross connection is detected by mbhc circuits, so there is no need of this argument. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20250327100633.11530-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-06-18ASoC: codecs: wcd-mbhc: Constify passed MBHC reg fieldsKrzysztof Kozlowski1-2/+2
The wcd-mbhc-v2 helper code/module does not modify passed array of registry fields, thus it can be made const for code safety. It will also allow individual drivers to allocate the array in rodata. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://msgid.link/r/20240612-asoc-wcd9xxx-wide-cleanups-v1-1-0d15885b2a06@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2024-01-22ASoC: codec: wcd-mbhc-v2: add support when connected behind an USB-C audio muxNeil Armstrong1-0/+3
When the WCD codec is connected behind an USB-C audio mux, plug/unplug events, clock control, pull-up and threshold are different. Add a typec_analog_mux config enabling those changes and add two callbacks to trigger plug/unplug events from USB-C events. Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org> Link: https://msgid.link/r/20231219-topic-sm8650-upstream-wcd939x-codec-v4-3-1c3bbff2d7ab@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04ASoC: codecs: wcd: add multi button Headset detection supportSrinivas Kandagatla1-0/+340
Most new Qualcomm WCD codecs support MBHC(Multi Button Headset Control) via ADC. This patchset adds support to Common parts of this MBHC support so that WCD codecs need not duplicate them. To do that codec exposes set of register fields and callbacks to this common driver to control it. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210604115230.23259-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>