Merge branch 'master' into upstream
[pandora-kernel.git] / drivers / media / video / tuner-core.c
index f7eb402..7be73e3 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/delay.h>
@@ -196,14 +195,6 @@ static void set_type(struct i2c_client *c, unsigned int type,
                i2c_master_send(c, buffer, 4);
                default_tuner_init(c);
                break;
-       case TUNER_LG_TDVS_H06XF:
-               /* Set the Auxiliary Byte. */
-               buffer[2] &= ~0x20;
-               buffer[2] |= 0x18;
-               buffer[3] = 0x20;
-               i2c_master_send(c, buffer, 4);
-               default_tuner_init(c);
-               break;
        case TUNER_PHILIPS_TD1316:
                buffer[0] = 0x0b;
                buffer[1] = 0xdc;
@@ -275,6 +266,10 @@ static int tuner_fixup_std(struct tuner *t)
 {
        if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {
                switch (pal[0]) {
+               case '6':
+                       tuner_dbg ("insmod fixup: PAL => PAL-60\n");
+                       t->std = V4L2_STD_PAL_60;
+                       break;
                case 'b':
                case 'B':
                case 'g':
@@ -451,6 +446,10 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
                        printk("%02x ",buffer[i]);
                printk("\n");
        }
+       /* HACK: This test were added to avoid tuner to probe tda9840 and tea6415c on the MXB card */
+       if (adap->id == I2C_HW_SAA7146 && addr < 0x4a)
+               return -ENODEV;
+
        /* autodetection code based on the i2c addr */
        if (!no_autodetect) {
                switch (addr) {
@@ -598,6 +597,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                if (t->standby)
                        t->standby (client);
                break;
+#ifdef CONFIG_VIDEO_V4L1
        case VIDIOCSAUDIO:
                if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
                        return 0;
@@ -607,17 +607,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                /* Should be implemented, since bttv calls it */
                tuner_dbg("VIDIOCSAUDIO not implemented.\n");
                break;
-       case TDA9887_SET_CONFIG:
-               if (t->type == TUNER_TDA9887) {
-                       int *i = arg;
-
-                       t->tda9887_config = *i;
-                       set_freq(client, t->tv_freq);
-               }
-               break;
-       /* --- v4l ioctls --- */
-       /* take care: bttv does userspace copying, we'll get a
-          kernel pointer here... */
        case VIDIOCSCHAN:
                {
                        static const v4l2_std_id map[] = {
@@ -701,7 +690,18 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                                    ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
                        return 0;
                }
+#endif
+       case TDA9887_SET_CONFIG:
+               if (t->type == TUNER_TDA9887) {
+                       int *i = arg;
 
+                       t->tda9887_config = *i;
+                       set_freq(client, t->tv_freq);
+               }
+               break;
+       /* --- v4l ioctls --- */
+       /* take care: bttv does userspace copying, we'll get a
+          kernel pointer here... */
        case VIDIOC_S_STD:
                {
                        v4l2_std_id *id = arg;