All of lore.kernel.org
 help / color / mirror / Atom feed
* Volume Peak display
@ 2003-09-20  5:11 Manuel Jander
  2003-09-23 14:27 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Manuel Jander @ 2003-09-20  5:11 UTC (permalink / raw)
  To: Alsa Devel list

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-06-22 14:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-20  5:11 Volume Peak display Manuel Jander
2003-09-23 14:27 ` 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

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.