Advertisement
Guest User

Untitled

a guest
Sep 8th, 2011
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.84 KB | None | 0 0
  1. # ~/.asoundrc or /etc/asound.conf
  2. # ALSA configuration file
  3.  
  4. ##### USAGE #####
  5. # Save this file as "~/.asoundrc" (for user-specific sound configuration) or
  6. # "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
  7. # device names ad described in the next section.
  8.  
  9.  
  10. ##### DEVICE NAMES #####
  11. # This configuration file defines four devices for use by the user. Those
  12. # devices are "analog", "mixed-analog", "digital", and "mixed-digital". The
  13. # user may also re-define "default" to be identical to one of the above-named
  14. # devices (i.e. to send all sound output to the digital output unless otherwise
  15. # specified). Use the device names as described below:
  16. # - "analog" outputs to the analog output directly and (at least on software
  17. # sound cards) blocks other audio output. After playback completes, "queued"
  18. # sounds are output in sequence.
  19. # - "mixed-analog" mixes audio output from multiple programs into the analog
  20. # output (so you can hear beeps, alerts, and other noises while playing back
  21. # an audio stream).
  22. # - "digital" outputs to the digital output directly. Since most (all?)
  23. # digital outputs expect 48kHz PCM audio, this may not work for some playback
  24. # (i.e. CD's--which are 44.1kHz PCM audio--or 32kHz audio streams from TV
  25. # recordings, etc.).
  26. # - "mixed-digital"
  27.  
  28. # All other devices created within this file are used only by the configuration
  29. # file itself and should /not/ be used directly. In other words, do not use
  30. # the devices "analog-hw", "dmix-analog", "digital-hw", or "dmix-digital".
  31.  
  32.  
  33. ##### IMPORTANT #####
  34. # To make this ALSA configuration file work with your sound card, you will need
  35. # to define the appropriate card and device information for the "analog-hw" and
  36. # "digital-hw" devices below. You can find the card and device information
  37. # using "aplay -l".
  38.  
  39.  
  40. ##### Configuration File #####
  41.  
  42. # Override the default output used by ALSA. If you do not override the
  43. # default, your default device is identical to the (unmixed) "analog" device
  44. # shown below. If you prefer mixed and/or digital output, uncomment the
  45. # appropriate four lines below (only one slave.pcm line).
  46. #
  47. # Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
  48. # such that their default "default" device is identical to the "mixed-analog"
  49. # device. Whether using an ALSA version before or after 1.0.9, it does no harm
  50. # and has no affect on performance to redefine the device (even if the
  51. # redefinition does not change anything). Also, by using this ALSA
  52. # configuration file, you once again have access to unmixed analog output using
  53. # the "analog" device.
  54. pcm.!default {
  55. type plug
  56. ## Uncomment the following to use (unmixed) "analog" by default
  57. # slave.pcm "analog-hw"
  58. ## Uncomment the following to use "mixed-analog" by default
  59. # slave.pcm "dmix-analog"
  60. ## Uncomment the following to use (unmixed) "digital" by default
  61. # slave.pcm "digital-hw"
  62. ## Uncomment the following to use "mixed-digital" by default
  63. slave.pcm "dmix-digital"
  64. }
  65.  
  66. # Control device (mixer, etc.) for the card
  67. ctl.!default {
  68. type hw
  69. card 0
  70. }
  71.  
  72. # Alias for (converted) analog output on the card
  73. # - This is identical to the device named "default"--which always exists and
  74. # refers to hw:0,0 (unless overridden)
  75. # - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
  76. # output on the card
  77. # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
  78. # "default" to do mixing, meaning this device is different from "default" and
  79. # allows playback while blocking other sound sources (until playback
  80. # completes).
  81. pcm.analog {
  82. type plug
  83. slave.pcm "analog-hw"
  84. }
  85.  
  86. # Control device (mixer, etc.) for the card
  87. ctl.analog {
  88. type hw
  89. card 0
  90. }
  91.  
  92. # Alias for (converted) mixed analog output on the card
  93. # - This will accept audio input--regardless of rate--and convert to the rate
  94. # required for the dmix plugin (in this case 48000Hz)
  95. # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
  96. # "default" to do mixing, meaning this device is identical to "default" for
  97. # "software" sound cards.
  98. pcm.mixed-analog {
  99. type plug
  100. slave.pcm "dmix-analog"
  101. }
  102.  
  103. # Control device (mixer, etc.) for the card
  104. ctl.mixed-analog {
  105. type hw
  106. card 0
  107. }
  108.  
  109. # Alias for (converted) digital (S/PDIF) output on the card
  110. # - This will accept audio input--regardless of rate--and convert to the rate
  111. # required for the S/PDIF hardware (in this case 48000Hz)
  112. pcm.digital {
  113. type plug
  114. slave.pcm "digital-hw"
  115. }
  116.  
  117. # Control device (mixer, etc.) for the card
  118. ctl.digital {
  119. type hw
  120. card 0
  121. }
  122.  
  123. # Alias for mixed (converted) digital (S/PDIF) output on the card
  124. # - This will accept audio input--regardless of rate--and convert to the rate
  125. # required for the S/PDIF hardware (in this case 48000Hz)
  126. pcm.mixed-digital {
  127. type plug
  128. slave.pcm "dmix-digital"
  129. }
  130.  
  131. # Control device (mixer, etc.) for the card
  132. ctl.mixed-digital {
  133. type hw
  134. card 0
  135. }
  136.  
  137. # The following devices are not useful by themselves. They require specific
  138. # rates, channels, and formats. Therefore, you probably do not want to use
  139. # them directly. Instead use of of the devices defined above.
  140.  
  141. # Alias for analog output on the card
  142. # Do not use this directly--it requires specific rate, channels, and format
  143. pcm.analog-hw {
  144. type hw
  145. card 0
  146. # The default value for device is 0, so no need to specify
  147. # - Uncomment one of the below or create a new "device N" line as appropriate
  148. # for your sound card or
  149. # device 1
  150. # device 4
  151. }
  152.  
  153. # Control device (mixer, etc.) for the card
  154. ctl.analog-hw {
  155. type hw
  156. card 0
  157. }
  158.  
  159. # Alias for digital (HDMI in this case, not S/PDIF) output on the card
  160. # Do not use this directly--it requires specific rate, channels, and format
  161. pcm.digital-hw {
  162. type hw
  163. card 0
  164. # device 1
  165. # - Comment out "device 1" above and uncomment one of the below or create a
  166. # new "device N" line as appropriate for your sound card or
  167. # device 2
  168. device 3
  169. # device 4
  170. }
  171.  
  172. # Control device (mixer, etc.) for the card
  173. ctl.digital-hw {
  174. type hw
  175. card 0
  176. }
  177.  
  178. # Direct software mixing plugin for analog output on the card
  179. # Do not use this directly--it requires specific rate, channels, and format
  180. pcm.dmix-analog {
  181. type dmix
  182. ipc_key 1234
  183. slave {
  184. pcm "analog-hw"
  185. period_time 0
  186. period_size 1024
  187. buffer_size 4096
  188. rate 48000
  189. }
  190. }
  191.  
  192. # Control device (mixer, etc.) for the card
  193. ctl.dmix-analog {
  194. type hw
  195. card 0
  196. }
  197.  
  198. # Direct software mixing plugin for digital (S/PDIF) output on the card
  199. # Do not use this directly--it requires specific rate, channels, and format
  200. pcm.dmix-digital {
  201. type dmix
  202. ipc_key 1235
  203. slave {
  204. pcm "digital-hw"
  205. period_time 0
  206. period_size 1024
  207. buffer_size 4096
  208. rate 48000
  209. }
  210. }
  211.  
  212. # Control device (mixer, etc.) for the card
  213. ctl.dmix-digital {
  214. type hw
  215. card 0
  216. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement