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

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

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

Postby Erin » Mon Apr 11, 2005 7:27 pm

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
User avatar
Erin
LXF regular
 
Posts: 141
Joined: Thu Apr 07, 2005 7:35 pm
Location: The Olde Smoke south of the River

RE: How to pipe the default audio h/w device directly to hw:

Postby slacker » Mon Apr 11, 2005 9:10 pm

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
slacker
 
Posts: 1
Joined: Mon Apr 11, 2005 8:51 pm

RE: How to pipe the default audio h/w device directly to hw:

Postby Flea » Tue Apr 12, 2005 12:33 am

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?
User avatar
Flea
LXF regular
 
Posts: 258
Joined: Fri Apr 08, 2005 1:03 pm
Location: Ferryhill, Co. Durham

RE: How to pipe the default audio h/w device directly to hw:

Postby graham » Tue Apr 12, 2005 9:58 am

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: Select all
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
}
User avatar
graham
Site admin
 
Posts: 37
Joined: Tue Apr 12, 2005 9:31 am

Postby Erin » Tue Apr 12, 2005 10:11 pm

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
User avatar
Erin
LXF regular
 
Posts: 141
Joined: Thu Apr 07, 2005 7:35 pm
Location: The Olde Smoke south of the River

Postby graham » Thu Apr 14, 2005 8:42 am

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.
User avatar
graham
Site admin
 
Posts: 37
Joined: Tue Apr 12, 2005 9:31 am

Postby Guest » Thu Apr 14, 2005 6:30 pm

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
Guest
 

Postby graham » Fri Apr 15, 2005 1:09 pm

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...
User avatar
graham
Site admin
 
Posts: 37
Joined: Tue Apr 12, 2005 9:31 am

Postby Guest » Fri Apr 15, 2005 7:24 pm

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
Guest
 

Postby Guest » Thu Apr 28, 2005 4:37 pm

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,
Guest
 


Return to Help!

Who is online

Users browsing this forum: No registered users and 1 guest