openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openvortex-dev] Re: Re: [ALSA - driver 0001138]: errors when instal


From: Raymond
Subject: Re: [Openvortex-dev] Re: Re: [ALSA - driver 0001138]: errors when installing au8820 modules
Date: Wed, 08 Jun 2005 19:40:38 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.3) Gecko/20041005


typedef struct {
        unsigned int *this00;   /*CAsp4HwIO */
        long this04;            /* How many filters for each side (default = 
10) */
        long this08;            /* inited to cero. Stereo flag? */
} eqhw_t;

static void vortex_EqHw_SetLevels(vortex_t * vortex, u16 peaks[])
{
        eqhw_t *eqhw = &(vortex->eq.this04);
        int i;

        /* set left peaks */
        for (i = 0; i < eqhw->this04; i++) {
                hwwrite(vortex->mmio, 0x2b024 + i * VORTEX_BAND_COEFF_SIZE, 
peaks[i]);
        }

        hwwrite(vortex->mmio, 0x2b3cc, peaks[eqhw->this04]);
        hwwrite(vortex->mmio, 0x2b3d8, peaks[eqhw->this04 + 1]);

        /* set right peaks */
        for (i = 0; i < eqhw->this04; i++) {
                hwwrite(vortex->mmio, 0x2b204 + i * VORTEX_BAND_COEFF_SIZE,
                        peaks[i + (eqhw->this04 + 2)]);
        }

        hwwrite(vortex->mmio, 0x2b3e4, peaks[2 + (eqhw->this04 * 2)]);
        hwwrite(vortex->mmio, 0x2b3f0, peaks[3 + (eqhw->this04 * 2)]);
}


        vortex_EqHw_SetLevels(vortex, (u16 *) eq_levels);




What is the reason to increase the size of the array eq_levels from 32 to 64 ? ( eqhw->this04 seem to be 10 )


Takashi Iwai wrote:



Index: alsa-kernel/pci/au88x0/au88x0_eqdata.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/au88x0/au88x0_eqdata.c,v
retrieving revision 1.1
diff -u -r1.1 au88x0_eqdata.c
--- alsa-kernel/pci/au88x0/au88x0_eqdata.c      9 Mar 2004 11:52:13 -0000       
1.1
+++ alsa-kernel/pci/au88x0/au88x0_eqdata.c      7 Jun 2005 17:56:37 -0000
@@ -104,7 +104,11 @@
};

/*_rodataba0:*/
-static long eq_levels[32] = {
+static u16 eq_levels[64] = {
+       0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+       0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+       0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+       0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
        0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
        0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
        0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,


You don't need to define values if the static array is initialize to
zero.  In this case,

        static u16 eq_levels[64];

would be better.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]