Score:2

Realtek® ALC4080 Codec Front Jack doesn't work

in flag

I just set up pc with MSI mag z590. it has Realtek® ALC4080 Codec. The headset jack which placed the front panel does not work. I search for old questions. I found this closest question. Unfortunately, there is no answer. A headset is defined on my sound settings but the sound does not come. my kernel 5.11.0-43-generic and ubuntu ver 20.04 LTS. I can get sound with a Bluetooth headset.

stason avatar
pl flag
This thread provides a manual switching solution - tested it to work: https://bbs.archlinux.org/viewtopic.php?id=272523
Terrance avatar
id flag
With your motherboard and the front panel connector for the JAUD1, did it ever work? If not, check your wiring. If you are getting sound out of the rear speaker jacks, then there shouldn't be any configuration to make the front jack work. I would definitely check the wiring. https://download.msi.com/archive/mnu_exe/mb/E7D08v1.0_v2.0.pdf page 35
Nmath avatar
ng flag
Even if this is not your first time building a PC, the front panel wiring can be complicated because it's not always consistent between motherboards and cases. Make sure that everything is wired correctly.
Burak Esen avatar
in flag
the Front JAUD1 is wired. when I plug in my headset, it is selectable from sound settings.
Terrance avatar
id flag
I would still check the wiring. Those things are crazy touchy, and it's way too easy to get the wrong wire to the wrong pin. If your headset is selectable, then it sounds like it is not an OS problem. You can try to eliminate that by booting to a Live USB and testing that way.
Burak Esen avatar
in flag
I'm sure that it is wired where it should be. I think alc4080 is not supported or somehow the computer tries to run with the wrong driver.
Terrance avatar
id flag
It very well could be running the wrong driver. There is no information out there for the ALC4080 chipset, not even on Realtek's site, unless there is a driver of another version that is compatible, but I can't seem to find one for you. Anyway, if you run `sudo lshw -C sound` it will show both the product chipset as well as the driver it is loading for it.
Terrance avatar
id flag
It looks like they kind of group all audio drivers into one: https://www.realtek.com/en/component/zoo/category/pc-audio-codecs-high-definition-audio-codecs-software
Burak Esen avatar
in flag
result 1-sudo lshw-C sound *-usb:1 description: Audio device product: USB Audio vendor: Generic physical id: 5 bus info: usb@1:5 version: 0.03 capabilities: usb-2.00 audio-control configuration: driver=snd-usb-audio maxpower=100mA speed=480Mbit/s
Burak Esen avatar
in flag
result 2-sudo lshw-C sound *-multimedia description: Audio device product: Intel Corporation vendor: Intel Corporation physical id: 1f.3 bus info: pci@0000:00:1f.3 version: 11 width: 64 bits clock: 33MHz capabilities: pm msi bus_master cap_list configuration: driver=snd_hda_intel latency=32 resources: irq:16 memory:92510000-92513fff memory:92000000-920fffff
Burak Esen avatar
in flag
Until the day the new driver is written, I will manage with solutions that I can use the rear inputs. I hope they are working properly I don't have the proper equipment to try right now.
Score:2
sc flag

I had the same issue and fixed it with the latest alsa UCM configuration. The alsa UCM configuration comes from the alsa-ucm-conf package. Updates to the alsa-ucm-conf package will wipeout the modifications you are doing here, so make backups and keep notes of what worked so you can easily restore your changes after eventual updates to alsa-ucm-conf. My fix is very similar to the other one that's listed here, however it manages to avoid the need to install a new version of alsa-lib. Other people landing here should know that it also depends on the motherboard you have, but I'll cover that as well. The ALC4080 chipset appears as a USB Audio device, so keep that in mind.

Now look at the file ucm2/USB-Audio/USB-Audio.conf specifically at the If.realtek-alc4080 block (delimited by the outside braces). If you see your motherboard in the comments, great! You can just use the block as is and skip the next step.

If you don't see your motherboard, don't worry, we'll still get it working. Run the following command:

    lsusb

You'll need to extract from there the id of your USB Audio card. It's different on every motherboard. Here's what mine looks like:

    Bus 001 Device 002: ID 42ab:4a5c ASUSTek Computer, Inc. USB Audio

So mine is 42ab:4a5c. Remember to look for the line that contains "USB Audio". If you see multiple lines with USB Audio, you might have some USB headset or audio device, unplug it then try again.

Now edit /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf on your system (save a backup before doing it to be on the safe side) and add the entire If.realtek-alc4080 block from ucm2/USB-Audio/USB-Audio.conf including the If.realtek-alc4080 text to your USB-Audio.conf file.

If you're motherboard is not listed, replace the entire line starting with Regex "USB(..." with Regex "USB<your usb id from lsusb>". So for my motherboard it would be Regex "USB42ab:4a5c"

Then copy ALC4080.conf and ALC4080-HiFi.conf to /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080.conf and /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf respectively.

What you are doing copying these files is basically providing alsa with the configuration necessary to understand how to communicate with the ALC4080 chipset.

Now we have to figure out if your alsa's libraries can understand these configuration files. These steps are necessary because the syntax used in these files is "new" syntax (syntax 6 apparently) which only newer alsa libs can understand (I don't know exactly which version). Lets try to load this new configuration and see if it works.

    alsaucm -i
    open USB-Audio
    listcards

The command alsaucm -i takes you to the interactive mode of alsaucm. Then with open USB-Audio you are telling it to try and load configuration for USB Audio. If at this point you get errors, we'll need to edit the configuration files to take out the syntax it cannot understand. If you get no errors and see some nice output after running listcards, congratulations, restart and try out your Audio capabilities.

If however you get errors, you'll need to edit /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080.conf and replace everything with

    Comment "USB-audio on Realtek ALC4080"
    SectionUseCase."HiFi" {
        File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
        Comment "HiFi 2.0 Channels"
    }
    # SectionUseCase."HiFi 5+1" {
    #   File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
    #   Comment "HiFi 5.1 channels"
    # }
    # SectionUseCase."HiFi 7+1" {
    #   File "/USB-Audio/Realtek/ALC4080-HiFi.conf"
    #   Comment "HiFi 7.1 channels"
    # }

This is my attempt at translating to the old syntax style. You also need to edit /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf and remove the 2 lines that start with Variant."HiFi.....

Now, if you've been paying attention you've probably noticed that ALC4080 has 3 operating modes. These operating modes are describe in my motherboard manual, the 3 operating modes are either 2.0 channels, or 5+1 or 7+1. In future versions of the alsa-ucm-conf these will work separately. But right now we'll have to hardcode one of those modes. In case you are just using your headset, you can skip changing the PlaybackChannels and move to the validation step below. In case you are using 5+1 you'll need to replace the PlaybackChannels 2 line with PlaybackChannels 6 and if you are using 7+1, then you'll have to replace it with PlaybackChannels 8. You can also do this by commenting/uncommenting lines (a comment starts with #) as it was done in the new ALC4080.conf above. You may also comment/uncomment the appropriate section for you in ALC4080.conf above if you want to see the appropriate title, although it is not strictly necessary. Unfortunately I don't know this format well enough to provide a solution for all 3 modes of operation. So if you want to switch between them, you'll need to edit these files appropriately and restart your computer.

Now let's try again to validate the configuration. Run these again

    alsaucm -i
    open USB-Audio
    listcards

You should not get any errors and upon running listcards you should see a card listed, probably called "Generic USB Audio". This should finally work now. Restart and check to see if it works.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.