From: Lennart Poettering <mznyfn@0pointer.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>,
ALSA development <alsa-devel@alsa-project.org>
Subject: Re: Softvol controls
Date: Sat, 22 Dec 2007 23:54:53 +0100 [thread overview]
Message-ID: <20071222225453.GD13486@tango.0pointer.de> (raw)
In-Reply-To: <Pine.LNX.4.61.0712041627310.7670@tm8103.perex-int.cz>
On Tue, 04.12.07 16:42, Jaroslav Kysela (perex@perex.cz) wrote:
> > No, there is no API to get the id mapping.
> > And I guess we can't do it because there is no 1:1 mapping between
> > ctl_elem and mixer_selem. It's N:1.
>
> I don't think that application should know about this mapping.
>
> I think that we have to provide API giving a mixer control element for
> opened PCM handle, otherwise applications might use hacks like
> suggested snd_ctl_elem_info_is_user() checks.
Wouldn't it be possible to just provide a snd_mixer_elem_is_user()
function? Would be fine to solve my task, too...
> > > I figure there is no useful documentation or even example how this is
> > > supposed to work? Hmm, is there any real documentation available which
> > > describes the relation of ctl, hctl, mixer and smixer at all? For the
> > > uninitated the whols structure looks overly complex and redundant.
> >
> > Yes, it's overly complex. The mixer abstracion is what I'd really
> > love to clean up, maybe better to write from scratch.
>
> I think that we might remove only 'mixer' and simplify initalization from
> the user side, but each time I tried to think about an optimal mixer
> interface, I ended with the current 'simple mixer API'.
Quite frankly, the whole structure of ctl, hctl, mixer and smixer is
one of the weakest points in the ALSA API. While it might make sense
to have these internally, I belive that exposing them all in the API was a
bad idea. (But actually, I only understand ALSA in parts, so maybe I
just am blind)
> > I guess PA could use ctl API better than mixer API because it requires
> > only certain elements like Master or PCM. You can simply take
> > "Master Playback Control" with MIXER iface for master volume and
> > "Master Playback Switch" for master mute switch. Of course, you'll
> > take care of number of channels or value range, but it's also same for
> > mixer API, too.
>
> I don't agree here. The simple mixer layer should be used, because it
> covers at least some abstraction. In my recent changes, we have
> possibility to use python for fast prototyping of simple mixer backends
> (see alsa-lib/modules/mixer/simple/python directory how fast with minimal
> code can be backend implemented). Unfortunately, main problem will be
> probably the work to cover all cards.
So, what does this mean for me? As long as I have some way to detect
whether a mixer element is software-only I am happy.
Should I now be following yours, or Takashi's advice? Should I wait
for a new interface to be added to the ALSA API?
Thanks,
Lennart
--
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
next prev parent reply other threads:[~2007-12-22 22:54 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 0:51 [lennart@poettering.net: Status of ALSA "simple" mixer interface] Lennart Poettering
2007-11-21 11:09 ` Takashi Iwai
2007-11-21 11:11 ` Takashi Iwai
2007-11-21 15:23 ` Clemens Ladisch
2007-11-25 19:56 ` The sense or non-sense of the device listing API (was: Status of ALSA "simple" mixer interface]) Lennart Poettering
2007-11-25 20:38 ` Jaroslav Kysela
2007-11-21 11:14 ` Mono device definition Takashi Iwai
2007-11-21 11:20 ` Analog-SPDIF dup Takashi Iwai
2007-11-21 11:22 ` Softvol controls Takashi Iwai
2007-11-29 23:28 ` Lennart Poettering
2007-11-29 23:46 ` John Utz
2007-11-30 0:08 ` Lennart Poettering
2007-11-30 0:34 ` John Utz
2007-11-30 8:59 ` Takashi Iwai
2007-12-04 15:42 ` Jaroslav Kysela
2007-12-13 10:39 ` Takashi Iwai
2007-12-22 22:54 ` Lennart Poettering [this message]
2007-12-23 10:21 ` Jaroslav Kysela
2007-12-22 22:48 ` Lennart Poettering
2007-11-21 11:40 ` Disable conversions Takashi Iwai
2007-11-21 14:29 ` Takashi Iwai
2007-11-21 15:16 ` Jaroslav Kysela
2007-11-21 14:51 ` Takashi Iwai
2007-11-25 20:41 ` Lennart Poettering
2007-11-26 15:55 ` Jaroslav Kysela
2007-12-22 22:37 ` Lennart Poettering
2007-11-21 11:42 ` Channel mapping Takashi Iwai
2007-11-21 15:17 ` Clemens Ladisch
2007-11-21 14:57 ` Takashi Iwai
2007-11-21 15:27 ` Jaroslav Kysela
2007-11-21 15:04 ` Takashi Iwai
2007-11-27 16:54 ` Takashi Iwai
2007-11-21 15:52 ` Clemens Ladisch
2007-11-21 15:36 ` Takashi Iwai
2007-11-21 18:37 ` Jaroslav Kysela
2007-11-22 9:17 ` Clemens Ladisch
2007-11-22 8:55 ` Clemens Ladisch
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=20071222225453.GD13486@tango.0pointer.de \
--to=mznyfn@0pointer.de \
--cc=alsa-devel@alsa-project.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.