Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Thomas Charbonnel <thomas@undata.org>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [RFC] hdsp plans and alsa integration
Date: Tue, 17 Feb 2004 16:48:45 +0100	[thread overview]
Message-ID: <s5hznbhwvtu.wl@alsa2.suse.de> (raw)
In-Reply-To: <402775CC.9070902@undata.org>

Hi Thomas,

again sorry for the late comments...

At Mon, 09 Feb 2004 12:58:04 +0100,
Thomas Charbonnel wrote:
> 
> Hi,
> 
> I've been thinking for some time now about allowing several applications 
> to access the hsdp matrix mixer in a cooperative way. Basically I want 
> several applications to share the current state of the matrix mixer and 
> be aware of the changes being made to it.
> The problem at the moment is that hdspmixer does not directly reflects 
> the hardware because it adds a software attenuation stage on the 
> physical outputs (the third row of faders). Any change on this row is 
> interpreted tracking back all the signals routed to the specified 
> output, applying the proper attenuation and converting this to standard 
> mixer calls. This renders the alsa ctl callback mechanism useless, 
> because if another application accesses the mixer ctl, hdspmixer will 
> have no way to interpret it properly.

well, we have now the matrix-style representation of mixer elements in
the alsa-driver, too.  can hdsp driver follow this way?
if it works, the problem of sharing the same data over control API
could be solved.

> I first thought of implementing the output attenuation stage directly in 
> the driver but I now believe it would be a very bad idea to do this in 
> kernel space (heavy computation, particularly with the new hdsp madi 
> cards).

ok, this is a different problem.  too much computation shouldn't be in
the kernel space.
instead, the 1:1 conversion of a value can be done in the application
itself, or do it in alsa-lib.

>  So I came up with the idea of writing a userspace daemon that 
> will access the card's mixer and be the keeper of this extended mixer 
> representation. I would also write a library to handle communication 
> with the daemon, and provide a callback mechanism to warn all the 
> clients of changes made to the extended mixer. The daemon could be 
> controled also from the network, which would make the whole system very 
> flexible. You could have hdspmixer running on a machine without any hdsp 
> hardware, controling the mixer of different hdsp cards on different 
> other machines on the network. You could easily control the mixer from a 
> pd patch, or a ladspa plugin, or ardour through an enhanced set of jack 
> monitoring calls. A nice point would also be to have the daemon provide 
> an optional ramping mechanism on mixer changes to avoid zipper noises 
> and make it usable in live mixing situations.

the idea using daemon looks fine for me, although i think it's
possible to implement without daemon.  but if the daemon makes your
life easier, i don't object.

> Now my question is does that fit within the scope of alsa ? Mabe the lib 
> could be integrated to alsa-lib and the daemon to alsa-tools ?

hmm, it's a good question.
if the API follows the standard ALSA API style, i.e. the daemon API
wraps the control/mixer API, we can implement it as a part of
alsa-lib.  if it becomes different, no big reason to include it in
alsa-lib, IMO.

putting the stuff into alsa-tools is no problem at all, though.
it's regarded as the place to contain card-specific applications.


Takashi


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

      reply	other threads:[~2004-02-17 15:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-09 11:58 [RFC] hdsp plans and alsa integration Thomas Charbonnel
2004-02-17 15:48 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hznbhwvtu.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=thomas@undata.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox