Guest User

asoundrc

a guest
Sep 19th, 2014
263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.62 KB | None | 0 0
  1. pcm.dmixed {
  2. type asym
  3. playback.pcm {
  4. # See plugin:dmix at http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
  5. type dmix
  6.  
  7. # Don't block other users, e.g. the Timidity midi-player daemon
  8. # http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
  9. ipc_key_add_uid true
  10.  
  11. ipc_key 5678293
  12. ipc_perm 0660
  13. ipc_gid audio
  14.  
  15. slave {
  16.  
  17. channels 6
  18.  
  19. pcm {
  20. #format S16_LE
  21. #format S24_LE
  22. format S32_LE
  23. #format FLOAT_LE
  24.  
  25. #rate 44100
  26. #rate 48000
  27. rate 96000
  28.  
  29. # http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html
  30. # Maybe helps
  31. nonblock true
  32.  
  33. type hw
  34. card 0
  35. device 0
  36. subdevice 0
  37. }
  38.  
  39. # period_size 512 with buffer_size 16384 stops crackling in xmame
  40. # 320 breaks flash - https://bbs.archlinux.org/viewtopic.php?id=129458
  41. #period_size 512
  42. period_size 1024
  43.  
  44. # If too large, use CONFIG_SND_HDA_PREALLOC_SIZE=2048
  45. buffer_size 16384
  46. }
  47. }
  48. capture.pcm "hw:0,1"
  49. }
  50.  
  51. #Default PCM used by most applications unless otherwise specified. ALSA_DEFAULT_PCM variable can be used to change it's slave, the default is upmixing from 2.0 to 5.1 via the stereo pcm.
  52. pcm.!default {
  53. type plug
  54. slave.pcm { @func getenv
  55. vars [ ALSA_DEFAULT_PCM ]
  56. default "stereo"
  57. }
  58.  
  59. }
  60.  
  61.  
  62. pcm.!surround20 {
  63. type plug
  64. slave.pcm "surround41"
  65. }
  66.  
  67. #HDMI Output on 4.0 pcm
  68. pcm.!surround40 {
  69. type plug
  70. slave.pcm {
  71. type hw
  72. card 3
  73. device 3
  74. }
  75. }
  76.  
  77. #HDMI Output on 5.0
  78. pcm.!surround41 {
  79. type plug
  80. slave.pcm "dmixed"
  81. route_policy duplicate
  82. }
  83.  
  84. pcm.!surround50 {
  85. type plug
  86. slave.pcm "dmixed"
  87. route_policy duplicate
  88. }
  89. pcm.!surround51 {
  90. type plug
  91. slave.pcm "dmixed"
  92. }
  93.  
  94. #Downmix 7.1 to 5.1
  95. pcm.!surround71{
  96. type plug
  97. slave.pcm "dmixed"
  98.  
  99. # Front and rear
  100. ttable.0.0 0.9
  101. ttable.1.1 0.9
  102. ttable.2.2 1
  103. ttable.3.3 1
  104.  
  105. # Center and LFE
  106. ttable.4.4 1
  107. ttable.5.5 1
  108.  
  109. # Side left and Side Right to Rear Left and Rear Right
  110. ttable.6.2 1
  111. ttable.7.3 1
  112. }
  113.  
  114. #Upmix mono to 5.1
  115. pcm.mono {
  116. type plug
  117. slave.pcm "dmixed"
  118. ttable.0.0 0.9
  119. ttable.0.1 0.9
  120. ttable.0.2 1
  121. ttable.0.3 1
  122. ttable.0.4 1
  123. ttable.0.5 1
  124. }
  125.  
  126. #Upmix stereo to 5.1
  127. pcm.stereo {
  128. slave.pcm "dmixed"
  129. type route
  130.  
  131. # Front and rear
  132. ttable.0.0 0.9
  133. ttable.1.1 0.9
  134. ttable.2.2 1
  135. ttable.3.3 1
  136.  
  137. # Center and LFE
  138. ttable.4.4 1
  139. ttable.5.5 1
  140.  
  141. # Front left/right to center
  142. ttable.0.4 0.5
  143. ttable.1.4 0.5
  144.  
  145. # Front left/right to rear
  146. ttable.0.2 0.5
  147. ttable.1.3 0.5
  148. }
Advertisement
Add Comment
Please, Sign In to add comment