Open 13r0ck opened 1 year ago
The patch above now only seems to fix mic, after plugging something into the speaker jack first. I can't reproduce the behavior I had anymore. Now it is just broken in new ways.
When in the state described here:
amixer -c 1 sset Line,0 100% unmute cap
fixes the Line jack. So that Line in just works, but then mic still doesn't work until something is plugged into the speaker
The Line,0
should be controlled in the UCM device:
EnableSequence [
cset "name='${var:Line1Mixer} Capture Switch',index=${var:Line1Mindex} on"
]
It looks like that the device is not selected in the audio server.
I would recommend to check jack detection names at first (amixer -c 0 events
or alsactl monitor hw:0
). Then check the PCM devices using aplay/arecord
and correlate mixer controls (alsamixer
or amixer
). If you gather this information, you can compare the defaults from the Define
section and overwrite them for the specific hardware/firmware version.
It's really pity that we have tents versions of firmware for ALC4080.
Thanks for the info! I have read those debug notes a few times and I'm still not sure what do do with this one.
$ amixer -c 1 events
~~SNIP~~
event value: numid=14,iface=CARD,name='Mic - Input Jack'
event value: numid=15,iface=MIXER,name='Mic Capture Switch'
That is the output I get when (un)plugging the mic jack. So the name detection is correct.
Then when I use arecord -Dplughw:1,2
I do get recording from the mic. Which is the same value that is already in ALC4080-HiFi
.
I'm not sure what else I should try here. I'm not sure if it is useful, but when I plug into the speaker jack (which then fixes the mic jack), if I run spa-acp-tool -c 1 info
it breaks the mic again, which is strange... and maybe means this is a pipewire bug?
It's a question, if PCM 2 device is only for the microphone. You may try also other PCM devices. I guess, if Speaker is somehow connected to Mic, then PCM 2 may be a stream for the mixed output.
Also, don't use spa-acp-tool
when the pipewire is running. You should also probably select the right sink/source there.
I think it might be a mixed stream? When I plug a jack into the speaker the mic input gets selected for a moment in gnome-control-center.
I have tried every combination of possible PCM via the Define
section. None of them make the mic work properly. After more testing amixer -c 1 sset Line,0 100% unmute cap
is only needed some of the times. I think it might be a fluke because I am changing ucm config and rebooting so many times.
The reboot is not necessary. For pipewire, the command systemctl --user restart wireplumber
is sufficient to reload the new UCM configuration.
I would start from scratch:
1) disable pipewire (systemctl --user stop wireplumber
)
2) test all Jacks - amixer -c 0 events
- report it here
3) turn all mixer settings on (+ unmute + capture flags) - report amixer scontents
here
4) test all possible PCM devices to assign them to the physical plugs (aplay -l
, arecord -l
)
5) try to find which mixer elements control volume for a given PCM stream
All amixer command should have -c 1
argument otherwise the sound server (not hardware) mixer controls are printed.
Have you tested all PCM devices directly (e.g. aplay -D plughw:1,1 <some_wav>
/ arecord -vvv -D plughw:1,1 -f dat a.wav
) without pulseaudio/pipewire? The first number is the sound card number and second is the PCM device number (for this sound card).
All amixer command should have -c 1 argument otherwise the sound server (not hardware) mixer controls are printed.
Oh sorry about that. Here are the updated outputs
Have you tested all PCM devices directly
This system is acting very weird. I tried that (and just double checked) I can't get arecord
to record anything on that computer. All jacks on all hardware devices report 0% (with and without the wireplumber service disabled.) The closest I can get is using audacity, and it detects the microphone on hw1,2
after I plug into the speaker jack.
I double checked on another machine to see if maybe the Pop!_OS packaging of alsa-utils was broken. On the other machine arecord
works as expected. Fedora has the same behavior on both machines.
Notably in the amixer -c 1 scontents
above, the Mic
is turned on after the speaker jack is plugged in. amixer -c 1 sset 'Mic',0 100% on cap
doesn't fix the issue though. Using a mixer to turn on 'PCM,0'
, 'PCM',1
, or 'Analog In',0
didn't fix the issue either.
I'm a little late to the party, but we also have massive problems with our B650I board.
Context: We run 2 identical PCs, one with normal Fedora 37 and the other with the KDE Plasma spin. Using the Fractal Ridge case, which provides: Mic, Line, Speaker jacks in the back; single jack - combined headphone/mic - in the front
Rear jacks: We can only play sound on the normal rear speaker output jack. Mic Input does not work (no signal), but the jack is detected.
Front jack: Does not work at all. Jack detection works, but no signal.
Jack detection: The KDE audio settings recognizes the separate speaker and headset as separate "things" if those are plugged in after each other. Not so the mics. Connecting a mic to the rear makes the Microphone settings appear, but adding the headset to the front does not add another microphone.
We already updated to latest ucm2-conf (as of today).
I'm willing to provide any details necessary to resolve this issue, but I'm not very deep into audio setup and configuration on Linux. Thanks for any help.
This is also an issue with the MSI MPG Z790I (ID: 0db0:62a4)
If things does not work with the native ALSA API (ALSA drivers) then we cannot do much in UCM. I already provided the debug information for UCM. The silent input / output may be caused that something is missing the USB communication / setup. The ALC4080 chips have own firmware and all vendors have a slightly modified version. One way is to use the reverse engineering technique for the windows drivers using qemu.
I'm not sure. I tried aplay -d ... some.wav
and I could hear it via the front jack. So this seems to work.
This seems to have been a pipewire bug, this might fix it https://github.com/pop-os/pipewire/pull/47
This seems to have been a pipewire bug, this might fix it pop-os/pipewire#47
Not sure how a pop-os fix should change things for me on Fedora? This fix is nowhere to see in the real pipewire repo (https://gitlab.freedesktop.org/pipewire/pipewire/-/commits/master?ref_type=heads)
No point in upstreaming something that is still being tested. That is what forks are for. Im just keeping this thread updated. Please be paitent (or use pop os đŸ˜›)
We will upstream after we have the whole set of audio issues on this motherboard fixed, as @13r0ck said.
This bug is stale. Re-open when required.
@perexg At least with Fedora 39 KDE spin this is not fixed as of today. Just re-tested.
@liayn : Describe what does work with the current UCM. Also use native ALSA tools to access the USB driver directly, if you can use the target functionality. UCM is on top of the ALSA drivers. If it's a driver issue, it should be reported at another place.
In regards to jack detection no change since https://github.com/alsa-project/alsa-ucm-conf/issues/281#issuecomment-1490493986
systemctl --user status wireplumber.service
wireplumber[2882]: No UCM verb is valid for hw:4
As noted in https://github.com/alsa-project/alsa-ucm-conf/issues/281#issuecomment-1432330365
So that Line in just works, but then mic still doesn't work until something is plugged into the speaker
This I can't confirm. Mic does not work at all, independent of whether a speaker is plugged in.
From the UCM DEBUG infos:
alsaucm
tool for me.speaker-test
runs forever and can't be stopped with ctrl+c. (no matter which CARD/DEV combo I use)
Also there is output to hear on the front jackaplay -D plughw:4,1 /usr/share/sounds/speech-dispatcher/test.wav
Nothing to hear
I hope this provides a good overview of what's going on. What should I do next?
Could you show amixer -c 4 info
, too ? Also, alsaucm
tool may be in a different package than alsa-utils
(e.g. alsa-ucm-utils
in Fedora). If alsaucm
test does not work, the UCM config is not valid in your system.
amixer -c 4 info
Card sysdefault:4 'Audio'/'Generic USB Audio at usb-0000:0c:00.0-10, high speed'
Mixer name : 'USB Mixer'
Components : 'USB0db0:36e7'
Controls : 25
Simple ctrls : 5
Installed alsa-ucm-utils
. Thanks.
Try the above patch (4b8c56ceab4a7a32c2b07328876426f904233c49). It's just a variation of patch proposed in this issue description. I would expect, that more ALC4080 hw variants may not have the S/PDIF device present.
@perexg Thanks I applied the patch and restarted wireplumber.
The effect now:
Rear speaker: :white_check_mark: Rear mic: :x: no jack detection Rear line: :x: no jack detection Front: speaker :white_check_mark: ; mic :x: detected, but no input
The alsaucm dump provides all information for the current configuration to test the devices / jack names with the native ALSA tools. If you discover that something is set wrongly for your platform, give feedback. Otherwise, we cannot do much. For example: Analog In - Input Jack
is for what ?
Also, are you on latest BIOS release? Vendors usually upgrade the ALC4080 firmware, too.
@perexg Yes I'm of course on the latest BIOS 7D73v16.
For example:
Analog In - Input Jack
is for what ?
I provided the dump above, but I honestly don't know where I could see this mapping between what amixer
outputs and what alsaucm dump
says.
I'm, obviously, not too deep into audio things in Linux. I tried to take away as much as I can from all the things written above. I still lack understanding on what information you would need to find the culprit.
Nevertheless, I fully understand that your free support time is exhausted at some point. Thanks for all the help so far! We meanwhile employed dedicated USB Audio-Hardware to workaround this issue. So basically we do not use the mainboard's audio features at all (which is a pity).
The debugging using the standard ALSA tools is described in https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/DEBUG.md . In the UCM dump, you see a list of used ALSA PCM device names and controls. If something is difficult to understand, please, put a comment to this document to improve things.
@perexg I have exactly the same issue with ASUS ROG STRIX B650E-I GAMING WIFI, System correctly detect rear and front microphone but it does not work until connect headphone to rear or front jack. Also when microphone start working it very silent - so I use EasyEffects to boost it software (but it has internal amplifier for microphone input but no way to control this amplifier)
I thought it is driver issue that's why I created this issue too https://bugzilla.kernel.org/show_bug.cgi?id=218913
Seems to have been broken by 33b934c29d2911ef060d48b1a0ca9682645b68c8 , as it was completely functional in 1.2.7.2
I did manage to find a patch that fixes the line in on 1.2.8: All it does is disable spdif for that usb id.
But I am struggling to find what is missing to make mic work. Jack detection is fine, and I can get recordings via
arecord
, but I am missing something with the ucm conf.Here are the config dumps for a few different situations
Without the patch above
$ alsa-info
-> http://alsa-project.org/db/?f=ac8aa25f882540a20c95ee555491a498bd3a88a4` $ alsaucm dump -c hw:1 text `
``` Verb.HiFi { Comment "HiFi 2.0 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 2 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,3" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 5+1" { Comment "HiFi 5.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 6 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,3" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 7+1" { Comment "HiFi 7.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 8 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.SPDIF { Comment "S/PDIF Output" Values { CaptureCTL "_ucm0001.hw:Audio" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,2 PlaybackPCM "_ucm0001.hw:Audio,3" PlaybackPriority 100 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } ```
With the patch above
$ alsa-info
-> http://alsa-project.org/db/?f=7b95b33ddf71324505c7dd696bcc7f24ca64ca52` $ alsaucm dump -c hw:1 text `
``` Verb.HiFi { Comment "HiFi 2.0 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 2 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 5+1" { Comment "HiFi 5.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 6 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } Verb."HiFi 7+1" { Comment "HiFi 7.1 channels" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 8 PlaybackMixerElem PCM,0 PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 TQ HiFi } } Device.Headphones { Comment "Front Headphones" Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Headphone - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackMixerElem PCM,1 PlaybackPCM "_ucm0001.hw:Audio,1" PlaybackPriority 300 TQ HiFi } } Device.Line1 { Comment "Line Input" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line,0 CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic,0 CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 300 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" TQ HiFi } } } ```
On 1.2.7.2 ( with
USB-Audio.conf
quirk to add 0bd0:36e7 to Realtek ALC4080. See https://github.com/alsa-project/alsa-ucm-conf/commit/1923bd19c0bef947c085e2941dd8ed2d1310731e but for 1.2.7.2 )$ alsa-info
-> http://alsa-project.org/db/?f=f148616a3e9b8c0dffffbe57a6bc9ede78c9d309` $ alsaucm dump -c hw:1 text `
``` Verb.HiFi { Comment "Play HiFi quality Music" Device.Speaker { Comment Speakers Values { CaptureCTL "_ucm0001.hw:Audio" JackControl "Speaker - Output Jack" PlaybackCTL "_ucm0001.hw:Audio" PlaybackChannels 2 PlaybackMixerElem Speaker PlaybackPCM "_ucm0001.hw:Audio" PlaybackPriority 200 } } Device.Line { Comment "Line In" Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Line CapturePCM "_ucm0001.hw:Audio,1" CapturePriority 100 JackControl "Line - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" } } Device.Mic1 { Comment Microphone Values { CaptureCTL "_ucm0001.hw:Audio" CaptureMixerElem Mic CapturePCM "_ucm0001.hw:Audio,2" CapturePriority 200 JackControl "Mic - Input Jack" PlaybackCTL "_ucm0001.hw:Audio" } } } ```