How to setup pulse audio stuff

1. Check /dev/dsp

First check protection of /dev/dsp.

$ ls -Fal /dev/dsp
crw-rw----+ 1 root root 14, 3 Jan 14 12:02 /dev/dsp

If it is not writable by you you have to change it.

# su
# ls -Fal /dev/dsp
crw-rw----+ 1 root root 14, 3 Jan 14 12:02 /dev/dsp
# chmod 666  /dev/dsp

2. Edit /etc/PolicyKit/PolicyKit.conf

Then you have to check contents of /etc/PolicyKit/PolicyKit.conf file, so policy kit can work according to your needs.

# su
# vi /etc/PolicyKit/PolicyKit.conf

In the end /etc/PolicyKit/PolicyKit.conf has to look something like this:

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->
<!-- Substitute your-username for your actual username. -->

<config version="0.1">

  <!-- So your-username acts as root. -->
  <define_admin_auth your-username="your-username"/>

  <!-- To mount USB dvices without root password. -->
  <match action="org.freedesktop.hal.storage.mount-fixed">
    <match your-username="your-username">
      <return result="yes"/>
    </match>
  </match>

  <!-- To let PulseAudio work. -->
  <match action="org.pulseaudio.*">
    <return result="yes"/>
    <!--
      Grant those actions to all:
        - org.pulseaudio.acquire-high-priority
        - org.pulseaudio.acquire-real-time
    -->
  </match>

  <match your-username="your-username">
    <return result="yes"/>
  </match>

</config>