Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALC4080 onboard audio support on the MSI X870 Tomahawk motherboard #455

Closed
nfp0 opened this issue Oct 23, 2024 · 10 comments
Closed

ALC4080 onboard audio support on the MSI X870 Tomahawk motherboard #455

nfp0 opened this issue Oct 23, 2024 · 10 comments

Comments

@nfp0
Copy link

nfp0 commented Oct 23, 2024

@perexg As mentioned here, it seems the ALC4080 audio on the new MSI X870 Tomahawk motherboard is not supported.

USB ID is 0db0:cd0e

I have tested adding cd0e on the USB-Audio.conf file like so:

Regex "USB((0414:a0(0e|1[0124]))|(0b05:(19(84|9[69])|1a(16|2[07]|5[23c]|97|f1)))|(0db0:(cd0e|005a|124b|151f|1feb|3130|36e7|4(19c|22d|240|88c)|62a4|6c[0c]9|70d3|7696|82c7|8af7|961e|a(073|228|47c|74b)|b202|d1d7|d6e7))|(26ce:0a0[68]))"

With this, the microphone now seems to be correctly mapped and works. But the problem is that it's volume is way too low.
It is set to 100% in both KDE and alsamixer (it's the Line one).

image

How can I help solve this problem? Should I open a separate issue?

@nfp0
Copy link
Author

nfp0 commented Oct 23, 2024

@perexg Sorry, I forgot to attach the output of alsa-info.sh --no-upload.
alsa-info.txt

@nfp0
Copy link
Author

nfp0 commented Oct 26, 2024

I have also noticed that the output volume is also quite low by default.

ALSA looks like this by default:

image

With ALSA set like this, it's not possible to achieve a high volume, on KDE, for example.

Is this situation normal or is it caused by alsa-ucm-conf not yet supporting this motherboard?
I'm not very knowledgeable about the Linux sound stack, so please tell me if I'm posting this issue in the wrong project.

@ykonoclast
Copy link

ykonoclast commented Oct 30, 2024

I have similar audio problems with the same motherboard (under Fedora 41) :

  • Audio output working from the back motherboard jack port

  • No audio output from front jack port, even though headphone is detected : it appears in the list of audio devices (in Gnome parameters) but, when selected, audio is still outputed by the speakers (plugged at the back). Unplugging the speakers and plugging the headphone to the back MoBo port makes it work, though it is impractical.

  • No microphone input working at all (front AND back) even though, like above, microphone is detected and appears in input devices list. There is no sound recorded (changing volume levels doesn’t work).

  • When in audio conferences, system sounds are transmitted to others : they don’t hear the microphone but they hear error bells, clicks on sliders etc. There seems to be some piping problem here.

Everything working fine on dual-boot Windows and used to work fine in Fedora with my previous MoBo. Definitely related to ACL4080 handling in Linux.

@bojankseneman
Copy link

I was experiencing the same issue on my Asus X670E-F.
I've modified the regex in alsa conf locally so it doesn't load ALC4080 driver and instead uses the generic driver which has normal audio volume.
As for the microphone low level, I gave up and I just bought a 10$ USB sound online and plugged the microphone into it.
Good luck solving this the proper way. I keep my fingers crossed for you.

@nfp0
Copy link
Author

nfp0 commented Nov 3, 2024

@bojankseneman In this motherboard's case (X870 Tomahawk), if we don't load the ALC4080 driver, we don't get microphone input at all, so that is not an option. But thank you for the input.

@perexg perexg closed this as completed in f6498fb Nov 7, 2024
@perexg
Copy link
Member

perexg commented Nov 7, 2024

I've modified the regex in alsa conf locally so it doesn't load ALC4080 driver and instead uses the generic driver which has normal audio volume.

The UCM device should handle volume in similar way as direct ALSA devices, because UCM is on top of the standard USB driver. Something is probably misconfigured for your case. Create another report and try to find differences between volume setup for your generic way and standard UCM way (check alsamixer or so to look for ALSA volume changes).

@nfp0
Copy link
Author

nfp0 commented Nov 9, 2024

@perexg What should I do about the volume situation I mentioned previously? Should I also open another issue here?
If not, what's the correct project to open an issue at?

@perexg
Copy link
Member

perexg commented Nov 11, 2024

If the ALSA USB driver cannot set the proper volume, then it's a driver support fault. See https://github.com/alsa-project/alsa-ucm-conf/blob/master/ucm2/DEBUG.md#checking-of-the-corresponding-simple-mixer-name . Basically, if you cannot set volume using a direct ALSA mixer tool like alsamixer, UCM won't help.

It seems that ALC4080 hardware have more firmware variants and it's not clear how the volume should be handled correctly. The information exposed using USB Audio protocol (specification) seems incomplete. Someone with a reverse engineering knowledge may catch and analyze the USB audio packets from the Windows driver to add missing parts to the Linux driver.

Another possibility is that the microphone volume control is limited for this hardware and digital gain should be increased. There's possibility to increase this gain using pactl or wpctl tool like:

pactl set-source-volume alsa_input.usb-C-Media_Electronics_Inc._KURZWEIL_Pro_Microphone_KM-1U-00.analog-stereo 200%
# ... or pipewire alternative ...
wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 200%

@nfp0
Copy link
Author

nfp0 commented Nov 11, 2024

Yes, digital gain certainly works around the issue, as I've tried it, but I was trying to understand if this is a normal expected out-of-the-box experience and if not, where to report it.
Thank you for the clarification.

Indeed it's not possible to raise the volume any further with any ALSA tools such as alsamixer or amixer. And as you said, there seem to be multiple ALC4080 firmware being used by different motherboard manufacturers.

I have also noticed that this problem is also present on Windows without the motherboard drivers installed. Later I will install the driver on Windows and try to see if the problem is solved, and if so, try to see what method is being used by the driver to boost the volume. If need be I'll capture the USB packets on Windows.

Thank you again for your help, and I think I will try to get in contact with the Linux driver developers.

@ryannathans
Copy link

Same issue on the x870 Tomahawk. Is this an issue on all ALC4080 motherboards or just the Tomahawk?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants