Difference between revisions of "Pulseaudio Setup"

From Ghpsdr3 SDR project
Jump to: navigation, search
(Set audio levels with Pavucontrol)
Line 16: Line 16:
  
 
[[File:Playback.png]]
 
[[File:Playback.png]]
=== RX adio levels on the softrock server ===
+
=== RX audio levels on the softrock server ===
  
  
Line 23: Line 23:
 
'''Make shure not to set the RX Audio level in the Recording Tab of pavucontrol to 100%. Otherwise you could have audio feedthrough from RX to TX and a distorted TX Audio. A level from 22% - 80% would be ok, but may vary on each system.'''
 
'''Make shure not to set the RX Audio level in the Recording Tab of pavucontrol to 100%. Otherwise you could have audio feedthrough from RX to TX and a distorted TX Audio. A level from 22% - 80% would be ok, but may vary on each system.'''
  
 +
== Enable Network Mode ==
 
You also need to run pulse in network mode. Use:
 
You also need to run pulse in network mode. Use:
 
<pre>
 
<pre>
Line 36: Line 37:
 
to set up network access by checking the various option boxes.
 
to set up network access by checking the various option boxes.
  
'''Pulseaudio Setup independant on a X-Server installation '''
+
=== Pulseaudio Setup independant on a X-Server installation ===
  
 
Make sure you add your username to the following system groups:
 
Make sure you add your username to the following system groups:
Line 90: Line 91:
 
Pulseaudio runs now in systemwide mode and your softrock server should be able to establish a connection
 
Pulseaudio runs now in systemwide mode and your softrock server should be able to establish a connection
 
to your following dspserver.
 
to your following dspserver.
 +
 +
== Configure Pulseaudio Daemon ==
  
 
In order to use 96000 or 192000, you will need to configure pulse audio by editing:
 
In order to use 96000 or 192000, you will need to configure pulse audio by editing:
Line 103: Line 106:
 
default-sample-rate = 192000
 
default-sample-rate = 192000
 
</pre>
 
</pre>
 +
 +
== Tweak System for realtime performance ==
  
 
For realtime audio add the following to:
 
For realtime audio add the following to:

Revision as of 15:24, 14 November 2011

Set audio levels with Pavucontrol

To run the softrock server use:

pavucontrol

In order to install it, submit the following command:

sudo apt-get install pavucontrol

to choose the default pulse audio sources:

TX audio levels on the softrock server

Playback.png

RX audio levels on the softrock server

Recording.png

Make shure not to set the RX Audio level in the Recording Tab of pavucontrol to 100%. Otherwise you could have audio feedthrough from RX to TX and a distorted TX Audio. A level from 22% - 80% would be ok, but may vary on each system.

Enable Network Mode

You also need to run pulse in network mode. Use:

paprefs

In order to install it, submit the following command:

sudo apt-get install paprefs

to set up network access by checking the various option boxes.

Pulseaudio Setup independant on a X-Server installation

Make sure you add your username to the following system groups:

  • pulse
  • pulse-access
  • audio

Use the following commands: ($USER stands for current logged in user)

sudo adduser $USER pulse
sudo adduser $USER pulse-access
sudo adduser $USER audio

Example, for the user dl6kbg the grup file must contain:

grep dl6kbg /etc/group
...
audio:x:29:pulse,dl6kbg
pulse:x:119:dl6kbg
pulse-access:x:120:dl6kbg
...
sudo nano /etc/default/pulseaudio

change settings to:

PULSEAUDIO_SYSTEM_START=1
DISALLOW_MODULE_LOADING=0
sudo nano /etc/pulse/system.pa

and add:

load-module module-native-protocol-tcp auth-anonymous=1

Restart pulseaudio:

sudo /etc/init.d/pulseaudio restart

or restart the system and fire up the softrock server. Pulseaudio runs now in systemwide mode and your softrock server should be able to establish a connection to your following dspserver.

Configure Pulseaudio Daemon

In order to use 96000 or 192000, you will need to configure pulse audio by editing:

/etc/pulse/daemon.conf

Uncomment these settings and change it for your needs.

Example:

default-sample-format = s24le
default-sample-rate = 192000

Tweak System for realtime performance

For realtime audio add the following to:

/etc/security/limits.conf
@audio - rtprio 99
@audio - memlock unlimited

and reboot and enjoy your system.