[Sound-open-firmware] Questions about the pause-release flow

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Sep 16 11:25:11 CEST 2019


On Mon, 2019-09-16 at 07:39 +0000, Paul Olaru wrote:
> Here is the strace output, I don't understand why for release we
> still have SNDRV_PCM_IOCTL_PAUSE used. Is this a problem in the
> userspace or some other issue I don't understand?
> 
> -----Original Message-----
> From: Sound-open-firmware <
> sound-open-firmware-bounces at alsa-project.org> On Behalf Of Paul Olaru
> Sent: Monday, September 16, 2019 10:31 AM
> To: sound-open-firmware at alsa-project.org
> Cc: Jerome Laclavere <jerome.laclavere at nxp.com>; Daniel Baluta <
> daniel.baluta at nxp.com>; Guido Roncarolo <guido.roncarolo at nxp.com>
> Subject: [Sound-open-firmware] Questions about the pause-release flow
> 
> Right now I have a working (but not yet cleaned up) set of drivers
> (host DMA,
> DAI DMA and DAI itself) and I figured I could test for pause-release
> (even if the
> rates seem incorrect; can't actually check for correctness until the
> codec driver
> is also ready).
> 
> The issue I encountered is: I can pause, however whenever I press
> <SPACE> again
> on aplay, I get "pause release error: Invalid argument" and the SOF
> log shows
> "dai_comp_trigger(), PAUSE/STOP" immediately followed by a -22 (-
> EINVAL)
> return code from pipeline_trigger.
> 
> Shouldn't unpausing actually send COMP_TRIGGER_RELEASE?

Yeah, it should do - it's designed to mirror the ALSA trigger commands.

> 
> I am doing my own state checking but I suspect it may be wrong.

The FW does check pipeline and component state here, so please make
sure any DMA has stopped and set the correct state before the stream is
restarted. 

> 
> What should I look into, and is this actually correct behavior?

There is a state transition diagram in component.h iirc, so best to
make sure that pause puts your pipeline in the correct state. I guess
that STOP and START work fine ?

> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.alsa-project.org%2Fmailman%2Flistinfo%2Fsound-open-firmware&data=02%7C01%7Cpaul.olaru%40nxp.com%7C4028d0b163df4aed313008d73a77effa%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C1%7C637042159114048923&sdata=bQxaRY0DEIlU89lslPK49w5LDmD5pXgrF2L7y8%2FRU2s%3D&reserved=0
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware



More information about the Sound-open-firmware mailing list