OSDN Git Service

ASoC: sdm660_cdc: Fix pop after PDR on SDM660 internal codec
authorVatsal Bucha <vbucha@codeaurora.org>
Mon, 30 Apr 2018 07:19:34 +0000 (12:49 +0530)
committerVatsal Bucha <vbucha@codeaurora.org>
Tue, 1 May 2018 14:02:19 +0000 (19:32 +0530)
Pop is heard after PDR is triggered. This is
resolved by disable PA before boost is discharged.

CRs-Fixed: 2186640
Change-Id: Ie48668725f5162251cf09215f9448a6965fac3e2
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
sound/soc/codecs/sdm660_cdc/msm-analog-cdc.c

index cc7132d..a33725a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -3794,12 +3794,11 @@ static int msm_anlg_cdc_device_down(struct snd_soc_codec *codec)
        }
        msm_anlg_cdc_boost_off(codec);
        sdm660_cdc_priv->hph_mode = NORMAL_MODE;
-
-       /* 40ms to allow boost to discharge */
-       msleep(40);
        /* Disable PA to avoid pop during codec bring up */
        snd_soc_update_bits(codec, MSM89XX_PMIC_ANALOG_RX_HPH_CNP_EN,
                        0x30, 0x00);
+       /* 40ms to allow boost to discharge */
+       msleep(40);
        snd_soc_update_bits(codec, MSM89XX_PMIC_ANALOG_SPKR_DRV_CTL,
                        0x80, 0x00);
        snd_soc_write(codec,