Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to pipe the default audio h/w device directly to hw:0,2

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
Erin
LXF regular


Joined: Thu Apr 07, 2005 8:35 pm
Posts: 141
Location: The Olde Smoke south of the River

PostPosted: Mon Apr 11, 2005 8:27 pm    Post subject: How to pipe the default audio h/w device directly to hw:0,2 Reply with quote

Dear all,

I run a SB!Live card. It has a co-ax out on it. Obviously, the default output port is the most commonly used one which is /dev/dsp or hw:0,0. What I would like to do is directly pipe the audio stream to hw:0,2. The reason for the semi-permenant pipe is because some applications, Ryhthmbox for example, do not seeingly support changing the output.

Google has provided some info as has Alsa's site. Bith suggest using an .asoundrc file and a plug entry. However, this does not work. I cannot get it to pipe directly. Typing "aplay -D plug:0,2 nix.wav" plays the file to hw:0,2 and I can hear it. It doesn't solve the problem though.

Can anyone please give me any tips, hints or pointer to help my cause. I bet the answer is really simple, just I cannot get it!

Thanks in advance,
Erin
Back to top
View user's profile Send private message
slacker



Joined: Mon Apr 11, 2005 9:51 pm
Posts: 1

PostPosted: Mon Apr 11, 2005 10:10 pm    Post subject: RE: How to pipe the default audio h/w device directly to hw: Reply with quote

You should be able to do this using aoss from the alsa OSS compatablity library. This lets you divert sounds going to /dev/dsp to alsa plugs.
Create an .asound plug called pcm.dsp0 like this
pcm.dsp0 {
type plug
slave.pcm "hw:0,2"
}

Then run the program you want to pipe using aoss eg:
aoss Rythmbox
Check out man aoss for more info
Hope this helps
Back to top
View user's profile Send private message
Flea
LXF regular


Joined: Fri Apr 08, 2005 2:03 pm
Posts: 258
Location: Ferryhill, Co. Durham

PostPosted: Tue Apr 12, 2005 1:33 am    Post subject: RE: How to pipe the default audio h/w device directly to hw: Reply with quote

I'm not too clued up on alsa but you could try routing sound through a deamon. I'm a KDE man so I don't know how you would do this in gnome, but under KDE I set arts to run on hw:0,1 and run stuff with 'artsdsp *program*' this ensures hw:0,0 is free for Firefox/games etc.

I'm not sure what gnome uses these days, it used to use esound didn't it?
_________________
The question is, what is a mahnamahna?
The question is, who cares?
Back to top
View user's profile Send private message
graham
Site admin


Joined: Tue Apr 12, 2005 10:31 am
Posts: 37

PostPosted: Tue Apr 12, 2005 10:58 am    Post subject: RE: How to pipe the default audio h/w device directly to hw: Reply with quote

I've had exactly the same problem. Editing the .asoundrc file can route most of the audio to the spdif output, but I've found that there are some apps that ignore it.

Here's my ~/.asoundrc file (it also resamples the data to 48000), hope it helps!

Code:
pcm.emu10k1 {
type hw
card 0
}

pcm.!default {
type plug
slave.pcm "emu10k1"
}

pcm.emu10k1 {
type dmix
ipc_key 1234
slave {
pcm "hw:0,2"
period_time 0
period_size 1024
buffer_size 4096
rate 48000
}
}

ctl.emu10k1 {
type hw
card 0
}
Back to top
View user's profile Send private message
Erin
LXF regular


Joined: Thu Apr 07, 2005 8:35 pm
Posts: 141
Location: The Olde Smoke south of the River

PostPosted: Tue Apr 12, 2005 11:11 pm    Post subject: Reply with quote

No joy so far but thanks for all the tips. I have pasted that .asoundrc in to a /etc/asound.conf and my own .asoundrc but nothing changes except aplay now winges (output below).

swallow:/etc# aplay /home/jerry/Utopia.WAV
ALSA lib pcm_dmix.c:1192:(_snd_pcm_dmix_open) Unknown field card
aplay: main:508: audio open error: Invalid argument

Any more ideas? I am struggling with this one. Even the aoss tip didn't alter anything!

Thanks, Erin
Back to top
View user's profile Send private message
graham
Site admin


Joined: Tue Apr 12, 2005 10:31 am
Posts: 37

PostPosted: Thu Apr 14, 2005 9:42 am    Post subject: Reply with quote

Morning!

Sounds like the card 0 statement in the pcm and ctl sections is causing a problem. I need this because I've also got the on-board motherboard sound device assigned to card 1. You could try removing the offending card 0 lines, or the pcm and ctl sections entirely.
Back to top
View user's profile Send private message
Guest






PostPosted: Thu Apr 14, 2005 7:30 pm    Post subject: Reply with quote

That failed too. I've tried everything I could find on the 'Net and more. Zero success or more accuratly, the same results.

Thanks though,

Erin
Back to top
graham
Site admin


Joined: Tue Apr 12, 2005 10:31 am
Posts: 37

PostPosted: Fri Apr 15, 2005 2:09 pm    Post subject: Reply with quote

Erin,

Are there any errors produced? If the sound still isn't being generated, then there's a good chance it could be one of the settings in the ALSA mixer. The best way to check is using alsamixergui; make sure that the IEC985 options are checked.

Sometimes you also need to move the IEC985 volume slider onto the first notch, and I've often had to resort to random slider adjustment (rta) to get any sound at all.

ALSA seems like voodoo sometimes...
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Apr 15, 2005 8:24 pm    Post subject: Reply with quote

Hmm, it seems toggling 'IEC958 Optical Raw' to off fixes the lot! So simple, always is!

Thanks guys and guyettes for all your assistance. I write this listening to Digitally Imported radio through Rhythmbox with no jiggery-pokery!

Regards Erin
Back to top
Guest






PostPosted: Thu Apr 28, 2005 5:37 pm    Post subject: Reply with quote

I don't know if any of you emu10k1 users found out how to record only a certain channel (line-in in my case) while playing something on pcm (other audio tracks in the sequencer). I'm running with alsa 1.0.8 and the mixer doesn't allow me to select a capture source other than analog mix, which results in recording from line-in and pcm!

Anyone with a working multi-track emu10k1 linux setup out there?? What versions of Alsa, Jack, actually work ?

thanks,
Back to top
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast