Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 00:22
All times are UTC - 4
 Forum index » Advanced Topics » Hardware » Audio
Creating virtual sound card
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
outsider

Joined: 11 Mar 2007
Posts: 17

PostPosted: Fri 16 Mar 2007, 14:35    Post_subject:  Creating virtual sound card
Sub_title: in alsa
 

Doesn anyone know how to create a virtual sound card in alsa?
I want to have a virtual card displayed when I run 'cat /proc/asound/cards'

I've looked at the alsa site, scoured the web... Hoping someone can point me in the right direction...
Back to top
View user's profile Send_private_message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Fri 16 Mar 2007, 16:37    Post_subject:  

i'm not sure, but i think you would need to set up an alias in /etc/modprobe.conf ... though Puppy tends to reconfigure things every time it boots

you can set up as many virtual cards as you like in /etc/asound.conf or /root/.asoundrc, and they will be instantly available ... but they won't be listed in /proc/asound/cards

for example, you can set gxine or xmms to use whichever virtual card you like

for example, this might be a duplicate of your card 0, named "mycard":

pcm.mycard {
type hw
card 0
}

this would make the default sound card "mycard":

pcm.!default mycard

so if you typed this, mplayer would use mycard:

mplayer -ao alsa movie.avi

or you could select which card mplayer will use like this:

mplayer -ao alsa:device=mycard movie.avi

you can see what cards you have to choose from by typing:

aplay -L

if you have 4 speakers, you could create a virtual device that duplicates the sound in the front speakers and plays the sound in the rear speakers too:

pcm.40dup {
type route
slave.pcm surround40
slave.channels 4
ttable.0.0 1
ttable.1.1 1
ttable.0.2 1
ttable.1.3 1
}

you could play a movie using 40dup like this:

mplayer -ao alsa:device=40dup movie.avi

you could make "40dup" (or name it anything you like) the default sound card to use like this:

pcm.!default 40dup
Back to top
View user's profile Send_private_message 
outsider

Joined: 11 Mar 2007
Posts: 17

PostPosted: Fri 16 Mar 2007, 22:20    Post_subject:  

GuestToo wrote:

you can set up as many virtual cards as you like in /etc/asound.conf or /root/.asoundrc, and they will be instantly available ... but they won't be listed in /proc/asound/cards

That's unfortunate...
Here's what I'm trying to accomplish.
On my server machine I have a music server called SlimServer (it indexes your music collections and gives you a slick web interface to control all the clients). I have several Squeeze boxes around the house (clients which play the streams from SlimServer) and I'm trying to set up several more audio zones on the cheap.
So I've got an old PC (running Puppy) with an onboard 4 channel soundcard which I have already split into 2 separate alsa devices.
The client software (which plays the slimserver stream) is a java application called SoftSqueeze. What I was planning on doing is running 2 instances of this application and assign each of the new alsa 2 channel pcm devices to each instance of the java app.
However, java donesn't play too nicely with alsa. All that java can address is actual devices that list in /proc/asound/cards. It can't address specific alsa pcm devices or dmix devices...
So I was hoping that by creating a virtual sound card, I could fool java into outputting to the proper outputs.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Hardware » Audio
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0443s ][ Queries: 11 (0.0035s) ][ GZIP on ]