#define TM5600_BOARD_GENERIC 1
#define TM6000_BOARD_GENERIC 2
#define TM5600_BOARD_10MOONS_UT821 3
-#define TM6000_BOARD_10MOONS_UT330 4
+#define TM5600_BOARD_10MOONS_UT330 4
#define TM6000_BOARD_ADSTECH_DUAL_TV 5
#define TM6000_BOARD_FREECOM_AND_SIMILAR 6
-
#define TM6000_MAXBOARDS 16
static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET };
int tuner_type; /* type of the tuner */
int tuner_addr; /* tuner address */
-
- int gpio_addr_tun_reset; /* GPIO used for reset tuner */
+ int demod_addr; /* demodulator address */
+ int gpio_addr_tun_reset; /* GPIO used for tuner reset */
};
},
.gpio_addr_tun_reset = TM6000_GPIO_1,
},
- [TM6000_BOARD_10MOONS_UT330] = {
+ [TM5600_BOARD_10MOONS_UT330] = {
.name = "10Moons UT 330",
- .tuner_type = TUNER_XC2028,
+ .tuner_type = TUNER_PHILIPS_FQ1216AME_MK4,
.tuner_addr = 0xc8,
.caps = {
.has_tuner = 1,
- .has_dvb = 1,
- .has_zl10353 = 1,
+ .has_dvb = 0,
+ .has_zl10353 = 0,
.has_eeprom = 1,
},
- .gpio_addr_tun_reset = TM6000_GPIO_4,
},
[TM6000_BOARD_ADSTECH_DUAL_TV] = {
.name = "ADSTECH Dual TV USB",
.name = "Freecom Hybrid Stick / Moka DVB-T Receiver Dual",
.tuner_type = TUNER_XC2028,
.tuner_addr = 0xc2,
+ .demod_addr = 0x1e,
.caps = {
.has_tuner = 1,
.has_dvb = 1,
.has_zl10353 = 1,
.has_eeprom = 0,
},
+ .gpio_addr_tun_reset = TM6000_GPIO_4,
},
-
};
/* table of devices that work with this driver */
/* Initializa board-specific data */
dev->tuner_type = tm6000_boards[dev->model].tuner_type;
dev->tuner_addr = tm6000_boards[dev->model].tuner_addr;
+ dev->tuner_reset_gpio = tm6000_boards[dev->model].gpio_addr_tun_reset;
+
+ dev->demod_addr = tm6000_boards[dev->model].demod_addr;
dev->caps = tm6000_boards[dev->model].caps;
#define BUFFER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */
+/* Limits minimum and default number of buffers */
+#define TM6000_MIN_BUF 4
+#define TM6000_DEF_BUF 8
+
/* Declare static vars that will be used as parameters */
static unsigned int vid_limit = 16; /* Video memory limit, in Mb */
static int video_nr = -1; /* /dev/videoN, -1 for autodetect */
/* ------------------------------------------------------------------
Videobuf operations
------------------------------------------------------------------*/
+
static int
buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
{
*size = fh->fmt->depth * fh->width * fh->height >> 3;
if (0 == *count)
- *count = 32;
+ *count = TM6000_DEF_BUF;
+
+ if (*count < TM6000_MIN_BUF) {
+ *count=TM6000_MIN_BUF;
+ }
+
+printk("Requesting %d buffers\n",*count);
+
while (*size * *count > vid_limit * 1024 * 1024)
(*count)--;
+
return 0;
}
struct tm6000_capabilities caps;
/* Tuner configuration */
- int tuner_type; /* type of the tuner */
- int tuner_addr; /* tuner address */
+ int tuner_type; /* type of the tuner */
+ int tuner_addr; /* tuner address */
+ int tuner_reset_gpio; /* GPIO used for tuner reset */
+
+ /* Demodulator configuration */
+ int demod_addr; /* demodulator address */
/* i2c i/o */
struct i2c_adapter i2c_adap;