summaryrefslogtreecommitdiffstats
path: root/sound/soc/sunxi
diff options
context:
space:
mode:
authorMark Brown2019-05-30 17:47:43 +0200
committerMark Brown2019-05-30 17:47:43 +0200
commit79b3b7c4a396b9fa1963ac70e853998633e8151d (patch)
treec1e507b4a6fff773ec81e90e1be11f1b35e773b6 /sound/soc/sunxi
parentASoC: SOF: add COMPILE_TEST for PCI options (diff)
parentASoC: sun4i-codec: fix first delay on Speaker (diff)
downloadkernel-qcow2-linux-79b3b7c4a396b9fa1963ac70e853998633e8151d.tar.gz
kernel-qcow2-linux-79b3b7c4a396b9fa1963ac70e853998633e8151d.tar.xz
kernel-qcow2-linux-79b3b7c4a396b9fa1963ac70e853998633e8151d.zip
Merge branch 'asoc-5.2' into asoc-5.3
Diffstat (limited to 'sound/soc/sunxi')
-rw-r--r--sound/soc/sunxi/sun4i-codec.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 15d08e343b47..28d2f7713f8d 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1329,6 +1329,15 @@ static int sun4i_codec_spk_event(struct snd_soc_dapm_widget *w,
gpiod_set_value_cansleep(scodec->gpio_pa,
!!SND_SOC_DAPM_EVENT_ON(event));
+ if (SND_SOC_DAPM_EVENT_ON(event)) {
+ /*
+ * Need a delay to wait for DAC to push the data. 700ms seems
+ * to be the best compromise not to feel this delay while
+ * playing a sound.
+ */
+ msleep(700);
+ }
+
return 0;
}