Guest User

Untitled

a guest
Dec 10th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.49 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. pcm.!spdif {
  40. type plug
  41. slave.pcm "hw:0,1"
  42. }
  43.  
  44. ##### Configuration File #####
  45.  
  46. # Override the default output used by ALSA. If you do not override the
  47. # default, your default device is identical to the (unmixed) "analog" device
  48. # shown below. If you prefer mixed and/or digital output, uncomment the
  49. # appropriate four lines below (only one slave.pcm line).
  50. #
  51. # Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
  52. # such that their default "default" device is identical to the "mixed-analog"
  53. # device. Whether using an ALSA version before or after 1.0.9, it does no harm
  54. # and has no affect on performance to redefine the device (even if the
  55. # redefinition does not change anything). Also, by using this ALSA
  56. # configuration file, you once again have access to unmixed analog output using
  57. # the "analog" device.
  58. pcm.!default {
  59. type plug
  60. ## Uncomment the following to use (unmixed) "analog" by default
  61. # slave.pcm "analog-hw"
  62. ## Uncomment the following to use "mixed-analog" by default
  63. slave.pcm "dmix-analog"
  64. ## Uncomment the following to use (unmixed) "digital" by default
  65. # slave.pcm "digital-hw"
  66. ## Uncomment the following to use "mixed-digital" by default
  67. # slave.pcm "dmix-digital"
  68. }
  69.  
  70. # Control device (mixer, etc.) for the card
  71. ctl.!default {
  72. type hw
  73. card 0
  74. }
  75.  
  76. # Alias for (converted) analog output on the card
  77. # - This is identical to the device named "default"--which always exists and
  78. # refers to hw:0,0 (unless overridden)
  79. # - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
  80. # output on the card
  81. # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
  82. # "default" to do mixing, meaning this device is different from "default" and
  83. # allows playback while blocking other sound sources (until playback
  84. # completes).
  85. pcm.analog {
  86. type plug
  87. slave.pcm "analog-hw"
  88. }
  89.  
  90. # Control device (mixer, etc.) for the card
  91. ctl.analog {
  92. type hw
  93. card 0
  94. # modified was 0 previously
  95. }
  96.  
  97. # Alias for (converted) mixed analog output on the card
  98. # - This will accept audio input--regardless of rate--and convert to the rate
  99. # required for the dmix plugin (in this case 48000Hz)
  100. # - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
  101. # "default" to do mixing, meaning this device is identical to "default" for
  102. # "software" sound cards.
  103. pcm.mixed-analog {
  104. type plug
  105. slave.pcm "dmix-analog"
  106. }
  107.  
  108. # Control device (mixer, etc.) for the card
  109. ctl.mixed-analog {
  110. type hw
  111. card 0
  112. # modified was 0 previously
  113. }
  114.  
  115. # Alias for (converted) digital (S/PDIF) output on the card
  116. # - This will accept audio input--regardless of rate--and convert to the rate
  117. # required for the S/PDIF hardware (in this case 48000Hz)
  118. pcm.digital {
  119. type plug
  120. slave.pcm "digital-hw"
  121. }
  122.  
  123. # Control device (mixer, etc.) for the card
  124. ctl.digital {
  125. type hw
  126. card 0
  127. }
  128.  
  129. # Alias for mixed (converted) digital (S/PDIF) output on the card
  130. # - This will accept audio input--regardless of rate--and convert to the rate
  131. # required for the S/PDIF hardware (in this case 48000Hz)
  132. pcm.mixed-digital {
  133. type plug
  134. slave.pcm "dmix-digital"
  135. }
  136.  
  137. # Control device (mixer, etc.) for the card
  138. ctl.mixed-digital {
  139. type hw
  140. card 0
  141. }
  142.  
  143. # The following devices are not useful by themselves. They require specific
  144. # rates, channels, and formats. Therefore, you probably do not want to use
  145. # them directly. Instead use of of the devices defined above.
  146.  
  147. # Alias for analog output on the card
  148. # Do not use this directly--it requires specific rate, channels, and format
  149. pcm.analog-hw {
  150. type hw
  151. card 0
  152. # The default value for device is 0, so no need to specify
  153. # - Uncomment one of the below or create a new "device N" line as appropriate
  154. # for your sound card or
  155. device 0
  156. # modified
  157. # device 4
  158. }
  159.  
  160. # Control device (mixer, etc.) for the card
  161. ctl.analog-hw {
  162. type hw
  163. card 0
  164. # modified
  165. }
  166.  
  167. # Alias for digital (S/PDIF) output on the card
  168. # Do not use this directly--it requires specific rate, channels, and format
  169. pcm.digital-hw {
  170. type hw
  171. card 0
  172. device 1
  173. # - Comment out "device 1" above and uncomment one of the below or create a
  174. # new "device N" line as appropriate for your sound card or
  175. # device 2
  176. # device 4
  177. }
  178.  
  179. # Control device (mixer, etc.) for the card
  180. ctl.digital-hw {
  181. type hw
  182. card 0
  183. }
  184.  
  185. # Direct software mixing plugin for analog output on the card
  186. # Do not use this directly--it requires specific rate, channels, and format
  187. pcm.dmix-analog {
  188. type dmix
  189. ipc_key 1234
  190. slave {
  191. pcm "analog-hw"
  192. period_time 0
  193. period_size 1024
  194. buffer_size 4096
  195. rate 48000
  196. }
  197. }
  198.  
  199. # Control device (mixer, etc.) for the card
  200. ctl.dmix-analog {
  201. type hw
  202. card 0
  203. }
  204.  
  205. # Direct software mixing plugin for digital (S/PDIF) output on the card
  206. # Do not use this directly--it requires specific rate, channels, and format
  207. pcm.dmix-digital {
  208. type dmix
  209. ipc_key 1235
  210. slave {
  211. pcm "digital-hw"
  212. period_time 0
  213. period_size 1024
  214. buffer_size 4096
  215. rate 48000
  216. }
  217. }
  218.  
  219. # Control device (mixer, etc.) for the card
  220. ctl.dmix-digital {
  221. type hw
  222. card 0
  223. }
  224.  
  225. # new new new
  226. pcm.stereo {
  227. type plug
  228. slave {
  229. pcm multi
  230. rate 48000
  231. }
  232. ttable.0.0 1.0
  233. ttable.1.1 1.0
  234. ttable.0.2 1.0
  235. ttable.1.3 1.0
  236. }
  237.  
  238. ctl.stereo {
  239. type hw
  240. card 0
  241. }
  242.  
  243. pcm.multi {
  244. type multi
  245. slaves.a.pcm "analog-hw"
  246. slaves.a.channels 2
  247. slaves.b.pcm "digital-hw"
  248. slaves.b.channels 2
  249. bindings.0.slave a
  250. bindings.0.channel 0
  251. bindings.1.slave a
  252. bindings.1.channel 1
  253. bindings.2.slave b
  254. bindings.2.channel 0
  255. bindings.3.slave b
  256. bindings.3.channel 1
  257. }
  258.  
  259. ctl.multi {
  260. type hw
  261. card 0
  262. }
  263. ##----------
  264.  
  265. pcm.pulse { type pulse }
  266. ctl.pulse { type pulse }
Add Comment
Please, Sign In to add comment