diff options
| author | Francois Mazard <f-mazard@ti.com> | 2011-05-31 09:23:05 +0100 |
|---|---|---|
| committer | Andy Green <andy.green@linaro.org> | 2011-05-31 11:04:34 +0100 |
| commit | 450f73dfb8472c546ec65914229062e493f26502 (patch) | |
| tree | 0fe02cd478e221050c772a49da7c51ff35d6d94d /sound | |
| parent | 26b3a1d62cdd4e68d1ef00b8540f1ae170c6811f (diff) | |
ASoc: sdp4430: Allow voice call during suspend
ASoC suspend doesn't check if DAIs are shared between
suspendable and non-suspendable DAI links. During voice
call, modem DAI link and associated DAIs need to continue
active, even if the DAIs are shared with non-suspendable
DAI links.
Temporal solution is to mark DAI links using shared DAIs as
non-suspendables. In Android, the non-suspendable DAI links
are not active when suspend happens. This solution should be
reworked when ASoC framework adds more support for non-
suspendable streams.
Change-Id: I34643d8cfd9951f476ce7adc25cb9f48cf59a6c0
Signed-off-by: Francois Mazard <f-mazard@ti.com>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/omap/sdp4430.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sound/soc/omap/sdp4430.c b/sound/soc/omap/sdp4430.c index a6c371ad52b..e33281b9dd8 100644 --- a/sound/soc/omap/sdp4430.c +++ b/sound/soc/omap/sdp4430.c @@ -389,8 +389,16 @@ static int sdp4430_twl6040_init(struct snd_soc_pcm_runtime *rtd) snd_soc_dapm_enable_pin(dapm, "Ext Spk"); snd_soc_dapm_enable_pin(dapm, "AFML"); snd_soc_dapm_enable_pin(dapm, "AFMR"); - snd_soc_dapm_enable_pin(dapm, "Headset Mic"); - snd_soc_dapm_enable_pin(dapm, "Headset Stereophone"); + snd_soc_dapm_disable_pin(dapm, "Headset Mic"); + snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); + + /* allow modem audio paths to run during suspend */ + snd_soc_dapm_ignore_suspend(dapm, "Ext Mic"); + snd_soc_dapm_ignore_suspend(dapm, "Ext Spk"); + snd_soc_dapm_ignore_suspend(dapm, "AFML"); + snd_soc_dapm_ignore_suspend(dapm, "AFMR"); + snd_soc_dapm_ignore_suspend(dapm, "Headset Mic"); + snd_soc_dapm_ignore_suspend(dapm, "Headset Stereophone"); ret = snd_soc_dapm_sync(dapm); if (ret) @@ -936,6 +944,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .fe_playback_channels = 2, .fe_capture_channels = 2, .no_host_mode = SND_SOC_DAI_LINK_NO_HOST, + .ignore_suspend = 1, }, { .name = "SDP4430 Media LP", @@ -992,6 +1001,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .codec_name = "twl6040-codec", .ops = &sdp4430_mcpdm_ops, + .ignore_suspend = 1, }, { .name = "Legacy DMIC", @@ -1006,6 +1016,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .codec_name = "dmic-codec.0", .ops = &sdp4430_dmic_ops, + .ignore_suspend = 1, }, /* @@ -1029,6 +1040,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .init = sdp4430_twl6040_init, .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_DL1, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_PDM_UL1, @@ -1045,6 +1057,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_UL, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_PDM_DL2, @@ -1061,6 +1074,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_DL2, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_PDM_VIB, @@ -1077,6 +1091,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .ops = &sdp4430_mcpdm_ops, .be_id = OMAP_ABE_DAI_PDM_VIB, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_BT_VX, @@ -1094,6 +1109,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp4430_mcbsp_ops, .be_id = OMAP_ABE_DAI_BT_VX, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_MM_EXT0, @@ -1128,6 +1144,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .be_hw_params_fixup = mcbsp_be_hw_params_fixup, .ops = &sdp4430_mcbsp_ops, .be_id = OMAP_ABE_DAI_MODEM, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_DMIC0, @@ -1145,6 +1162,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .be_hw_params_fixup = dmic_be_hw_params_fixup, .be_id = OMAP_ABE_DAI_DMIC0, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_DMIC1, @@ -1162,6 +1180,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .be_hw_params_fixup = dmic_be_hw_params_fixup, .be_id = OMAP_ABE_DAI_DMIC1, + .ignore_suspend = 1, }, { .name = OMAP_ABE_BE_DMIC2, @@ -1179,6 +1198,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = { .no_pcm = 1, /* don't create ALSA pcm for this */ .be_hw_params_fixup = dmic_be_hw_params_fixup, .be_id = OMAP_ABE_DAI_DMIC2, + .ignore_suspend = 1, }, }; |
