* [PATCH] ASoC: samsung dma - Don't indicate support for pause/resume.
@ 2012-08-31 4:37 Dylan Reid
2012-08-31 17:41 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Dylan Reid @ 2012-08-31 4:37 UTC (permalink / raw)
To: linux-arm-kernel
The pause and resume operations indicate that the stream can be
un-paused/resumed from the exact location they were paused/suspended.
This is not true for this driver, the pause and suspend triggers share
the same code path with stop, they flush all pending DMA transfers.
This drops all pending samples. The pause_release/resume triggers are
the same as start, except that prepare won't be called beforehand,
nothing will be enqueued to the DMA engine and nothing will happen (no
audio). Removing the pause flag will let apps know that it isn't
supported. Removing the resume flag will cause user space to call
prepare and start instead of resume, so audio will continue playing when
the system wakes up.
Before removing the pause and resume flags, I tested this on an exynos
5250, using 'aplay -i'. Pause/un-pause leads to silence followed by a
write error. Suspend/resume testing led to the same result. Removing
the two flags fixes suspend/resume (since snd_pcm_prepare is called
again). And leads to a proper reporting of pause not supported.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
sound/soc/samsung/dma.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/sound/soc/samsung/dma.c b/sound/soc/samsung/dma.c
index f3ebc38..56a507a 100644
--- a/sound/soc/samsung/dma.c
+++ b/sound/soc/samsung/dma.c
@@ -34,9 +34,7 @@ static const struct snd_pcm_hardware dma_hardware = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP |
- SNDRV_PCM_INFO_MMAP_VALID |
- SNDRV_PCM_INFO_PAUSE |
- SNDRV_PCM_INFO_RESUME,
+ SNDRV_PCM_INFO_MMAP_VALID,
.formats = SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_U16_LE |
SNDRV_PCM_FMTBIT_U8 |
--
1.7.12.146.g16d26b1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: samsung dma - Don't indicate support for pause/resume.
2012-08-31 4:37 [PATCH] ASoC: samsung dma - Don't indicate support for pause/resume Dylan Reid
@ 2012-08-31 17:41 ` Mark Brown
2012-09-01 8:31 ` Dylan Reid
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-08-31 17:41 UTC (permalink / raw)
To: linux-arm-kernel
On Thu, Aug 30, 2012 at 09:37:34PM -0700, Dylan Reid wrote:
> index f3ebc38..56a507a 100644
> --- a/sound/soc/samsung/dma.c
> +++ b/sound/soc/samsung/dma.c
> @@ -34,9 +34,7 @@ static const struct snd_pcm_hardware dma_hardware = {
> .info = SNDRV_PCM_INFO_INTERLEAVED |
> SNDRV_PCM_INFO_BLOCK_TRANSFER |
> SNDRV_PCM_INFO_MMAP |
> - SNDRV_PCM_INFO_MMAP_VALID |
> - SNDRV_PCM_INFO_PAUSE |
> - SNDRV_PCM_INFO_RESUME,
> + SNDRV_PCM_INFO_MMAP_VALID,
I'd expect to also see an update to the trigger function to not accept
the suspend and resume triggers?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] ASoC: samsung dma - Don't indicate support for pause/resume.
2012-08-31 17:41 ` Mark Brown
@ 2012-09-01 8:31 ` Dylan Reid
0 siblings, 0 replies; 3+ messages in thread
From: Dylan Reid @ 2012-09-01 8:31 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Aug 31, 2012 at 10:41 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, Aug 30, 2012 at 09:37:34PM -0700, Dylan Reid wrote:
>
>> index f3ebc38..56a507a 100644
>> --- a/sound/soc/samsung/dma.c
>> +++ b/sound/soc/samsung/dma.c
>> @@ -34,9 +34,7 @@ static const struct snd_pcm_hardware dma_hardware = {
>> .info = SNDRV_PCM_INFO_INTERLEAVED |
>> SNDRV_PCM_INFO_BLOCK_TRANSFER |
>> SNDRV_PCM_INFO_MMAP |
>> - SNDRV_PCM_INFO_MMAP_VALID |
>> - SNDRV_PCM_INFO_PAUSE |
>> - SNDRV_PCM_INFO_RESUME,
>> + SNDRV_PCM_INFO_MMAP_VALID,
>
> I'd expect to also see an update to the trigger function to not accept
> the suspend and resume triggers?
Good point, I'll send an updated version shortly.
Thanks Mark,
Dylan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-09-01 8:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-31 4:37 [PATCH] ASoC: samsung dma - Don't indicate support for pause/resume Dylan Reid
2012-08-31 17:41 ` Mark Brown
2012-09-01 8:31 ` Dylan Reid
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).