alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Eliot Blennerhassett <linux@audioscience.com>,
	alsa-devel@alsa-project.org
Subject: Re: Support for floating point controls?
Date: Mon, 01 Feb 2010 17:57:06 +0100	[thread overview]
Message-ID: <s5hljfcc2sd.wl%tiwai@suse.de> (raw)
In-Reply-To: <alpine.LNX.2.00.1002011740040.25340@eeebox2.perex-int.cz>

At Mon, 1 Feb 2010 17:43:22 +0100 (CET),
Jaroslav Kysela wrote:
> 
> On Thu, 28 Jan 2010, Eliot Blennerhassett wrote:
> 
> > Greetings,
> >
> > some of our products now have control paramters that are 32 bit floating
> > point values.
> >
> > I wonder if a patch implementing float ctl elements would be accepted?
> >
> > Note that the floats are not manipulated in the kernel at all, the
> > values are just passed through from the hardware to userspace (?)
> 
> If hardware supports this format, I have no objections against this 
> extension.
> 
> > Adding something like:
> >
> > #define	SNDRV_CTL_ELEM_TYPE_FLOAT	((__force snd_ctl_elem_type_t) 7)
> >
> > struct snd_ctl_elem_info {
> > ...
> >  union {
> > 	struct {
> > 		float min;		/* R: minimum value */
> > 		float max;		/* R: maximum value */
> > 		float step;		/* R: step (0 variable) */
> > 	} float;
> > ...
> > }
> >
> > struct snd_ctl_elem_value {
> >  union {
> > 	union {
> > 		float value[128];
> > 	} float;

I think this isn't allowed in C.  The field name should be _float or
so...

> 
> Looks good. Also, don't forget to add the support for this type to 
> alsa-lib.

And don't forget to add a protocol-version check there, too.


thanks,

Takashi

  reply	other threads:[~2010-02-01 16:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-27 23:12 Support for floating point controls? Eliot Blennerhassett
2010-02-01 16:43 ` Jaroslav Kysela
2010-02-01 16:57   ` Takashi Iwai [this message]
2010-02-01 18:13 ` James Courtier-Dutton
2010-02-01 19:42   ` Eliot Blennerhassett
2010-02-02 10:08 ` Daniel Glöckner
2010-02-02 10:44   ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2010-02-01 16:13 Tobias Schneider

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=s5hljfcc2sd.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux@audioscience.com \
    --cc=perex@perex.cz \
    /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;
as well as URLs for NNTP newsgroup(s).