[Sound-open-firmware] Question about scheduling IPC task vs pipeline task
Hi Tomasz,
Running aplay I get this timeout, on kernel side:
sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 This is the command for SOF_IPC_STREAM_TRIG_START.
What I notice on SOF side is:
-> irq_handle (new message from SOF arrives) -> ipc_schedule_process -> schedule_ipc_task -> run: ipc_platform_do_cmd -> pipeline_trigger() -> schedule pipe_task -> then pipeline_copy starts to RUN
Now the problem is that even if pipeline_copy() runs in a separate schedulable task, ipc_task doesn't get a chance to run so the reply for TRIGGER command isn't sent back to host hence the timeout.
My question:
Does pipeline_copy() runs in some special context so that normal EDF tasks can meet their deadline?
I do have a slightly new firmware then the kernel, not sure about what recent changes have been done to firmware.
thanks, Daniel.
On Tue, 2020-04-21 at 23:55 +0300, Daniel Baluta wrote:
Hi Tomasz,
Running aplay I get this timeout, on kernel side:
sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 This is the command for SOF_IPC_STREAM_TRIG_START.
Hi Daniel,
Do you have any further logs in dmesg? Usually, timeouts are followed by any DSP FW exceptions IIRC. Is the DSP still after you see the timeout?
Thanks, Ranjani
What I notice on SOF side is:
-> irq_handle (new message from SOF arrives) -> ipc_schedule_process -> schedule_ipc_task -> run: ipc_platform_do_cmd -> pipeline_trigger() -> schedule pipe_task -> then pipeline_copy starts to RUN
Now the problem is that even if pipeline_copy() runs in a separate schedulable task, ipc_task doesn't get a chance to run so the reply for TRIGGER command isn't sent back to host hence the timeout.
My question:
Does pipeline_copy() runs in some special context so that normal EDF tasks can meet their deadline?
I do have a slightly new firmware then the kernel, not sure about what recent changes have been done to firmware.
thanks, Daniel. _______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware
On Tue, Apr 21, 2020 at 11:59 PM Ranjani Sridharan ranjani.sridharan@linux.intel.com wrote:
On Tue, 2020-04-21 at 23:55 +0300, Daniel Baluta wrote:
Hi Tomasz,
Running aplay I get this timeout, on kernel side:
sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 This is the command for SOF_IPC_STREAM_TRIG_START.
Hi Daniel,
Do you have any further logs in dmesg? Usually, timeouts are followed by any DSP FW exceptions IIRC. Is the DSP still after you see the timeout?
Indeed, it could make sense that DSP has crashed. The infrastructure for traces when DSP crashes is not quite implemented on IMX.
Let me try to add something adhoc.
Trace on the kernel side is not very helpful:
60.140624] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 [ 60.148212] sof-audio-of 3b6e8000.dsp: error: waking up any trace sleepers [ 60.155150] Port0: ASoC: trigger FE cmd: 1 failed: -110 [ 60.155433] sof-audio-of 3b6e8000.dsp: error: trace IO error [ 60.684636] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60050000 size 12 [ 60.692227] sof-audio-of 3b6e8000.dsp: error: waking up any trace sleepers [ 60.699154] Port0: ASoC: trigger FE cmd: 0 failed: -110
On Wed, 2020-04-22 at 00:05 +0300, Daniel Baluta wrote:
On Tue, Apr 21, 2020 at 11:59 PM Ranjani Sridharan ranjani.sridharan@linux.intel.com wrote:
On Tue, 2020-04-21 at 23:55 +0300, Daniel Baluta wrote:
Hi Tomasz,
Running aplay I get this timeout, on kernel side:
sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 This is the command for SOF_IPC_STREAM_TRIG_START.
Hi Daniel,
Do you have any further logs in dmesg? Usually, timeouts are followed by any DSP FW exceptions IIRC. Is the DSP still after you see the timeout?
Indeed, it could make sense that DSP has crashed. The infrastructure for traces when DSP crashes is not quite implemented on IMX.
Let me try to add something adhoc.
Trace on the kernel side is not very helpful:
60.140624] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 [ 60.148212] sof-audio-of 3b6e8000.dsp: error: waking up any trace sleepers [ 60.155150] Port0: ASoC: trigger FE cmd: 1 failed: -110 [ 60.155433] sof-audio-of 3b6e8000.dsp: error: trace IO error [ 60.684636] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60050000 size 12 [ 60.692227] sof-audio-of 3b6e8000.dsp: error: waking up any trace
You could try sedning a "ping" with the FLOOD_TEST IPC if you have the debug option enabled to check quickly if the DSP is still alive.
Thanks, Ranjani
Sorry for late reply.I found a fix for this. Caches areas were not correct causing volume copies to take longer than expected. ________________________________ From: Sound-open-firmware sound-open-firmware-bounces@alsa-project.org on behalf of Ranjani Sridharan ranjani.sridharan@linux.intel.com Sent: Wednesday, April 22, 2020 11:47 PM To: Daniel Baluta daniel.baluta@gmail.com Cc: Lauda, Tomasz tomasz.lauda@intel.com; Paul Olaru paul.olaru@nxp.com; Sridharan, Ranjani ranjani.sridharan@intel.com; sound-open-firmware@alsa-project.org sound-open-firmware@alsa-project.org Subject: Re: [Sound-open-firmware] Question about scheduling IPC task vs pipeline task
On Wed, 2020-04-22 at 00:05 +0300, Daniel Baluta wrote:
On Tue, Apr 21, 2020 at 11:59 PM Ranjani Sridharan ranjani.sridharan@linux.intel.com wrote:
On Tue, 2020-04-21 at 23:55 +0300, Daniel Baluta wrote:
Hi Tomasz,
Running aplay I get this timeout, on kernel side:
sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 This is the command for SOF_IPC_STREAM_TRIG_START.
Hi Daniel,
Do you have any further logs in dmesg? Usually, timeouts are followed by any DSP FW exceptions IIRC. Is the DSP still after you see the timeout?
Indeed, it could make sense that DSP has crashed. The infrastructure for traces when DSP crashes is not quite implemented on IMX.
Let me try to add something adhoc.
Trace on the kernel side is not very helpful:
60.140624] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60040000 size 12 [ 60.148212] sof-audio-of 3b6e8000.dsp: error: waking up any trace sleepers [ 60.155150] Port0: ASoC: trigger FE cmd: 1 failed: -110 [ 60.155433] sof-audio-of 3b6e8000.dsp: error: trace IO error [ 60.684636] sof-audio-of 3b6e8000.dsp: error: ipc timed out for 0x60050000 size 12 [ 60.692227] sof-audio-of 3b6e8000.dsp: error: waking up any trace
You could try sedning a "ping" with the FLOOD_TEST IPC if you have the debug option enabled to check quickly if the DSP is still alive.
Thanks, Ranjani
_______________________________________________ Sound-open-firmware mailing list Sound-open-firmware@alsa-project.org https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.al...
participants (3)
-
Daniel Baluta
-
Daniel Baluta
-
Ranjani Sridharan