From: Takashi Iwai <tiwai@suse.de>
To: Christian Esken <c.esken@cityweb.de>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: alsa-lib mixer-interface: snd_mixer_selem_get_capture_switch()
Date: Mon, 24 Nov 2003 16:06:27 +0100 [thread overview]
Message-ID: <s5hekvx3ix8.wl@alsa2.suse.de> (raw)
In-Reply-To: <200311232023.11189.c.esken@cityweb.de>
At Sun, 23 Nov 2003 20:23:11 +0100,
Christian Esken wrote:
>
> Hello,
>
> I have problems with snd_mixer_selem_get_capture_switch(elem,pos,&value)
> in my KMix mixer application. The "value" returned does *not* reflect the
> actual state in all cases.
> Probably I am doing something wrong, if somebody could throw me a hint I would
> be more than happy. I have investigated for days and feel completely lost.
>
> It is a bit complicated, so I'll do a step-by-step walkthrough of an example:
>
> 1) Initially switch "1" is ON and switch "2" is OFF
> 2) I enable switch "2".
> 3) The ALSA driver detects that switches "1" and "2" cannot be ON at
> the same time. So the ALSA driver disables "1".
> 4a) KMix now shows switches "1" and "2" both as ON, because
> snd_mixer_selem_get_capture_switch() reports them as ON.
> 4b) alsamixer shows switch "1" is OFF and switch "2" is ON.
>
> So I wonder why snd_mixer_selem_get_capture_switch() works in alsamixer and
> not in KMix.
> The only differenece I see is that alsamixer has these poll-descriptor stuff
> in it. Do I possibly need to implement it (I don't understand what I would
> have to do there - it looks complicated)?
yes, otherwise the update won't occur.
in the case of qt, you can do polling via connecting QSocketNotifier.
> Or is there some other means to
> "update" the state of the mixer elements?
it's not so easy, since you'll need to receive the information which
element should be updated at each time when a change occurs.
otherwise you'll have to update all elements at once.
Takashi
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
prev parent reply other threads:[~2003-11-24 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-23 19:23 alsa-lib mixer-interface: snd_mixer_selem_get_capture_switch() Christian Esken
2003-11-24 15:06 ` 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=s5hekvx3ix8.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=c.esken@cityweb.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.