From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: ALSA development <alsa-devel@alsa-project.org>
Subject: Re: [RFC] virtual master control for HD-audio
Date: Wed, 09 Jan 2008 18:06:56 +0100 [thread overview]
Message-ID: <s5hd4sb3p3j.wl%tiwai@suse.de> (raw)
In-Reply-To: <s5hd4syu6co.wl%tiwai@suse.de>
At Sat, 22 Dec 2007 15:55:19 +0100,
I wrote:
>
> At Fri, 21 Dec 2007 20:37:09 +0100 (CET),
> Jaroslav Kysela wrote:
> >
> > On Thu, 20 Dec 2007, Takashi Iwai wrote:
> >
> > > Hi,
> > >
> > > another thing I'd like to push into the next kernel is the virtual
> > > master volume control. As I posted in earlier posts, it adds virtual
> > > controls that have several slave controls with the same types,
> > > e.g. Front, Surround, Center, LFE, etc. Then these are adjusted
> > > simultaneously via the master control.
> > >
> > > It'd be appreciated if some one can test the patches with HD-audio h/w
> > > that has no master control yet (e.g. some STAC codecs).
> > >
> > > Note that this won't add the master volumes if there are no real
> > > volume controls. Some codecs have really no volume control, and this
> > > won't help for such devices.
> > >
> > > Two (and one for driver) patches will follow after this.
> >
> > NAK from my side. I am convinced that this code can be implemented in the
> > user space even without any daemon just in the mixer abstract layer using
> > standard control elements and using eventually new user controls to store
> > data for virtual mixer controls.
>
> A user-space implementation of virtual mixer elements would be far
> more complicated than the simplistic kernel-space patch. I've
> considered it many times, even tried to implement it, but got that
> conclusion. You'll see obviously the following difficulties:
>
> 1. Many user-space virtual elements
>
> Each slave control element needs a virtual element (eventually a
> user-space one) because we need to keep both raw and virtual values to
> handle saturation. That is, the same number of additional controls
> would be added. Significant for 7.1 outputs.
>
> 2. Easy incosistency between virtual and raw elements
>
> Even if the mixer abstraction hides the virtual elements, both
> virtual and raw elements are exposed on control API. This can cause
> the value-inconsistency between them quite easily, because many apps
> access directly via control API (even some mixer apps), and they
> likely change only raw values. The similar situation is for kernel
> OSS emulation.
>
> 3. Complicated configuration
>
> The requirement of virtual master controls is very much dependent on
> the hardware. In the case of HD-audio, it depends on codec chip
> types, and even on the preset model chosen via PCI SSID or a module
> option. Implementing such a complex conditional in alsa-lib
> configuration is a clear overhead.
>
> 4. More resource requirement
>
> Clearly a user-space solution requires more layers in alsa-lib, which
> is invoked by each process, and even more memory footprint than the
> kernel solution, not only the additional complexity.
>
>
> ... and think again what is the benifit of the user-space solution in
> this case, in comparison with the demerits above.
>
> If you could implement the same feature on user-space with less amount
> of codes, I'd happily take it. But, I'm sure it's very hard.
The master control is really important feature. Unless you have
really a better patch, I'd like to commit the vmaster patch soon, so
that more people can test.
thanks,
Takashi
next prev parent reply other threads:[~2008-01-09 17:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-20 15:38 [RFC] virtual master control for HD-audio Takashi Iwai
2007-12-20 15:45 ` [RFC] [Patch 1/2] Add virtual master control Takashi Iwai
2008-01-30 15:19 ` Daniel Jacobowitz
2008-01-30 15:27 ` Takashi Iwai
2008-03-21 19:08 ` Daniel Jacobowitz
2008-03-22 9:09 ` Takashi Iwai
2008-03-22 15:30 ` Daniel Jacobowitz
2008-03-22 16:31 ` Takashi Iwai
2008-03-22 19:15 ` Daniel Jacobowitz
2008-05-02 18:01 ` Daniel Jacobowitz
2008-05-06 15:17 ` Takashi Iwai
2008-05-06 15:45 ` Daniel Jacobowitz
2007-12-20 15:46 ` [RFC] [Patch 2/2] Add virtual master to HD-audio Takashi Iwai
2008-01-12 20:21 ` Daniel Jacobowitz
2008-01-13 11:04 ` Takashi Iwai
2007-12-20 15:48 ` [RFC] [Patch] Add vmaster to alsa-driver Takashi Iwai
2007-12-20 15:50 ` [RFC] virtual master control for HD-audio Takashi Iwai
2007-12-21 19:37 ` Jaroslav Kysela
2007-12-22 7:39 ` Alexander E. Patrakov
2007-12-23 3:15 ` Lee Revell
2007-12-22 14:55 ` Takashi Iwai
2008-01-09 17:06 ` Takashi Iwai [this message]
2008-01-10 10:29 ` Jaroslav Kysela
2008-01-10 11:49 ` Takashi Iwai
2008-01-10 14:09 ` Jaroslav Kysela
2008-01-10 15:00 ` Takashi Iwai
2008-01-10 15:43 ` Jaroslav Kysela
2008-01-10 15:47 ` Takashi Iwai
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=s5hd4sb3p3j.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
/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