Skip to content

audio: chain_dma: fix notification pool overflow#10816

Open
wjablon1 wants to merge 1 commit into
thesofproject:mainfrom
wjablon1:notif_overflow_fix
Open

audio: chain_dma: fix notification pool overflow#10816
wjablon1 wants to merge 1 commit into
thesofproject:mainfrom
wjablon1:notif_overflow_fix

Conversation

@wjablon1
Copy link
Copy Markdown
Contributor

@wjablon1 wjablon1 commented May 28, 2026

Task for DMA chain uses the same function wrapper for checking DMA statuses and sending notifications for both Host and Link DMAs. Moreover, only one xrun_notification_sent flag is defined for that purpose. For Host DMA notifications are not needed since the task immediately returns an error on any Host DMA failure. However, the side effect of using the common function wrapper is that we might clear the flag while checking the Host DMA status and thus cause a Link DMA notification flood. This change fixes this issue by removing the common function wrapper and limiting notification API usage to Link DMA.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a notification pool overflow in the chain DMA component. Previously, the shared chain_get_dma_status() wrapper was called for both Host and Link DMAs, and a successful Host DMA status check would clear the xrun_notification_sent latch — defeating its purpose and causing a flood of Link xrun notifications that exhausted the notification pool. The fix removes the wrapper and applies xrun notification handling only to the Link DMA path.

Changes:

  • Replace chain_get_dma_status() wrapper with direct dma_get_status() calls for Host and Link.
  • Introduce chain_dma_send_xrun_notif() helper guarded by CONFIG_XRUN_NOTIFICATIONS_ENABLE.
  • Clear the xrun_notification_sent latch only on a successful Link DMA status.

Task for DMA chain uses the same function wrapper for checking DMA
statuses and sending notifications for both Host and Link DMAs. Moreover,
only one xrun_notification_sent flag is defined for that purpose.
For Host DMA notifications are not needed since the task immediately
returns an error on any Host DMA failure. However, the side effect of
using the common function wrapper is that we might clear the flag while
checking the Host DMA status and thus cause a Link DMA notification flood.
This change fixes this issue by removing the common function wrapper and
limiting notification API usage to Link DMA.

Signed-off-by: Wojciech Jablonski <wojciech.jablonski@intel.com>
@wjablon1 wjablon1 force-pushed the notif_overflow_fix branch from ba04247 to 6ee6df6 Compare May 28, 2026 09:26
Copy link
Copy Markdown
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

@wjablon1 good catch, thanks!

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.

5 participants