From 8a7ec532537c3cbeae5ce5346375cadb7d5be105 Mon Sep 17 00:00:00 2001 From: Axel Castaneda Gonzalez Date: Mon, 21 Feb 2011 17:12:38 -0600 Subject: [PATCH 50/60] ASoC: SDP4430: Set the pmdown_time for OMAP_ABE_BE_PDM_DL2 commit 322c58525be4fe472002812f02e9944bec4571c4 upstream For HF playback stream pmdown_time was not set to 500ms, 5000ms was used as a default delay, which was causing pops at the end of audio rendering because playback streams were powered down after McPDM shutdown. Change-Id: I1a8ca45229898ef1c1c9d6f04f3c985e790bbfb8 Signed-off-by: Axel Castaneda Gonzalez Integrated-by: Jingdong Lu --- sound/soc/omap/sdp4430.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index 46c3f99..9ee3aeb 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -361,7 +361,7 @@ static const struct snd_soc_dapm_route audio_map[] = { {"AFMR", NULL, "Aux/FM Stereo In"}, }; -static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) +static int sdp4430_twl6040_init_hs(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; struct snd_soc_dapm_context *dapm = &codec->dapm; @@ -422,6 +422,13 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) return ret; } +static int sdp4430_twl6040_init_hf(struct snd_soc_pcm_runtime *rtd) +{ + /* wait 500 ms before switching of HS power */ + rtd->pmdown_time = 500; + return 0; +} + /* TODO: make this a separate BT CODEC driver or DUMMY */ static struct snd_soc_dai_driver dai[] = { { @@ -703,7 +710,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .codec_name = "twl6040-codec", .no_pcm = 1, /* don't create ALSA pcm for this */ - .init = sdp4430_twl6040_init, + .init = sdp4430_twl6040_init_hs, .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_DL1, .ignore_suspend = 1, @@ -738,6 +745,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .codec_name = "twl6040-codec", .no_pcm = 1, /* don't create ALSA pcm for this */ + .init = sdp4430_twl6040_init_hf, .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_DL2, .ignore_suspend = 1, -- 1.7.4.1