* [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link
@ 2011-10-27 6:28 ramesh.babu
2011-10-27 9:11 ` Girdwood, Liam
0 siblings, 1 reply; 5+ messages in thread
From: ramesh.babu @ 2011-10-27 6:28 UTC (permalink / raw)
To: alsa-devel; +Cc: Ramesh Babu K V, Vinod Koul, broonie, lrg
With this flag, each dai_link in machine driver can choose
to ignore pmdown_time during DAPM shut down sequence.
If the ignore_pmdown_time is set, the DAPM for corresponding DAI
will be executed immediately.
Signed-off-by: Ramesh Babu K V <ramesh.babu@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
---
include/sound/soc.h | 3 +++
sound/soc/soc-pcm.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 11cfb59..877fcc1 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -718,6 +718,9 @@ struct snd_soc_dai_link {
/* Symmetry requirements */
unsigned int symmetric_rates:1;
+ /* pmdown_time is ignored at stop */
+ unsigned int ignore_pmdown_time:1;
+
/* codec/machine specific init - e.g. add machine controls */
int (*init)(struct snd_soc_pcm_runtime *rtd);
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ee15337..52a7259 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
cpu_dai->runtime = NULL;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- if (unlikely(codec->ignore_pmdown_time)) {
+ if (unlikely(codec->ignore_pmdown_time ||
+ rtd->dai_link->ignore_pmdown_time)) {
/* powered down playback stream now */
snd_soc_dapm_stream_event(rtd,
codec_dai->driver->playback.stream_name,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link
@ 2011-10-27 6:42 ramesh.babu
2011-10-27 10:04 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: ramesh.babu @ 2011-10-27 6:42 UTC (permalink / raw)
To: alsa-devel; +Cc: peter.ujfalusi, Ramesh Babu K V, Vinod Koul, broonie, lrg
Resending the patch by CCing Peter
With this flag, each dai_link in machine driver can choose
to ignore pmdown_time during DAPM shut down sequence.
If the ignore_pmdown_time is set, the DAPM for corresponding DAI
will be executed immediately.
Signed-off-by: Ramesh Babu K V <ramesh.babu@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
---
include/sound/soc.h | 3 +++
sound/soc/soc-pcm.c | 3 ++-
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 11cfb59..877fcc1 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -718,6 +718,9 @@ struct snd_soc_dai_link {
/* Symmetry requirements */
unsigned int symmetric_rates:1;
+ /* pmdown_time is ignored at stop */
+ unsigned int ignore_pmdown_time:1;
+
/* codec/machine specific init - e.g. add machine controls */
int (*init)(struct snd_soc_pcm_runtime *rtd);
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index ee15337..52a7259 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
cpu_dai->runtime = NULL;
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- if (unlikely(codec->ignore_pmdown_time)) {
+ if (unlikely(codec->ignore_pmdown_time ||
+ rtd->dai_link->ignore_pmdown_time)) {
/* powered down playback stream now */
snd_soc_dapm_stream_event(rtd,
codec_dai->driver->playback.stream_name,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link
2011-10-27 6:28 ramesh.babu
@ 2011-10-27 9:11 ` Girdwood, Liam
2011-10-27 9:18 ` Mark Brown
0 siblings, 1 reply; 5+ messages in thread
From: Girdwood, Liam @ 2011-10-27 9:11 UTC (permalink / raw)
To: ramesh.babu, Ujfalusi, Peter; +Cc: alsa-devel, broonie, Vinod Koul
On 27 October 2011 07:28, <ramesh.babu@linux.intel.com> wrote:
> With this flag, each dai_link in machine driver can choose
> to ignore pmdown_time during DAPM shut down sequence.
>
> If the ignore_pmdown_time is set, the DAPM for corresponding DAI
> will be executed immediately.
>
> Signed-off-by: Ramesh Babu K V <ramesh.babu@linux.intel.com>
> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
> ---
> include/sound/soc.h | 3 +++
> sound/soc/soc-pcm.c | 3 ++-
> 2 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index 11cfb59..877fcc1 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -718,6 +718,9 @@ struct snd_soc_dai_link {
> /* Symmetry requirements */
> unsigned int symmetric_rates:1;
>
> + /* pmdown_time is ignored at stop */
> + unsigned int ignore_pmdown_time:1;
> +
> /* codec/machine specific init - e.g. add machine controls */
> int (*init)(struct snd_soc_pcm_runtime *rtd);
>
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index ee15337..52a7259 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -319,7 +319,8 @@ static int soc_pcm_close(struct snd_pcm_substream *substream)
> cpu_dai->runtime = NULL;
>
> if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
> - if (unlikely(codec->ignore_pmdown_time)) {
> + if (unlikely(codec->ignore_pmdown_time ||
> + rtd->dai_link->ignore_pmdown_time)) {
> /* powered down playback stream now */
> snd_soc_dapm_stream_event(rtd,
> codec_dai->driver->playback.stream_name,
> --
> 1.7.4.1
>
>
This looks fine by me. Peter, does this work for you ?
if so,
Acked-by: Liam Girdwood <lrg@ti.com>
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link
2011-10-27 9:11 ` Girdwood, Liam
@ 2011-10-27 9:18 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-10-27 9:18 UTC (permalink / raw)
To: Girdwood, Liam; +Cc: ramesh.babu, Ujfalusi, Peter, alsa-devel, Vinod Koul
On Thu, Oct 27, 2011 at 10:11:37AM +0100, Girdwood, Liam wrote:
> This looks fine by me. Peter, does this work for you ?
Peter already has a per-CODEC property he's using since the CODEC needs
this for pop/click issues. This is for a system integration problem the
Intel guys have.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link
2011-10-27 6:42 [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link ramesh.babu
@ 2011-10-27 10:04 ` Mark Brown
0 siblings, 0 replies; 5+ messages in thread
From: Mark Brown @ 2011-10-27 10:04 UTC (permalink / raw)
To: ramesh.babu; +Cc: peter.ujfalusi, alsa-devel, Vinod Koul, lrg
On Thu, Oct 27, 2011 at 12:12:33PM +0530, ramesh.babu@linux.intel.com wrote:
> Resending the patch by CCing Peter
>
> With this flag, each dai_link in machine driver can choose
> to ignore pmdown_time during DAPM shut down sequence.
>
> If the ignore_pmdown_time is set, the DAPM for corresponding DAI
> will be executed immediately.
Applied, thanks.
Please:don't:use:this:style:when:writing:subject:lines as it's hard to
read and doesn't correspond to anything code-wise.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-10-27 10:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-27 6:42 [PATCH] ASoC:core:add flag ignore_pmdown_time in snd_soc_dai_link ramesh.babu
2011-10-27 10:04 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2011-10-27 6:28 ramesh.babu
2011-10-27 9:11 ` Girdwood, Liam
2011-10-27 9:18 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.