Skip to content

[BUG][CML][HDA] fixed distortion pattern at the beginning of recording on headset pipeline #2101

Closed

Description

@aiChaoSONG

Describe the bug
run arecord on headset capture pipeline, you will see volume keeps high at the beginning, even there is no sound. check the recorded wave, you can see a fixed distortion pattern, and all headset recorded waves have the same distortion.

if no headset connected when run arecord, no distortion found.

Screenshot from 2019-11-18 10-24-51

To Reproduce
run arecord -Dhw:0,0 -fs32_le -r 48000 -c 2 -i -vvv headset.wav

Reproduction Rate
10/10

Environment

  1. Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
  2. Name of the topology file
    • Topology: {sof-hda-generic-2ch.tplg}
  3. Name of the platform(s) on which the bug is observed.
    • Platform: {Dell HDA platform with ALC 3204 codec}

sof_logger_trace.log

Activity

  1. added
    bugSomething isn't working as expected
    CMLApplies to Comet Lake platform
    on Nov 18, 2019
  2. lgirdwood commented on Nov 18, 2019

    @lgirdwood
    Member

    @singalsu @bardliao what do you think, this could just be the mic powering UP.

  3. plbossart commented on Nov 18, 2019

    @plbossart
    Member

    likely something in the HDaudio codec driver and/or bad settings applied?

  4. bardliao commented on Nov 19, 2019

    @bardliao
    Collaborator

    Looks like a power up pop. @aiChaoSONG How long will the max volume continue? Will you see the same issue on DMIC recording?

  5. aiChaoSONG commented on Nov 19, 2019

    @aiChaoSONG
    CollaboratorAuthor

    @bardliao only see this on headset capture pipeline, and the max volume duration is very short, about 0.35s.

  6. bardliao commented on Nov 19, 2019

    @bardliao
    Collaborator

    @bardliao only see this on headset capture pipeline, and the max volume duration is very short, about 0.35s.

    So I think it is a codec issue (or limitation). I think we can close this issue since there is nothing we can do.

  7. singalsu commented on Nov 19, 2019

    @singalsu
    Collaborator

    This would be fixed by inserting a high-pass IIR EQ into capture path. If someone with access to this device and test an enhanced topology can contact me I can make a patch to sof-hda-generic-2ch.tplg to test with.

  8. singalsu commented on Nov 19, 2019

    @singalsu
    Collaborator

    @bardliao @aiChaoSONG Can you please check if SOF PR #2109 helps for this.

  9. lgirdwood commented on Nov 20, 2019

    @lgirdwood
    Member

    @singalsu good work, btw this is worthy of a technical note on sof-decs i.e. a small howto.

  10. singalsu commented on Nov 20, 2019

    @singalsu
    Collaborator

    I was able to repeat this issue with a device that I have. There's no volume ramp happening in capture, I'll try to make a fix for this and related problems thesofproject/linux#1463 and thesofproject/linux#1480.

    The length of DC pulse is in my device even longer, almost 5 seconds. I think this needs both the volume ramp fix and the DC block filter.

    Screenshot from 2019-11-20 13-25-03

  11. self-assigned this
    on Nov 20, 2019
  12. plbossart commented on Nov 20, 2019

    @plbossart
    Member

    thanks @singalsu for looking into this.

  13. singalsu commented on Nov 20, 2019

    @singalsu
    Collaborator

    I have a fix under development that is done in firmware to launch a volume ramp in beginning of copy() operations if the driver control sequence has not initiated it. I don't think it can be fixed in driver in simple way because the PM controls cache hides the unmute transition from firmware.

    Combination of ramp and DC block works well but I need to eliminate the volume setting dependent ramp length variation for the start ramp (use the whole topology defined time even if the gain request is much lower than max. volume).

  14. lgirdwood commented on Nov 21, 2019

    @lgirdwood
    Member

    @singalsu can we have topology tuple flags for ramp up/down at stream start, this way we can turn it off/on as needed.

  15. singalsu commented on Nov 22, 2019

    @singalsu
    Collaborator

    We have a single token for ramp length but the same length is used for both start and during streaming. The ramp is turned off by setting length to zero.

  16. singalsu commented on Jan 24, 2020

    @singalsu
    Collaborator

    @aiChaoSONG The PR #2109 is merged so I re-tested this on a WHL HDA platform with headset disconnected. The start waveform is now clean so I think this can be closed.

    Screenshot from 2020-01-24 14-11-11

  17. singalsu commented on Jan 24, 2020

    @singalsu
    Collaborator

    Closing this issue.

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

Metadata

Metadata

Assignees

Labels

CMLApplies to Comet Lake platformbugSomething isn't working as expected

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions