Audio through headphone jack is not working

Hey there!

I installed the Fedora Remix a few days ago and so far I’ve managed to test all the supported (according to the Feature Support matrix) features. I haven’t been able to make the headphone audio work unfortunately.

Kernel seems to detect the headphones being plugged in:

Aug 16 01:52:25 rubicon kernel: cs42l84 2-004b: Plug event
Aug 16 01:52:25 rubicon kernel: cs42l84 2-004b: Detected mic
Aug 16 01:52:29 rubicon kernel: cs42l84 2-004b: Unplug event

Apart from that, nothing changes. No new audio device is added, and no audio is coming from anywhere. So I started tinkering around.

By default the only audio device shown in Plasma settings was set to off. Changing the device configuration from “Off” to “Pro Audio” in the Plasma audio settings shows two audio sinks, but none of them are outputting anything to either the speakers (as expected) or the headphones.

wpctl status
PipeWire 'pipewire-0' [0.3.77, imanol@rubicon, cookie:1921123757]
 └─ Clients:
        31. uresourced                          [0.3.77, imanol@rubicon, pid:1555]
        32. WirePlumber                         [0.3.77, imanol@rubicon, pid:1563]
        33. WirePlumber [export]                [0.3.77, imanol@rubicon, pid:1563]
        40. xdg-desktop-portal                  [0.3.77, imanol@rubicon, pid:1586]
        41. pipewire                            [0.3.77, imanol@rubicon, pid:1884]
        47. Plasma PA                           [0.3.77, imanol@rubicon, pid:1670]
        49. kwin_wayland                        [0.3.77, imanol@rubicon, pid:1564]
        60. wpctl                               [0.3.77, imanol@rubicon, pid:18452]
        61. plasmashell                         [0.3.77, imanol@rubicon, pid:1670]

Audio
 ├─ Devices:
 │      39. Built-in Audio                      [alsa]
 │  
 ├─ Sinks:
 │  *   51. Built-in Audio Pro                  [vol: 0.50]
 │      55. Built-in Audio Pro 1                [vol: 0.50]
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  *   57. Built-in Audio Pro                  [vol: 1.00 MUTED]
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:

Video
 ├─ Devices:
 │  
 ├─ Sinks:
 │  
 ├─ Sink endpoints:
 │  
 ├─ Sources:
 │  
 ├─ Source endpoints:
 │  
 └─ Streams:
        56. kwin_wayland                                                
             48. output_1        > plasmashell:input_1  [init]
        58. plasmashell                                                 
             63. input_1         < kwin_wayland:output_1        [init]

Settings
 └─ Default Configured Node Names:
         0. Audio/Sink    alsa_output.platform-sound.pro-output-0

Connecting/Disconnecting the headphones makes no change to the audio sinks shown by wpctl status. The only change I’ve seen is in alsamixer, where the Headphone volume control, shown after selecting the “MacBook Pro J314” card instead of the “default” card changes from Muted to Unmuted. I can’t change the volume on that though. I may not have done a great job at explaning this so let me know if I some screenshots are needed.

Thanks for any help on this.

PS: Forgot to mention, the headphones I’m testing are one of those that come with phones with a microphone bit on them (3.5 jack with 4 contacts). Not sure if it may be an issue or not

Just noticed that testing the “Pro Audio” device in KCM (the typical Left/Right speaker sound test) spews a lot of messages in the kernel ring buffer, and freezes the entire application:

Aug 16 02:10:41 rubicon pipewire[1562]: spa.alsa: set_hw_params: Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: pw.node: (alsa_output.platform-sound.pro-output-0-51) suspended -> error (Start error: Invalid argument)
Aug 16 02:10:41 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: spa.audioadapter: params Spa:Enum:ParamId:EnumFormat: 1:0 (follower format) Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: spa.audioadapter: there was no filter
Aug 16 02:10:41 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: spa.audioadapter:   error: Invalid argument
Aug 16 02:10:41 rubicon pipewire[1562]: spa.audioadapter: could not get any follower format
Aug 16 02:10:41 rubicon pipewire[1562]: pw.node: (alsa_input.platform-sound.pro-input-0-57) suspended -> error (Start error: Invalid argument)
Aug 16 02:10:41 rubicon kernel:  Primary: opening PCM device 'Primary' with no audio route configured (bad settings applied to the sound card)
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at snd_soc_link_hw_params on Primary: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at __soc_pcm_hw_params on Primary: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_hw_params on Primary: -22
Aug 16 02:10:41 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:41 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:41 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:41 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon pipewire[1562]: spa.alsa: set_hw_params: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: pw.node: (alsa_output.platform-sound.pro-output-0-51) suspended -> error (Start error: Invalid argument)
Aug 16 02:10:46 rubicon pipewire[1562]: spa.alsa: set_hw_params: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.audioadapter: params Spa:Enum:ParamId:EnumFormat: 1:0 (follower format) Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.audioadapter: there was no filter
Aug 16 02:10:46 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.audioadapter:   error: Invalid argument
Aug 16 02:10:46 rubicon pipewire[1562]: spa.audioadapter: could not get any follower format
Aug 16 02:10:46 rubicon pipewire[1562]: pw.node: (alsa_input.platform-sound.pro-input-0-57) idle -> error (Start error: Invalid argument)
Aug 16 02:10:46 rubicon kernel:  Primary: opening PCM device 'Primary' with no audio route configured (bad settings applied to the sound card)
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at snd_soc_link_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at __soc_pcm_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: opening PCM device 'Primary' with no audio route configured (bad settings applied to the sound card)
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at snd_soc_link_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at __soc_pcm_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_hw_params on Primary: -22
Aug 16 02:10:46 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:46 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon pipewire[1562]: pw.node: (alsa_input.platform-sound.pro-input-0-57) suspended -> error ((null))
Aug 16 02:10:51 rubicon pipewire[1562]: spa.alsa: set_hw_params: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: pw.node: (alsa_output.platform-sound.pro-output-0-51) suspended -> error (Start error: Invalid argument)
Aug 16 02:10:51 rubicon pipewire[1562]: spa.alsa: set_hw_params: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.audioadapter: params Spa:Enum:ParamId:EnumFormat: 1:0 (follower format) Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.audioadapter: there was no filter
Aug 16 02:10:51 rubicon pipewire[1562]: spa.alsa: 'hw:0,0': capture open failed: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.audioadapter:   error: Invalid argument
Aug 16 02:10:51 rubicon pipewire[1562]: spa.audioadapter: could not get any follower format
Aug 16 02:10:51 rubicon kernel:  Primary: opening PCM device 'Primary' with no audio route configured (bad settings applied to the sound card)
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at snd_soc_link_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at __soc_pcm_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: opening PCM device 'Primary' with no audio route configured (bad settings applied to the sound card)
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at snd_soc_link_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at __soc_pcm_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_hw_params on Primary: -22
Aug 16 02:10:51 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon kernel: apple-mca 39b600000.mca: ASoC: error at snd_soc_dai_startup on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  mca-i2s-2: ASoC: error at __soc_pcm_open on mca-i2s-2: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_be_dai_startup on Primary: -22
Aug 16 02:10:51 rubicon kernel:  Primary: ASoC: error at dpcm_fe_dai_startup on Primary: -22
Aug 16 02:10:55 rubicon plasmashell[1670]: QString::arg: 2 argument(s) missing in systemsett

Tested regular headphones with no mic:

[  734.281270] cs42l84 2-004b: Detected bare headphone (no mic)

Same deal though.

I also noticed, out of the two sinks (Built-in Audio Pro and Built-in Audio Pro 1), the errors in dmesg are only shown if I used the first one, not the Pro 1, which also does nothing but at least the kernel doesn’t complain about it

On headphone / headset connect Built-in Audio Headphones and Built-in Audio Headset Microphone should appear. This works for me on a Macbook Pro 13" (M2) running Fedora and on a MacBook Pro J314 running Gentoo with the same base kernel.

Please check if alsa-ucm-asahi is installed.

It is already installed, and this is the list of files I have in /usr/share/alsa/ucm2/conf.d/macaudio/:

/usr/share/alsa/ucm2/conf.d/macaudio/
/usr/share/alsa/ucm2/conf.d/macaudio/cs42l83
/usr/share/alsa/ucm2/conf.d/macaudio/cs42l83/Headphones.conf
/usr/share/alsa/ucm2/conf.d/macaudio/cs42l84
/usr/share/alsa/ucm2/conf.d/macaudio/cs42l84/Headphones.conf
/usr/share/alsa/ucm2/conf.d/macaudio/j274
/usr/share/alsa/ucm2/conf.d/macaudio/j274/HiFi.conf
/usr/share/alsa/ucm2/conf.d/macaudio/j375
/usr/share/alsa/ucm2/conf.d/macaudio/j375/HiFi.conf
/usr/share/alsa/ucm2/conf.d/macaudio/laptops1
/usr/share/alsa/ucm2/conf.d/macaudio/laptops1/HiFi.conf
/usr/share/alsa/ucm2/conf.d/macaudio/laptops2
/usr/share/alsa/ucm2/conf.d/macaudio/laptops2/HiFi.conf
/usr/share/alsa/ucm2/conf.d/macaudio/DetectSpeaker.conf
/usr/share/alsa/ucm2/conf.d/macaudio/Mac Studio J375.conf
/usr/share/alsa/ucm2/conf.d/macaudio/Mac mini J274.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Air J313.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Air J413.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Pro J293.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Pro J314.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Pro J316.conf
/usr/share/alsa/ucm2/conf.d/macaudio/MacBook Pro J493.conf
/usr/share/alsa/ucm2/conf.d/macaudio/iMac J456.conf
/usr/share/alsa/ucm2/conf.d/macaudio/iMac J457.conf

Currently checking the ALSA configs to see if I can find something interesting.

As it stands right now, no devices get added if I plug the headphones in.

I’m running a 14-inch Macbook Pro M1, with 13.5 firmware

Okay I managed to do something:

If I go into alsamixer and change the “Headphone Playback Mux” from “Primary” to “Secondary” I hear audio only on the left channel. I also had to change “Jack DAC” volume from 0 to something else (this was not done automatically when plugging or anything like that)

Finally, changing “Jack DACB Select” to CH1 is now sending audio to both channels.

So to summarise, from default install I had to:

  • Set “Jack DAC” volume to nonzero
  • Change “Headphone Playback Mux” from “Primary” to “Secondary”
  • Set “Jack DACB Select” to “ASP RX CH1”

It should be noted, this is parting from the default settings as they were on my system. Unsure if something weird happened during my install or perhaps the default settings for new installs are not sane?

This is the problem. Please switch the Profile back to “Off” or “n/a” if headphones are connected. Everything should than work as soon as headphones or a headset is connected. Sorry, I should have read the post fully from the beginning. I agree that this is not a nice UI.

I tried these settings on my 16" M1 but didn’t get headphones working. You do anything else to Alsa?