Skip to content

host.c: remove DMA specific logic #1052

Closed

Description

@lgirdwood

host.c has host HDA GW and DW DMA specific logic surrounded by ifdefs. This logic should be abstracted and pushed down into the DMA drivers (using new DMA ops). host.c should also support a buffer interface direct to host memories .

Activity

  1. dbaluta commented on Mar 4, 2019

    @dbaluta
    Collaborator

    Hi @mmaka1,

    Any idea in commit b39b17d ("comp: host: hda/dw-dma flow unification") why host and local sgl are no longer used for HDA DMA?

  2. tlauda commented on Apr 12, 2019

    @tlauda
    Contributor

    @dbaluta When using HDA DMA for host transfers we don't have access to the host buffer from DSP side, so we don't need host sgl. Local sgl is just the pointer to the config sgl.

  3. dbaluta commented on Apr 18, 2019

    @dbaluta
    Collaborator

    @tlauda if we don't have acess to host buffer from DSP how do we copy the data?

  4. added this to the 1.4 milestone on Apr 18, 2019
  5. lgirdwood commented on Apr 18, 2019

    @lgirdwood
    MemberAuthor

    @dbaluta we only have access to the host buffer after copying to DSP with HDA DMA. The Intel HDA DMA is programmed by both FW and driver; driver programs host address, FW programs DSP address, I dont remember who enables the copy though.

  6. dbaluta commented on Apr 18, 2019

    @dbaluta
    Collaborator

    @lgirdwood thanks, make sense.

  7. dbaluta commented on Apr 18, 2019

    @dbaluta
    Collaborator

    host.c has host HDA GW and DW DMA specific logic surrounded by ifdefs. This logic should be abstracted and pushed down into the DMA drivers (using new DMA ops). host.c should also support a buffer interface direct to host memories .

    Here I am working on creating a new object host_copier which will expose mostly the same operations as host object (params, trigger, copy, prepare, etc). But I still cannot wrap my mind around on how to split the functionality.

    For the moment it makes sense that

    • dma_buffer member of host_data to stay in host.c
    • dma pointer to be pushed into specific host_copier instance
    • dma_sg_config config member of host_data it should be pushed into specific host_copier.
      ... together with host and local members of host_data.

    I've thought about pushing the specific ops as you said in DMA drivers but I think it makes more sense to create a special object host_copier which will contain an instance to a dma channel (if we use DMA).

  8. lgirdwood commented on Apr 19, 2019

    @lgirdwood
    MemberAuthor

    @dbaluta yes, I think special object is probably the way to go atm. I guess your DSP can memcpy() directly from host -> DSP and schedule this based on the pipeline copy() callback. Another alternative is a dummy DMA driver that does just memcpy() ?

  9. dbaluta commented on Apr 21, 2019

    @dbaluta
    Collaborator

    @lgirdwood yes, I can directly memcpy from host -> DSP. For the moment I'm going with the dummy DMA driver that just does memcpy().

  10. added
    P1Blocker bugs or important features
    on Jun 7, 2019
  11. lgirdwood commented on Jun 7, 2019

    @lgirdwood
    MemberAuthor

    @michalgrodzicki @mengdonglin lets make this P1 for v1.4 as it cleans up our DMA logic a lot. @tlauda has already made a start, but lets track with this feature.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Blocker bugs or important featuresenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions