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
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to