From: "Max Klein" <mein_name@ist-einmalig.de>
To: alsa-devel@alsa-project.org
Subject: ALSA Control Interface - default values?
Date: Mon, 10 May 2010 15:35:16 +0200 [thread overview]
Message-ID: <20100510133516.41930@gmx.net> (raw)
Hello,
when writing an alsa driver, in the info callback of the control I can specify which range of values this control does accept (uinfo->value.integer.min and .max). If I put 1 as minimum and 10 as maximum for example, I would expect that the default value of this control is something in between the range, e.g. 1, after the driver is loaded.
But I figured out, that ALSA initializes the control with a value of 0, which is not in between the range.
Can someone please tell me why ALSA initializes the Control with a value of zero, even if the minimum in the info callback is 1 ?
Is there any way to initialize the control with some "default" values, aside of snd_ctl_add()?
Best regards and thanks for your help!
Max
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
next reply other threads:[~2010-05-10 13:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-10 13:35 Max Klein [this message]
2010-05-10 13:54 ` ALSA Control Interface - default values? Mark Brown
[not found] ` <20100510142507.41960@gmx.net>
2010-05-10 15:31 ` Mark Brown
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=20100510133516.41930@gmx.net \
--to=mein_name@ist-einmalig.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 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).