V4L/DVB (8951): xc5000: dont pass devptr in xc5000_attach()
[safe/jmp/linux-2.6] / drivers / media / video / au0828 / au0828-dvb.c
index c6d4705..9624695 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  Driver for the Auvitek USB bridge
  *
- *  Copyright (c) 2008 Steven Toth <stoth@hauppauge.com>
+ *  Copyright (c) 2008 Steven Toth <stoth@linuxtv.org>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -28,6 +28,8 @@
 #include "au0828.h"
 #include "au8522.h"
 #include "xc5000.h"
+#include "mxl5007t.h"
+#include "tda18271.h"
 
 DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 
@@ -37,6 +39,15 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
 static struct au8522_config hauppauge_hvr950q_config = {
        .demod_address = 0x8e >> 1,
        .status_mode   = AU8522_DEMODLOCKING,
+       .qam_if        = AU8522_IF_6MHZ,
+       .vsb_if        = AU8522_IF_6MHZ,
+};
+
+static struct au8522_config hauppauge_woodbury_config = {
+       .demod_address = 0x8e >> 1,
+       .status_mode   = AU8522_DEMODLOCKING,
+       .qam_if        = AU8522_IF_4MHZ,
+       .vsb_if        = AU8522_IF_3_25MHZ,
 };
 
 static struct xc5000_config hauppauge_hvr950q_tunerconfig = {
@@ -45,6 +56,15 @@ static struct xc5000_config hauppauge_hvr950q_tunerconfig = {
        .tuner_callback   = au0828_tuner_callback
 };
 
+static struct mxl5007t_config mxl5007t_hvr950q_config = {
+       .xtal_freq_hz = MxL_XTAL_24_MHZ,
+       .if_freq_hz = MxL_IF_6_MHZ,
+};
+
+static struct tda18271_config hauppauge_woodbury_tunerconfig = {
+       .gate    = TDA18271_GATE_DIGITAL,
+};
+
 /*-------------------------------------------------------------------*/
 static void urb_completion(struct urb *purb)
 {
@@ -338,9 +358,26 @@ int au0828_dvb_register(struct au0828_dev *dev)
                                &hauppauge_hvr950q_config,
                                &dev->i2c_adap);
                if (dvb->frontend != NULL)
-                       dvb_attach(xc5000_attach, dvb->frontend,
-                               &dev->i2c_adap,
-                               &hauppauge_hvr950q_tunerconfig, dev);
+                       dvb_attach(xc5000_attach, dvb->frontend, &dev->i2c_adap,
+                                  &hauppauge_hvr950q_tunerconfig);
+               break;
+       case AU0828_BOARD_HAUPPAUGE_HVR950Q_MXL:
+               dvb->frontend = dvb_attach(au8522_attach,
+                               &hauppauge_hvr950q_config,
+                               &dev->i2c_adap);
+               if (dvb->frontend != NULL)
+                       dvb_attach(mxl5007t_attach, dvb->frontend,
+                                  &dev->i2c_adap, 0x60,
+                                  &mxl5007t_hvr950q_config);
+               break;
+       case AU0828_BOARD_HAUPPAUGE_WOODBURY:
+               dvb->frontend = dvb_attach(au8522_attach,
+                               &hauppauge_woodbury_config,
+                               &dev->i2c_adap);
+               if (dvb->frontend != NULL)
+                       dvb_attach(tda18271_attach, dvb->frontend,
+                                  0x60, &dev->i2c_adap,
+                                  &hauppauge_woodbury_tunerconfig);
                break;
        default:
                printk(KERN_WARNING "The frontend of your DVB/ATSC card "