LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   [SOLVED] Proper pulseaudio setup for Slackware64-current (https://www.linuxquestions.org/questions/slackware-14/%5Bsolved%5D-proper-pulseaudio-setup-for-slackware64-current-792080/)

rmjohnso 02-27-2010 11:25 PM

[SOLVED] Proper pulseaudio setup for Slackware64-current
 
What is the proper Slackware style setup for pulseaudio? I have the dependencies and pulseaudio-0.9.21 installed, but I am stuck on how to properly setup pulseaudio as my sound backend.


Thanks!

Ivshti 03-01-2010 10:57 AM

/etc/asound.conf
Code:

pcm.pulse {
    type pulse
}

ctl.pulse {
    type pulse
}


tommcd 03-01-2010 11:14 AM

Hmmm, So Slackware current includes pulse audio?? I sure hope that pulse in Slack proves to be easier to live with and easier to configure than the bloated, resource hungry mess that it currently is in Ubuntu!

tdos20 03-01-2010 11:34 AM

Other things you may need to change are in /etc/pulse or /usr/local/etc/pulse (depends on your install configuration), there are two configuration files which are fairly well commented and also some man pages relating to various elements of the pulse subsystem, the pulse wiki is fairly good and can give you some pointers about common setups (my only complain when I used pulse was the networking system didn't work so I gave up) also if you have a 5:1 sound system you will need to do some custom configuration in the .conf files (daemon.conf and another - can't remember atm). Their mailing list is active and helpful.

Ivshti 03-01-2010 11:34 AM

No ;)
He compiled it from source, I guess. If you want easier pulseaudio configuration, install it from Slacky.eu or SlackBuilds.org and it will get automatically configured.

henkees 03-02-2010 05:29 AM

Quote:

Originally Posted by Ivshti (Post 3881199)
If you want easier pulseaudio configuration, install it from Slacky.eu or SlackBuilds.org and it will get automatically configured.

I don't have this experience, the slackbuild did not work by me. ( And I did follow the steps from alien -multilib, edit the scripts, but this one did not build. And the pulseaudio package included is rather old, now you can get 0.9.21 pulse; and if you want support from udev included; then you also need to comile a newer udev version (=>143 version) and that's not so easy to do...:study:

rmjohnso 03-02-2010 10:31 AM

Thanks for all of the responses so far. I compiled the latest version of pulse from pulseaudio.org. I couldn't get the Slackbuilds.org version to compile due to some sort of incompatibility with libtool. When I compiled the latest version, I used the SlackBuild from SBo and just modified the version number. I haven't recompiled udev, and I probably won't. [update] I just looked at the latest changelog, and udev-151 is included.

I'll try to play around with the configurations mentioned above tonight. Right now, when I start pulse, it fails with a number of errors. If I'm still having problems, I'll post the specific errors. [update] I'll upgrade everything tonight, recompile pulse, edit some files, and see what happens.

My only questions right now are related to Ivshti's suggestion for creating a .asoundrc file and editing the /etc files. I thought the use of the .asoundrc file was deprecated, and its use was discouraged with the latest versions of ALSA. Does that suggestion not apply when using pulse? For the /etc files, are any edits to the rc.d startup scripts necessary?

rmjohnso 03-02-2010 10:33 AM

Quote:

Originally Posted by henkees (Post 3882288)
I don't have this experience, the slackbuild did not work by me. ( And I did follow the steps from alien -multilib, edit the scripts, but this one did not build. And the pulseaudio package included is rather old, now you can get 0.9.21 pulse; and if you want support from udev included; then you also need to comile a newer udev version (=>143 version) and that's not so easy to do...:study:

Btw, I'm not running a multilib environment on my Slackware64-current install. I don't think that's necessary for pulse, but someone please correct me if I'm wrong.

henkees 03-02-2010 03:07 PM

For pulse setup you only needs to edit etc/asound.conf as mentioned by lvshti.

My asound.conf:
Code:

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

With the new udev upgrade you can enable udev in pulseaudio.
Maybe you'll also need package consolekit, then you have also to edit etc/dbus-1/system.conf:
Code:

...
 <!-- Allow anyone to talk to the message bus -->
    <allow send_destination="org.freedesktop.DBus"/>
    <!-- But disallow some specific bus services -->
    <deny send_destination="org.freedesktop.DBus"
          send_interface="org.freedesktop.DBus"
          send_member="UpdateActivationEnvironment"/>
  <!--THIS BELOW IS ADDED BY ME : -->
  <allow own="org.freedesktop.ConsoleKit"/>
  <allow send_destination="org.freedesktop.ConsoleKit"/>
  <allow send_interface="org.freedesktop.ConsoleKit"/>
  </policy>
...

On the website from pulseaudio there are some extra software packages available for making it easier to work with.
HINT: when you like some very good sound-visualisation: see projectM-pulseaudio. When pulseaudio is working, then is compiling this project not so difficult any more.

rmjohnso 03-04-2010 05:22 PM

Sorry for the delay in reporting back. I had some problems with the updates in -current64, but I'm up and running again. I've got the latest pulseaudio compiled and installed. With the update to udev in -current64, pulse recognizes udev now.

I also have my /etc/asoundrc configured as henkees indicates above since that is what the pulseaudio.org site recommends when setting pulse as the default. In /etc/pulse/default.pa, I disabled console-kit (not needed as far as I can tell - correct me if I'm wrong) and bluetooth (bluetooth was throwing back some access errors, and I don't use bluetooth for audio).

When I try to play a .wav file via aplay (e.g., aplay -Dpulse foo.wav), I get the following error back:
Code:

ALSA lib pcm.c:2171:(snd_pcm_open_conf) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so
aplay: main:608: audio open error: No such file or directory

I'm not sure why I'm missing libasound_module_pcm_pulse.so. Where should this library be from?


Thanks

botnet 03-04-2010 06:26 PM

you need the alsa-plugins package available here: http://slackbuilds.org/repository/13.../alsa-plugins/

rmjohnso 03-04-2010 07:23 PM

Quote:

Originally Posted by botnet (Post 3886254)
you need the alsa-plugins package available here: http://slackbuilds.org/repository/13.../alsa-plugins/

When I run the configure script, alsa-plugins doesn't pickup that pulseaudio is installed, even if I pass --enable-pulseaudio.

botnet 03-04-2010 07:50 PM

i just installed all of this yesterday (hoping to enable my laptops built-in subwoofer, with no success) and I had no errors.

i installed all the dependencies for pulseaudio with sbopkg, then installed the latest pulseaudio with src2pkg, I had to disable console kit in the default.pa file, and set asound.conf to use pulse, following that i ran pulseaudio --start, then found i needed those plugins, which i installed with sbopkg

are you on 32 or 64 bit?


i did reboot my computer after setting up pulse to ensure all modules got unloaded then reloaded, but i would imagine just modprobing your sound modules would have the same affect

rmjohnso 03-04-2010 08:02 PM

Quote:

Originally Posted by botnet (Post 3886321)
i just installed all of this yesterday (hoping to enable my laptops built-in subwoofer, with no success) and I had no errors.

i installed all the dependencies for pulseaudio with sbopkg, then installed the latest pulseaudio with src2pkg, I had to disable console kit in the default.pa file, and set asound.conf to use pulse, following that i ran pulseaudio --start, then found i needed those plugins, which i installed with sbopkg

are you on 32 or 64 bit?


i did reboot my computer after setting up pulse to ensure all modules got unloaded then reloaded, but i would imagine just modprobing your sound modules would have the same affect

I installed all of the dependencies from SBo as well with sbopkg on -current64 (no multilib). I've rebooted my laptop, and pulseaudio starts automatically. However, I tried installing the alsa-plugins from SBo and the current version from the ALSA project page. Both compile and install, but libasound_module_pcm_pulse.so is not built.

I went back and looked at the configure script results for alsa-plugins, and it says:

Code:

Plugin directory: /usr/lib64/alsa-lib
ALSA_CFLAGS: -I/usr/include/alsa 
ALSA_LIBS: -lasound 
JACK plugin:        yes
  JACK_CFLAGS: 
  JACK_LIBS: -ljack -lpthread -lrt 
Pulseaudio plugin:  no
Samplerate plugin:  yes
  samplerate_CFLAGS: 
  samplerate_LIBS: -lsamplerate 
Maemo plugin:      no
  Using Osso resource manager: no
A52, lavc plugins:  yes
  AVCODEC_CFLAGS: 
  AVCODEC_LIBS: -lavcodec 
  AVCODEC_HEADER: <libavcodec/avcodec.h>
Speex rate plugin:  lib
Speex preprocess plugin:  yes

When I looked at the pulseaudio package, everything is installed to /usr/lib, not /usr/lib64, which surprises me since the SBo script specifies /usr/lib64 as the proper place. I'm not sure if this is the cause of alsa-plugins not finding pulseaudio or not.

botnet 03-04-2010 08:16 PM

they all installed to /usr/lib64 here

i built pulseaudio with src2pkg

rmjohnso 03-04-2010 08:19 PM

I just rebuilt pulseaudio, and now it's in /usr/lib64. Very strange. alsa-plugins now sees pulseaudio, and I get get a .wav file to play with 'aplay -Dpulse foo.wav'

Thanks for all of the help everyone.


All times are GMT -5. The time now is 01:40 PM.