Skip to content

[BUG][CML][SDW UCM2]Output source/input Device selection won't auto highlight on headphone/headset when plug in headset. #1999

Closed

Description

@YvonneYang2

Describe the bug
Output source/input Device selection won't auto highlight on headphone/headset when plug in headset.

To Reproduce

  1. Boot up without headset.
  2. Open sound setting. Then plug in headset.
  3. Check the input and output Device selection.

Reproduced rate
100%

Expected result
Input Device will auto switch to "Headset Mic - sof-soundwire"
Output Device will auto switch to "Headphone - sof-soundwire"

Actual result
Input Device still highlight on "Soundwire microphones-sof-soundwire"
Output Device still highlight on "Speaker-sof-soundwire"

IMG_20200408_112823

Test recipe
Kernel: https://github.com/thesofproject/linux/commits/topic/sof-dev commit:052e45d7
FW: https://github.com/thesofproject/sof/commits/master commit:b4e8b1e
UCM: https://github.com/thesofproject/alsa-ucm-conf commit: 4722f5b +thesofproject/alsa-ucm-conf#29
TPLG: Same with FW branch, sof-cml-rt711-rt1308-mono-rt715.tplg
platform: CML-U Laptop with ALC711+ ALC1308+ ALC715 in SDW mode

Activity

  1. added
    bugSomething isn't working
    CMLApplies to Comet Lake platform
    on Apr 8, 2020
  2. plbossart commented on Apr 8, 2020

    @plbossart
    Member

    @YvonneYang2 I just tried and indeed there is no automatic switch but
    a) there is no exclusion between Speaker and Headphone
    b) on Dell platforms isn't this supposed to be handled with a user choice?

    @juimonen can you help here, I am not sure what would trigger a switch in a UCM file.

  3. changed the title [-][BUG][CML][UCM2]Output source/input Device selection won't auto highlight on headphone/headset when plug in headset.[/-] [+][BUG][CML][SDW UCM2]Output source/input Device selection won't auto highlight on headphone/headset when plug in headset.[/+] on Apr 9, 2020
  4. added
    SDWApplies to SoundWire bus for codec connection
    on Apr 9, 2020
  5. ClarexZhou commented on Apr 9, 2020

    @ClarexZhou

    Latest provided Dell platform UCM1 is thesofproject/alsa-ucm-conf#28, which is crated by @libinyang
    Will do automatic switch when plug in/ unplug headset.

    And no pop up query for headset/headphone/Microphone type selection when plugging in headset.
    @juimonen could you comment more details?

  6. juimonen commented on Apr 9, 2020

    @juimonen

    hmm I haven't too much tested this platform with ucm1 or ucm2. Need to think a little bit...

  7. libinyang commented on Apr 17, 2020

    @libinyang

    I did some test and debug on this issue. It seems there are 2 issues.

    1. the priority setting is wrong. Speaker priority should be lower than Headphone. I will submit a patch for it later.
    2. It seems pulseaudio can't recognize the UCM2 priority setting. I will continue testing and debugging on this issue.
  8. libinyang commented on Apr 21, 2020

    @libinyang

    I did some test and debug on this issue. It seems there are 2 issues.

    1. the priority setting is wrong. Speaker priority should be lower than Headphone. I will submit a patch for it later.
    2. It seems pulseaudio can't recognize the UCM2 priority setting. I will continue testing and debugging on this issue.

    some update: pulseaudio can recognize the UCM2 priority setting. But it doesn't work when Headset hotplug. I will do more test on that.

  9. libinyang commented on Apr 21, 2020

    @libinyang

    This bug is caused that we are using the single profile (or may be more accurate: switch between ports in the same profile). If we switch to multi profiles mode, this bug is fixed. I'm not sure this is a bug in pulseaudio of single support or it is designed so. I'm confirming with Jaroslav. Please see more details in https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/854

  10. perexg commented on Apr 21, 2020

    @perexg

    The headset automatic switch issue is probably a gnome issue: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/10

  11. libinyang commented on Apr 21, 2020

    @libinyang

    The headset automatic swith issue is probably a gnome issue: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/10

    @perexg Got it. Thanks a lot.

  12. libinyang commented on Apr 24, 2020

    @libinyang

    @perexg I checked with Hui. He told me that gnome patch is rejected. I checked pulseaudio and found if headphone and speaker use different pcms in a single profile, when headphone is plugged in, the headphone will be considered as active, which causes pulseaudio will not switch to headphone automatically. So it seems we have to use multiple profiles to support automatic Headphone switch. Or do you have any other suggestions?

    @plbossart @mengdonglin @kv2019i @juimonen Is this a mandatory feature that system will automatically switch to headphone if it is plugged in?

  13. perexg commented on Apr 24, 2020

    @perexg

    I checked with Hui. He told me that gnome patch is rejected.

    Read the whole gnome story... We have different (and correct) mechanism in pulseaudio so the clients can do the proper manual port selection. The gnome patch should be recoded.

    if headphone and speaker use different pcms in a single profile, when headphone is plugged in, the headphone will be considered as active, which causes pulseaudio will not switch to headphone automatically.

    It's resolvable. Create a new pulseaudio issue. You may also propose the fix.

    So it seems we have to use multiple profiles to support automatic Headphone switch.

    It's a bit step back.

  14. libinyang commented on Apr 24, 2020

    @libinyang

    @perexg

    Read the whole gnome story... We have different (and correct) mechanism in pulseaudio so the clients can do the proper manual port selection. The gnome patch should be recoded.

    Yes. the manual port selection works well.

    It's resolvable. Create a new pulseaudio issue. You may also propose the fix.

    OK. I will create an issue in gitlab.freedesktop.org and try to fix it. Thanks for the suggestion.

  15. ClarexZhou commented on May 29, 2020

    @ClarexZhou
  16. libinyang commented on Aug 6, 2020

    @libinyang

    with the latest recipe:

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 platformP1Blocker bugs or important featuresSDWApplies to SoundWire bus for codec connectionUCM2bugSomething isn't workingsingle-profile UCMUCM devices are defined in a single profile.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions