
Here you define a 6-channel device, using the two channels of the first sound card as the first two channels (0-1) and the four channels of the second sound card as the last four channels (2-5). it has surround too! You can try it using the command "speaker-test -c6 -D both -t wav". The trick here is creating another pcm device, named "both", to merge the two dmixed devices:
Load more than 1 sound on a single key soundplant how to#
How to do it? Luckily I found a good article about it, and after trying and trying again I ended up merging everything together. The two combined makes the device usable for more than one user at the same time.Īnd here comes the difficult part: getting these two cards to output concurrent sound. The first one disables user id for the device (or so I suppose) and the second one sets permissions for the device. If you look at the two dmixed pcms you will see two lines, " ipc_key_add_uid false" and " ipc_perm 0666". This one was hard to find but easy to apply. In this way I can use dmix to mix various outputs channels and get rid of that awful resource busy error. }Here I define two more pcms, using the previously defined ones as slaves. How do we solve it? We setup a few more pcms: Now we have all this pcms, but we still have that resource busy error hanging around. So now if I want to output sound on my internal card I can use aplay -Dinternal sound.wav (thanks to pcm), and alsamixer -Dinternal to manage the volume only for that card (thanks to ctl).ĭmix: concurrent sound from more than one application }As you can see there are one pcm and one ctl for each card I want to use, defined by vicename. A pcm is an input/output device, and a ctl is a control for a device. Once you know your card's names, you have to setup basic hardware pcms and ctls. SB is the internal card, with four speakers plugged, and Transceiver is a USB wireless sound card, transmitting to two speakers in another room. Above the card names are the ones I bolded (yours will be different).Īs you can see, I have a lot of devices here, but the ones I care about are the first two, Transceiver and SB. Subdevice #0: subdevice #0If you use your card's name as reference for alsa is better, because it will always connect to the right card no matter what the cards' order is.

**** List of PLAYBACK Hardware Devices ****Ĭard 0: Transceiver, device 0: USB Audio Ĭard 2: SB, device 0: ALC662 rev1 Analog Ĭard 2: SB, device 1: ALC662 rev1 Digital Ĭard 3: HDMI, device 3: HDMI 0 To get your cards names, the easiest way is to use aplay -l command. Understanding which cards you want to use

How does this strange thing work? Let's look at it step by step: So after a deep digging, I ended up with this config:

Which allows you to include configuration files. $ cat ~/.ssh/config_* > ~/.ssh/configįrom 7.3p1 and up, there is the Include option. However you approach it, though, you'll have to concatenate individual files to be a single file from outside of the file. One might also look into tools such as Puppet or Augeas. Suggestions around this can include a script to cat several changes together either on the system or via checkin hooks on a repository. The ~/.ssh/config file don't have a directive for including other files, possibly related to SSH's check for file permissions.
