Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ALSA and pulseaudio
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
MustrumR
n00b
n00b


Joined: 15 Nov 2011
Posts: 71
Location: Right here

PostPosted: Wed May 23, 2012 12:42 pm    Post subject: ALSA and pulseaudio Reply with quote

app-emulation/emul-linux-x86-soundlibs-20120520's alsa won't work with pulseaudio (the older version works).
It seems /usr/lib32/libasound.so tries to load a 64-bit module. Tested with 32-bit wine and 32-bit aplay (alsa-utils).
Code:

ALSA lib conf.c:3314:(snd_config_hooks_call) Cannot open shared library /usr/lib/alsa-lib/libasound_module_conf_pulse.so
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default

Worked around by removing /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf and having this in /etc/asound.conf
Code:

pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}

The removal of 51-pulseaudio-probe.conf makes alsa not try to load a module and asound.conf forces it to use pulseaudio. However this hack doesn't work if I don't have a running pulseaudio.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Wed May 23, 2012 2:41 pm    Post subject: Reply with quote

Why not just use ALSA and skip pulseaudio altogether?
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
MustrumR
n00b
n00b


Joined: 15 Nov 2011
Posts: 71
Location: Right here

PostPosted: Wed May 23, 2012 4:32 pm    Post subject: Reply with quote

Because I want to hear sound from a game AND listen to music at the same time.
Back to top
View user's profile Send private message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 6639
Location: The soundosphere

PostPosted: Wed May 23, 2012 5:08 pm    Post subject: Reply with quote

If the game supports ALSA, I think you can rig ALSA to handle multiple sources.
_________________
decibel Linux: https://decibellinux.org
Github: https://github.com/Gentoo-Music-and-Audio-Technology
Facebook: https://www.facebook.com/decibellinux
Discord: https://discord.gg/73XV24dNPN
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed May 23, 2012 6:27 pm    Post subject: Reply with quote

MustrumR wrote:
Because I want to hear sound from a game AND listen to music at the same time.

See my sig for an example ALSA config. Why hasn't everyone in the world seen this by now?
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
Neskweek
n00b
n00b


Joined: 20 Jun 2004
Posts: 35
Location: Nantes - France

PostPosted: Mon Jun 11, 2012 8:00 am    Post subject: Reply with quote

PaulBredbury wrote:
Why hasn't everyone in the world seen this by now?

Because the presentation is crappy and there's no solution for that problem.
Furthermore most of the link of your crappy draft are broken, or the "solution" are already included in the base installation, or aren't applicable.

For your font thing, it's not an howto: it's a pain to read through 25 pages of forum. And there's no straight foward solutions ...
You find it faster by typing "gentoo fonts" in google.
The solution presented in the Gentoo wiki works better ...





Anyways ...




Got the same problem, and did found the solution here.

There you go for Gentoo (tested and working) :

0. Install, if not done, emul-linux-x86-soundlibs
emerge emul-linux-x86-soundlibs

1. Create /etc/ld.so.conf.d/alsa32.conf with the following contents:
Code:
/usr/lib32/alsa-lib


2. Create /etc/ld.so.conf.d/alsa64.conf with the following contents:
Code:
/usr/lib/alsa-lib


3. ldconfig

4. Open /usr/share/alsa/alsa.conf.d/51-pulseaudio-probe.conf in the editor and remove the "/usr/lib/alsa-lib/" prefix from the libasound_module_conf_pulse.so file.
like this :

Code:
# PulseAudio alsa plugin configuration file to set the pulseaudio plugin as
# default output for applications using alsa when pulseaudio is running.

hook_func.pulse_load_if_running {
#replace this         
#       lib "/usr/lib/alsa-lib/libasound_module_conf_pulse.so"
#by this : 
        lib "libasound_module_conf_pulse.so"
        func "conf_pulse_hook_load_if_running"
}

@hooks [
        {
                func pulse_load_if_running
                files [
                        "/usr/share/alsa/pulse-default.conf"
                        "/etc/asound.conf"
                        "~/.asoundrc"
                ]
                errors false
        }
]



And that should do it.
Back to top
View user's profile Send private message
gfaccin
Tux's lil' helper
Tux's lil' helper


Joined: 20 Aug 2004
Posts: 120

PostPosted: Sun Nov 24, 2013 6:18 am    Post subject: Reply with quote

Thanks Neskweek!

I spent 4 hours already looking for a solution to this problem, so that Europa Universalis IV could work with sound on linux.

Works out of the box now! :D

Cheers!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum