Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is ALSA polyphonic?---ie can it burp, fart and swear at once
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
thegoonden
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 84
Location: N Ireland

PostPosted: Fri Jan 07, 2005 12:14 pm    Post subject: Is ALSA polyphonic?---ie can it burp, fart and swear at once Reply with quote

Short version for those who don't like to read "war and peace"in forums:

Alsa only makes one noise at a time.

^^ Thought I'd stick that in for 2 reasons.......
1. I'm the world's biggest idiot when it comes to finding ANYTHING on the gentoo fora ( can't explain it, it's just that way, I've read the search FAQ and everything and STILL have beter luck finding stuff here via google LOL) Other people are far better, and 99 times out of 100 the answer is already there and someone will point me to it.

2. I DO like to ramble, and make a post entertaining :)

Extended remix---:

I just updated (well ground up rebuilt) a shiney new 2.6.9-gentoo-r12 based system. And seeing as how that's how things are done these days, I set up to use ALSA.

The thing is that now if I'm playing an mp3 and for instance someone sends me a message in GAIM, I hear no alert sounds.......until I stop xmms and then all the noises that GAIM or whatever should have been making, all come spewing out in one great big bunch. Same thing happens if I'm watching mplayer and fire up xmms, it will wait (patiently and politely I'd like to add) until mplayer stops before it starts playing.

I asked my brother about it ( having recently evangelised him from "I'm not installing anything where a bunch of 3rd party weirdos have hacked everything to ribbons" to "Bloody hell, this gentoo kicks ass a bit"), and he reckoned a sound server of some kind was needed. I thought about using JACK as a friend of mine managed to do virtually all his electro-accoustic degree using ardour and csound and stuff, and I thought it would be nice to some day use those, and maybe break free of DOS ( trouble is, I'm a cubase junky and can't even use other windows audio apps, but that is not really important).
So I installed JACK and set it up as best i could ( worst thing about Gentoo is that so much is so well done for you, that you get pig arsed lazy....and I'll put my money on the table and say that if any Linux will beat DOS, it'll be Gentoo). And for my troubles got not a lot of sound. With a bit of fiddling I had the QT frontend telling me te server was started and happy, I could patch my physical ins to outs and so on, but connections from applications were not posible (xmms was set to use jack out)
I then took a look at the jack tutorial on these fine fora, and scared myself witless at the amount of messing and hacking that I'd need to do to get at best questionable results out of JACK ( the morale of this story is that you should never EVER believe the phrase "yeah,it's no bother at all, works a treat" when it comes from someone who can write full scale orchestral style scores in csound).


My Bro's only other suggestion was to resign myself to the use of artsd, which I'd rather avoid.[1]
Is there some other way to allow ALSA to accept multiple applications on it's inputs ( I'd always thought ALSA was as close as Linux got to DOS's ASIO ( the A in both is for "advanced " aint it:) )

I'm pretty sure the soundcard itself has channels aplenty, it's a cmedia 8768 based card ( using still the 8738 kernel driver ( cmipci) obviously), covered in optical IO's for like 27:1 sound or something:). The now fried (actually, really hardware b*gg*r*d) o/b sound in the machine was an 8738 and using oss and esound on my previous 2.4 based system, it seemed to work a treat ( the main reason I never used alsa back then was that I also had an sblive in the machine, that poor card with an identity crisis, not knowing if it's a lame gamers card or half an EMU Emulator4 trapped on a PCI board, seems to drive a lot of stuff in linux nuts (in DOS, it's the user who goes nuts with it).

So........can I get more than one program to make noises without resorting to JACK or artsd? I note there are a number of outputs listed for the device in things like xmms, although it would appear HW:0.0 is the front speaker OP, HW:0.1 is the rear and HW:0.2 is either an optical out or some rewire-the-line-in-to-make-it-a-sub-out thingy.

There.....and all without making one bad pun on jack.

[1] My first Linux experience was Mandrake 7.2, and it has given me a real fear for artsd ( they way it liked to take control of my sound card, lock it, that crash and refuse to releaase it). Essentially, think of me as an unfortunate person who was savaged by a dog as a child, to whom someone has just suggested kicking an angry looking rottweiler in the danglies.
Back to top
View user's profile Send private message
neenee
Veteran
Veteran


Joined: 20 Jul 2003
Posts: 1786

PostPosted: Fri Jan 07, 2005 12:22 pm    Post subject: Reply with quote

i believe you can use dmix for software mixing.
Back to top
View user's profile Send private message
thegoonden
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 84
Location: N Ireland

PostPosted: Fri Jan 07, 2005 12:54 pm    Post subject: Reply with quote

well I'll be off to take a look at that then. cheers, I'll let you know.
Back to top
View user's profile Send private message
eae
Apprentice
Apprentice


Joined: 28 Dec 2004
Posts: 211

PostPosted: Fri Jan 07, 2005 1:38 pm    Post subject: Reply with quote

Just look at this page: http://alsa.opensrc.org/index.php?page=DmixPlugin
Back to top
View user's profile Send private message
thegoonden
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 84
Location: N Ireland

PostPosted: Fri Jan 07, 2005 7:48 pm    Post subject: Reply with quote

gettin somewhere now, got gaim and xmms and all the various commanline players being all nicey nicey and friendly, just by using the simple method described.
Mplayer on the other hand is less inclined to play ball, I tried to setup my asoundrc to be the came as the one in the complex example, but it didn't help.
It seems mplayer has once again proven to be an astonishingly fast moving target, and must have changed it's audio ouput option syntax since this guide was produced.

I get down o this bit
Quote:

"Mplayer 1.0_pre5 has added a new configuration directive for alsa devices. In /etc/mplayer.conf use ao=alsa and adevice=dsp0"


And whether I use the simple or complex asoundrc configuration options(examples, techniques, whatever u like to call em), although mplayer generally makes noise, it takes over all the devices.
the relevant bit of my mplayer.conf looks like this,,,,,,,
Code:
ao=alsa        # To specify default audio driver (see -ao help for
 adevice=pcm0                   # list)

I've tried everthing under the sun as the adevice (ossmix, pcm.ossmix, dmix, dmixer, kitchen.sink), either I get silence or it plays sound and locks /dev/dsp.
Probably the main reason would be that mplayer considers the whole adevice thing to be a pile of fetid dingo's kidneys, as evidenced by the fact that irrespective of what goes AFTER adevice....mplayer still has this to say,,,,,

Code:
Warning unknown option adevice at line 15


Which if my computerspeak is up to scratch translates as "bite me" does it not?


Most confused by mplayer, probably cos I am doing something astonishingly stupid, and just need to be soundly LARTed. But at least I can hear when someone messages me while I've got tunes on :-)
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3256

PostPosted: Fri Jan 07, 2005 9:48 pm    Post subject: Reply with quote

In your mplayer config (~/.mplayer/config) provide your audio driver as follows:
Code:
ao_driver = "alsa:device=nforce"
, of course, replace "nforce" with the device you defined in your .asoundrc
HTH[/code]
Back to top
View user's profile Send private message
thegoonden
Tux's lil' helper
Tux's lil' helper


Joined: 02 Dec 2003
Posts: 84
Location: N Ireland

PostPosted: Fri Jan 07, 2005 11:08 pm    Post subject: Reply with quote

Thanks very much for that, I'm sure that will do the trick, either it's another new syntax or I just can't read that tutorial :)

Actually I ran into some stuttering and breakup issues out of the blue earlier so I think I have a litle buffer tweaking to do, or maybe it's just all this sound server abuse without giving alsa any chance to start up from cold ( /etc/init.d/alsasound restart doesn't quite do a full reset I suspect).

Either way, that looks to be the way to get mplayer to play nice.
thanks again.

Edit:

In the end the exact incantation was
Code:
ao="alsa:device=ossmix"

seems to be working.

I'll be back after I next reboot and it all goes wrong ;)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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