mbox series

[v4,0/3] ASoC: codecs: msm8916-wcd-analog: Add support to MBHC

Message ID 20170817080211.11453-1-srinivas.kandagatla@linaro.org
Headers show
Series ASoC: codecs: msm8916-wcd-analog: Add support to MBHC | expand

Message

Srinivas Kandagatla Aug. 17, 2017, 8:02 a.m. UTC
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


This patchset adds support to MBHC(Multibutton headset control) block in PM8916
analog block. MBHC support comes from 2 blocks first mechanical headset detection
and second headset type, 5 button detection.

This patchset adds support to:
1> Support to NC and NO type of headset Jacks.
2> Mechanical insertion and detection of headset jack.
3> Detect a 3 pole Headphone and a 4 pole Headset.
4> Detect 5 buttons.

Tested it on DB410c with Audio Mezz board with 4 pole and 3 pole
and during playback and recording use cases.

Changes since v3(https://lkml.org/lkml/2017/8/2/609):
	- dropped ASoC: codecs: msm8916-wcd-analog: move codec reset to probe
	- fixed rampup time for micbias spotted by Mark.
	- Added tested-by from Dimien
	- Dropped dt patch from this series.

Srinivas Kandagatla (3):
  ASoC: codecs: msm8916-wcd-analog: get micbias voltage from dt
  ASoC: codecs: msm8916-wcd-analog: add MBHC support
  ASoC: qcom: apq8016-sbc: Add support to Headset JACK

 .../bindings/sound/qcom,msm8916-wcd-analog.txt     |  18 +-
 sound/soc/codecs/msm8916-wcd-analog.c              | 400 ++++++++++++++++++++-
 sound/soc/qcom/apq8016_sbc.c                       |  34 ++
 3 files changed, 444 insertions(+), 8 deletions(-)

-- 
2.11.0

Comments

Mark Brown Aug. 21, 2017, 6:24 p.m. UTC | #1
On Thu, Aug 17, 2017 at 10:02:09AM +0200, srinivas.kandagatla@linaro.org wrote:

> +		/*

> +		 * Special headset needs MICBIAS as 2.7V so wait for

> +		 * 50 msec for the MICBIAS to reach 2.7 volts.

> +		 */

> +		if (wcd->micbias_mv >= 2700)

> +			msleep(50);


This doesn't sound like how ramping usually works?  Normally it'd be at
least somewhat proportional to voltage, a sudden cutoff like this seems
strange.  I'll apply but this looks like it needs fixing, please send an
incremental patch.