hifiberry / hifiberry-os

Linux distribution optimized for audio playback
MIT License
958 stars 123 forks source link

HiFiBerryOS64 alpha7 Initial volumelevel not read after (re)start #543

Open 3Dirkie opened 1 month ago

3Dirkie commented 1 month ago

Describe the bug After (re)start the volumelevel stored in alsactl.store is not read.

HiFiBerryOS version System software 20240410

HiFiBerry sound card Beocreate 2.4.5

To Reproduce

# amixer
Simple mixer control 'DSPVolume',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 252 [99%] [-2.00dB]
  Front Right: 252 [99%] [-2.00dB]
Simple mixer control 'Softvol',0
  Capabilities: volume
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 255 [100%] [-0.95dB]
  Front Right: 255 [100%] [-0.95dB]

Expected behavior In the previous version 20230404 the level in alsactl.store is used as the initial volumelevel. In the current version the level is 252, almost 100%. This is way too loud.

Additional context /etc/alsactl.store:

state.sndrpihifiberry {
    control.1 {
        iface MIXER
        name Softvol
        value.0 123
        value.1 123
        comment {
            access 'read write user'
            type INTEGER
            count 2
            range '0 - 255'
            tlv '0000000100000008ffffdcc400000023'
            dbmin -9020
            dbmax -95
            dbvalue.0 -95
            dbvalue.1 -95
        }
    }
    control.2 {
        iface MIXER
        name DSPVolume
        value.0 254
        value.1 254
        comment {
            access 'read write user'
            type INTEGER
            count 2
            range '0 - 255'
            tlv '0000000100000008ffffdcc400000023'
            dbmin -9020
            dbmax -95
            dbvalue.0 -130
            dbvalue.1 -130
        }
    }
}
hifiberry commented 1 month ago

I can't reproduce this here. However, as every player can change the volume, it's possible that one of the players changed the volume after reboot. Try disabling all players and check if you still see this behaviour.