alsa-project / alsa-ucm-conf

ALSA Use Case Manager configuration
BSD 3-Clause "New" or "Revised" License
76 stars 219 forks source link

Low volume with chtmax98090 (Toshiba Chromebook 2/Swanky) #45

Open reanimus opened 4 years ago

reanimus commented 4 years ago

It looks like the UCM configuration for this board is the Chromebook Asus C300 one, but the volume levels set by default are far too low. It looks like when Pulseaudio loads on my system, it follows the initialization steps and results in a really low volume, as the Speaker is set to 27/100 and one must manually set the alsamixer levels to fix it. I could have a periodic task reload the volume state, but I find it better to override the UCM configuration manually and tell my package manager to ignore changes to that file during upgrade.

FWIW, my fix is to modify ucm2/codecs/max98090/EnableSeq.conf and change

    cset "name='Headphone Volume' 10"
    cset "name='Speaker Volume' 10"

to

    cset "name='Headphone Volume' 80%"
    cset "name='Speaker Volume' 80%"

Naturally, this is a bit of a nasty solution. It'd be nice to have an upstream fix in case other stuff is changed for this.

reanimus commented 4 years ago

(Alternatively, is setting the speaker volume necessary as part of this? It makes pulseaudio interfere with ALSA's state restoration logic, as ALSA will restore mixer levels at boot but pulseaudio will reset them thanks to the UCM config)

plbossart commented 4 years ago

I can't recall when/why this volume of 10 was added.

You could modify the default for that skew by adding a new condition in ucm2/chtmax98090/HiFi.conf

    If.Quawks {
        Condition {
            Type String
            Haystack "${CardLongName}"
            Needle "GOOGLE-Quawks-1.0"
        }
        True {
            EnableSequence [
                # volume values modified
                cset "name='Headphone Volume' 25"
                cset "name='Speaker Volume' 32"
            ]
        }
    }
perexg commented 4 years ago

The initial values should be set only once via the BootSequence now. We need to review all old configs and move this initialization there.