Bug 209053 - No master volume control in built-in speakers (Asus Zenbook 14 UM431D, ALC294 Analog)
Summary: No master volume control in built-in speakers (Asus Zenbook 14 UM431D, ALC294...
Status: RESOLVED DUPLICATE of bug 212547
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Jaroslav Kysela
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-26 22:24 UTC by Lukas ThyWalls
Modified: 2021-04-05 09:04 UTC (History)
2 users (show)

See Also:
Kernel Version: 5.8.3
Subsystem:
Regression: No
Bisected commit-id:


Attachments
alsa-info.sh output (33.38 KB, text/plain)
2020-08-27 10:08 UTC, Lukas ThyWalls
Details

Description Lukas ThyWalls 2020-08-26 22:24:48 UTC
Hello

To summarizing the issue, i can't control the master volume of the built-in speakers from the notebook in any form (with the keyboard buttons, via SO's control panel or alsamixer). It mutes when it reaches 0%, but between 1%-100% the volume is the same (not sure if it's 100%, but it's high). With headphones, it works as it should, but not with the built-in speakers. When i use the keyboard volume keys, (Fn+F2 and Fn+F3), i can see in alsamixer or the sound control panel changing the position of the volume slider, so the value of the volume is changing but it has no effect to the volume itself.

The notebook is an Asus Zenbook 14' UM431D, with ALC294 Analog sound. The built-in speakers are marked in the notebook as harman/kardon (I don't know how they are or what). I'm using KUbuntu 20.04.1, with Kernel 5.8.3 (Installed using Ubuntu Mainline Kernel Installer).

$ aplay -l
**** Lista de PLAYBACK dispositivos hardware ****
tarjeta 0: Generic [HD-Audio Generic], dispositivo 3: HDMI 0 [HDMI 0]
  Subdispositivos: 1/1
  Subdispositivo #0: subdevice #0
tarjeta 1: Generic_1 [HD-Audio Generic], dispositivo 0: ALC294 Analog [ALC294 Analog]
  Subdispositivos: 1/1
  Subdispositivo #0: subdevice #0

$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus B
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
02:00.0 Non-Volatile memory controller: SK hynix BC501 NVMe Solid State Drive 512GB
03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c1)
03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Raven/Raven2/Fenghuang HDMI/DP Audio Controller
03:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
03:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
03:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
03:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor
03:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
04:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 61)

Any other information i can provide, tell me.

-----

As, hopefully, temporary workaround, i used this post https://forums.linuxmint.com/viewtopic.php?t=91453 adding to /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common the lines:

[Element Master]
switch = mute
volume = ignore

With this, the volume control (Keyboard keys and Volume control panel sliders) affects to the PCM volume (as seen with alsamixer) and make more usable the notebook.

-----

Thanks in advance.
Comment 1 Takashi Iwai 2020-08-27 08:11:37 UTC
Could you give alsa-info.sh output?  Run with --no-upload and attach the output to Bugzilla (don't paste).

For checking the mixer volumes, try without PulseAudio.
e.g. run "alsamixer -c1" on a terminal, and try to change "Master" or any relevant volume, and check the output via
  pasuspender -- aplay -Dplughw:1 foo.wav
Comment 2 Lukas ThyWalls 2020-08-27 10:08:01 UTC
Created attachment 292187 [details]
alsa-info.sh output
Comment 3 Takashi Iwai 2020-08-27 10:42:05 UTC
Looking at the codec info, there is anything obviously wrong.  The speaker is from DAC NID 0x02 -> pin NID 0x14, and there is no other choice.

You can try to set Master volume 100% at first, and then check changing Speaker volume in the raw value, e.g.

  % amixer -c1 cset name='Master Playback Volume' 100%
  % amixer -c1 cset name='Master Playback Switch' on,on
  % amixer -c1 cset name='Speaker Playback Volume' 0
  % amixer -c1 cset name='Speaker Playback Switch' on,on

This will set speaker to volume zero but unmuted.  Check aplay like the above.
Then, change the raw value of Speaker Playback Volume
  % amixer -c1 cset name='Speaker Playback Volume' 1

and check aplay again.  Repeat this until 87, which is the max raw value.
Comment 4 Lukas ThyWalls 2020-08-27 11:53:51 UTC
Sorry, i was writing the comment when you updated with #c3. Later i will add info with the new test you provided.

Original comment i was writing:

Ok, the behaviour with the commands provided (pasuspender -- aplay -Dplughw:1 example.wav and alsamixer -c1 in other terminal window) are like this:

With headphones inserted, "Master" and "Headphone" sliders are active and working (Volume go up and down as should be). "Speaker" and "Bass Speaker" elements switch to mute automatically. "PCM" Slider do nothing*. So, correct behaviour.

With the built-in speakers, when i extract the headphones, "Headphone" element go mute automatically, and "Speakers" and "Bass Speakers" switchs on. But then "Master" and "Speakers" sliders do nothing, you pull them up and down but the volume doesn't go up and down. "PCM" do nothing also*.
Muting give some information with the elements "Master", "Speaker" and "Bass Speaker" when using the built-in speakers. Muting one of them when all of them are unmuted, mute all, and the sound goes off, but to unmute the sound, you need to manually unmute every one of them.

- First, I unmute the "Master" (still there is no sound, if i do anything with the other with this one muted there is no sound, and there is not sound with the other two muted).

- If i have "Speaker" muted and "Bass Speaker" unmuted (which is only a switch, it hasn't a slider), the sound is normal, and the "Master" and "Speaker" sliders (which is muted) do nothing.

- If i have "Bass Speaker" muted and "Speaker" unmuted, the sound is low, and the "Master" and "Speaker" sliders works, but like i said, the sound is low at any volume and strange. To me, is like this is the Bass and not the speaker.

Last, testing the Keyboard Fn Keys to change volume, they change the "Master" slider, automatically mutes when reach 0% and also mutes "Speakers", "Bass Speaker" and "PCM" when "Master" is 0%.

Only guessing, Are the "Speaker" and "Bass Speaker" exchanged?

I read somewhere (i don't know if it's true or not), this notebook have a 4 speakers configuration, maybe there are 2 speakers and 2 bass speakers, and there are not correctly asigned by the driver.

-------

* I'm pointing what the "PCM" does because with the workaround above described, the "PCM" element is what the Fn Keyboard Keys change.
Comment 5 Takashi Iwai 2020-08-27 13:02:59 UTC
The PCM volume and switch are alsa-lib user mixer element and have no meaning unless you use the softvol plugin there, which is not used by either PA nor "plughw".  So, this can be ignored safely.

And the description above indicates that the hardware has some weird behavior wrt combination of Speaker + Bass Speaker.  What if Speaker is muted but Bass unmuted?  Do you get any bass tone?

Also, while you adjust Speaker volume with Bass muted, I understand that the volume level changes somehow, not zero-or-full.  Change the volume in the middle, then toggle Bass to unmuted.  Does the speaker volume change, too?
Comment 6 Lukas ThyWalls 2020-08-27 23:14:15 UTC
With the test described in #C3 i found some details i wasn't aware until now. Because those command are not gradually changing the volume, i wasn't aware the sound is a bit different. Let me explain:

The built-in speakers are in two vertical zones with holes on both sides of the keyboard. At least, there are four speakers, two in every side, one up and other down, because with those test i can feel different vibrations depending what elements are muted. I'm not completely sure about this but it is what it seems without opening the notebook, but i think it's important for the explanation below.

Responding to your question, When "Speaker" is muted and "Bass Speaker" is unmuted (and Master also unmuted) the sound is "almost" right. (i explain that later), and when the opposite ("Speaker" unmuted, "Bass Speaker" muted) sound low and different, how there are missing something.

What i realized, and that changes what i said above, the "Speaker" sound comes from the two "down" speakers on both sides, and this sound is the one affected by the volume at every moment. The issue is the other sound which is controled by "Bass Speaker" sound much more and the sound seems to come by the 4 speakers at the same time (you can feel the vibration at any zone, unlike the "Speaker" sound which come clearly from the down speakers), however, when the "Speaker" sound is muted, the whole sound or music is different, it doesn't sound bad, but when is there it sounds better.

However, i need to point this out, the "Speaker" sound, which is low, doesn't sound like a "Bass". In fact with the "Bass Speaker" there is a lot of low-pitch sound and vibrato expected by a bass speaker, and with the sound from "Speaker" there isn't. But maybe it is something subjective and i'm wrong, but i think i'm not.

The problem is i can feel and touch this because i have the notebook, but i don't know how to explain this here. I think i only can record a video and try to catch the differences...
Comment 7 Ícar Nin Solana 2020-09-21 18:16:21 UTC
Hello, I had the same issue with this laptop. What worked for me is to edit /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common adding:

[Element Master]
switch = mute
volume = 100

before the PCM block.

Also you can get into alsamixer and cranck up Master channel then do a 
alsactl store

What I am having issues with is the microphone from the mini jack port. It won't work at all. Maybe I should open a new issue, tho.
Comment 8 Lukas ThyWalls 2020-09-22 16:42:17 UTC
I didn't find any change with my issues with the info added by #7.

there is something i can do to help to find a solution for my issue?

Thanks
Comment 9 Lukas ThyWalls 2020-12-05 13:00:56 UTC
I did a fresh installation to KUbuntu 20.10 and i still have the issue.

Tested with 5.8.0-25-generic (Live Disk), 5.8.0-31-generic (Actual Distro Kernel version), 5.9.12-050912 and 5.10.0-051000rc6 (both installed via Ubuntu Mainline Kernel Installer).

However, i found something: In KDE Audio Panel, you can change the audio profile to Off, Stereo, 2.1 and 4.0 Speakers, and then test each speaker alone. I was always testing it as Stereo in the other tests.

When i put it in 4.0 speakers:
- First i found the speakers aren't in the locations i think they were. Front speakers sounds in both sides of the keyboard (two vertical bars). Back speakers are in the rear of the notebook, so they aren't in the same vertical bar in the front.
- When you test the front speakers, they sound low. In the notebook, the sounds comes from the lower part from the front speakers (near to the mouse pad than the display). Both real front speakers are affected by the volume, but in 100% sound very low compared to the back speakers.
- Both back speakers sound much higher than the front speakers. Those aren't affected by the volume at all, except when is 0% (in alsamixer, you can see all speakers go to mute when reach 0%)

When i put it in 2.1 speakers:
- Front speakers work exactly the same as with 4.0.
- Instead of back speakers, it appears subwoofer. When i test it, the real back speakers make a white noise. In this case, the volume affects the sound, but only in what it seems the first 10% (between 1% to 10%), what is from nearly audible to highest volume in my opinion.

When i put it in Stereo:
- Real speakers from back and front from every side sound at the same time. That's the original behaviour i tested before, and that make hard to see when is sound every speaker because the back speakers vibrates a lot (because they sound much higher than the front ones). However, i feel the real front are affected by the volume, and the back don't, but because the vibration and the place are the same for both (in both side of the notebook) is what make difficult to notice.

---

Also, i have other issue, i don't know if it's related to this, but since i make the fresh install, sometimes i start the computer and i don't have any sound at all. I noticed, that those profile options (Stereo, 2.1 and 4.0) sometimes appears all, sometimes appears only Stereo and 2.1, sometimes only Stereo, and also doesn't appears any, at in that case i don't have any sound, for example, with VLC. However, "pasuspender -- aplay -Dplughw:1 example.wav" plays sound. This doesn't happen to me with the Live Disk (5.8.0-25-generic) but happened with the installed KUbuntu (5.8.0-31-generic, 5.9.12-050912 and 5.10.0-051000rc6).
Because is something changing every time i reboot, i don't know how to do (maybe a dmesg and alsa-info in each case), but if it's needed to create a new bug i can try.
Comment 10 Lukas ThyWalls 2020-12-30 11:53:58 UTC
I reported the other (related?) issue noted in the last comment here https://bugzilla.kernel.org/show_bug.cgi?id=210971

I only want to point that out, with 5.10.3-051003-generic it still has this issue.

I just found other bug i remember to fill here about audio issues with other laptop (which die some time ago) and i was fixed https://bugzilla.kernel.org/show_bug.cgi?id=88251. There i used hdajackretask tool (i needed to find the bug to remember the name) to change and test how the mic jack is detected to fix the issue. is there a tool (i don't remember if hdajackretask can do it) to reassign speakers output and/or volume sliders to test if that is the issue? It seems like what is the issue for me...
Comment 11 Jaroslav Kysela 2020-12-30 15:11:58 UTC
Just a little comment. This bugzilla is for the ALSA kernel driver. It would be probably nice to test things only with the basic ALSA tools like 'aplay', 'amixer' and 'alsamixer' to determine the driver issues. The PA should be suspended for tests.

So, using the ALSA tools and -Dplughw and -c <cardno> options (no PA devices!), please, report what does not work.

Takashi - from the description, it seems that the routing may be somewhat similar to ThinkPad X1 7th/8th gen - DAC1/DAC2 - one speaker pair shares DAC with the headphone output.
Comment 12 Lukas ThyWalls 2021-01-05 22:59:37 UTC
(In reply to Jaroslav Kysela from comment #11)
> Just a little comment. This bugzilla is for the ALSA kernel driver. It would
> be probably nice to test things only with the basic ALSA tools like 'aplay',
> 'amixer' and 'alsamixer' to determine the driver issues. The PA should be
> suspended for tests.
> 
> So, using the ALSA tools and -Dplughw and -c <cardno> options (no PA
> devices!), please, report what does not work.

Thanks for the response.

I'm only trying to be as descriptive as i can to help to figure out what is happening. I'm not a high end Linux user and if there is something is not related, or is not ALSA driver business like the other bug, i try to figure out myself but i miss a lot of details. I'm not an expert but i have some knowledge to compile a kernel with some patches as i did in the past, but is something i don't do often.

I only detail all of that because i found a difference in the behaviour. If i only use aplay (pasuspender -- aplay -Dplughw:1 example.wav), it works like i explained that works in "Stereo".

(In reply to Lukas ThyWalls from comment #9)
> - Real speakers from back and front from every side sound at the same time.
> That's the original behaviour i tested before, and that make hard to see
> when is sound every speaker because the back speakers vibrates a lot
> (because they sound much higher than the front ones). However, i feel the
> real front are affected by the volume, and the back don't, but because the
> vibration and the place are the same for both (in both side of the notebook)
> is what make difficult to notice.

And, as i explain above, using alsamixer to mute "Speaker" and "Bass Speaker" meanwhile aplay is playing a wav file, Speaker sound much less than Bass Speaker, and Speaker changes volume with Speaker and Master volume Bar, but Bass Speaker doesn't have volume bar and Master doesn't affect it at all.
Comment 13 Lukas ThyWalls 2021-03-22 23:58:32 UTC
I'm using now 5.8.0-44 and 5.12.0-rc3 and the behaviour is the same.

I'm thinking if it could be better to close this bug and open a new one without all the rambling with new discoveries of how the laptop' speakers work, and adding pulseaudio issues to this thread.

Thanks.
Comment 14 Lukas ThyWalls 2021-04-05 09:04:45 UTC
I created this bug to follow there https://bugzilla.kernel.org/show_bug.cgi?id=212547
Thanks.

*** This bug has been marked as a duplicate of bug 212547 ***

Note You need to log in before you can comment on or make changes to this bug.