Skip to content

[FEATURE] Improve host input DMA start flow #7407

@tlissows

Description

@tlissows

Is your feature request related to a problem? Please describe.
Observing the problem of host-input DMA not starting of DMA traffic when using comp_host component from host-zephyr.c. An example of affected scenario is the following two-item pipeline configured for capture direction (scenario driven by existing test_02_uaol_capture.py script):

dai_uaol_output >>> host_input

In the example, the intel_adsp_hda_host_in Zephyr DMA device is used in direction DMA_DIR_LMEM_TO_HMEM. It looks, from behavior, that starting (or not) of DMA transfer is related to the order of two actions: setting of DGHISXCS.FIFORDY bit by SOF/Zephyr FW, and setting of ISDXCTL_B0.RUN bit by host SW:

  • setting RUN=1 by SW followed by setting FIFORDY=1 by FW - is not working sequence,
  • setting FIFORDY=1 by FW followed by setting RUN=1 by SW - is working sequence.

With the existing version of SOF/Zephyr FW and python scripts, not working sequence occurs. This is because FIFORDY bit is set by Zephyr function intel_adsp_hda_enable(), which is called by dma_start() API function for intel_adsp_hda_host_in device. SOF calls to dma_start() within host_zephyr_trigger() when COMP_TRIGGER_START arrives. On the other hand, python script sets RUN bit after setting the pipeline to PAUSED state, but prior to the subsequent pipeline starting.

Describe the solution you'd like
The issue could be fixed on FW side by preponed setting of FIFORDY bit (at the latest when component is entering PAUSED state). This solution is known from closed firmware, however it could not be confirmed in FAS if it is compliant with required/recommended flow.

Describe alternatives you've considered
The issue could also be fixed on the script side by postponed setting of the RUN bit (until TRIGGER_START sent). This was used to on-hand confirm that inversed sequence really works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions