Skip to contentSkip to conversation

playng several files at the same time]

Fwd: Re: Sagi Bashari 5 participants 8 messages Oct 5, 2002 – Oct 8, 2002

lore
Share & tools
lore
#0 lore raw

No answer on the users list, forwarding to devel.

Quoted 16 lines · AthlonRob
Quoted 11 lines · Sagi Bashari

I installed ALSA on computer running RedHat 8.0 with Hercules Game Theater XP Sound Card.

According to the ALSA website, this card should support hardware mixing, so I should be able to play more than one file in the same time.

After I start to play the first file, every file I'm trying to play will simply hang until the first one finishes.

I read somewhere that this is the intended behavior and if a programmer wants to he can disable it in his program code (using nonblock or something like that).

However, I would like to enable it globally.

Quoted 7 lines

Well.... I just posted a somewhat similar question last night about my nForce chip. :-)

Are you sure 'Hardware mixing' is what you need to play multiple files ... I got the impression it was 'Multiple I/O' (but I could be totally mistaken).

Yes, I'm sure. See section 3.9 in http://www.alsa-project.org/~jfulmer/alsa-faq.html.

I had a Trident 4DWave card some years ago, and back then it did work with multiopen. I think it's disabled now - I read it in one of the packages documentation. My current GTXP card is much more advanced and supports mixing as well according to the site (I belive most modern soundcards do, only that alsa does not support this feature in all of them).

Quoted 7 lines

Where on the ALSA website, exactly, did you find out your card supported 'Hardware mixing'? While I'm pretty sure my card *does* support whatever is required to play multiple files at once (I learned a SoundBlaster PCI128 does as does a SB Live, so surely it must be common in nice cards, right?) I would like to see if I can find out for sure.

I found in in the "SoundCard Matrix" section in the ALSA site - http://www.alsa-project.org/alsa-doc/ the '(4)' note means that a card supports hardware mixing.

Quoted 10 lines

Sadly, I haven't received any responses to my original query. I'm somewhat at a loss as far as all this sound stuff goes, but may (or may not) take it to the developers list if nobody has a clue... :-)

Rob

Sagi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

#1 lore raw

Multiple Audio Streams

Quoted 1 line · Sagi Bashari

No answer on the users list, forwarding to devel.

Yes... let me go ahead and re-hash this for those who don't want to read through the earlier email.

Sagi and I have two different soundcards with somewhat similar, yet different, problems. (Ambigious enough?)

His soundcard theoretically supports hardware mixing both in actual hardware and in the ALSA drivers, yet when he tries to open a second audio stream, the application attempting to do so simply hangs until the resource is free. I think he said his card was a GTXP... I am unfamiliar with it.

My soundcard also supports hardware mixing, but only in the hardware.. not in the ALSA drivers. Perhaps two threads would be ideal. Oh well. I'm running on an nForce board using its integrated audio. The drivers nVidia provided (for OSS) simply consisted of an Intel i810 audio patch. I guess y'all on the ALSA team were able to utilize the nVidia-released patch and do the same thing to the ALSA i810 drivers.

Anyway... Sagi needs to know how to get the multiple streams working on his card, globally.

I need to know if it is possible to get the nForce (using the patched i810 driver) to support hardware mixing so I can send many audio streams to it at once. I have basically no programming experience, but may have a few friends who could help me if I had some clue of the how or the why of it. Alternatively, since I cannot afford to send anybody hardware... if somebody was really interested in working on this, I could give you ssh access and work with me, here, physically... but I don't know how useful or feasable such a thing would be.

Anyway... input on either or both topics by you guys who really know what you're doing would be much apperciated! :-)

Rob

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#2 lore raw

Re: Multiple Audio Streams

Quoted 37 lines · AthlonRob
Quoted 3 lines · Sagi Bashari

No answer on the users list, forwarding to devel.

Yes... let me go ahead and re-hash this for those who don't want to read through the earlier email.

Sagi and I have two different soundcards with somewhat similar, yet different, problems. (Ambigious enough?)

His soundcard theoretically supports hardware mixing both in actual hardware and in the ALSA drivers, yet when he tries to open a second audio stream, the application attempting to do so simply hangs until the resource is free. I think he said his card was a GTXP... I am unfamiliar with it.

My soundcard also supports hardware mixing, but only in the hardware..
not in the ALSA drivers. Perhaps two threads would be ideal. Oh well. I'm running on an nForce board using its integrated audio. The drivers nVidia provided (for OSS) simply consisted of an Intel i810 audio
patch. I guess y'all on the ALSA team were able to utilize the
nVidia-released patch and do the same thing to the ALSA i810 drivers.

Anyway... Sagi needs to know how to get the multiple streams working on his card, globally.

I need to know if it is possible to get the nForce (using the patched i810 driver) to support hardware mixing so I can send many audio streams to it at once. I have basically no programming experience, but may have a few friends who could help me if I had some clue of the how or the why of it. Alternatively, since I cannot afford to send anybody hardware... if somebody was really interested in working on this, I could give you ssh access and work with me, here, physically... but I don't know how useful or feasable such a thing would be.

Quoted 7 lines

Anyway... input on either or both topics by you guys who really know what you're doing would be much apperciated! :-)

Rob

mypc: /proc/asound/card0/pcm0p# cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CS4231
name: Yamaha OPL3-SA23
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1 <- This tells you how many streams the sound card can handle in hardware at the same time.
E.g. Only one application at a time can use the card.

As you can see, my old sound card can only handle one stream at once in hardware. Alsa does not do any software mixing. I also have a SB Live in another machine, the subdevices_avail is then 32 because the SB Live can handle 32 streams at once in hardware.

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

Does this help you at all ?

Cheers
James

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw

Re: Multiple Audio Streams

Quoted 46 lines · James Courtier-Dutton
Quoted 37 lines · AthlonRob
Quoted 2 lines · Sagi Bashari

No answer on the users list, forwarding to devel.

Yes... let me go ahead and re-hash this for those who don't want to read through the earlier email.

Sagi and I have two different soundcards with somewhat similar, yet different, problems. (Ambigious enough?)

His soundcard theoretically supports hardware mixing both in actual hardware and in the ALSA drivers, yet when he tries to open a second audio stream, the application attempting to do so simply hangs until the resource is free. I think he said his card was a GTXP... I am unfamiliar with it.

My soundcard also supports hardware mixing, but only in the hardware..
not in the ALSA drivers. Perhaps two threads would be ideal. Oh well. I'm running on an nForce board using its integrated audio. The drivers nVidia provided (for OSS) simply consisted of an Intel i810 audio
patch. I guess y'all on the ALSA team were able to utilize the
nVidia-released patch and do the same thing to the ALSA i810 drivers.

Anyway... Sagi needs to know how to get the multiple streams working on his card, globally.

I need to know if it is possible to get the nForce (using the patched i810 driver) to support hardware mixing so I can send many audio streams to it at once. I have basically no programming experience, but may have a few friends who could help me if I had some clue of the how or the why of it. Alternatively, since I cannot afford to send anybody hardware... if somebody was really interested in working on this, I could give you ssh access and work with me, here, physically... but I don't know how useful or feasable such a thing would be.

Quoted 7 lines

Anyway... input on either or both topics by you guys who really know what you're doing would be much apperciated! :-)

Rob

Quoted 13 lines

mypc: /proc/asound/card0/pcm0p# cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CS4231
name: Yamaha OPL3-SA23
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1 <- This tells you how many streams the sound card can handle in hardware at the same time.
E.g. Only one application at a time can use the card.

This is what I get:

[sagi@beep pcm0p]$ cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CS46xx
name: CS46xx
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
[sagi@beep pcm0p]$

Quoted 4 lines

As you can see, my old sound card can only handle one stream at once in hardware. Alsa does not do any software mixing. I also have a SB Live in another machine, the subdevices_avail is then 32 because the SB Live can handle 32 streams at once in hardware.

Yes, that's the strange thing. According to the output it only supports 1 subdevice, but the soundcard matrix says it does support hardware mixing (and I know that it does, it works perfectly on other OSs).

Does this mean that there's no real ALSA support for the Hardware mixing using this chip? If yes, why is it listed in the website with this option?

Quoted 3 lines

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

I used ARTS until now. But I don't want to use software mixing. The latency is bad and it eats CPU for nothing, why use it when you have hardware support?

Sagi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#4 lore raw

Re: Multiple Audio Streams

Quoted 18 lines · Sagi Bashari

This is what I get:

[sagi@beep pcm0p]$ cat info
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: CS46xx
name: CS46xx
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
[sagi@beep pcm0p]$

Quoted 2 lines
Quoted 9 lines
Quoted 2 lines

As you can see, my old sound card can only handle one stream at once in hardware. Alsa does not do any software mixing. I also have a SB Live in another machine, the subdevices_avail is then 32 because the SB Live can handle 32 streams at once in hardware.

Yes, that's the strange thing. According to the output it only supports 1 subdevice, but the soundcard matrix says it does support hardware mixing (and I know that it does, it works perfectly on other OSs).

Does this mean that there's no real ALSA support for the Hardware mixing using this chip? If yes, why is it listed in the website with this option?

It's there because the author of the driver wrote to me and told me it has support. It could be that your version of the card has something funky going on.

Quoted 7 lines
Quoted 3 lines

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

I used ARTS until now. But I don't want to use software mixing. The latency is bad and it eats CPU for nothing, why use it when you have hardware support?

Signature · 17 lines
Patrick Shirkey - Boost Hardware Ltd.
For the discerning hardware connoisseur
Http://www.boosthardware.com
Http://www.djcj.org - The Linux Audio Users guide
========================================

"Um...symbol_get and symbol_put... They're
kindof like does anyone remember like get_symbol
and put_symbol I think we used to have..."
- Rusty Russell in his talk on the module subsystem



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#5 lore raw

Re: Multiple Audio Streams

In reply to Sagi Bashari

Hi,

Quoted 9 lines · Sagi Bashari hat gesagt: // Sagi Bashari wrote:
Quoted 3 lines · James Courtier-Dutton

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

I used ARTS until now. But I don't want to use software mixing. The latency is bad and it eats CPU for nothing, why use it when you have hardware support?

That's what the JACK developers also thought, and that's why Jack has excellent low latency. It's a design goal of Jack. The other goal is something, that hardware mixing cannot achieve: Transparent exchange of audio data between applications. With Jack you can use the output of one programm as input to another program.

ciao

Signature · 7 lines
 Frank Barknecht                               _ ______footils.org__


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#6 lore raw

Re: Multiple Audio Streams

In reply to James Courtier-Dutton
Quoted 6 lines · James Courtier-Dutton

mypc: /proc/asound/card0/pcm0p# cat info

subdevices_count: 1
subdevices_avail: 1 <- This tells you how many streams the sound card
can handle in hardware at the same time.
E.g. Only one application at a time can use the card.

Thanks, that does help some. But, I fear the subdevice_count and avail are only reporting the numbers that the driver supports... not the number that the hardware itself supports.

At least, I hope so, because mine is reporting as 1 & 0 (I have esd running). :-)

Quoted 2 lines

I also have a SB Live in another machine, the subdevices_avail is then 32 because the SB Live can handle 32 streams at once in hardware.

I can probably scrounge up a SB Live if need be... maybe I'll do that so I'm able to play multiple streams (if we can't get a better driver written, that is).

Quoted 3 lines

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

Cool, I'll see if I can find some information about that. I hadn't heard of it before... is it GPL'd?

Rob

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#7 lore raw

Re: Multiple Audio Streams

Quoted 11 lines
Quoted 5 lines

There are other applications/tools you can use, one of which is "JACK" that allows for multiple audio streams mixed in software and lots of other cool stuff.

Cool, I'll see if I can find some information about that. I hadn't heard of it before... is it GPL'd?

Rob

http://jackit.sourceforge.net/

Cheers
James

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf