Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manuel Jander <manuel.jander@mat.utfsm.cl>
To: alsa-devel@lists.sourceforge.net
Subject: Re: Query devices in a non-blocking fashion / 3D capabilties.
Date: Sun, 14 Dec 2003 15:06:36 -0400	[thread overview]
Message-ID: <1071428796.17638.21.camel@localhost> (raw)
In-Reply-To: <oprz6jjyl7q1sf88@mail.broadpark.no>

Hi,

While writing a advanced capabilities (positional audio) interface for
ALSA, i encountered this same problem.

So far i have "architected" the thing like this:

- The ALSA driver loads as usual.
- When OpenAL or whatever fires up, it queries the device for
capabilties, using a well defined control for that purpose.
- Depending on what capabilties are reported as supported, the library
uses a series of kcontrols to modify hardware settings for advanced
capabilties (HRTF, ITD, filters, etc).

If this can't be performed in a asyncronous (non-blocking) i wouldn't be
able to use controls.

I looked into "alsa-kernel/core/control.c" and after finding out that
every control interaction does a control lookup (iterated through all
controls), i don't feel very confortable about using kcontrols to update
hardware parameters in at tens of milisecond intervals.

Then i discovered the ALSA /proc interface, but the docs read "use for
debugging". They have a lot less overhead. Would it be OK to use them
for hardware parameter update ? And if so, why don't you use this
interface for queries ? They seem to give much more freedom about
locking and other issues.

I really need feedback :)

Best Regards

        
On Sun, 2003-12-14 at 12:46, Arve Knudsen wrote:
> On Mon, 15 Dec 2003 01:17:26 +0900, Patrick Shirkey 
> <pshirkey@boosthardware.com> wrote:
> 
> > If we have a DB of info how would we define the abilities of each device?
> >
> > I assume this info is available in the driver layer because there is a 
> > point where ALSA will return false eg. if a card is not able to run at 
> > 48000Hz
> >
> > My opinion is that a simple function could be included in alsactl which 
> > scans for available devices, makes a list of their abilities. Everyone 
> > uses "post-insert alsactl restore" in the modules.conf file so it would 
> > be essentially a non issue from a user perspective.
> >
> > Couldn't this be saved in the config settings for alsactl?
> This whole database thing seems like overkill to me, to be honest. This is
> dynamic information would best be obtained from cards during operation,
> the only problem is that you have to lock the device. A better design would
> be to, if possible, allow the configuration space to be read even when a
> device is streaming.
> 
> I dont know the dirty details of writing drivers, but would this be a
> problem? Perhaps we could differ between read-locked and write-locked
> configuration, so there would be inclusive read access to the device, and
> totally exclusive access if it is to be modified.
> 
> Hope some of this makes sense
> 
> Arve Knudsen
> 
> 
> 
> 
> -------------------------------------------------------
> 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/
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 



-------------------------------------------------------
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/

  reply	other threads:[~2003-12-14 19:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-07 17:07 Query devices in a non-blocking fashion Arve Knudsen
2003-12-07 18:40 ` Jaroslav Kysela
2003-12-07 18:56   ` Arve Knudsen
2003-12-07 19:19     ` Paul Davis
2003-12-07 19:31       ` Arve Knudsen
2003-12-07 19:38         ` Jaroslav Kysela
2003-12-07 19:51           ` Arve Knudsen
2003-12-07 20:00             ` Jaroslav Kysela
2003-12-07 20:13               ` Arve Knudsen
2003-12-07 20:44                 ` Jaroslav Kysela
2003-12-07 21:11                   ` Arve Knudsen
2003-12-08 10:49                 ` Frank Barknecht
2003-12-08 11:08                   ` Arve Knudsen
2003-12-08 11:39                     ` Frank Barknecht
2003-12-08 11:52                       ` [Alsa-devel][OT]Was: " Arve Knudsen
2003-12-07 19:56           ` Paul Davis
2003-12-07 20:05             ` Jaroslav Kysela
2003-12-08 15:19       ` Giuliano Pochini
2003-12-08 15:54         ` Arve Knudsen
2003-12-08 16:57           ` Jaroslav Kysela
2003-12-08 17:43             ` Arve Knudsen
2003-12-14 16:17               ` Patrick Shirkey
2003-12-14 16:38                 ` Paul Davis
2003-12-14 16:46                 ` Arve Knudsen
2003-12-14 19:06                   ` Manuel Jander [this message]
2003-12-15  9:02                     ` Query devices in a non-blocking fashion / 3D capabilties Jaroslav Kysela
2003-12-15  8:59                   ` Query devices in a non-blocking fashion Jaroslav Kysela
2003-12-15  9:39                     ` Arve Knudsen
2003-12-10 11:26           ` Giuliano Pochini
2003-12-08 17:04         ` Paul Davis

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=1071428796.17638.21.camel@localhost \
    --to=manuel.jander@mat.utfsm.cl \
    --cc=alsa-devel@lists.sourceforge.net \
    /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