At Sat, 29 Mar 2003 09:14:48 -0500,
Paul Davis wrote:
> 
> >Please give me some suggestions about how to build a control interface
> >for this thing. The card has Ni inputs and No ouputs. It can route any
> >input to any number of outputs and each connection have a different
> >gain. e.g:
> >
> >    ---50%----- Out0
> >   /
> >In0 ---30%----- Out3
> >   \         /
> >    \ -60%---
> >     X 
> >    / -100%---- Out4
> >   /          /
> >In5----10%----
> 
> the hammerfall HDSP series are the same.
> 
> there are 2 questions:
> 
>    1) what ALSA API to use, and how to use it?
>    2) what would a GUI look like?
> 
> for (2), i suggest you *carefully* study RME's totalmix application, a
> version of which will soon be available for linux.

is it the gui that Thomas has worked on?
it would be nice to have such a tool in the common alsa-tools tree.
please send a patch if it's finished.


> for (1), we use the control API but use it in a slightly unorthodox
> way. the control API normally is used to set control values in a
> simple 1:1 mapping between a control parameter and its new
> value. instead, we use 2 parameters (the source and the destination)
> and 1 value (the gain level). this does mean that alsactl can't handle
> it correctly, but so far no better suggestion has arisen. the hdsp
> series would have 1500+ control elements if we used the 1:1 method.

i think it's good time to discuss this theme again.

as we talked in the LAD meeting, there are some possibilities:

1. implement it on hwdep device
2. implement it as a new control element (e.g. CTL_ELEM_MATRIX)
3. introduce a flag to allow the indirect access with CTL_ELEM_INTEGER
4. use 1500+ mixer elements.


we all agreed that really allocating thousands of elements is not
clever.  so, the case 4 would introduce some "virtual" mapping in the
kernel side, but from the user-space, it looks like a normal control
API access.  however, this will need many changes in the alsa core
code.


OTOH, the case 1 would need no change for the alsa core itself, but
the driver needs to implement by itself.  and above all, there is no
notification mechanism.

the case 2 is, IMO, the most straightforward way.  the info field will
have number of rows and columns, in addition to min, max and step
values.  the change in the alsa core wouldn't be too much.

the case 3 would be similar with case 2, but use an additional bit
flag to indicate the matrix type.

in the cases 2 and 3, you'll need to change alsactl to save/restore
the whole matrix data.  in the case 4, it's not.  the case 1, alsactl
cannot do it, since it's on hwdep device.


Takashi


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to