Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound volume is very low for ALSA float output #135

Open
nickjwhite opened this issue May 16, 2016 · 4 comments
Open

Sound volume is very low for ALSA float output #135

nickjwhite opened this issue May 16, 2016 · 4 comments

Comments

@nickjwhite
Copy link

I'm using the 4.4-7 kernel (this is also true for the 4.4-6 kernel, which is the other one I've tried), with Debian Jessie, and the i7 version of the Chromebook Pixel 2015.

The sound is very quiet when playing some things, even when set to 100%. This confused me for a while, but I just figured out it's when ALSA's float output format is used. The quality seems fine, but it's unusably quiet. I tried cranking up all the mixer settings in alsamixer, but to no avail.

Once I figured out that it's the float format, I created a workaround using ~/.asoundrc which seems to have fixed it for me. I suppose there must be a little bug in the audio driver causing this. I don't use pulseaudio; maybe that's why others don't seem to have had this issue, because it always uses a linear output, or something? I'm not sure.

Anyway, the workaround is to use this in .asoundrc. There may be better ways of writing it, but this at least works.

pcm.!default {
type plug
slave {
pcm "nofloat"
}
}

pcm.nofloat {
type lfloat
slave {
pcm "hw:0,0"
format S16_LE
}
}

@wikkyk
Copy link

wikkyk commented May 19, 2016

I have the same issue and this works for me. I was suspecting a solution like yours, because some programs were loud. In fact, some audio codecs were loud. Everything else was quiet.

@DerVerruckteFuchs
Copy link

I use pulse and have noticed the, at least somewhat, quieter than usual audio with the more current kernels. Your ~/.asoundrc seems to help make some things a bit louder. Videos in mpv are a bit louder, I think some video streams in browsers are also louder, but the one Steam game I play on my Pixel is still is about as quiet as before. My guess is because Steam uses it's own packages for a few things, so it's unaffected by some system packages or settings without using any overrides.

@purple-mountains
Copy link

See #199

@ejona86
Copy link

ejona86 commented Jun 30, 2021

This appears to be the only serious audio problem out-of-the-box for me using Fedora 23 and kernel 5.11.12. The microphone volume is initially 0, so you do need to increase "Mic Front" in alsamixer (I would max it out; use F6/<dim screen> to change device, then F4/<maximize> to see capture settings). Previous issues like no auto-detection of headphones on insertion and swapped Left/Right channels no longer seem to be problems.

The .asoundrc change works for things like aplay, but it isn't observed by pipewire. For pipewire, I modified pipewire.conf (in /etc/pipewire/ or ~/.config/pipewire/) to have:

...
context.objects = [
    ...
    # I added this:
    {   factory = adapter
        args = {
            factory.name            = api.alsa.pcm.sink
            node.name               = "alsa-sink"
            node.description        = "PCM Sink"
            media.class             = "Audio/Sink"
            api.alsa.path           = "hw:1,0"
            audio.format            = "S16LE"
        }
    }
]
...

That will create a new audio device ("PCM Sink") that needs to be chosen; I use GNOME's Sound settings to change the output device.

While trying to get that working, sometimes restarting pipewire or re-logging in still had weird behavior like the GNOME volume slider not impacting the volume. I suggest restarting after making the change.

Note that I did not adjust the ordering/indexes of devices nor use dsp_driver=2. So HDMI was card 0 and speakers were card 1, same as #199.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants