]> code.delx.au - pulseaudio/blobdiff - src/daemon/system.pa.in
card-restore: Fix a memory leak
[pulseaudio] / src / daemon / system.pa.in
index 0ca32bd305786fea0e768eed0297d9297bc7d107..6da880e8f6532d8e6f1634662c73d07f19105389 100755 (executable)
 
 # This startup script is used only if PulseAudio is started in system
 # mode.
+changequote(`[', `]')dnl Set up m4 quoting
 
 ### Automatically load driver modules depending on the hardware available
+ifelse(@HAVE_UDEV@, 1, [dnl
+.ifexists module-udev-detect@PA_SOEXT@
+load-module module-udev-detect
+.else
+], @HAVE_HAL@, 1, [dnl
 .ifexists module-hal-detect@PA_SOEXT@
 load-module module-hal-detect
 .else
-### Alternatively use the static hardware detection module (for systems that
-### lack HAL support)
+], [dnl
+.ifexists module-detect@PA_SOEXT@
+])dnl
+### Use the static hardware detection module (for systems that lack udev/hal support)
 load-module module-detect
 .endif
 
@@ -32,17 +40,16 @@ load-module module-detect
 .ifexists module-esound-protocol-unix@PA_SOEXT@
 load-module module-esound-protocol-unix
 .endif
-.ifexists module-dbus-protocol@PA_SOEXT@
-### If you want to allow TCP connections, set access to "remote" or "local,remote".
-load-module module-dbus-protocol access=local
-.endif
 load-module module-native-protocol-unix
 
 ### Automatically restore the volume of streams and devices
 load-module module-stream-restore
 load-module module-device-restore
 
-### Automatically restore the default sink/source when changed by the user during runtime
+### Automatically restore the default sink/source when changed by the user
+### during runtime
+### NOTE: This should be loaded as early as possible so that subsequent modules
+### that look up the default sink/source get the right value
 load-module module-default-device-restore
 
 ### Automatically move streams to the default sink if the sink they are