]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ASoC: sgtl5000: fix VAG power up timing
authorJean-Michel Hautbois <jhautbois@gmail.com>
Thu, 17 Dec 2015 10:07:23 +0000 (11:07 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Dec 2019 18:01:07 +0000 (18:01 +0000)
commit c803cc2dcd722e08020c1ba63bb5ceece4a19fdb upstream.

When power up, a "pop" is heard on line-in and mic-in.
An analysis of the PCM shows it lasts ~400ms
and looks like a filter response.
VAG power up should be delayed by 400ms as VAG power down is.

Signed-off-by: Jean-Michel Hautbois <jean-michel.hautbois@veo-labs.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
sound/soc/codecs/sgtl5000.c

index 31281d24e00955fab2af3932ffd46ff9d0f4eeb7..7b342c59e9473d57c685fc3e186907cd77047eae 100644 (file)
@@ -175,6 +175,7 @@ static int power_vag_event(struct snd_soc_dapm_widget *w,
        case SND_SOC_DAPM_POST_PMU:
                snd_soc_update_bits(w->codec, SGTL5000_CHIP_ANA_POWER,
                        SGTL5000_VAG_POWERUP, SGTL5000_VAG_POWERUP);
+               msleep(400);
                break;
 
        case SND_SOC_DAPM_PRE_PMD: