ASoC: rt5663: Add delay for jack plug in
authoroder_chiou@realtek.com <oder_chiou@realtek.com>
Wed, 30 Aug 2017 05:08:31 +0000 (13:08 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 30 Aug 2017 15:06:41 +0000 (16:06 +0100)
Codec initialize takes some time when 3.5mm jack plugged in. Add a
delay to report jack plugged event to user space to avoid pop noise.

Signed-off-by: Hsinyu Chao <hychao@chromium.org>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5663.c

index fdc2bbc..14716d2 100644 (file)
@@ -1705,6 +1705,9 @@ static void rt5663_jack_detect_work(struct work_struct *work)
                        default:
                                dev_err(codec->dev, "Unknown CODEC Version\n");
                        }
+
+                       /* Delay the jack insert report to avoid pop noise */
+                       msleep(30);
                } else {
                        /* jack is already in, report button event */
                        report = SND_JACK_HEADSET;