All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sebastian H." <vand2@gmx.de>
To: alsa-devel@alsa-project.org
Subject: snd_mixer handle in two threads
Date: Wed, 09 Jun 2010 15:05:33 +0200	[thread overview]
Message-ID: <4C0F919D.1040603@gmx.de> (raw)

Hello again

This is still about the alsamixer-qt4 application I working on.

This time I wonder if a snd_mixer_t handle created with
snd_mixer_open ( ... ) can be used in two threads concurrently.

One thread should be the main Qt4 GUI thread and the second thread
should only poll ( ... ) blocking for ALSA events on the shared
snd_mixer_t handle in accompany with

  snd_mixer_poll_descriptors_count ( ... )
  snd_mixer_poll_descriptors ( ... )
  snd_mixer_poll_descriptors_revents ( ... )

The second thread then will post Qt4 signals to the main thread
on occassion.

Does this sound feasible?

This approach seems neccessary as I want to avoid timed polls and any
integration of linux poll() in the Qt4 mail loop seems to boil down to
timed polls.


Regards,
Sebastian H.

             reply	other threads:[~2010-06-09 13:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-09 13:05 Sebastian H. [this message]
2010-06-09 16:59 ` snd_mixer handle in two threads 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=4C0F919D.1040603@gmx.de \
    --to=vand2@gmx.de \
    --cc=alsa-devel@alsa-project.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 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.