linux icon indicating copy to clipboard operation
linux copied to clipboard

[BUG] Headphones are not detected when you boot with them plugged in

Open ApostolosB opened this issue 3 years ago • 9 comments

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

  1. Plug in headphones
  2. Turn on the laptop
  3. 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

  1. 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
  2. Name of the topology file
    • Topology: {FILE}
  3. 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

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 avatar May 13 '22 14:05 ApostolosB

@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.

plbossart avatar May 13 '22 15:05 plbossart

alsa-info.txt

The requested file.

ApostolosB avatar May 14 '22 15:05 ApostolosB

@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.

plbossart avatar May 16 '22 17:05 plbossart

OK. Did that and it worked as expected. Now what?

ApostolosB avatar May 17 '22 10:05 ApostolosB

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.

plbossart avatar May 17 '22 14:05 plbossart

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.

ApostolosB avatar May 17 '22 16:05 ApostolosB

Any update or something more i can do with regards to this bug?

ApostolosB avatar Jan 24 '23 18:01 ApostolosB

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'...

plbossart avatar May 16 '23 19:05 plbossart

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.

ApostolosB avatar May 31 '23 11:05 ApostolosB