Skip to content

Fix allocation of link dma channels - #895

Merged
plbossart merged 7 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/link-dma-allocation
May 29, 2019
Merged

plbossart merged 7 commits into
thesofproject:topic/sof-devfrom
ranj063:fix/link-dma-allocation

Conversation

@ranj063

@ranj063 ranj063 commented May 2, 2019 •

Copy link
Copy Markdown
Collaborator

The recommended HDA HW programming sequence for setting the DMA format requires that the link DMA and host DMA channels be coupled before setting the format. This change means that host DMA or link DMA channels be reserved even if only one is used.

Statically assigned link DMA channels would mean that all the corresponding host DMA channels will need to be reserved, leaving only a few channels available at run-time. So, the suggestion here is to switch to dynamically assigning both host DMA channels and link DMA channels are run-time.

The host DMA channel is assigned when the pcm is opened as before. While choosing the link DMA channel, if the host DMA channel corresponding to the link DMA channel is already taken, the proposed method checks to make sure that the BE is connected to the FE that has been assigned this host DMA channel. For hostless streams, the host DMA channel is marked as opened to ensure it isn't assigned to another stream. After assigning the link DMA channel, a DAI_CONFIG IPC is sent to the FW to set the chosen link DMA channel.

This change should support N:M FE <->BE configurations as well.

The corresponding FW change for this PR is thesofproject/sof#1354

Tested on UP2 so far. Further testing in progress.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI involves ABI changes, need extra attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants