Hi,
I have an ES9038Q2M based DAC, and the problem occur on my end as well.
I use a slightly custom driver; based on i-sabre-codec/i-sabre-q2m.
The interesting phenomenon on my config is:
- When I'm using either the vol.sh script or the 'mpc volume' command, or the GUI interface: I always have a problem with volume going to -127dB. (zero in this case). It's somehow random, which GUI setting is responsible for going to Zero, but if I click GUI volume up multiple times, sometimes the HW volume goes back to normal.
Stange thing: If I control the volume from the ALSA interface directly from console using 'amixer sset', then the hardware volume is always correct.
---
I tracked it down on the I2C bus using a logic analyzer, and found, that ALSA commands perform the following actions (as normal):
Vol1Reg : Read old value / Write new value
Vol2Reg : Read old value / Write new value
example logic analyzer log:
2023-01-23 15:02:36.416874+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.417320+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.417777+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.418205+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.418641+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.419069+00:00: W, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.419385+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.419837+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.420267+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.420707+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.421133+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.421578+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.422353+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.422788+00:00: W, Volume 2 (0x10) DATA:0x10
2023-01-23 15:02:36.423219+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.423655+00:00: R, Volume 2 (0x10) DATA:0x10
However, mpc console and GUI of moode sends the following actions on I2C:
Vol1Reg : Read old value / Write new value / Read new value / Write '0xff'
Vol2Reg: Read old value / Write new value / Read new value / Write '0xff'.
example logic analyzer log:
2023-02-02 08:13:19.268154+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.268590+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.269034+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.269464+00:00: W, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.269782+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.270235+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.270673+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.271191+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.271617+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.272066+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.272492+00:00: W, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.272809+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.273273+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.273720+00:00: R, Volume 2 (0x10) DATA:0xff
However, I was not successful tracking down the source of the problem. But I can reproduce it on moode 8.2.5.
My assumption : it's not based on ALSA driver level. Either some configuration is bad, or the MPD volume control has some strange setting, and this MPD volume control invalidates somehow immediately a newly written volume value in the HW register.
At my setup, the problem occurs ONLY with hardware volume control. (Software volume works perfectly).
I use ALSA in 'direct hw' output mode.
I have an ES9038Q2M based DAC, and the problem occur on my end as well.
I use a slightly custom driver; based on i-sabre-codec/i-sabre-q2m.
The interesting phenomenon on my config is:
- When I'm using either the vol.sh script or the 'mpc volume' command, or the GUI interface: I always have a problem with volume going to -127dB. (zero in this case). It's somehow random, which GUI setting is responsible for going to Zero, but if I click GUI volume up multiple times, sometimes the HW volume goes back to normal.
Stange thing: If I control the volume from the ALSA interface directly from console using 'amixer sset', then the hardware volume is always correct.
---
I tracked it down on the I2C bus using a logic analyzer, and found, that ALSA commands perform the following actions (as normal):
Vol1Reg : Read old value / Write new value
Vol2Reg : Read old value / Write new value
example logic analyzer log:
2023-01-23 15:02:36.416874+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.417320+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.417777+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.418205+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.418641+00:00: R, Volume 1 (0xf) DATA:0x20
2023-01-23 15:02:36.419069+00:00: W, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.419385+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.419837+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.420267+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.420707+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.421133+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.421578+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.422353+00:00: R, Volume 2 (0x10) DATA:0x20
2023-01-23 15:02:36.422788+00:00: W, Volume 2 (0x10) DATA:0x10
2023-01-23 15:02:36.423219+00:00: R, Volume 1 (0xf) DATA:0x10
2023-01-23 15:02:36.423655+00:00: R, Volume 2 (0x10) DATA:0x10
However, mpc console and GUI of moode sends the following actions on I2C:
Vol1Reg : Read old value / Write new value / Read new value / Write '0xff'
Vol2Reg: Read old value / Write new value / Read new value / Write '0xff'.
example logic analyzer log:
2023-02-02 08:13:19.268154+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.268590+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.269034+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.269464+00:00: W, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.269782+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.270235+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.270673+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.271191+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.271617+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.272066+00:00: R, Volume 1 (0xf) DATA:0x2
2023-02-02 08:13:19.272492+00:00: W, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.272809+00:00: R, Volume 2 (0x10) DATA:0xff
2023-02-02 08:13:19.273273+00:00: R, Volume 1 (0xf) DATA:0xff
2023-02-02 08:13:19.273720+00:00: R, Volume 2 (0x10) DATA:0xff
However, I was not successful tracking down the source of the problem. But I can reproduce it on moode 8.2.5.
My assumption : it's not based on ALSA driver level. Either some configuration is bad, or the MPD volume control has some strange setting, and this MPD volume control invalidates somehow immediately a newly written volume value in the HW register.
At my setup, the problem occurs ONLY with hardware volume control. (Software volume works perfectly).
I use ALSA in 'direct hw' output mode.