From: Manuel Jander <manuel.jander@mat.utfsm.cl>
To: Alsa Devel list <alsa-devel@lists.sourceforge.net>
Subject: Volume Peak display
Date: Sat, 20 Sep 2003 01:11:12 -0400 [thread overview]
Message-ID: <1064034672.10497.7.camel@localhost> (raw)
Hello,
I'm implementing Hardware EQ peak visualization code in the Aureal
Vortex driver, and took as a reference the ICE1712 MultiTrack peak
kcontrol code.
The problems are:
- The peaks doesnt get updated by alsamixer nor alsamixergui.
I set the "volatile" flag, but is doesnt have any effect.
- Alsamixer shows only 4 of the peak control set (20 total), and other
mixers just show 2 of them.
- The controls are declared as read only, but i can change their value.
This shouldn't be allowed.
Any suggestions ?
Best Regards
Manuel Jander.
static int snd_vortex_peaks_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo) {
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 20;
uinfo->value.integer.min = 0x0000;
uinfo->value.integer.max = 0xffff;
return 0;
}
static int snd_vortex_peaks_get(snd_kcontrol_t *kcontrol,
snd_ctl_elem_value_t *ucontrol) {
vortex_t *vortex = snd_kcontrol_chip(kcontrol);
int i, count;
u16 peaks[20];
vortex_Eqlzr_GetAllPeaks(vortex, peaks, &count);
printk("vortex: Peak = %x\n", peaks[5]);
for (i=0; i<20; i++)
ucontrol->value.integer.value[i] = peaks[i];
return 0;
}
static snd_kcontrol_new_t vortex_levels_kcontrol __devinitdata = {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "EQ Peaks",
.access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE,
.info = snd_vortex_peaks_info,
.get = snd_vortex_peaks_get,
};
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next reply other threads:[~2003-09-20 5:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-20 5:11 Manuel Jander [this message]
2003-09-23 14:27 ` Volume Peak display Takashi Iwai
[not found] ` <1064414023.1630.11.camel@localhost>
2003-09-24 16:34 ` Takashi Iwai
2005-06-21 9:08 ` Raymond
2005-06-21 10:32 ` Takashi Iwai
2005-06-22 14:21 ` Raymond
2005-06-22 14:37 ` Takashi Iwai
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=1064034672.10497.7.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