Well, I've recreated setup proposed by me, and it work flawlessly with some quirks..
Thanks for the link, by the way, it helped me to streamline the start-stop of alsa part.
So I needed ALSA for TeamSpeak3 (TS3), and I got my self the following setup:
My Creative "SoundBlaster Audigy Gamer 2" is served by OSSv4 only.
My built in "HD Audio Intel PCH ALC892" is served by ALSA only.
Everything play trough OSSv4 and 99% of programs uses microphone input of OSSv4.
TS3 uses ALSA for microphone input and OSSv4 for all output.
What I've done:
1. We need to make sure that ALSA loads all it's needed modules and ONLY needed modules for ONLY ONE sound card so what I did:
1.1. Removed OSSv4 service from starting at all.
1.2. Recompiled kernel with ALSA modules compiled as modules.
I compiled only modules Intel HDA needed as I knew which it needs but if you don't know which modules are needed and which is not You can compile all ALSA as modules or in case of binary distribution like Debian/Ubuntu, Fedora/CentOS, etc you'll have all ALSA modules compiled for you so this step can be safely ignored in this case.
1.3. I knew what modules needed, but in case you don't, you can simply temporary remove the other sound card, in my case that would be my Creative "SoundBlaster Audigy Gamer 2", and restart computer, upon completed start udev will load all needed ALSA modules, you should make a note of which modules needed with command thing like this:
Code: Select all
sudo lsmod | grep snd >~/ALSA.listIf at this point you'll find that non of them are loaded then check if they are blacklisted some where in /etc/modprobe.d/ and temporary comment out that blacklist, you will need that blacklist down that road.
1.4. Now I needed the correct rmmod command because rmmod command cannot unload module if it is used by any other module so you need to tell rmmod in which sequence to unload modules by hand so it unloads only modules that aren't used by any one, you can check which module uses which with lsmod mentioned before, I get this
Code: Select all
rmmod snd_hda_intel snd_hda_codec_realtek snd_hda_codec_generic snd_hda_controller snd_hda_codec snd_pcm snd_timer sndAnd I needed a command to load all needed modules, that is much easier in my case this worked:
Code: Select all
modprobe snd_hda_codec_realtek
modprobe snd_hda_intelYou might want to test this after you blacklisted all ALSA modules as blacklisting affects autoload of modules with modprobe command in My case without blacklist it was enogth to load only snd_hda_intel ans after it wasn't, you can check if ALSA modules is loaded correctly with
it should list your desired sound card.
1.5. Now I had all needed info about ALSA and should blacklist all ALSA modules (in my case: /etc/modprobe.d/blacklist-alsa.conf), add back OSSv4 service to be loaded on start, re-plug sound card in PC and reboot it.
2. Now I need make sure that OSSv4 do not try to load module for Intel HDA which is much simpler task than with ALSA.
Just edit
Code: Select all
sudo mcedit /usr/lib/oss/etc/installed_drivers and remove any lines not related to the one sound card you need OSSv4 to use. In My case all I left
Code: Select all
oss_sblive #Creative Sound Blaster Audigy Platinum3. And now I needed to automate restart of OSSv4 service, as it noted in topic you gave me the link to, /usr/sbin/soundon command actually removes all ALSA modules backing them up, thankfuly, in "/lib/modules/`uname -r`/sound-preoss.tar.bz2", but I want to prevent this from happening at all, at system startup this will not happen because of ALSA modules blacklisted but if I am to restart OSSv4 service, that might happen, and so I made sure that in no case any of ALSA modules are loaded at the time of soundon is executed.
I've achieved that by adding rmmod line I've got earlier to service script in "/etc/init.d/oss" right before soundon command.
It is not enough to add rmmod line in /usr/lib/oss/soundon.user as that script is started by /usr/sbin/soundon after ALSA modules detection and removal.
3.1. Also I've added to the end of /usr/lib/oss/soundon.user:
Code: Select all
modprobe snd_hda_codec_realtek
modprobe snd_hda_intel
/etc/init.d/alsasound restoreSo that uppon start of OSSv4 I have ALSA started and fully configured ALSA mixer and I've actualy configured ALSA volumes with alsamixer command so that all capture I need is on and at good volume level and no other is on at all, just muted everything else.
4. And last thing is /etc/asound.conf ( or ~/.asoundrc) which ever fly you boat, that works for me:
Code: Select all
pcm.!default
{
type asym # combine playback and capture devices
playback.pcm { ### Playback object ###
type oss
device /dev/dsp
}
capture.pcm { ### Capture object ###
type plug # convert audio format from the hardware
slave {
pcm {
type hw # define the capture hardware
card "PCH" # capture card name
device 0 # capture device on that card
}
}
}
}