Headphones vs Headset detection
#1
Got a question about how to nail down a problem.  Have nice Sony noise canceling headphones and a cheap set of regular Sony headphones.  Neither work in the Pinephone.  A set of pack-in earbuds + mic from an old phone do.  Manually flipping switches with alsamixer makes either set of the Sony headphones work.

So after much exploration it seems Pinephone only detects a headset.  The SoC has inputs for HP-DET and MIC-DET but the Pinephone schematics only show a connection to a headphone detection circuit in the physical jack.  If the diagram of the jack is right it should be detecting either type of connection.  evtest shows microphone detection when the headset is inserted but nothing on headphone insertion.

Wondering if the current kernel even looks at the HP-DET signal?  Does it instead use the button input for the MIC pin to also detect presence of a Mic? If it does, a headphone grounds the Mic signal so it should also be able to detect that case.
  Reply
#2
(03-18-2021, 10:27 AM)jmorris Wrote: evtest shows microphone detection when the headset is inserted but nothing on headphone insertion.
I am not able to reproduce that. Pinephone Community Edition. Mobian running 5.11 kernel:
First two entries are headphones. Last entry a headset.

Code:
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "PinePhone Headset Jack"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 164 (KEY_PLAYPAUSE)
  Event type 5 (EV_SW)
    Event code 2 (SW_HEADPHONE_INSERT) state 0
    Event code 4 (SW_MICROPHONE_INSERT) state 0
Properties:
Testing ... (interrupt to exit)
Event: time 1616146736.894669, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1616146736.894669, -------------- SYN_REPORT ------------
Event: time 1616146738.588486, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1616146738.588486, -------------- SYN_REPORT ------------
Event: time 1616146741.995267, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1616146741.995267, -------------- SYN_REPORT ------------
Event: time 1616146743.477673, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1616146743.477673, -------------- SYN_REPORT ------------
Event: time 1616146747.531432, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 1
Event: time 1616146747.531432, -------------- SYN_REPORT ------------
Event: time 1616146748.150480, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 1
Event: time 1616146748.150480, -------------- SYN_REPORT ------------
Event: time 1616146749.368830, type 5 (EV_SW), code 2 (SW_HEADPHONE_INSERT), value 0
Event: time 1616146749.368830, type 5 (EV_SW), code 4 (SW_MICROPHONE_INSERT), value 0
Event: time 1616146749.368830, -------------- SYN_REPORT ------------
  Reply
#3
(03-19-2021, 03:42 AM)fernando_c_m Wrote:
(03-18-2021, 10:27 AM)jmorris Wrote: evtest shows microphone detection when the headset is inserted but nothing on headphone insertion.
I am not able to reproduce that. Pinephone Community Edition. Mobian running 5.11 kernel:
First two entries are headphones. Last entry a headset.

Code:
Input driver version is 1.0.1
Input device ID: bus 0x0 vendor 0x0 product 0x0 version 0x0
Input device name: "PinePhone Headset Jack"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 114 (KEY_VOLUMEDOWN)
    Event code 115 (KEY_VOLUMEUP)
    Event code 164 (KEY_PLAYPAUSE)
  Event type 5 (EV_SW)
    Event code 2 (SW_HEADPHONE_INSERT) state 0
    Event code 4 (SW_MICROPHONE_INSERT) state 0
That second to last line is the key, I don't see that on PostmarketOS-Phosh.  Thought everybody was running the same basic kernel.  Apparently not.

Was already digging into ALSA's Use Case Manager to add a manual config.  Instead the plan has to be to figure out what is different and get PMOS to pick up that change.  Thanks.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Headphones outputting mono only? Subsentient 10 14,694 06-26-2020, 06:07 AM
Last Post: Subsentient

Forum Jump:


Users browsing this thread: 3 Guest(s)