alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state
@ 2012-12-20  3:36 Patrick Lai
  2012-12-20 10:29 ` Liam Girdwood
  2012-12-20 16:00 ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick Lai @ 2012-12-20  3:36 UTC (permalink / raw)
  To: broonie, lrg; +Cc: alsa-devel, Patrick Lai

When front-end PCM session is in paused state, back-end
PCM session will be put in paused state as well if given
front-end PCM session is the only client of given back-end.
Then, application closes front-end PCM session, DPCM
framework will not allow back-end enters HW_FREE state
so back-end will never get shutdown completely.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
---
 sound/soc/soc-pcm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ef22d0b..d340644 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1240,6 +1240,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
+		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
 			continue;
 
-- 
1.7.8.3
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state
@ 2012-12-12 16:49 Patrick Lai
  2012-12-15 14:49 ` Mark Brown
  0 siblings, 1 reply; 9+ messages in thread
From: Patrick Lai @ 2012-12-12 16:49 UTC (permalink / raw)
  To: lrg, broonie; +Cc: alsa-devel, Patrick Lai

When front-end PCM session is in paused state, back-end
PCM session will be put in paused state as well if given
front-end PCM session is the only client of given back-end.
Then, application closes front-end PCM session, DPCM
framework will not allow back-end enters HW_FREE state
so back-end will never get shutdown completely.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
---
 sound/soc/soc-pcm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ef22d0b..d340644 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1240,7 +1240,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
+		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
 			continue;
 
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
1.7.8.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state
@ 2012-12-06 18:39 Patrick Lai
  2012-12-07 13:37 ` Liam Girdwood
  2012-12-09 15:28 ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Patrick Lai @ 2012-12-06 18:39 UTC (permalink / raw)
  To: broonie, lrg; +Cc: alsa-devel, linux-arm-msm, Patrick Lai

When front-end PCM session is in paused state, back-end
PCM session will be put in paused state as well if given
front-end PCM session is the only client of given back-end.
Then, application closes front-end PCM session, DPCM
framework will not allow back-end enters HW_FREE state
so back-end will never get shutdown completely.

Signed-off-by: Patrick Lai <plai@codeaurora.org>
---
 sound/soc/soc-pcm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ef22d0b..d340644 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1240,7 +1240,7 @@ static int dpcm_be_dai_hw_free(struct snd_soc_pcm_runtime *fe, int stream)
 		if ((be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_PARAMS) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) &&
+		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) &&
 		    (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP))
 			continue;
 
-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
1.7.8.3

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2012-12-20 16:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20  3:36 [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state Patrick Lai
2012-12-20 10:29 ` Liam Girdwood
2012-12-20 16:00 ` Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2012-12-12 16:49 Patrick Lai
2012-12-15 14:49 ` Mark Brown
2012-12-06 18:39 Patrick Lai
2012-12-07 13:37 ` Liam Girdwood
2012-12-09 15:28 ` Mark Brown
2012-12-09 23:09   ` Patrick Lai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).