Skip to content

[MTL] SoundWire: unreliable headset detection on Dell SKU 0CC7 #4872

Closed

Description

@plbossart

When testing headset plug/unplug on Fedora, it's fairly common to see the headset not detected at all, but the headphone is always detected.

Typical setup:
speakers are shown (no local mics on this SKU)
insert headset, both output and input devices are shown
unplug headset
reinsert headset -> no input shown

example screen shot
start:
Screenshot from 2024-03-22 22-34-18

headset plugged
Screenshot from 2024-03-22 22-34-54

headset unplugged/replugged
Screenshot from 2024-03-22 22-34-35

Activity

  1. plbossart commented on Mar 23, 2024

    @plbossart
    MemberAuthor
  2. bardliao commented on Mar 25, 2024

    @bardliao
    Collaborator

    @plbossart Can you try #4873? We didn't add quirk for SUK 0CC7, and based on my test, the JD source is JD2. @shumingfan Could you confirm the JD source?

  3. bardliao commented on Mar 25, 2024

    @bardliao
    Collaborator

    @plbossart Can you try #4873? We didn't add quirk for SUK 0CC7, and based on my test, the JD source is JD2. @shumingfan Could you confirm the JD source?

    Hmm, the product uses rt713 codec not rt711, and the codec driver support JD1 only. So, closing #4873 and wait for Realtek's confirmation. @plbossart You could try options snd_soc_sof_sdw quirk=2 if you want to test with JD2.

  4. plbossart commented on Mar 25, 2024

    @plbossart
    MemberAuthor

    @bardliao if the codec driver only supports JD1, setting the quirk to JD2 will do absolutely nothing?

    @shumingfan we really need your help on this one.

  5. bardliao commented on Mar 25, 2024

    @bardliao
    Collaborator

    @bardliao if the codec driver only supports JD1, setting the quirk to JD2 will do absolutely nothing?

    Hmm, the codec driver will set a register if the JD source is set to JD1. I think the register will be the default value if the JD source is set to JD2 and it happens to work.

    https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/codecs/rt712-sdca.c#L417

  6. shumingfan commented on Mar 26, 2024

    @shumingfan

    @plbossart @bardliao
    Could you try the patch below?
    If the problem still happens, please dump the registers including MBQ registers.

    +++ b/sound/soc/codecs/rt712-sdca.c
    @@ -405,6 +405,7 @@ static void rt712_sdca_jack_init(struct rt712_sdca_priv *rt712)
                            RT712_UMP_HID_CTL0, 0x1100, 0x1100);
                    rt712_sdca_index_update_bits(rt712, RT712_VENDOR_HDA_CTL,
                            RT712_UMP_HID_CTL7, 0xf000, 0x0000);
    +               rt712_sdca_index_write(rt712, RT712_VENDOR_REG, 0x09, 0x6002);
    
                    /* detected_mode_change_event_en & hid1_push_button_event_en */
    
  7. plbossart commented on Mar 27, 2024

    @plbossart
    MemberAuthor

    @shumingfan I tried with this patch, I don't see a change. The mixers don't show the headset mic detected, so it's not a pipewire plumbing issue

    root@fedora:~# amixer -Dhw:0 cget numid=25
    numid=25,iface=CARD,name='Headphone Jack'
      ; type=BOOLEAN,access=r-------,values=1
      : values=on
    root@fedora:~# amixer -Dhw:0 cget numid=26
    numid=26,iface=CARD,name='Headset Mic Jack'
      ; type=BOOLEAN,access=r-------,values=1
      : values=off
    

    i am not sure how to dump the registers, the command 'cat /sys/kernel/debug/regmap/sdw:0:0:025d:0713:01/registers' seem to hang for some reason. What do I need to do here?

  8. shumingfan commented on Mar 28, 2024

    @shumingfan

    @plbossart
    I checked the Windows settings of RT713. Two more settings are added.
    Would you please test again?
    If the issue still happens, I will try to borrow the same machine and test it on my side.

    +++ b/sound/soc/codecs/rt712-sdca.c
    @@ -405,6 +405,9 @@ static void rt712_sdca_jack_init(struct rt712_sdca_priv *rt712)
                            RT712_UMP_HID_CTL0, 0x1100, 0x1100);
                    rt712_sdca_index_update_bits(rt712, RT712_VENDOR_HDA_CTL,
                            RT712_UMP_HID_CTL7, 0xf000, 0x0000);
    +               rt712_sdca_index_write(rt712, RT712_VENDOR_REG, 0x09, 0x6002);
    +               rt712_sdca_index_write(rt712, RT712_VENDOR_REG, 0x47, 0xa47a);
    +               regmap_write(rt712->regmap, 0x2f59, 0x07);
    
                    /* detected_mode_change_event_en & hid1_push_button_event_en */
    

    i am not sure how to dump the registers, the command 'cat /sys/kernel/debug/regmap/sdw:0:0:025d:0713:01/registers' seem to hang for some reason. What do I need to do here?

    Hmm, it will take some time about a few minutes.
    Please keep the DSP on, then dump the registers.

  9. plbossart commented on Mar 28, 2024

    @plbossart
    MemberAuthor

    Thanks @shumingfan, with the last patch the jack detection works reliably in my manual tests I didn't see any configuration where the mic is not detected.

    Button detection doesn't seem to work though, I have a two button headphone and the volume does not adjust. It's likely a different problem though, and I am not sure if this is supposed to work on this SKU.

  10. shumingfan commented on Mar 29, 2024

    @shumingfan

    @plbossart Thanks for the testing.
    I will get the same machine from @bardliao.
    I need some time to check this and release the final patch.

  11. shumingfan commented on Apr 1, 2024

    @shumingfan

    @plbossart
    I could reproduce the same issue on SKU 0CC7, even using the patch (#4872 (comment)).
    If the jack inserts into the socket slowly, the issue will happen.
    The hardware engineer checks the jack socket that the JD is triggered when the jack isn't even plugged into the mic ring.
    jack-socket1

    Is it possible to report this situation to Dell?
    Realtek also tries to report this to Dell/ODM.

  12. bardliao commented on Apr 2, 2024

    @bardliao
    Collaborator

    @plbossart I could reproduce the same issue on SKU 0CC7, even using the patch (#4872 (comment)). If the jack inserts into the socket slowly, the issue will happen. The hardware engineer checks the jack socket that the JD is triggered when the jack isn't even plugged into the mic ring. jack-socket1

    Is it possible to report this situation to Dell? Realtek also tries to report this to Dell/ODM.

    I will report it to Dell

  13. added
    SDWApplies to SoundWire bus for codec connection
    MTLApplies to Meteor Lake platform.
    codecCodec HW or driver restriction
    on Apr 12, 2024
  14. marc-hb commented on May 23, 2024

    @marc-hb
    Collaborator

    @shumingfan , can the "Selected Mode" approach in #4996 help here?

  15. shumingfan commented on May 24, 2024

    @shumingfan

    @shumingfan , can the "Selected Mode" approach in #4996 help here?

    @marc-hb No, this is the problem with the jack socket. It is a hardware issue.
    The amixer control can't help.
    Realtek reported this problem to ODM already. But, we didn't get any feedback or action about this.

  16. changed the title [-]SoundWire: unreliable headset detection on Dell SKU 0CC7[/-] [+][MTL] SoundWire: unreliable headset detection on Dell SKU 0CC7[/+] on May 29, 2024
  17. plbossart commented on Aug 12, 2024

    @plbossart
    MemberAuthor

    nothing we can do to fix this, closing

  18. added
    won't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
    on Aug 12, 2024
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

    MTLApplies to Meteor Lake platform.SDWApplies to SoundWire bus for codec connectioncodecCodec HW or driver restrictionwon'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