No way of getting sound with the ALC294 from the Asus Zenbook 13

giocitta

Member

Reaction score: 1
Messages: 27

In my ZenBook 13 laptop, I installed from scratch, a few days ago, FreeBSD-12.2. Everything (and above all, wifi and touchpad) does work as expected, but sound. I managed to get it from the internal speakers and from the headphones: no success! While performing all required tests, everything seems OK, but - anywhere - no sound. A similar problem, caused by a bug in the ALC294 driver, appeared in the past for some Linux distributions but was corrected with a new patched kernel. I'm now, simply, asking: are FreeBSD-12.2 developers trying to find a solution, possibly easily applicable by medium-level FreeBSD users? Many thanks for who will clear the actual situation.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,512
Messages: 34,309

This uses the snd_hda(4) driver? That driver is very flexible because manufactures can implement it in various different ways. So sometimes you need to play around with the pin settings to make it work for your specific situation. Read the man page, it's explained in detail there.
 

Elazar

Well-Known Member

Reaction score: 159
Messages: 403

There is a one year old proposed patch for alc294 in PR 210138.

A snippet of it...

Code:
else if (id == HDA_CODEC_ALC294 && subid == ASUS_UX331_SUBVENDOR) {
+        switch (nid) {
+        case 25:
+            config = 0x01a1103c;
+            break;
+        case 33:
+            patch = "as=1 seq=15";
+            break;
+        }
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Too difficult to understand and apply. Simpler instructions would be very appreciated!
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Sorry. PR 242802 "[snd:hda] fix no sound on headphones of Asus UX331UAL (ALC294)"
Sorry to verify my bits of knowledge. My ASUS ZenBook is a UX333FN. If I well understood, I should modify the two files (hdaa_patches.c and hdac.h) as suggested, and then rebuild/reinstall my kernel. I proceeded, but again no sound. What did I miss? Thanks for your help.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 9,512
Messages: 34,309

Code:
BUGS
     Some Hardware/OEM vendors tend to screw up	BIOS settings or use custom
     unusual CODEC wiring that create problems to the driver.  This may	result
     in	missing	pcm devices, or	a state	where the snd_hda driver seems to at-
     tach and work, but	no sound is played.  Some cases	can be solved by tun-
     ing loader.conf variables.	 But before trying to fix problem that way,
     make sure that there really is a problem and that the PCM audio device in
     use really	corresponds to the expected audio connector.

From snd_hda(4).

I would suggest doing a verbose boot and taking a look at the pin assignments. You may need to adjust those for your system.
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Thanks, SirDice. I perfectly understand what you have written. I'll search to resolve according to your suggestions.
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Hi, I couldn't resolve because - due to my absolute incompetence in audio problems - I don't understand which are my pin assignments, and eventually how to adjust those for my system. I hope that some pious souls will justify me and be pious (and patient!) enough to guide me in the necessary steps.

In verbose 4 boot, I find this in dmesg:

hdac0: <Intel Cannon Lake HDA Controller> mem 0xb4318000-0xb431bfff,0xb4100000-0xb41fffff at device 31.3 on pci0

hdacc0: <Realtek ALC294 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC294 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC294 (Internal Analog)> at nid 23 and 18 on hdaa0
pcm1: <Realtek ALC294 (Right Analog Headphones)> at nid 33 on hdaa0
hdacc1: <Intel Kaby Lake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Kaby Lake Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> at nid 3 on hdaa1

$ dmesg | grep pcm
pcm0: <Realtek ALC294 (Internal Analog)> at nid 23 and 18 on hdaa0
pcm1: <Realtek ALC294 (Right Analog Headphones)> at nid 33 on hdaa0
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> at nid 3 on hdaa1

Well, where are the pin assignments I should take into account, and how to adjust them for my system? Thanks in advance!
 
Last edited:

tingo

Daemon

Reaction score: 510
Messages: 2,339

If you do a verbose boot and paste the dmesg output somewhere (pastebin?) with a link to it in this thread it is much easier for people to help you. ("Somewhere" because it is too large to be put here on the forums).
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Hi tingo, thanks for your help (and for the kind underlying reproach!). I hope I have not made any mistakes.

 

tingo

Daemon

Reaction score: 510
Messages: 2,339

You managed to get the files on pastebin - good. Now, as I wrote, the interesting details about pins and connections for the sound card only shows up in dmesg if you do a verbose boot...
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Hi everyone, I have studied for a long time following the wise advice of SirDice and Tingo, and I have learned many things that I did not know (not needing them either with Windows or with Gentoo - with which latest OS the configuration is also perfect for the audio). However I can't get any sound out and before I quit, at least on laptops, FreeBSD (I would be sorry because it's a really interesting and trauma-resistant OS), I want to try asking the experts for further help.

My ASUS ZenBook 13 has:
--- Realtek ALC294 HDA CODEC at cad 0 on controller hdac0 (hdacc0) and Realtek ALC294 Audio Function Group at nid 1 on hdacc0:
--- Intel Kaby Lake HDA CODEC at cad 2 on controller hdac0 (hdacc1) and Intel Kaby Lake Audio Function Group at nid 1 on hdacc1.

hdacc0 manages the internal speaker (and microphone?) and the Headphones; hdacc1, the HDMI connection.
I attach below what I find in dmesg thanks to the verbose boot.


--- pcm0 (default) is Realtek ALC294 (Analog 2.0+HP/2.0) at nid 23 and 18 on hdaa0;
--- pcm1 is Realtek ALC294 (Right Analog Headphones) at nid 33 on hdaa0.
--- pcm2: is Intel Kaby Lake (HDMI/DP 8ch) at nid 3 on hdaa1

Well, if I put ***dev.hdaa.0.init_clear="0"*** in device.hints, I expect the default configuration values set up by the BIOS to be accepted. By selecting pcm0 as the default, no sound is reproduced.
If, on the other hand, I put ***hint.hdaa.0.nid23.config="as=1 seq=0"*** and ***hint.hdaa.0.nid33.config="as=1 seq=15"***, I still don't get any sound.

I find NumGPIO=4, NumGPo=0, GPIWake=0, GPIUnsol=1. But, to tell the truth, this doesn't seem influential to me. And here I stop because I can't go further (but I think it is an initial good position for an 85 years old newbie).

Can any of the audio experts suggest to me what to do (if possible studying any more!) to config my sound output? Thanks a lot!
 

claudfernandes

New Member


Messages: 2

I also have the same problem, I will also refer the link here if need more logs or information about this issue. this also one of the reasons I stop using freebsd...


I will try to help you with the tests too
 
OP
G

giocitta

Member

Reaction score: 1
Messages: 27

Well, after many days of experimenting (but alas, I'm just a doctor and not a developer!), I made the decision to give up and go back to Gentoo. I hope that in the future the snd_hda driver problem will be solved with the proper patches, as done for Linux, so that I can return to using FreeBSD (14.0?) in what is one of the most popular and modern laptops, the ASUS ZenBook. Anyhow, thanks to those who suggested or helped me.
 
Top