Skip to content

Correct the HDA host DMA FMT programming flow #670

Closed

Description

@keyonjie

According to information from FW side, here is the correct FMT programming flow:

Put DMA into coupled mode for the time of writing format to SDxFMT register.
a. Before writing format to SDxFMT, clear PPCTL.PROCEN bit for corresponding stream index.
b. Write SDxFMT
c. Set PPCTL.PROCEN bit for corresponding stream index.

Then check if thesofproject/sof#856 can be fixed by this change.

Activity

  1. added
    enhancementNew feature or request
    P1Blocker bugs or important features
    on Feb 25, 2019
  2. keyonjie commented on Feb 25, 2019

    @keyonjie
    Author

    Hi @RanderWang can you please help on this?

    We may need to check if something change like below can fix sof issue #856:

    diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c
    index c70046f20eec..c2c70c7d4907 100644
    --- a/sound/soc/sof/intel/hda-stream.c
    +++ b/sound/soc/sof/intel/hda-stream.c
    @@ -363,12 +363,22 @@ int hda_dsp_stream_hw_params(struct snd_sof_dev *sdev,
                              sd_offset + SOF_HDA_ADSP_REG_CL_SD_CBL,
                              hstream->bufsize);
     
    +       /* couple host and link DMA */
    +       mask = 0x1 << hstream->index;
    +       snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,
    +                               mask, 0);
    +
            /* program stream format */
            snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
                                    sd_offset +
                                    SOF_HDA_ADSP_REG_CL_SD_FORMAT,
                                    0xffff, hstream->format_val);
     
    +       /* decouple host and link DMA */
    +       mask = 0x1 << hstream->index;
    +       snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL,
    +                               mask, mask);
    +
            /* program last valid index */
            snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR,
                                    sd_offset + SOF_HDA_ADSP_REG_CL_SD_LVI,
    
  3. RanderWang commented on Mar 5, 2019

    @RanderWang

    I can't reproduce this bug so I can't fix it.

  4. added
    P2Critical bugs or normal features
    and removed
    P1Blocker bugs or important features
    on Mar 5, 2019
  5. plbossart commented on Mar 6, 2019

    @plbossart
    Member

    @RanderWang can you clarify if you used the same tests as @keyonjie as described in thesofproject/sof#856

    "Using simultaneous pipelines stress test can duplicate this easily. Scrip here:
    https://github.com/thesofproject/sof/blob/master/tools/test/qa/tests/stability_test/multiplex_pipeline-test.sh"

  6. keyonjie commented on Mar 6, 2019

    @keyonjie
    Author

    @RanderWang please use that test script directly, I remember both our QA and FW team can reproduce it also.

  7. RanderWang commented on Mar 7, 2019

    @RanderWang

    yes, I tried it but still be failed to reproduce it.

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

Metadata

Metadata

Assignees

Labels

P2Critical bugs or normal featuresenhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions