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-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

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

On 06/12/12 18:39, Patrick Lai wrote:
> 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>

Acked-by: Liam Girdwood <lrg@ti.com>

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

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

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

On Thu, Dec 06, 2012 at 10:39:59AM -0800, Patrick Lai wrote:
> 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.

I'm not entirely sure what this patch is generated against but it
doesn't appear to apply to either -next or to v3.7-rc7 - can you check
and regenerate please?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state
  2012-12-09 15:28 ` Mark Brown
@ 2012-12-09 23:09   ` Patrick Lai
  0 siblings, 0 replies; 9+ messages in thread
From: Patrick Lai @ 2012-12-09 23:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: lrg, alsa-devel, linux-arm-msm

On 12/9/2012 7:28 AM, Mark Brown wrote:
> On Thu, Dec 06, 2012 at 10:39:59AM -0800, Patrick Lai wrote:
>> 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.
>
> I'm not entirely sure what this patch is generated against but it
> doesn't appear to apply to either -next or to v3.7-rc7 - can you check
> and regenerate please?
>

I generated this patch against tag v3.7-rc6. I just did a rebase against 
tag v3.7-rc7. I did not encounter merge error. I will regenerate patch again

Thanks
Patrick

-- 
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	[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

* Re: [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, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-12-15 14:49 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel, lrg


[-- Attachment #1.1: Type: text/plain, Size: 1112 bytes --]

On Wed, Dec 12, 2012 at 08:49:40AM -0800, Patrick Lai wrote:
> 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.

This still doesn't apply against mainline, applying to v3.7 gives:

$ git am -3 --signoff /tmp/fnord
Applying: ASoC: pcm: allow backend hardware to be freed in pause state
Using index info to reconstruct a base tree...
error: patch failed: sound/soc/soc-pcm.c:1240
error: sound/soc/soc-pcm.c: patch does not apply
Did you hand edit your patch?
It does not apply to blobs recorded in its index.
Cannot fall back to three-way merge.
Patch failed at 0001 ASoC: pcm: allow backend hardware to be freed in pause state

I can't see what's wrong but that's making me worry about applying it
by hand as it seems likely that there's some aspect of it thatd' be
missed; the plain patch program also has similar issues.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* [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

* Re: [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
  1 sibling, 0 replies; 9+ messages in thread
From: Liam Girdwood @ 2012-12-20 10:29 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel, broonie

On 20/12/12 03:36, Patrick Lai wrote:
> 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>

Acked-by: Liam Girdwood <lrg@ti.com>

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

* Re: [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
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2012-12-20 16:00 UTC (permalink / raw)
  To: Patrick Lai; +Cc: alsa-devel, lrg


[-- Attachment #1.1: Type: text/plain, Size: 420 bytes --]

On Wed, Dec 19, 2012 at 07:36:02PM -0800, Patrick Lai wrote:
> 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.

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[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-06 18:39 [PATCH] ASoC: pcm: allow backend hardware to be freed in pause state Patrick Lai
2012-12-07 13:37 ` Liam Girdwood
2012-12-09 15:28 ` Mark Brown
2012-12-09 23:09   ` Patrick Lai
  -- 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-20  3:36 Patrick Lai
2012-12-20 10:29 ` Liam Girdwood
2012-12-20 16:00 ` Mark Brown

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).