Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian H." <vand2@gmx.de>
To: Raymond Yau <superquad.vortex2@gmail.com>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Re: alsa-lib: snd_mixer_selem_is_active changes -	which event?
Date: Sun, 17 Apr 2011 14:06:17 +0200	[thread overview]
Message-ID: <4DAAD7B9.1010205@gmx.de> (raw)
In-Reply-To: <BANLkTimkDFUybYQK+AzDpq_n0LDH86oYGQ@mail.gmail.com>

>> I wonder which event mask notifies an application that
>> snd_mixer_selem_is_active() may have changed.
>>
>> SND_CTL_EVENT_MASK_VALUE
>> or
>> SND_CTL_EVENT_MASK_INFO
>>
>> or something else?
>>
>> I'd be glad for any insights?
>>
>>
> qasmixer display the following message when play audio through front device
> of emu10k1
> 
> alsa_callback_hctl_elem: Unknown mask ( 3 )
> [EE] snd_hctl_handle_events : Operation not permitted

This is actually a bug in qasmixer.
Up to now it could not handle multi event masks.

Mask 3 seems to be
SND_CTL_EVENT_MASK_VALUE & SND_CTL_EVENT_MASK_INFO ( 1 & 2 )
but qasmixer checks for
( mask == SND_CTL_EVENT_MASK_VALUE ) ||
( mask == SND_CTL_EVENT_MASK_INFO )
which fails as ( 3 == 1 ) || ( 3 == 2 ) == false;

That should be fixed now.
A new version should be around next week.
You could also try the development version in the sourceforge mercurial
repo.

> which event mask "SND_CTL_EVENT_MASK_VALUE" or "SND_CTL_EVENT_MASK_VALUE "
> should the mixer application handle first ?

IMO the order doesn't matter as long as both events are handled properly
and the displayed mixer state equals the system mixer state
afterwards.

> e.g. it is possible that the driver may change access of  the control
> 
>  & ~SNDRV_CTL_ELEM_ACCESS_READ

If that triggers a SND_CTL_EVENT_MASK_INFO event it shouldn't be a
problem in the coming version 0.11.0.

Sebastian H.

  reply	other threads:[~2011-04-17 12:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-15 19:07 alsa-lib: snd_mixer_selem_is_active changes - which event? Sebastian H.
2011-02-16  8:38 ` Clemens Ladisch
2011-02-16  8:38   ` Sebastian H.
2011-02-16 11:03   ` Raymond Yau
2011-02-18  1:54   ` Raymond Yau
2011-02-28 14:56     ` Clemens Ladisch
2011-03-11 13:10       ` Raymond Yau
2011-04-16  2:02 ` Raymond Yau
2011-04-17 12:06   ` Sebastian H. [this message]
2011-04-17 12:09     ` Sebastian H.

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=4DAAD7B9.1010205@gmx.de \
    --to=vand2@gmx.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=superquad.vortex2@gmail.com \
    /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