pulseaudio version-dependent options

Vagrant Cascadian <[email protected]> Fri, 29 Jan 2010 20:16:45 -0800
Newsgroups gmane.linux.terminal-server.devel
Message-ID <[email protected]>
i've been getting some noisy messages from pulseaudio lately:

  Jan 29 19:08:02 ltsp20 pulseaudio[1733]: main.c: Running in system mode, but --d
  isallow-exit not set!
  Jan 29 19:08:02 ltsp20 pulseaudio[1733]: main.c: Running in system mode, but --d
  isallow-module-loading not set!

i tried running with --disallow-exit and --disallow-module-loading, and
everything still seemed to work, but that's probably version dependent...


  Jan 29 19:08:02 ltsp20 pulseaudio[1733]: main.c: OK, so you are running PA in sy
  stem mode. Please note that you most likely shouldn't be doing that.
  Jan 29 19:08:02 ltsp20 pulseaudio[1733]: main.c: If you do it nonetheless then i
  t's your own fault if things don't work as expected.
  Jan 29 19:08:02 ltsp20 pulseaudio[1733]: main.c: Please read http://pulseaudio.o
  rg/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually
  a bad idea.

i don't seem to see any option to quiet down the message about running in
system mode, but if we go to the URL mentioned, it talks about the only valid
use cases being ...thin clients!

probably need to report an upstream bug about that.

  Jan 29 19:08:03 ltsp20 pulseaudio[1733]: alsa-util.c: Disabling timer-based sche
  duling because running inside a VM.
  Jan 29 19:08:03 ltsp20 pulseaudio[1733]: alsa-util.c: Disabling timer-based sche
  duling because running inside a VM.
  Jan 29 19:08:03 ltsp20 pulseaudio[1733]: module.c: module-volume-restore is depr
  ecated: Please use module-stream-restore instead of module-volume-restore!
  Jan 29 19:08:03 ltsp20 pulseaudio[1733]: module-volume-restore.c: We will now lo
  ad module-stream-restore. Please make sure to remove module-volume-restore from
  your configuration.

should we do the same that we did with module-detect/module-udev-detect with
module-volume-restore/module-stream-restore, changing the option depending on
the version?

does anyone know what versions included support for module-stream-restore? the
changelog just mentions dates, as far as i can tell.

live well,
  vagrant

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

_____________________________________________________________________
Ltsp-developer mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-developer
For additional LTSP help,   try #ltsp channel on irc.freenode.net
pulseaudio-versioned-options.diff (text/x-diff, 2.3 KB)
=== modified file 'client/initscripts/ltsp-init-common'
--- client/initscripts/ltsp-init-common	2010-01-27 18:51:54 +0000
+++ client/initscripts/ltsp-init-common	2010-01-30 03:41:26 +0000
@@ -19,11 +19,26 @@
 
                 # Detect method, 0.9.16+ uses module-udev-detect instead of module-detect
                 unset PULSE_DETECT
-                # Replace "awk" with shell built-in "while read"
+
+                # Recent pulseaudio versions prefer module-stream-restore instead of
+                # module-volume-restore
+                unset PULSE_VOLUME_RESTORE
+
+                # quiet syslog a little about using options appropriate to --system
+                unset PULSE_DISALLOW
+
                 case $(pulseaudio --version |while read a b; do echo $b; done) in
-                    0.9.1[6-9]*|0.9.[2-9][0-9]*) PULSE_DETECT=module-udev-detect ;;
-                    0.[0-9].*) PULSE_DETECT=module-detect ;;
-                    *) PULSE_DETECT=module-udev-detect ;;
+                    0.9.1[6-9]*|0.9.[2-9][0-9]*) PULSE_DETECT=module-udev-detect 
+                        PULSE_VOLUME_RESTORE=module-stream-restore
+                        PULSE_DISALLOW="--disallow-exit --disallow-module-loading"
+                        ;;
+                    0.[0-9].*) PULSE_DETECT=module-detect 
+                        PULSE_VOLUME_RESTORE=module-volume-restore
+                        ;;
+                    *) PULSE_DETECT=module-udev-detect
+                        PULSE_VOLUME_RESTORE=module-stream-restore
+                        PULSE_DISALLOW="--disallow-exit --disallow-module-loading"
+                        ;;
                 esac
                 /usr/bin/pulseaudio --system \
                 --exit-idle-time=-1 \
@@ -35,10 +50,10 @@
                 -L $PULSE_DETECT \
                 -L "module-esound-protocol-tcp auth-anonymous=1" \
                 -L "module-native-protocol-tcp auth-anonymous=1" \
-                -L module-volume-restore \
+                -L $PULSE_VOLUME_RESTORE  \
                 -L module-rescue-streams \
                 -L "module-native-protocol-unix auth-anonymous=1" \
-                -n &
+                -n $PULSE_DISALLOW &
                 ;;
             esd) 
                 /usr/bin/esd -nobeeps -public -tcp &