Re: [Alsa-devel] PCM hw mixing with volume

2004-03-11 Thread Giuliano Pochini
On 10-Mar-2004 Ove Kaaven wrote: >> Uhm... I think first of all we need a way to know how many >> virtual channels are available (hw and sw) > > For the EMU10K1, snd_pcm_info_get_subdevices_count() and > snd_pcm_info_get_subdevices_avail() works for me. But I suppose you're > right that this isn'

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Manuel Jander
Hi, > What about 7.1 surround sound channels. All your suggestions only assume > 2 PCM channels. Lets clarify something: A 3D stream is one mono stream, that is split into all the necesary channels with the corresponding processing for whatever amount of speaker / headphones you have, to get th

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Manuel Jander
Hi Ove, On Wed, 2004-03-10 at 10:16, Ove Kaaven wrote: > > Please start writing what the API should provide. > > Well, the requirements that raised this thread should be fairly clear. > For example, > > ALTERNATIVE 1 > > snd_pcm_set_volume(snd_pcm_t* pcm, int volume) > > and > > snd_pcm_set_p

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread James Courtier-Dutton
Ove Kaaven wrote: Well, the requirements that raised this thread should be fairly clear. For example, ALTERNATIVE 1 snd_pcm_set_volume(snd_pcm_t* pcm, int volume) and snd_pcm_set_pan(snd_pcm_t* pcm, int pan) using whatever value range makes the most sense, and perhaps some query on whether th

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Takashi Iwai
At Wed, 10 Mar 2004 16:55:05 +0100 (CET), Giuliano Pochini wrote: > > There also is another important question: What is the unit used > to set the gain ? Decibel is probably the right choice, but > the control API provides no way to translate the dB scale to the > scale used by the hardware. dB

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Ove Kaaven
ons, 10.03.2004 kl. 16.55 skrev Giuliano Pochini: > Uhm... I think first of all we need a way to know how many > virtual channels are available (hw and sw) For the EMU10K1, snd_pcm_info_get_subdevices_count() and snd_pcm_info_get_subdevices_avail() works for me. But I suppose you're right that thi

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Ove Kaaven
ons, 10.03.2004 kl. 16.08 skrev Takashi Iwai: > At Wed, 10 Mar 2004 15:16:34 +0100, > Ove Kaaven wrote: > > > > > Please start writing what the API should provide. > > > > Well, the requirements that raised this thread should be fairly clear. > > For example, > > > > ALTERNATIVE 1 > > > > snd_p

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Giuliano Pochini
On 10-Mar-2004 Ove Kaaven wrote: > Well, the requirements that raised this thread should be fairly clear. > For example, > > ALTERNATIVE 1 > > snd_pcm_set_volume(snd_pcm_t* pcm, int volume) > > and > > snd_pcm_set_pan(snd_pcm_t* pcm, int pan) > > using whatever value range makes the most sense, a

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Takashi Iwai
At Wed, 10 Mar 2004 15:16:34 +0100, Ove Kaaven wrote: > > > Please start writing what the API should provide. > > Well, the requirements that raised this thread should be fairly clear. > For example, > > ALTERNATIVE 1 > > snd_pcm_set_volume(snd_pcm_t* pcm, int volume) > > and > > snd_pcm_set_

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Paul Davis
>In any case, most of this can all be handled by software. The only stuff >the hardware really need is the volume, frequency, direction to sound >source, and any additional effects (such as reverb). Application >software can deal with the rest. i can certainly see the utility of such an API. howev

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Ove Kaaven
ons, 10.03.2004 kl. 15.16 skrev Ove Kaaven: > * Volume > * Pan (not available if 3D sound is requested) > * Frequency (can be used for software-calculated doppler shift, or for > "wavetable synthesis"-like purposes) > * 3D position (relative to listener) > * Velocity (for hardware-calculated dopple

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Ove Kaaven
ons, 10.03.2004 kl. 10.46 skrev Giuliano Pochini: > On 09-Mar-2004 Ove Kaaven wrote: > > Since we're ranting anyway: It's a similar situation with 3D graphics > > hardware, where the 3D cards get ever more powerful, even though the CPU > > power is going up. [...] > > No need to enter the philosop

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-10 Thread Giuliano Pochini
On 09-Mar-2004 Ove Kaaven wrote: > Independently? No, our software mixing code resamples, adjusts volume, > and mixes the stream into the buffer in one step. It should be more efficient than separate passes. It minimizes memory i/o and some operation (multiply-add == volume-mix) can be done nati

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-09 Thread Manuel Jander
Hi, On Tue, 2004-03-09 at 13:25, Ove Kaaven wrote: > tir, 09.03.2004 kl. 15.26 skrev Paul Davis: > > >And by that time, games will be even more demanding than before, and > > >still want to use those cycles for itself rather than software sound > > >processing, so just sitting idle waiting for the

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-09 Thread Ove Kaaven
tir, 09.03.2004 kl. 15.26 skrev Paul Davis: > >And by that time, games will be even more demanding than before, and > >still want to use those cycles for itself rather than software sound > >processing, so just sitting idle waiting for the ultimate > >infinite-megahertz cpu, that can do everything

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-09 Thread Takashi Iwai
At Tue, 09 Mar 2004 09:26:56 -0500, Paul Davis wrote: > > >And by that time, games will be even more demanding than before, and > >still want to use those cycles for itself rather than software sound > >processing, so just sitting idle waiting for the ultimate > >infinite-megahertz cpu, that can d

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-09 Thread Paul Davis
>And by that time, games will be even more demanding than before, and >still want to use those cycles for itself rather than software sound >processing, so just sitting idle waiting for the ultimate >infinite-megahertz cpu, that can do everything in no time, gains nobody >anything... at least our b

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-08 Thread Ove Kaaven
man, 08.03.2004 kl. 17.20 skrev Paul Davis: > The kinds of features you seem to expect from hardware didn't exist in > most devices 2 years ago. Its likely that features currently > considered "experimental" in hardware right now (matrix mixing springs > to mind) will become more common 2 years fro

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-08 Thread Paul Davis
>Are you planning to standardize such features or design a >device-independent API for it? (And my manager wants to know which ALSA >release this might get implemented in...) Just a thought on your overall issues with ALSA over the last week. The kinds of features you seem to expect from hardware

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-07 Thread Jaroslav Kysela
On Sun, 7 Mar 2004, Ove Kaaven wrote: > We have some games that want to mix several dynamic sound streams. > That's easy enough at first glance, just snd_pcm_open() for each stream > they want to output (and do software mixing when that fails). However, > it seems that they want each stream to hav

Re: [Alsa-devel] PCM hw mixing with volume

2004-03-07 Thread Manuel Jander
Hi, Aureal Hardware can do this in hardware, but this feature has not been exposed. I would be interested :D Maybe this could be done using some well defined controls. That would be needed for OpenAL support anyway. Any comments ? Best Regards Manuel Jander On Sun, 2004-03-07 at 10:51, Ove Kaa

[Alsa-devel] PCM hw mixing with volume

2004-03-07 Thread Ove Kaaven
We have some games that want to mix several dynamic sound streams. That's easy enough at first glance, just snd_pcm_open() for each stream they want to output (and do software mixing when that fails). However, it seems that they want each stream to have independent volume and pan controls. As far