default_example.pa 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/pulseaudio -nF
  2. #
  3. # This file is part of PulseAudio.
  4. #
  5. # PulseAudio is free software; you can redistribute it and/or modify it
  6. # under the terms of the GNU Lesser General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # PulseAudio is distributed in the hope that it will be useful, but
  11. # WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. # General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU Lesser General Public License
  16. # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
  17. # This startup script is used only if PulseAudio is started per-user
  18. # (i.e. not in system mode)
  19. .fail
  20. ### Automatically restore the volume of streams and devices
  21. load-module module-device-restore
  22. load-module module-stream-restore
  23. load-module module-card-restore
  24. ### Automatically augment property information from .desktop files
  25. ### stored in /usr/share/application
  26. load-module module-augment-properties
  27. ### Should be after module-*-restore but before module-*-detect
  28. load-module module-switch-on-port-available
  29. ### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
  30. .ifexists module-switch-on-connect.so
  31. load-module module-switch-on-connect
  32. .endif
  33. ### Load audio drivers statically
  34. ### (it's probably better to not load these drivers manually, but instead
  35. ### use module-udev-detect -- see below -- for doing this automatically)
  36. #load-module module-alsa-sink
  37. #load-module module-alsa-source device=hw:1,0
  38. #load-module module-oss device="/dev/dsp" sink_name=output source_name=input
  39. #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
  40. #load-module module-null-sink
  41. #load-module module-pipe-sink
  42. ### Automatically load driver modules depending on the hardware available
  43. .ifexists module-udev-detect.so
  44. load-module module-udev-detect tsched=0
  45. .else
  46. ### Use the static hardware detection module (for systems that lack udev support)
  47. load-module module-detect
  48. .endif
  49. ### Automatically connect sink and source if JACK server is present
  50. .ifexists module-jackdbus-detect.so
  51. .nofail
  52. load-module module-jackdbus-detect channels=2
  53. .fail
  54. .endif
  55. ### Automatically load driver modules for Bluetooth hardware
  56. .ifexists module-bluetooth-policy.so
  57. load-module module-bluetooth-policy
  58. .endif
  59. .ifexists module-bluetooth-discover.so
  60. load-module module-bluetooth-discover
  61. .endif
  62. ### Load several protocols
  63. .ifexists module-esound-protocol-unix.so
  64. load-module module-esound-protocol-unix
  65. .endif
  66. load-module module-native-protocol-unix
  67. ### Network access (may be configured with paprefs, so leave this commented
  68. ### here if you plan to use paprefs)
  69. #load-module module-esound-protocol-tcp
  70. #load-module module-native-protocol-tcp
  71. #load-module module-zeroconf-publish
  72. ### Load the RTP receiver module (also configured via paprefs, see above)
  73. #load-module module-rtp-recv
  74. ### Load the RTP sender module (also configured via paprefs, see above)
  75. #load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
  76. #load-module module-rtp-send source=rtp.monitor
  77. ### Load additional modules from GConf settings. This can be configured with the paprefs tool.
  78. ### Please keep in mind that the modules configured by paprefs might conflict with manually
  79. ### loaded modules.
  80. .ifexists module-gconf.so
  81. .nofail
  82. load-module module-gconf
  83. .fail
  84. .endif
  85. ### Automatically restore the default sink/source when changed by the user
  86. ### during runtime
  87. ### NOTE: This should be loaded as early as possible so that subsequent modules
  88. ### that look up the default sink/source get the right value
  89. load-module module-default-device-restore
  90. ### Automatically move streams to the default sink if the sink they are
  91. ### connected to dies, similar for sources
  92. load-module module-rescue-streams
  93. ### Make sure we always have a sink around, even if it is a null sink.
  94. load-module module-always-sink
  95. ### Honour intended role device property
  96. load-module module-intended-roles
  97. ### Automatically suspend sinks/sources that become idle for too long
  98. load-module module-suspend-on-idle
  99. ### If autoexit on idle is enabled we want to make sure we only quit
  100. ### when no local session needs us anymore.
  101. .ifexists module-console-kit.so
  102. load-module module-console-kit
  103. .endif
  104. .ifexists module-systemd-login.so
  105. load-module module-systemd-login
  106. .endif
  107. ### Enable positioned event sounds
  108. load-module module-position-event-sounds
  109. ### Cork music/video streams when a phone stream is active
  110. load-module module-role-cork
  111. ### Modules to allow autoloading of filters (such as echo cancellation)
  112. ### on demand. module-filter-heuristics tries to determine what filters
  113. ### make sense, and module-filter-apply does the heavy-lifting of
  114. ### loading modules and rerouting streams.
  115. load-module module-filter-heuristics
  116. load-module module-filter-apply
  117. ### Make some devices default
  118. #set-default-sink output
  119. #set-default-source input