Bug 210559
Summary: | VIA VT2021 wrong minimal dB value | ||
---|---|---|---|
Product: | Drivers | Reporter: | William (Wi11iam_1) |
Component: | Sound(ALSA) | Assignee: | Jaroslav Kysela (perex) |
Status: | NEW --- | ||
Severity: | normal | CC: | tiwai |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 5.9.11 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
alsa-info.sh output
Test fix patch for VIA codecs DS_VIA_VT2021 pulseaudio debug amixer-contents |
The patch below should make the driver showing the minimal volume as mute. Could you give it a try? Created attachment 294567 [details]
Test fix patch for VIA codecs
first of all thank you for looking into this. I was able to compile kernel 5.9.16 with that patch but the result was still the same pulse mutes the device below 9%. i could confirm that the master volume slider in alsamixer showed a different value than before so i guess the patch was applied correctly but my assumption that it was the root cause was wrong mb... using pulseaudio control the mixer values for Master PCM and Front all are controlled and when reaching 8% the overall -dB is at -63db (master) -1.2dB (PCM) and -1.5dB (Front) but since master is at -63 there is already no sound. at 9% master is at -61.5dB with PCM at -1.2dB and Front is maxed at -0.00 for overall -62.7dB and a very low sound. What can cause this and is it normal that master control only has 0-42 volume steps? + why would pulseaudio put Master to 0 at 8%? It's the hardware feature that mutes in the lowest volume, and we can't change it; that said, there is no way to allow the latest non-mute volume at all. The difference with the patch is that the driver now tells that the lowest volume is the mute. Then PA (or any other) can know that it's being muted in the lowest volume and can show the status more properly. The Master volume is a virtual volume that is basically the additional attenuation applied on top of the Front volume. This doesn't give more resolution; if the Front is already attenuated, Master can have the resolution (max - Front) value. So, determining the real resolution, you need to set Front and PCM to 0dB, then adjust Master volume accordingly. ok. my understanding comes from this: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/PulseAudioStoleMyVolumes/ basically saying that pulse 0%-100% slider works in dB adjusting outer to inner mixers... But for some reason pulse is trying to go way below -63dB overall and archwiki said its a bug in the driver reporting wrong values and therefor a wontfix in pulseaudio. (a dirty workaround is that ignore_dB=1 but then i am left with only 43 volume steps and no change inbetween) (PCM and Front stay at 0dB always then) as i said the patch did not fix this as pulse still wanted to go below -63dB. Here is a DataSheet about the audiochip (mb it helps). i can find the 0 to -63dB in 43 steps in it but dont know where the 0 to -51dB PCM mixer (34 steps) would come from. Created attachment 294647 [details]
DS_VIA_VT2021
Data Sheet VIA-VT-2021
William, could you show the debug output from PA? There are visible dB calculations. It may help to determine what's wrong. Also, if 'amixer contents' reports correct dB ranges, then this problem should be discussed in PA: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues . Thx for your help aswell here is pulseaudio debug log for a short run and changing some volumes: interesting part is when switching below 9%... D: [pulseaudio] alsa-sink.c: Requested volume: front-left: 5243 / 8% / -65,81 dB, front-right: 5243 / 8% / -65,81 dB D: [pulseaudio] alsa-sink.c: Got hardware volume: front-left: 5266 / 8% / -65,70 dB, front-right: 5266 / 8% / -65,70 dB D: [pulseaudio] alsa-sink.c: Calculated software volume: front-left: 65250 / 100% / -0,11 dB, front-right: 65250 / 100% / -0,11 dB (accurate-enough=yes) is there anything else needed to make sure its really not a driver bug?? mb the mixer order or smthing is assumed wrong or smthing.. Created attachment 294649 [details]
pulseaudio debug
Created attachment 294651 [details]
amixer-contents
It's because the volume is calculated as multiplication from both Master and Front (or Headphone) volumes; e.g. if both points to -60dB, it'll be -120dB although the hardware is up to -63dB or such. It's a side-effect of the virtual master volume, unfortunately, and we have no way to inform the total limit of dB range, so far. so it is a missing feature? is there a way to hide the master/ front mixer so pulse would only see one and assume the -63dB minimum? also why is PCM only down to -51dB? otherwise i could tell pulse to only use that mixer ... (i cant cuz i lose 12dB and can't mute) is that feature even planned or is it too much of an edge case with these via onboard audio chips? PCM control is defined in alsa-lib for this hardware, so you may change the range, there. But it's software defined volume control. It's better to keep this control to max (0dB gain) to avoid the stream modification. so what is the best solution here then. i just want a smooth audio control for a single line out why is it so hard to map 0>100 % to -63>0 dB? where do i go from here? |
Created attachment 294039 [details] alsa-info.sh output Affected Soundcard: 00:1b.0 Audio device [0403]: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller [8086:1e20] (rev 04) Subsystem: Gigabyte Technology Co., Ltd Device [1458:a014] Motherboard is an old gigabyte Z77X-Ud3h - with VIA VT2021 audio Problem: The soundcard reports -63 dB as the lowest volume to ALSA, but setting the volume to -63 dB mutes the device. This also results in PulseAudio muting the device at 9% (-63db), resulting in no sound at all. This my first bug report here i am new to Linux and hope this is the right place to report it. as you can see in the alsa-info the aplay -l output shows the device as VT2020 but it is definitly actually a VT2021 (i checkt on the motherboard) im told this is not an issue with pulseaudio it happens with ignore_dB=1 aswell as with the cli tool alsamixer.