Skip to content

Conversation

@softwarecki
Copy link
Collaborator

@softwarecki softwarecki commented Jan 18, 2023

The dma_get_status function returns -EINVAL if it detects an invalid parameter, -EPIPE if it detects an xrun. Added error code check before calling xrun handler.

Updated zephyr revision to 5d902ea621e43ec9a3916eed8dea5ab3647d81c3.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recently found out that ALSA is using EPIPE to indicate xrun conditions, should we update our code to do the same?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't assume also -EPIPE according to https://www.alsa-project.org/alsa-doc/alsa-lib/pcm.html ?
New example in DMA:
zephyrproject-rtos/zephyr#53327

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That does sound like a compelling argument, however here we don't have that error as a possible outcome from dma_get_status within SOF. Maybe a translation layer high above?

@softwarecki
Copy link
Collaborator Author

softwarecki commented Jan 19, 2023

It seems that hda driver uses -EPIPE to signal xrun, as proposed in the alsa lib. In that case, I will change the error code used by dw dma from -ENODATA to -EPIPE. I will switch this PR as a draft until the error codes are unified in zephyr.

Change of the error code in dw dma driver: zephyrproject-rtos/zephyr#53930

@softwarecki softwarecki changed the title dai: Check error code before xrun report [UPDATE ZEPHYR] zephyr: dai: Check error code before xrun report Jan 19, 2023
@softwarecki softwarecki marked this pull request as ready for review January 19, 2023 16:02
@marcinszkudlinski
Copy link
Contributor

SOFCI TEST

@kv2019i
Copy link
Collaborator

kv2019i commented Jan 26, 2023

@wszypelt This seems to have stuck in "merge/codecheck", can you check?

@softwarecki
Copy link
Collaborator Author

rebased and force pushed to restart tests.

@lgirdwood
Copy link
Member

lgirdwood commented Jan 27, 2023

Lots of failures around HDA and copier, @softwarecki we may have a Zephyr regression, perhaps in DT as it looks like copier cant find DAIs ?

EDIT: https://sof-ci.01.org/sofpr/PR6965/build3587/devicetest/index.html

west.yml Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There seems to be a regression in here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softwarecki @abonislawski @juimonen @teburd At least locally Isee failures with the DMA start/stop changes. Here's a test run with Zephyr just before the DMA driver changes -> #6998

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was not that. The test run shows failures with HDMI before the start/stop changes on Zephyr side.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@softwarecki @lgirdwood bisected problem to this change zephyrproject-rtos/zephyr#53327 (comment) -- this will show on MTL as well (once HDMI is enabled). I think we can't raise xruns on HDA link errors (to match previous behaviour expected on Linux).

Updated zephyr revision to 5d902ea621e43ec9a3916eed8dea5ab3647d81c3

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@kv2019i
Copy link
Collaborator

kv2019i commented Jan 27, 2023

The tools build issue is fixed now, this was not related to this PR.

@marc-hb

This comment was marked as off-topic.

@marc-hb
Copy link
Collaborator

marc-hb commented Jan 27, 2023

What fixed it (e4dc655 / #6999 ?)

Yes the fix is #6999

some moving ALSA dependency maybe?

No.

why was this not caught by CI?

See #6971

The dma_get_status function returns -EINVAL if it detects an invalid
parameter, -EPIPE if it detects an xrun. Added error code check before
calling xrun handler.

Signed-off-by: Adrian Warecki <adrian.warecki@intel.com>
@lgirdwood
Copy link
Member

@softwarecki @kv2019i do we have Zephyr fixes in flight ? if so, can we link them here so we know when to re-test. Thanks

@kv2019i
Copy link
Collaborator

kv2019i commented Jan 30, 2023

@softwarecki @kv2019i do we have Zephyr fixes in flight ? if so, can we link them here so we know when to re-test.

Not aware of any fixes yet. We have bisected the first problematic commit. I guess @makarukp you are looking at this (based on zephyrproject-rtos/zephyr#53327 (comment) ).

@makarukp
Copy link
Contributor

@kv2019i I don't have any fixes yet. I made only initial analysis. I think SOF part would require improvements. I will try to solve it.

@kv2019i
Copy link
Collaborator

kv2019i commented Feb 6, 2023

Update: it turns out the old HD-DMA link driver had a feature of not actually reporting the xruns up in the stack, and Linux stack has grown to depend on this. Details in #7044 (comment)

@softwarecki
Copy link
Collaborator Author

Closed because #7044 solves the same thing

@softwarecki softwarecki closed this Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.