1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
From 8a7ec532537c3cbeae5ce5346375cadb7d5be105 Mon Sep 17 00:00:00 2001
From: Axel Castaneda Gonzalez <x0055901@ti.com>
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 <x0055901@ti.com>
Integrated-by: Jingdong Lu <jingdong.lu@windriver.com>
---
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
|