Skip to contentSkip to conversation

Mixer sanity

DISCUSSION Owen Fraser-Green 3 participants 3 messages Jun 5, 2004 – Jun 6, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

After some tinkering around with ALSA's mixer with a couple of different cards it's become apparent to me that there's not too much standardization when it comes to track naming.

What I'd like to be able to do is adjust the different levels on different channels and to adjust the mast mixer - in fact, I'm sure this must be about the most common use case for a mixer. The problem is, however, it isn't really possible to decide consistently across all sound cards which mixer elements the program should use to achieve this. For example, the Maestro3-based sound card on my laptop has a Master element and a stereo PCM element. Fair enough. On my workstation, my envy24-based card shows no usable master element and, even worse, each of the 8 mono channels has it's own stereo mixer element where the L-R levels control how much of the mono signal is mixed into the L-R channels of the master mix. Just to alter the level for regular stereo playback, therefore, I have to first lower the L level for HW1 and then alter the R level for HW2 (with HW1's R and HW2's L muted). This is weird!

Now, I know an envy24mixer exists to make life easier for me but surely it would be a bit nicer if the mixer interface provided a more consistent abstraction. In my situation, I want my software to be useful without a screen so the envy24mixer is out of the question. The only other solution, therefore, is for me to provide a map for every sound card which ALSA supports.

Having spoken to some guys involved in gstreamer/GNOME I gather this is a pet grumble of theirs too as they would like to provide a generalized mixer interface.

Cheers,
Owen

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Quoted 1 line

From Windows to Linux, servers to mobile, InstallShield X is the one

installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504

#1 lore raw
Quoted 6 lines · Owen Fraser-Green

Now, I know an envy24mixer exists to make life easier for me but surely it would be a bit nicer if the mixer interface provided a more consistent abstraction. In my situation, I want my software to be useful without a screen so the envy24mixer is out of the question. The only other solution, therefore, is for me to provide a map for every sound card which ALSA supports.

The problem with providing an 'abstraction' is that a model that works well for one class of application may be totally inappropriate for another. This was one of the fundamental weaknesses of the original OSS API -- for example, it worked well enough for many of the simple 'stereo' cases, but tended to fall apart for multitrack work. Different models of sound card are -- well -- different, and I think that all ALSA can reasonably be expected to do is expose the various features through the API so they can be utilized.

I quite sympathize with your desires here however, having struggled with the same issues in trying develop ALSA support for Rivendell
[http://www.salemradiolabs.com/rivendell/], which is heavily dependent upon mixer operations. I've finally come to the conclusion that the only sane way to provide this is to implement my own 'virtual' mixer, exporting the resulting output channels as JACK ports. That way, users can connect the ports to whatever sources or destinations (be they ALSA ports or whatever) according to their own needs and the capabilities of their sound hardware.

Cheers!

|-------------------------------------------------------------------------|
| Frederick F. Gleason, Jr. | Director of Broadcast Software Development  |
|                           |             Salem Radio Labs                |
|-------------------------------------------------------------------------|
|                     Innovation is hard to schedule.                     |
|                                       -- Dan Fylstra                    |
|-------------------------------------------------------------------------|

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Quoted 1 line

From Windows to Linux, servers to mobile, InstallShield X is the one

installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504

#2 lore raw
In reply to Owen Fraser-Green
Quoted 5 lines · Owen Fraser-Green

Hi,

After some tinkering around with ALSA's mixer with a couple of different cards it's become apparent to me that there's not too much standardization when it comes to track naming.

It's work in progress. We need to create an abstract layer on top of hardware.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.

Quoted 1 line

From Windows to Linux, servers to mobile, InstallShield X is the one

installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504