]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - sound/i2c/tea6330t.c
[ALSA] emux - Avoid cast of function pointers
[linux-2.6.git] / sound / i2c / tea6330t.c
index fd65da654267bda2e31ea60e6cd86dcd15b5a366..7bd4948c2a3b6c16201fb97ed8b0acd92153b400 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/init.h>
 #include <linux/slab.h>
 #include <sound/core.h>
+#include <sound/control.h>
 #include <sound/tea6330t.h>
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
@@ -43,6 +44,17 @@ MODULE_LICENSE("GPL");
 #define   TEA6330T_GMU                 0x80    /* mute control, general mute */
 #define   TEA6330T_EQN                 0x40    /* equalizer switchover (0=equalizer-on) */
 
+typedef struct {
+       snd_i2c_device_t *device;
+       snd_i2c_bus_t *bus;
+       int equalizer;
+       int fader;
+       unsigned char regs[8];
+       unsigned char mleft, mright;
+       unsigned char bass, treble;
+       unsigned char max_bass, max_treble;
+} tea6330t_t;
+
 int snd_tea6330t_detect(snd_i2c_bus_t *bus, int equalizer)
 {
        int res;
@@ -58,7 +70,7 @@ static void snd_tea6330t_set(tea6330t_t *tea,
                             unsigned char addr, unsigned char value)
 {
 #if 0
-       printk("set - 0x%x/0x%x\n", addr, value);
+       printk(KERN_DEBUG "set - 0x%x/0x%x\n", addr, value);
 #endif
        snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
 }