[alsa-devel] Removal of indirect access in control API

Takashi Iwai tiwai at suse.de
Thu Nov 15 14:44:29 CET 2007

At Thu, 15 Nov 2007 18:29:06 +0100 (CET),
Jaroslav Kysela wrote:
> On Thu, 15 Nov 2007, Takashi Iwai wrote:
> > Hi,
> > 
> > ALSA control elements have "indirect" flag, which is supposed to allow
> > the indirect access via pointer.  But, as far as I know, this feature
> > has never been used nor implemented, and unsupported via 32/64bit
> > compat layer.
> > 
> > So, I'd like to get rid of this now.  The clean-up patch is below.
> > 
> > If you have objections, please let me know.
> I have objection. This layer was designed to support large mixer matrixes 
> like in the HDSPM driver (and if I remember correctly - implementation was 
> started after discussion with authors of RME drviers). HDSPM driver uses 
> hwdep interface now (probably because it was ported from the OSS code).
> I think that it would be worth to use standard ALSA control interface to 
> track changes thus to finish indirect interface.

Well, I don't think the current design would work ever.
If the mixer matrix is too large for linear control elements, then
it's simply too much for the control API.

The control API doesn't have to be perfect to handle everything.
Let's keep as simple as possible peacefully.

And, above all, passing through the pointer for ioctls is a bad idea
in general.  You'll understand if you see how ALSA qemu support got
messy due to that.

> Which problems are with the 32/64 bit conversion layer? I suppose that it 
> is possible to write an ioctl converters.

Oh, it's possible but not preferable (I'll never do).  The ioctl32
wrapper for control API is already a huge mess, next to PCM API.
Addition of indirect access would add incredible complexity just for
this minor (and even not-yet-implemented) reason.


More information about the Alsa-devel mailing list