Share Soundcard between Direwolf and VARA on Linux
I wish I could make this one simple, but we are getting into complex territory. Please read the instructions and follow along carefully. This is not something I recommend doing without knowing your way around Linux, and so the basics are not covered(it would be too long). this should let you share the same soundcard between direwolf and other apps like VARA, and FLDigi as well. I ran into this when I wanted to have VARA and Dire wolf share a soundcard for my BPQ32 node on Linux. By default, Dire wolf takes complete control of the sound card interface, as well as VARA when ran within wine. There are several tweaks and changes needed to make this work, so buckle in. In this guide, Iβve used this post to install VARA within wine on Debian 12. Iβve used this post to install dire wolf.
Splitting the Interface
First, we need to grab your sound cards device name. Enter cat /proc/asound/cards
to get a list of sound cards, pay attention to the βDevice
β or βDevice_1
β relating to your radios digital audio interface card. I my case, I needed both (one was used for 2m, the other for HF). Note the name somewhere, paying attention to the case as well.
Now, we need to open the βasoundβ configuration file (or make a new one if it doesnβt exist), and enter some information. First, check if one exists for your current user with : cat ~/.asound
. If you get file does not exist, thatβs fine. If you instead see file info, enter rm ~/.asound
to get rid of it. The reason we did that was because the user configuration file overrides the global (which is the one we will now create/edit).
Enter sudo nano /etc/asound.conf
to create/edit the existing global configuration. If your file is empty, awesome. If it contains content, remove everything.
What we will do now, is name our new split soundcard interface. In the following example, Iβve taken the soundcard listed as βDevice
β from above, and now named it βdigirig
β in this new interface, and split it into βdigirig-rx
β for the receive(audio in), and βdigirig-tx
β for the transmit (audio out)
We will now paste the following template:
Take care to replace the word βDeviceβ with the name you found above (probably the same), and if you would like to rename the interface to something other than βdigirigβ like I have here, replace all instances of it with something lowercase and simple you will remember.
pcm_slave.digirig {
pcm {
type hw
card Device
}
period_time 0
buffer_size 8192
}
pcm.digirig-dmix {
type dmix
ipc_key 2023041901
slave "digirig"
bindings.0 0
}
pcm.digirig-dsnoop {
type dsnoop
ipc_key 2023041902
slave "digirig"
bindings.0 0
}
pcm.digirig-rx {
type plug
slave.pcm "digirig-dsnoop"
hint.description "digirig RX audio plug"
}
pcm.digirig-tx {
type plug
slave.pcm "digirig-dmix"
hint.description "digirig TX audio plug"
}
If you have 2 sound card interfaces, such as I do, you will just paste the above twice, one after the other. You will need to rename all instances of βdigirigβ (or whatever you called the first one) to something else (to refer to the second card). You will also need to replace βDeviceβ once more with the name of the second sound card (probably βDevice_1β).
Great, save that file. Issue the following command to have the changes take effect.
sudo alsa force-reload
If you get command not found, youβre better off rebooting before continuing.
Now, we will now make sure weβve done this part right. Open up your direrwolf configuration file (probably nano ~/direwolf.conf
) and find the βADEVICEβ line and remove it.
Replace it with the following. (Obviously replacing βdigirigβ if youβve renamed it in the asound file we made/edited above.
ADEVICE digirig-rx digirig-tx
Save the file, and restart Dire wolf. Dire wolf should start fine, and your audio device should be working as it did before. If not, stop here, somethings wrong.
Getting VARA to use the Split interface
Now that dire wolf is using our split interface, we now need to get VARA on board, which is a little more involved.
First, we need to get your wine prefix to be configured using ALSA. If using VARA in the default prefix, this could be as simple as running βwinetricks sound=alsa
β. Give it a try, as it wonβt hurt either way. Otherwise, you will run the following command, replacing β.wine32β with the wine prefix youβve made for VARA.
env WINEARCH="win32" env WINEPREFIX="/home/aspect/.win32" winecfg
Another way you can try to achieve this is by running βwinetricksβ within desktop mode, selecting the prefix where VARA is installed, choosing βChange Settingsβ, finding βsound=alsaβ and pressing βOkβ
Next we need to set some registry keys on the Wine prefix to identify our split interfaces. Similar to the above, we will enter the following command to open the registry editor for the VARA prefix:
env WINEARCH="win32" env WINEPREFIX="/home/aspect/.win32" regedit
You can also reach the Registry editor using the βwinetricksβ command, selecting the prefix, and opening the regedit from there.
You will navigate to the following key and leave it it open:
HKCU->Software->Wine->Drivers->winealsa.drv
Just as in the above screenshot, you will right click the empty space, and select new -> multi-string value.
Create one key called βALSAInputDevicesβ and another called βALSAOutputDevicesβ. In each of them, for the value, make a list of the relative -rx or -tx devices we made before in the asound file. (If you only have 1 sound card interface to use, you only need the one here). (-rx being in the Input devices, and -tx being in the Output.)
Save, and close it all out.
Starting VARA
Now start VARA as you normally do in WINE. In the soundcard settings, now chose the interface we specified in the registry relating to the one we created in the asound configuration file.
Direwolf and VARA should now be able to share the sound interface this way!
The post Share Soundcard between Direwolf and VARA on Linux appeared first on TheModernHam.