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 - ASRock X670E Taichi #229

Closed
hendrikb-101 opened this issue Oct 13, 2022 · 38 comments
Closed

ALC4080 - ASRock X670E Taichi #229

hendrikb-101 opened this issue Oct 13, 2022 · 38 comments

Comments

@hendrikb-101
Copy link

hendrikb-101 commented Oct 13, 2022

This board's ALC4082 seems to be sitting here:
26ce:0a06 Generic USB Audio

After trying out the latest UCM configuration I also tried adding this to my USB-Audio.conf:
# 26ce:0a06 ASRock X670E Taichi
Regex "USB((26ce:0a06)|(0414:a00e)|(0b05:(1996|1a(16|2[07])))|(0db0:(005a|151f|1feb|419c|82c7|a073|a47c|b202)))"

but no dice (still recognized as "Generic USB Audio" and ports don't work). Sound works in Windows 11 and manually playing a sound like that works:
aplay -D plughw:Audio,1 /usr/share/sounds/alsa/Front_Left.wav

Is there anything else different on this board besides the device's id?!

This is my alsa-info.txt.

@perexg
Copy link
Member

perexg commented Oct 13, 2022

What does print alsaucm -c hw:Audio dump text command with your modified conf file?
And alsaucm -c hw:Audio set _verb HiFi.

@hendrikb-101
Copy link
Author

This is alsaucm -c hw:Audio dump text and there's the output of alsaucm -c hw:Audio set _verb HiFi:

ALSA lib main.c:2573:(set_verb_user) error: failed to initialize new use case: HiFi
alsaucm: error failed to set _verb=HiFi: No such file or directory

@perexg
Copy link
Member

perexg commented Oct 13, 2022

Could you try to comment (add # as the first char on the line) the SectionDevice blocks in ALC4080-HiFi.conf until the alsaucm -c hw:Audio set _verb HiFi succeeds ? I don't see the real problem from this vague error message unfortunately.

Also, the firmware for this hw creates only two capture devices. It would be nice, if you can test all PCM devices (see aplay -l and aplay -c for the list of available devices) and related mixer controls (alsamixer -D hw:Audio).

@hendrikb-101
Copy link
Author

welp, I made a mistake pasting the error last time (triple ` requires a line break apparently). The full error message is this:

ALSA lib main.c:826:(execute_sequence) unable to execute cset 'name='Line Capture Switch',index=0 off'
ALSA lib main.c:2573:(set_verb_user) error: failed to initialize new use case: HiFi
alsaucm: error failed to set _verb=HiFi: No such file or directory

Accordingly, commenting out this block made the command succeed:

#If.line1 {
#	Condition {
#		Type String
#		Empty "${var:Line1Name}"
#	}
#	False.SectionDevice."Line1" {
#		Comment "${var:Line1Name}"
#
#		EnableSequence [
#			cset "name='${var:Line1Mixer} Capture Switch',index=${var:Line1Mindex} on"
#		]
#
#		DisableSequence [
#			cset "name='${var:Line1Mixer} Capture Switch',index=${var:Line1Mindex} off"
#		]
#
#		Value {
#			CapturePriority 100
#			CapturePCM "${var:Line1PCM}"
#			JackControl "${var:Line1Jack}"
#			CaptureMixerElem "${var:Line1Mixer},${var:Line1Mindex}"
#		}
#	}
#}

However, I can't get aplay -D plughw:Audio,1 /usr/share/sounds/alsa/Front_Left.wav to play anything now and I don't know how I would test the devices?

@perexg
Copy link
Member

perexg commented Oct 17, 2022

If you get busy errors, you need to stop the pulseaudio server or the pipewire server to test the raw ALSA devices. Also, check the mixer settings (alsamixer).

@IsaacVaughn
Copy link

IsaacVaughn commented Nov 5, 2022

I am having the same problem. I can head "aplay -D plughw:Audio,1 /usr/share/sounds/alsa/Front_Left.wav", put pulseaudio gives "No UCM verb is valid for hw:0". I also get the same error when running "set _verb=HiFi", and deleting the line1 config makes the error go away. After doing so, I cam able to get sound from aplay after using alsamixer to unmute the audio again.

By muting and unmuting channels, I have confirmed that "PCM 1" corresponds to the front headphone jack.

However, pulseaudio is now failing to find any audio at all.

Nov 05 18:28:40 manjaro pulseaudio[436340]: Failed to load module "module-alsa-card" (argument: "device_id="0" name="usb-Generic_USB_Audio-00" card_name="alsa_card.usb-Generic_USB_Au>

EDIT: I got some more detailed output by running pulseaudio with "-vv"

Nov 05 18:39:37 manjaro pulseaudio[1498357]: Set ucm verb to HiFi
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Trying _ucm000C.hw:Audio,3 with SND_PCM_NO_AUTO_FORMAT ...
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Managed to open _ucm000C.hw:Audio,3
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Maximum hw buffer size is 2000 ms
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Set buffer size first (to 4408 samples), period size second (to 1102 samples).
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Trying _ucm000C.hw:Audio,1 with SND_PCM_NO_AUTO_FORMAT ...
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Managed to open _ucm000C.hw:Audio,1
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Maximum hw buffer size is 2000 ms
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Set buffer size first (to 4408 samples), period size second (to 1102 samples).
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Trying _ucm000C.hw:Audio with SND_PCM_NO_AUTO_FORMAT ...
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Managed to open _ucm000C.hw:Audio
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Maximum hw buffer size is 2000 ms
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Set buffer size first (to 4408 samples), period size second (to 1102 samples).
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Trying _ucm000C.hw:Audio,2 with SND_PCM_NO_AUTO_FORMAT ...
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Error opening PCM device _ucm000C.hw:Audio,2: No such file or directory
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Profile set 0x55ff1a491610, auto_profiles=no, probed=yes, n_mappings=0, n_profiles=0, n_decibel_fixes=0
Nov 05 18:39:37 manjaro pulseaudio[1498357]: Failed to find a working profile.

@IsaacVaughn
Copy link

I was able to get pulseaudio working by deleting all ALC4080 configs except the headphone and speaker sections. I have yet to narrow down the problem any further than that.:

@hendrikb-101
Copy link
Author

This has also worked for me.
In summary:

  • Added hwid to USB-Audio.conf
  • ALD4080-HiFi.conf looks like the attached file
  • Front and Rear audio outputs work, automatic switching works
  • Adding the block If.mic1 {...} and the corresponding lines in the Define {...} block breaks audio playback (mic doesn't work as well).
    ALC4080-HiFi.conf.txt

perexg added a commit to perexg/alsa-ucm-conf that referenced this issue Nov 15, 2022
BugLink: alsa-project#229
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Nov 15, 2022

@hendrikb-101
Copy link
Author

hendrikb-101 commented Nov 16, 2022

Does not yet work for me:

alsaucm -c hw:Audio set _verb HiFi:

ALSA lib main.c:826:(execute_sequence) unable to execute cset 'name='Line Capture Switch',index=0 off'
ALSA lib main.c:2573:(set_verb_user) error: failed to initialize new use case: HiFi
alsaucm: error failed to set _verb=HiFi: No such file or directory

Also:
alsaucm -c hw_Audio dump text.txt

perexg added a commit to perexg/alsa-ucm-conf that referenced this issue Nov 16, 2022
BugLink: alsa-project#229
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Nov 16, 2022

I've updated my test repo. Please, download again and retest. Thanks.

@hendrikb-101
Copy link
Author

hendrikb-101 commented Nov 16, 2022

That's it! Both front & rear audio output and input work.

Automatically switches for output when I plug the headset in front/rear, but doesn't do so for the Mic. Instead I now have 2 mic inputs and have to manually choose which one I want to use.

@perexg
Copy link
Member

perexg commented Nov 16, 2022

I think that you see an issue in the alsa-lib-1.2.8 code which was fixed in alsa-project/alsa-lib@1b43686 . Could you try to switch priorities for the Mic1/Mic2 devices in Realtek/ALC4080-HiFi.conf? Switch CapturePriority values 400 <-> 300.

@perexg
Copy link
Member

perexg commented Nov 16, 2022

Also, I would know feedback if microphone2 device (PA/PW) is microphone input on the motherboard or if some of the microphone devices (PA/PW) is not a line input according the description.

@hendrikb-101
Copy link
Author

After switching priorities:

  • "Microphone2" always stays listed as an input device as if it was plugged in.
  • When plugging in the mic into the rear connector, "Microphone" (1) appears and is selected as input device.
    This solves the issue in practice! I don't know if Mic2 should disappear after disconnecting the mic from the front connect or?

What's PA/PW? The input on the rear panel has a 'Mic' icon next to it, as does the front jack on the case (...which is a Fractal Torrent). I have attached screenshots from the mainboards manual explaining the ports.
Screenshot_20221116_125406

Manual-1

@perexg
Copy link
Member

perexg commented Nov 16, 2022

PA/PW - Pulseaudio/Pipewire

Which microphone device in the sound server is for the front panel ?

EDIT: If I read correctly your text, Microphone is for rear and Microphone2 is for front, right?

@perexg
Copy link
Member

perexg commented Nov 16, 2022

I don't know if Mic2 should disappear after disconnecting the mic from the front connect or?

Basically, the jack detection information is wrongly parsed without patched alsa-lib, thus the Microphone2 device is present all time, but by priority, the Microphone device is selected.

perexg added a commit to perexg/alsa-ucm-conf that referenced this issue Nov 16, 2022
BugLink: alsa-project#229
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Nov 16, 2022

Another version for tests is available. Could you check if the port names in the sound server corresponds to the function? No priority changes are required - I swapped the whole device definitions.

@IsaacVaughn
Copy link

Is there a way to test without having a microphone? I am willing to help test, but only have an analog headset, no microphones.

@abonny
Copy link

abonny commented Dec 3, 2022

I have this same motherboard but a bigger problem. My boot hangs indefinitely. I get a handful of (EFI) errors but here's the final error it hangs on: snd_hda_intel 0000:5a:00.6: no codecs found!

I tried adding this: options snd-hda-intel enable=0,1,0 to file /etc/modprobe.d/alsa-base.conf and that didn't change any behavior (Reference1).

I am running "Kubuntu 22.04 LTS", fully up to date. What's crazy is the "live" edition and recovery both boot. I can literally boot recovery, then "resume" normal boot and get into the desktop. This makes me wonder if it's a race condition.

Reference1: https://bbs.archlinux.org/viewtopic.php?id=196996

@perexg
Copy link
Member

perexg commented Dec 3, 2022

I have this same motherboard but a bigger problem. My boot hangs indefinitely. I get a handful of (EFI) errors but here's the final error it hangs on: snd_hda_intel 0000:5a:00.6: no codecs found!

This is correct. ALC4080 is an USB soundcard. The analog HDA PCI bridge is not used on those motherboards. Try the updated UCM configuration.

@abonny
Copy link

abonny commented Dec 3, 2022

I have this same motherboard but a bigger problem. My boot hangs indefinitely. I get a handful of (EFI) errors but here's the final error it hangs on: snd_hda_intel 0000:5a:00.6: no codecs found!

This is correct. ALC4080 is an USB soundcard. The analog HDA PCI bridge is not used on those motherboards. Try the updated UCM configuration.

Forgive me but can you walk me through the full paths on my machine and where do I get the latest "UCM" configuration? Is it USB-audio.conf that I'm replacing? If so I have that file in many places:

/snap/gnome-3-38-2004/112/usr/share/alsa/cards/USB-Audio.conf
/snap/gnome-3-38-2004/119/usr/share/alsa/cards/USB-Audio.conf
/usr/share/alsa/cards/USB-Audio.conf
/usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf
/usr/share/alsa/ucm2/conf.d/USB-Audio/USB-Audio.conf

Thanks

@abonny
Copy link

abonny commented Dec 8, 2022

I replaced USB-Audio.conf (from https://raw.githubusercontent.com/perexg/alsa-ucm-conf/issue/229/ucm2/USB-Audio/USB-Audio.conf) in the last three places above (snap shouldn't matter, FYI one file was a symlink to another). And that made no difference.

@perexg
Copy link
Member

perexg commented Feb 7, 2023

The latest ALC4080 config is working for most of users (I'm constantly adding new USB IDs). Please, create another issue with full description for your problem.

@perexg perexg closed this as completed Feb 7, 2023
@Zamundaaa
Copy link

Could you try the above change? You may download USB-Audio.conf and ALC4080-HiFi.conf using those links:

https://raw.githubusercontent.com/perexg/alsa-ucm-conf/issue/229/ucm2/USB-Audio/USB-Audio.conf https://raw.githubusercontent.com/perexg/alsa-ucm-conf/issue/229/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf

@perexg the original issue (detection as "Generic USB Audio" and no audio output) still exists on master, and testing these files locally they make the sound on this mainboard work flawlessly for me. Can those changes please be incorporated into the master?

perexg added a commit to perexg/alsa-ucm-conf that referenced this issue Mar 21, 2023
BugLink: alsa-project#229
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Member

perexg commented Mar 21, 2023

@Zamundaaa : Could you retest again. I rebased to the master and force pushed to my test branch so you can use identical URLs to fetch the files. The diff is now 154aae1 .

Please, test all outputs/inputs to fix possible problems before pushing to master.

@perexg perexg reopened this Mar 21, 2023
@abonny
Copy link

abonny commented Mar 21, 2023

Any idea how long before this ends up in popular distros? Beyond merging to master did any code change since Dec 2022?

@Zamundaaa
Copy link

@perexg S/PDIF and line out work without a problem., but the front panel output doesn't make a sound. It does detect that the headphones are plugged in though. I don't have any microphones here so I can't test that atm.

@meberlein
Copy link

Unfortunately with the latest config from this thread still no luck with the headphone output on the ASRock x670e Taichi.

Aplayer with plughw works although only mono it seems.

Not sure if maybe the relatively new DAC in the chain would be the source any issues?
image

Sharing alsa info as well
alsa-info.txt

hwchong added a commit to hwchong/alsa-ucm-conf that referenced this issue Jul 9, 2023
@hwchong
Copy link

hwchong commented Jul 9, 2023

@perexg just out of curiosity why is this issue still open? the changes you posted seems to enable this to be fixed. I have applied it to my own branch. Should I do a PR and have it merged to master? hwchong@3ec7e6e

@Chevek
Copy link

Chevek commented Aug 23, 2023

I also have the Asrock x670e Taichi. This indeed fix the no sound issue using fedora 38 :
I've copy those 2 files #229 (comment)
in /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf
& /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf

Thank you, I hope this will be released ASAP.

perexg added a commit that referenced this issue Aug 29, 2023
BugLink: #229
Co-developed-by: Hon Weng Chong <hon@corticallabs.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@jonasdutra
Copy link

I also have the Asrock x670e Taichi. This indeed fix the no sound issue using fedora 38 : I've copy those 2 files #229 (comment) in /usr/share/alsa/ucm2/USB-Audio/USB-Audio.conf & /usr/share/alsa/ucm2/USB-Audio/Realtek/ALC4080-HiFi.conf

Thank you, I hope this will be released ASAP.

Chevek, solved no sound in SPDIF ?

@Chevek
Copy link

Chevek commented Nov 5, 2023

Sorry, I do not use S/PDIF.

@millma
Copy link

millma commented Nov 5, 2023

I have one of these boards and can get access to a S/PDIF adapter to test, if that would be helpful.

@abonny
Copy link

abonny commented Nov 10, 2023

Audio now works for me using Kubuntu 22.04.3 LTS. It's the third edit (22.04**.3**) of that O.S. that made the difference

@jonasdutra
Copy link

Audio now works for me using Kubuntu 22.04.3 LTS. It's the third edit (22.04**.3**) of that O.S. that made the difference

SPDIF ?

@abonny
Copy link

abonny commented Nov 10, 2023

Audio now works for me using Kubuntu 22.04.3 LTS. It's the third edit (22.04**.3**) of that O.S. that made the difference

SPDIF ?

Sorry I don't have an easy way to test SPDIF. This is the jack directly to the right, line out

@ZVNexus
Copy link
Contributor

ZVNexus commented Nov 27, 2023

@perexg @jonasdutra FYI I tested 4766b40 on my ASRock X670E Taichi and I am able to confirm this fixes SPDIF output on the board (tested with Sennheiser RS 185's), this can be closed.

sarnold pushed a commit to VCTLabs/alsa-ucm-conf that referenced this issue Nov 30, 2023
BugLink: alsa-project#229
Co-developed-by: Hon Weng Chong <hon@corticallabs.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg perexg closed this as completed Jan 9, 2024
ninelore pushed a commit to ninelore/alsa-ucm-conf-cros that referenced this issue Jun 10, 2024
BugLink: alsa-project#229
Co-developed-by: Hon Weng Chong <hon@corticallabs.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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