Dual Sound Cards
Topic: Dual Sound Cards
started by: spanners
Posted by spanners on Mar. 13 2008,20:46Hi There
I was just wondering if anyone knew of a volume application that would control two sound cards at once.
I've got two fitted as I'm playing streaming content out of one whist encoding audio from the other and it's working great except the levels are off.
Dmix seg faults when I try to adjust levels for my secondary card and aumix doesn't see it.
Any help would be gratefully appreciated
Posted by andrewb on Mar. 13 2008,22:43Which version of DSl are you using. DMIX has issues with dual soundcards, in that it when there are channels with the same name on both soundcards they both get changed at the same time. I did have a modified version (pre-murgaLUA) which worked well with dual sound card systems (in fact it would deal with any number of sound cards, but John Andrews found it seg faulted when the volume was changed repeatedly (must have been a lot of times as I never encountered the problem). The work-around John has implemented at present in DMIX for dual sound cards doesn't solve the problem for duplicate channel names.
If you want I can post the code I had for using multiple sound cards, but it will need to be converted for the MurgaLUA scripting language now used in DSL.
Posted by mikshaw on Mar. 14 2008,01:12
Posted by andrewb on Mar. 14 2008,02:20
So far as I know this was the situation which caused the seg fault. It didn't do so in his original script. The only difference at this point in the script was how the device being altered was referenced. I had to add a few lines to sort out which mixer the device was controlled through. When a volume change is made the current DMIX executes umix for each mixer in turn, with the relevant device name. John has assumed in this approach that the same device name doesn't appear on multiple mixers. In the case of my Libretto there is a MIC device on both the mixers - one is the built-in mono microphone & the other is the external stereo plug-in. Adjusting MIC in the current DMIX alters both of these simultaneously, making the control somewhat useless as normally the internal microphone should be off (muted) when using an external microphone.
I haven't yet got round to converting my revised version of DMIX to MurgaLUA to use in the current version of DSL.
Posted by spanners on Mar. 16 2008,12:24
I'm using DSL 3.0
It would be great if you could post your code but I know very little about converting scripting languages...
Posted by ^thehatsrule^ on Mar. 16 2008,19:35There's always the option to try ALSA and its set of utilities.
Posted by andrewb on Mar. 16 2008,22:54
OK, as your using v3.0 the modified script I had will work OK. I have uploaded it to:
< http://users.tpg.com.au/cramond/zydas/abdmix.tar.gz >
There are 3 files in there, you need dmix and docked.lua. Extract the files to the home directory (/home/dsl). Change Line 29 of .xinitrc by adding '~/' in front of 'docked.lua'. Save the file & restart X (exit to prompt & type startx). You will now be using the modified version of dmix when you start it by clicking the button on the mount-tool at the bottom right of the screen.
FYI the other file in the archive is the output from umix -q on my libretto 100CT & shows the sound card setup with 2 separate mixers. The modified dmix & docked.lua scripts are coded so they will deal with any number of sound cards on a system. Duplicate named devices on different mixers have the relevant mixer number as a suffix to their name (unless they are attached to the first mixer device, in which case they have no suffix). In the case of my Libretto the MIC device on /dev/mixer is listed as MIC in dmix, the MIC device on /dev/mixer1 is listed as MIC1.
Posted by andrewb on Mar. 18 2008,12:34For those needing to control multiple mixer devices (sound cards) on one system using a newer version of DSL (with MurgaLua) I have posted a revised version of DMIX at:
< http://users.tpg.com.au/cramond/zydas/dmixnew.tar.gz >
You can eiter replace the existing dmix in /usr/local/bin (if running the unionfs system (default in v4.2.5) - you need to be root, or run emelfm as root to do this - remember to add it to .filetool.lst to get it to persist over rebooting), or call it from a terminal window using ./dmix, after extracting it from the archive.
Only 'bugs' are cosmetic in that '^A' appears at the end of each channel name & the background to the channel selector is not the same colour as the rest of the program.
Please post any comments / problems with this version here.