Re: [Alsa-user] pcm vs pcm2 channel
On Thu, 2006-01-05 at 13:25 -0500, Paul Fox wrote: hi -- i understand that sometimes channels are mislabeled, and that pcm2 sometimes means headphones, or main, but assuming that that's not the case, does the presence of a pcm2 channel imply that one could play two digital sources at once (e.g., two wav files) and have them mixed by the hardware? if so, what devices would one use? i run a whole-house audio system. i have both music (duh. :-) and also a home-automation menuing system. currently, i run a nas server on top of the audio device, because it's capable of mixing inputs from various clients. i use a NAS-enabled mpg123 to play the music, and i use auplay to send the festival-generated voice data. so my music can keep playing while i check my voicemail, for instance. i'd like to eliminate the nas server (just to make things simpler) but i know of no other easy way to do pcm signal mixing. (i'd also be happy with having one input override the other input -- i.e., the voice response menu system would have priority over music.) You must be using an old version of ALSA. With 1.0.9 and later this should Just Work - if your hardware can't mix multiple channels then alsa-lib will handle the mixing. You have to make sure all your ALSA apps are using the default PCM. Some buggy apps like XMMS default to hw:0,0 which has always been wrong. Lee --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] pcm vs pcm2 channel
channel imply that one could play two digital sources at once (e.g., two wav files) and have them mixed by the hardware? if so, what devices would one use? ... voicemail, for instance. i'd like to eliminate the nas server (just to make things simpler) but i know of no other easy way to do pcm signal mixing. (i'd also be happy with having one input override the other input -- i.e., the voice response menu system would have priority over music.) You must be using an old version of ALSA. With 1.0.9 and later this should Just Work - if your hardware can't mix multiple channels then alsa-lib will handle the mixing. doh. okay, clearly i need to upgrade. i'm running 1.0.1, but even if i were running something newer, it might not have occurred to me to try this. i confess that once i get sound (or almost anything else, for that matter :-) working, i don't tend to touch it until i have to. You have to make sure all your ALSA apps are using the default PCM. what does this mean, exactly? /dev/dsp? Some buggy apps like XMMS default to hw:0,0 which has always been wrong. am i to infer from this (and your mention of alsa-lib, above) that i can't do this from the shell? i.e. can i simply cat two sound files to separate device nodes and have them mixed? or do i have to use alsa-aware apps? thanks very much for helping me understand this... paul =- paul fox, [EMAIL PROTECTED] (arlington, ma, where it's 31.5 degrees) --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] pcm vs pcm2 channel
On Thu, 2006-01-05 at 13:42 -0500, Paul Fox wrote: channel imply that one could play two digital sources at once (e.g., two wav files) and have them mixed by the hardware? if so, what devices would one use? ... voicemail, for instance. i'd like to eliminate the nas server (just to make things simpler) but i know of no other easy way to do pcm signal mixing. (i'd also be happy with having one input override the other input -- i.e., the voice response menu system would have priority over music.) You must be using an old version of ALSA. With 1.0.9 and later this should Just Work - if your hardware can't mix multiple channels then alsa-lib will handle the mixing. doh. okay, clearly i need to upgrade. i'm running 1.0.1, but even if i were running something newer, it might not have occurred to me to try this. i confess that once i get sound (or almost anything else, for that matter :-) working, i don't tend to touch it until i have to. You have to make sure all your ALSA apps are using the default PCM. what does this mean, exactly? /dev/dsp? /dev/dsp is the OSS emulation device. I was referring to native ALSA. Some buggy apps like XMMS default to hw:0,0 which has always been wrong. am i to infer from this (and your mention of alsa-lib, above) that i can't do this from the shell? i.e. can i simply cat two sound files to separate device nodes and have them mixed? or do i have to use alsa-aware apps? thanks very much for helping me understand this... You can't cat files to /dev/dsp and have them be mixed (but cat file.wav /dev/dsp was never a good interface anyway) as the in-kernel OSS emulation does not do software mixing. But you can just aplay file.wav from two different terminals and they will be mixed. Lee --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] pcm vs pcm2 channel
You have to make sure all your ALSA apps are using the default PCM. what does this mean, exactly? /dev/dsp? /dev/dsp is the OSS emulation device. I was referring to native ALSA. i see. so i guess there's no per-channel device node under alsa? You can't cat files to /dev/dsp and have them be mixed (but cat file.wav /dev/dsp was never a good interface anyway) as the in-kernel OSS emulation does not do software mixing. But you can just aplay file.wav from two different terminals and they will be mixed. gotcha. alsa-aware apps it is, then. thanks. if alsa is doing the mixing, how can one adjust the relative volume of the inputs? possible? going back to my music and home-automation menuing example, i could see wanting to mute or reduce the volume of the music while the voice menus are speaking. paul =- paul fox, [EMAIL PROTECTED] (arlington, ma, where it's 32.0 degrees) --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user