Skip to content

[BUG][CML][DMIC]DMIC not work after remove headset when headset mic is selected in sound setting. #917

Closed

Description

@YvonneYang2

Describe the bug
DMIC can not work after remove the headset when headset mic is selected in sound setting.

To Reproduce
1.Plug in headset and choose headset mic from sound input setting.
2. Do parecord , and confirm capture can work via headset Mic.
3. Plug out headset
4. Do parecord, check if capture can work via build-in DMIC.
5. Open sound input setting, check if DMIC is highlighted automatically. Tap to select one more time and do parecord again. check if capture can work via build-in DMIC.

Expected behavior
Parecord should work normally at step 4 and 5, i.e. capture via DMIC should work.

Actual result
DMIC parecord always not work, i.e. no sound captured by DMIC. Check via list-sources in pacmd, DMIC 32 is marked after headset is plug out (step 3). Reproduce rate 100%

More info:

  • If we plug in headset after step (5) and select DMIC again in Sound Input Setting, can record normally from DMIC.
  • If we select DMIC in Sound Input Setting before plugging out headset at step (3), then DMIC capture can work.

Environment
Rander UCM https://github.com/RanderWang/intel-UCM
Kernel repo:c99938c https://github.com/thesofproject/linux/tree/release/sof-v5.0
Firmware repo: 05d4e19 https://github.com/thesofproject/sof/commits/master |
Topology: https://github.com/thesofproject/sof/commits/master . Same as above SOF repo
file: tools/topology/sof-hda-generic.m4, sof-hda-generic-2ch.tplg

No error sof-logger.

[ 4439.273915] sof-audio-pci 0000:00:1f.3: pcm: hw params stream 0 dir 0
[ 4439.273919] sof-audio-pci 0000:00:1f.3: generating page table for 0000000077b04940 size 0xffc0 pages 16
[ 4439.273941] sof-audio-pci 0000:00:1f.3: period_bytes:0x3fc0
[ 4439.273943] sof-audio-pci 0000:00:1f.3: periods:4
[ 4439.273955] sof-audio-pci 0000:00:1f.3: stream_tag 2
[ 4439.273962] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[ 4439.274117] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[ 4439.274121] sof-audio-pci 0000:00:1f.3: pcm: stream dir 0, posn mailbox offset is 790756
[ 4439.274269] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 1
[ 4439.274277] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[ 4439.274409] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60040000: GLB_STREAM_MSG: TRIG_START
[ 4439.274415] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=1
[ 4440.124565] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 4440.124598] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 4441.903245] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 1 cmd 0
[ 4441.903270] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 4441.903582] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 4441.903599] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=0
[ 4441.903700] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 1
[ 4441.903707] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 4441.903940] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 4441.904121] sof-audio-pci 0000:00:1f.3: pcm: close stream 0 dir 1
[ 4442.624336] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 4442.624363] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 4447.828983] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 0
[ 4447.829002] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 4447.829231] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 4447.829245] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=0
[ 4447.829322] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 0
[ 4447.829329] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 4447.829545] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 4447.829680] sof-audio-pci 0000:00:1f.3: pcm: close stream 0 dir 0
[ 4448.624566] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 4448.624608] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG

DmicNotWorkAfterRemoveHeadset.log
DmicNotWorkAfterRemoveHeadset_Logger.log

Activity

  1. added
    bugSomething isn't working
    CMLApplies to Comet Lake platform
    HDAApplies to HD-Audio bus for codec connection
    on May 8, 2019
  2. added
    P1Blocker bugs or important features
    on May 9, 2019
  3. ClarexZhou commented on May 9, 2019

    @ClarexZhou

    Add alsamixer status when error occurred after plug out headset.
    test@test-Inspiron-5490:~$ amixer cget numid=34,iface=CARD,name='Headphone Mic Jack'
    numid=34,iface=CARD,name='Headphone Mic Jack'
    ; type=BOOLEAN,access=r-------,values=1
    : values=off

  4. RanderWang commented on May 9, 2019

    @RanderWang

    After headset is unplugged, DMIC is the default input
    Screenshot from 2019-05-09 16-02-22

  5. RanderWang commented on May 9, 2019

    @RanderWang

    But when you parecord, HeadSet is still used. So it is caused by pulse audio
    Screenshot from 2019-05-09 16-02-42

  6. RanderWang commented on May 9, 2019

    @RanderWang

    @ClarexZhou next time testing paplay or parecord, please add flag of : -v. It will show you more info, including which device is used

  7. wenqingfu commented on May 9, 2019

    @wenqingfu

    After headset is plugged, DMIC is the default input

    I guess you mean 'unplugged'? @RanderWang

  8. mengdonglin commented on May 10, 2019

    @mengdonglin

    @jason77-wang Please fix this PulseAudio issue.

  9. RanderWang commented on May 10, 2019

    @RanderWang

    After headset is plugged, DMIC is the default input

    I guess you mean 'unplugged'? @RanderWang

    fixed it

  10. jason77-wang commented on May 10, 2019

    @jason77-wang

    I mentioned it before: because headset-mic and dmic belongs to two different sources in the PA, it will be more difficult for us to support them.

    So far, please let headset-mic not support hotplug, that means let headset-mic always shows in the sound-setting no matter the headset is plugged or not, When users want to record via headset-mic, then choose headset-mic from UI, if users want to record sound from DMIC, choose dmic from UI. that is a workaround.

  11. mengdonglin commented on May 14, 2019

    @mengdonglin

    @jason77-wang I think you need to customize the UCM for system integration, like adjusting volume, doing workaround for PulseAudio or providing more user-friendly hot-plug effect in GUI Sound Settings etc.

    The UCM provided by @RanderWang is just a reference/prototype for how SOF can work with legacy HD-A codecs and to kick off system integration. But we cannot do further customization or workaround. Canonical needs to take over from here.

    So closing this issue as won't fix.

  12. added
    won't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
    on May 14, 2019
  13. jason77-wang commented on Jun 20, 2019

    @jason77-wang
  14. added
    UCMRestriction of UCM configuration files
    on Oct 31, 2019
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 platformHDAApplies to HD-Audio bus for codec connectionP1Blocker bugs or important featuresPulseAudioPulseAudio restrictionUCMRestriction of UCM configuration filesbugSomething isn't workingwon't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions