Advertisement
Guest User

alsa multiplex/multiuser Steam/Mumble config

a guest
Aug 28th, 2021
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.33 KB | None | 0 0
  1. # cat /proc/asound/cards
  2. #
  3. # 0 [PCH            ]: HDA-Intel - HDA Intel PCH
  4. #                       HDA Intel PCH at 0xfbff8000 irq 39
  5. # 1 [NVidia         ]: HDA-Intel - HDA NVidia
  6. #                       HDA NVidia at 0xfaffc000 irq 17
  7. # 2 [Headset        ]: USB-Audio - Logitech Wireless Headset
  8. #                     Logitech Logitech Wireless Headset at usb-0000:00:1a.0-1.1.4.4, full speed
  9. # ^
  10. # |_______________ alsa card index
  11.  
  12.  
  13. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  14. ::::::::::::::::::::::::::::::::       /etc/asound.conf         ::::::::::::::::::::::::::::::::
  15. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  16. # this makes a "device" for multiplexing by specifying the alsa device number?
  17. # Logitech USB headset w/mic
  18. pcm.foomix {
  19.     type dmix
  20.     ipc_key 1024
  21.     ipc_key_add_uid 0
  22.     slave.pcm "hw:2,0"
  23. }
  24.  
  25. # I don't know what a dsnoop is used for but it's in many examples
  26. pcm.foosnoop {
  27.     type dsnoop
  28.     ipc_key 1025
  29.     slave.pcm "hw:2,0"
  30. }
  31.  
  32. # multiplex device "fooplex" using the logitech headset
  33. pcm.fooplex {
  34.     type asym
  35.     playback.pcm "foomix"
  36.     capture.pcm "foosnoop"
  37. }
  38.  
  39. # "PCH" speaker/mic output on the back of my computer
  40. pcm.dmixed {
  41.     type dmix
  42.     ipc_key 1024
  43.     ipc_key_add_uid 0
  44.     slave.pcm "hw:0,0"
  45. }
  46.  
  47. # snoop device for "PCH" speaker/mic
  48. pcm.dsnooped {
  49.     type dsnoop
  50.     ipc_key 1025
  51.     slave.pcm "hw:0,0"
  52. }
  53.  
  54. # multiple device for "PCH" speaker/mic
  55. pcm.duplex {
  56.     type asym
  57.     playback.pcm "dmixed"
  58.     capture.pcm "dsnooped"
  59. }
  60.  
  61. # Instruct ALSA to use "PCH" as the default device
  62. # can override the default in each user's ~/.asoundrc
  63. pcm.!default {
  64.     type plug
  65.     slave.pcm "duplex"
  66. }
  67. ctl.!default {
  68.     type hw
  69.     card 0
  70. }
  71.  
  72.  
  73. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  74. :::::::::::::::::::::::::::::::: /home/steamuser/.asoundrc      ::::::::::::::::::::::::::::::::
  75. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  76. # Steam and Mumble are run using sudo to "steamuser"
  77. # we want to use Logitech headset for Mumble and Steam. Multiplex device allows for this
  78. # "steamuser" must be in audio group (and possibly plugdev group?)
  79. #
  80. # the Mumble Audio Tuning Wizard config settings
  81. # https://imgur.com/ojRJPVul.png
  82. pcm.!default {
  83.     type plug
  84.     slave.pcm "fooplex"
  85. }
  86.  
  87. # Logitech headset is hw 2
  88. ctl.!default {
  89.     type hw
  90.     card 2
  91. }
  92.  
  93.  
  94. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  95. :::::::::::::::::::::::::::::::: /home/firefox/.asoundrc        ::::::::::::::::::::::::::::::::
  96. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  97. # sudo to "firefox" user for running web browser
  98. # if empty/commented out, then uses defaults from /etc/asound.conf
  99. # if we want to use headphones to listen to youtube at night, then uncomment the lines below
  100. # it is just a copy of "steamuser" setup
  101. # seems like re-sudo to "firefox" user should work after changing file but I had to restart
  102. # computer to get it to work. Not sure what the problem is
  103. #
  104. # pcm.!default {
  105. #    type plug
  106. #    slave.pcm "fooplex"
  107. #}
  108. #ctl.!default {
  109. #    type hw
  110. #    card 2
  111. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement