Penguin

Differences between version 8 and revision by previous author of AlsaNotes.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 8 Last edited on Monday, November 3, 2003 5:45:20 pm by AlastairPorter Revert
Older page: version 6 Last edited on Friday, September 26, 2003 6:43:16 pm by AristotlePagaltzis Revert
@@ -19,13 +19,59 @@
 You will need to get your hands dirty a bit. Install the [SRPM]: 
  
  rpm -ivh alsa-driver.x.y.z-p.src.rpm 
  
-Now open the __alsa-driver.x.y.z-p.spec__ in the __SPECS/__ directory, locate the __%configure__ and __make__ commands and the following command between them. 
+Now open the __alsa-driver.x.y.z-p.spec__ in the __SPECS/__ directory, locate the __%configure__ and __make__ commands and add the following command between them. 
  
  touch include/linux/workqueue.h 
  
 Finally, [RPM] needs to be told to build the ''spec file'': 
  
  rpmbuild -bb --define 'cards als4000' --target $arch alsa-driver.x.y.z-p.spec 
  
 You can now install the [RPM]s built in the __RPMS/$arch/__ directory. 
+  
+!!! Software Mixing With Alsa  
+  
+You can get alsa to do software mixing for you without having to resort to something like ESounD. This is done via the dmix plugin and is documented [here|http://alsa.opensrc.org/index.php?page=DmixPlugin]. Basically, all you need to do is get alsa going, then put the following in a .asoundrc file in your home directory.  
+  
+ # .asoundrc file. Put this in your home directory.  
+  
+ pcm.mixed {  
+ type dmix  
+ ipc_key 123456 # Any unique value  
+ ipc_key_add_uid true # No idea...  
+ slave {  
+ pcm "hw:0,0"  
+ # Apparently for OSS emulation device, you have to set the period  
+ # and the buffer sizes in powers of two.  
+ period_time 0  
+ period_size 1024 # must be power of 2  
+ buffer_size 4096 # ditto  
+ rate 44100  
+ }  
+  
+ # bindings are cool. This says, that only the first  
+ # two channels are to be used by dmix, which is enough for  
+ # (most) oss apps and also lets multichannel chios work  
+ # much faster:  
+  
+ bindings {  
+ 0 0 # from 0 => to 0  
+ 1 1 # from 1 => to 1  
+ }  
+ }  
+  
+ pcm.!default {  
+ type plug  
+ slave.pcm mixed  
+ }  
+  
+ pcm.dsp0 {  
+ type plug  
+ slave.pcm mixed  
+ }  
+  
+ pcm.mixer0 {  
+ type hw  
+ card 0  
+ }