Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

Introduction

Try at own risk. I use Australian spelling. Contents of any named files are in a code box for wiki format reasons only.

Pulseaudio (abbreviated pa) is a sound server depending on ALSA. Let me be more explicit. pa does not autodetect your sound sytem! If you want a certain mixer (eg left surround etc), it should show up in your ALSA before you attempt to install pa.

However, pa offers graphical change of sound devices on the fly, graphical merging of sound or playing sound to 2 different connectors etc.

Although some files need root power to edit, you can choose to run pa as normal user or as system-wide user. It is recommended you run pa as a normal user.

I have no experiece of running it without daemons as per this link. http://forum.tinycorelinux.net/index.php?PHPSESSID=a0ultcfdposn3mnav4j6pcp860&topic=7054.msg37190#msg37190

Steps to pulseaudio

My way of doing it which differs from the info file.

1) Please setup your ALSA or follow the wiki for Setting+up+Sound.

I prefer you use alsamixer….but use any mixer you like but ensure you know what the settings are please.

2 Set up Xorg as per wiki Using+Xorg+over+Xvesa as its a dependency of pulseaudio.tcz

3) Change mixer config file from home/tc (or elsewhere) to default of /etc/asound.state.

If you do not use it, your mixer level will be set by pa (when running) by the alsasound file. You can view the contents of /usr/local/etc/init.d/alsasound to see why this file restores from /etc/asound.state.

3a) For the thrill seekers you could modify this file, and change this line

if [[ -f /etc/asound.state ]]; then
    /usr/local/sbin/alsactl restore
TO
if [[ -f /home/tc/asound.state ]]; then
/usr/local/sbin/alsactl -f /home/tc/asound.state restore

OR you can adjust the values of the mixer level values or provide extra “set” switches, at the risk of borking your sound.

3b) If you do test this method please remember to save your modified file to the /opt/.filetool.lst to backup

End of 3b section back to normal comments

Add /etc/asound.state to .filetool.lst for backup

etc/asound.state

OR if you elected to test out (3a) look to see if home is in your backup or in your bootcode etc.

3c) There are numerous ways of using persistence for the home folder. I elect to have home 'traditionally' on the hard drive and elect not to have it backed up. YMMV.

3d) Instead of creating a file as per the pulseaudio info file called /home/tc/.X.d/dbus I have changed to a system wide dbus daemon which means you go to (4)

4) Download dbus.tcz

Start the dbus daemon manually by running

sudo /usr/local/etc/init.d/dbus start

Check dbus is running by

/usr/local/etc/init.d/dbus status

For persistence for system wide dbus, add following line to /opt/bootlocal.sh using root powers.

/usr/local/etc/init.d/dbus start

5) Download pulsaudio and pavucontrol packages, other packages are discussed toward end of page.

If you are using wbar, maybe pavucontrol is there otherwise create a desktop icon for pavucontrol.

6) Start pulseaudio manually with

 pulseaudio -vv

Let it run for a while then press Ctrl and c keys to close it (TIP …memory aide…C for close)….meaning to kill the daemon.

7) Look at any errors and fix them. See Section on Errors then rejoin at next step please. As we have already setup dbus, I hope you have fewer errors

8) Full reboot and check that

dbus status shows …its running

pulseaudio -vv….still has no errors…..leave it running.

Open pavucontrol. This graphical tool will default to 2 channel setting. If it does you are half way there.

If you do not want to create some more persistent configs jump to step 15 on decisions.

9) Assuming you want default surround sound, we copy entire folder of /usr/local/etc/pulse to /home/tc

10) Next delete /home/tc/pulse/system.pa as that is only for system wide daemon mode.

11) We edit /home/tc/pulse/daemon.conf and search for the line that reads

;default-sample-channel=2 

Firstly remove the ”;” so the line becomes active and then change 2 to your new channel numbers. (The default is 2 ch in any case) eg if you have a 5.1 add 5 + 1 to make 6 channel. Naturally you need a surround sound speaker system, with connections to your colour connectors.

eg mine reads

default-sample-channels=6

Depending on your persistence type, as its in home you should not need to do anything.

Reboot should show the new default, however, you can select a temporary setting manually thru pavucontrol….tab=configuration.

i54.tinypic.com_5x8z2a.jpg

In above image 5.1 is showing at the top as that is what I set. Yours may differ.

At this stage it is not important that you have lost sound or volume levels are not right.

12) Edit /home/tc/pulse/default.pa and remove all these lines…..as pathway may not exist for some TC users.

  - # Load something into the sample cache
  - load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
  - load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
  - load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
  - load-sample-lazy pulse-access /usr/share/sounds/generic.wav

.fail

13) In same file add the # so appropiate line reads

# load-module module-suspend-on-idle

This is because I want you to have miniminal connection errors due to timeouts.

Again there should be no need to backup this file for persistence

14) Although its not a step, after running pa….home/tc will have a folder called pulse and .pulse

/pulse is our config area and .pulse is the area for pa to write to show its stored info.

You may wish to cull some files from .pulse if they build up on you, as each time to run pa, a number of files are created.

The smart way would be to add /home/tc/.pulse to your /opt/.xfiletool.lst but your persistence may vary depending on exactly how you set it up.

Now for those who want more persistence, you can adjust the sliders and mute buttons and linking right and left channels button and fallback button until you are happy with the output and any inputs you need.

When I did not use the home folder for /pulse, on reboot my sliders were muted. YMMV.

I still get a connection refused dialog box but close it down and restart it and so I still have things to learn about pa.

I have tested having a daemon file as per the info file but I was still getting errors so have elected not to create it here.

15) Decision Point

If your sound is ok, and mixer levels ok….web based sound etc is ok……then jump next step.

You are here because some settings need tweaking.

a) Test if you can mute or unmute your sound using pa but looking at alsamixer at the same time.

b) No system sounds or beeps

Assuming you have not blacklisted pcspr module and you previosly had system sounds or beeps look at this image from pavucontrol

i53.tinypic.com_2rcognd.jpg

The slider is 100% and the button to mute is not depressed or on.

c) No sound recorded with using microphone

You may have a mic in connector on a desktop pc at the back and the front.

pa may will name these mic 1 and mic 2 where 1 “should be” the back.

i55.tinypic.com_jrtetj.jpg

In above image we have selected “Input Devices” TAB in the pa control panel but observe that the mute button has been depressed or is on. Notice that the volume sliders also appear greyed out.

Therefore no input will be recorded for this device and you need to change the default of muted to un-muted.

Below image is me selecting mic 2.

i54.tinypic.com_oartds.jpg

But there is another tweak involving alsamixer.

You can change the mic from mic (meaning back mic) to front mic.

See the alsa wiki mentioned in step 1 for mic stuff for alsa.

d) Microphone works but volume too low

show image for sliders

e) I can't see surround sound in the control panel? I see this image

i51.tinypic.com_2mflu2g.jpg

Yes I tried to warn you, if you have not set up Alsa correctly…pa works off that and so defaults to a basic stereo system while you may have a 5.1 or 7.1 etc.

Errors for pulseaudio -vv

If you get this image, your dbus is not running so start it manually or add it to your bootlocal.sh file and reboot.

Error includes words… Failed to connect to system bus and Failed to get D-bus connection.

Error should be eliminated if you followed wiki?

i56.tinypic.com_r7w5xt.jpg

If you get this image, your dbus is still not running correctly. Try a reboot

i56.tinypic.com_bi3wib.jpg

If you get this image, for some reason you have forgotten pulseaudio is already running.

i53.tinypic.com_149rtyd.jpg

Error for running pa control panel....connection refused

pa often goes to sleep so when you first click on the pavucontrol icon, you may get this image

i52.tinypic.com_ll4wx.jpg

Click on close and click on the X to close your control panel and then re-click to open it again as its now awake.

2) You may also get that error when a sound device is currently in use and vice versa.

This means, unless further tweaked, if you set a control in pavucontrol …do so when no sound is being played or recorded.

and

Generally speaking, while playing or recording sound, try to avoid opening any pa application.

changing common apps to use pulseaudio

….eg vlc

i55.tinypic.com_24vr5eq.jpg

Optional..... install pavumeter

pavumeter offers you a way of seeing the sound outputs according to pa for each surround sound, or basic stereo sound. This is an improvement on the one meter fits all that is visible in your pavucontol panel.

So no package installed gives you only one meter as per

i52.tinypic.com_27xgwah.jpg

With it installed you can have

i51.tinypic.com_28ba52f.jpg

Optional .....install paprefs

pulsaudio preferences ….sounds like a control panel but likely to be not useful unless you are doing certain things.

The most likely is streaming output to input or sound from one source to multiple devices as per

i53.tinypic.com_2870vpv.jpg

Credits

Note that a lot of these setups will fail on TC due to the way we run our system compared to others.

YMMV but IMHO you do not need asoundrc or asound.conf.

http://www.pulseaudio.org/wiki/PerfectSetup

http://wiki.archlinux.org/index.php/PulseAudio

Print/export
Languages
Translations of this page: