OSDN Git Service

ASoC: sdm660_cdc: Fix no headset remove event after SSR
authorLaxminath Kasam <lkasam@codeaurora.org>
Fri, 10 Mar 2017 12:46:57 +0000 (18:16 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Wed, 22 Mar 2017 07:25:34 +0000 (00:25 -0700)
Restart mechanical detection as part of SSR device_up
functionality to receive headset events after SSR.

CRs-Fixed: 2015351
Change-Id: I359c701b8c7c086c087ab5fa7714b6bd3f7c4708
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c

index 0444026..c647549 100644 (file)
@@ -3797,6 +3797,9 @@ static int msm_anlg_cdc_device_up(struct snd_soc_codec *codec)
        msm_anlg_cdc_configure_cap(codec, false, false);
        wcd_mbhc_stop(&sdm660_cdc_priv->mbhc);
        wcd_mbhc_deinit(&sdm660_cdc_priv->mbhc);
+       /* Disable mechanical detection and set type to insertion */
+       snd_soc_update_bits(codec, MSM89XX_PMIC_ANALOG_MBHC_DET_CTL_1,
+                           0xA0, 0x20);
        ret = wcd_mbhc_init(&sdm660_cdc_priv->mbhc, codec, &mbhc_cb,
                            &intr_ids, wcd_mbhc_registers, true);
        if (ret)