[BUG] Headphones are not detected when you boot with them plugged in
Describe the bug
When i plug in headphones and start my laptop they are not detected. I have to plug them out and then in again for them to work.
To Reproduce
- Plug in headphones
- Turn on the laptop
- No sound on the headphones (neither on the speakers)
Reproduction Rate
Every time
Expected behavior
I would expect sound to be directed on the headphones.
Impact
Annoyance
Environment
- Branch name and commit hash of the 2 repositories: sof (firmware/topology) and linux (kernel driver).
- Kernel: Linux mainland 5.17.6-arch1-1 thesofproject/sof#1 SMP PREEMPT Tue, 10 May 2022 23:00:39 +0000 x86_64 GNU/Linux
- SOF: 2.1.1
- Name of the topology file
- Topology: {FILE}
- Name of the platform(s) on which the bug is observed.
- Platform:
description: Multimedia audio controller product: Tiger Lake-LP Smart Sound Technology Audio Controller vendor: Intel Corporation physical id: 1f.3 bus info: pci@0000:00:1f.3 version: 20 width: 64 bits clock: 33MHz capabilities: bus_master cap_list configuration: driver=sof-audio-pci-intel-tgl latency=32 resources: iomemory:600-5ff iomemory:600-5ff irq:169 memory:601d190000-601d193fff memory:601d000000-601d0fffff
- Platform:
Screenshots or console output If applicable, add a screenshot (drag-and-drop an image), or console logs (cut-and-paste text and put a code fence (```) before and after, to help explain the issue.
Please also include the relevant sections from the firmware log and kernel log in the report (and attach the full logs for complete reference). Kernel log is taken from dmesg and firmware log from sof-logger. See https://thesofproject.github.io/latest/developer_guides/debugability/logger/index.html
@ApostolosB headphone detection is handled by a codec, not by the DSP running SOF firmware. That's likely a codec configuration issue and/or a missing UCM file.
Please attach the log of 'alsa-info' so that we can understand what device you have.
In addition, if you see an 'hdaudio card' created please take a look at https://thesofproject.github.io/latest/getting_started/index.html#debug-audio-issues-on-intel-platforms and check if using the legacy HDaudio driver solves your problem. If not, then it's most definitively a codec configuration issue unrelated to the SOF firmware and driver.
@ApostolosB Looks like a bog-standard HDAudio configuration, so please follow the recommendations in https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#disable-sof-on-pci-hdaudio-devices-to-test-audio-playback and add this to /etc/modprobe.d/alsa-base.conf
options snd-intel-dspcfg dsp_driver=1
reboot and recheck jack detection. If this still doesn't work, it's a codec configuration issue that happens with both HDaudio legacy driver and SOF driver.
OK. Did that and it worked as expected. Now what?
Thanks @ApostolosB
so if you remove the option "options snd-intel-dspcfg dsp_driver=1", boot without the headphones plugged in and later plug them, the detection works fine?
Can you also try to suspend/hibernate, plug the headphones while suspended and resume, would the headphone be detected then?
Just trying to triangulate when we have a missing check for the jack status, only on initial boot or on resume as well.
@kv2019i @juimonen @jsarha FYI, wondering if this could be a UCM/Pipewire issue as well.
If i remove the option i go back to the previous behavior. Headphones get no sound.
Suspend works with no issue.
Its a problem only at boot time.
Any update or something more i can do with regards to this bug?
It's unfortunately been a year since the initial issue was filed, and there's no resolution and no line of sight to fix something we haven't root caused.
This is trending to 'won't fix'...
The only thing we've established thus far is that it works as it should with options snd-intel-dspcfg dsp_driver=1
I don't think i can do something more. I am no coder.