Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192660
b: refs/heads/master
c: 4386136
h: refs/heads/master
v: v3
  • Loading branch information
Michel Ludwig authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 4894aa3 commit 7548964
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a228618c1a2c15da35f8cc60286a25541fbc6348
refs/heads/master: 4386136d29327a6645f7dba963d609d2452db843
19 changes: 17 additions & 2 deletions trunk/drivers/staging/tm6000/tm6000-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#define TM5600_BOARD_10MOONS_UT330 4
#define TM6000_BOARD_ADSTECH_DUAL_TV 5
#define TM6000_BOARD_FREECOM_AND_SIMILAR 6
#define TM6000_BOARD_ADSTECH_MINI_DUAL_TV 7

#define TM6000_MAXBOARDS 16
static unsigned int card[] = {[0 ... (TM6000_MAXBOARDS - 1)] = UNSET };
Expand All @@ -55,7 +56,6 @@ struct tm6000_board {
int gpio_addr_tun_reset; /* GPIO used for tuner reset */
};


struct tm6000_board tm6000_boards[] = {
[TM6000_BOARD_UNKNOWN] = {
.name = "Unknown tm6000 video grabber",
Expand Down Expand Up @@ -118,9 +118,23 @@ struct tm6000_board tm6000_boards[] = {
},
[TM6000_BOARD_FREECOM_AND_SIMILAR] = {
.name = "Freecom Hybrid Stick / Moka DVB-T Receiver Dual",
.tuner_type = TUNER_XC2028,
.tuner_type = TUNER_XC2028, /* has a XC3028 */
.tuner_addr = 0xc2,
.demod_addr = 0x1e,
.caps = {
.has_tuner = 1,
.has_dvb = 1,
.has_zl10353 = 1,
.has_eeprom = 0,
.has_remote = 1,
},
.gpio_addr_tun_reset = TM6000_GPIO_4,
},
[TM6000_BOARD_ADSTECH_MINI_DUAL_TV] = {
.name = "ADSTECH Mini Dual TV USB",
.tuner_type = TUNER_XC2028, /* has a XC3028 */
.tuner_addr = 0xc8,
.demod_addr = 0x1e,
.caps = {
.has_tuner = 1,
.has_dvb = 1,
Expand All @@ -136,6 +150,7 @@ struct usb_device_id tm6000_id_table [] = {
{ USB_DEVICE(0x6000, 0x0001), .driver_info = TM5600_BOARD_10MOONS_UT821 },
{ USB_DEVICE(0x06e1, 0xf332), .driver_info = TM6000_BOARD_ADSTECH_DUAL_TV },
{ USB_DEVICE(0x14aa, 0x0620), .driver_info = TM6000_BOARD_FREECOM_AND_SIMILAR },
{ USB_DEVICE(0x06e1, 0xb339), .driver_info = TM6000_BOARD_ADSTECH_MINI_DUAL_TV },
{ },
};

Expand Down
7 changes: 6 additions & 1 deletion trunk/drivers/staging/tm6000/tm6000-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,17 @@ int tm6000_init_digital_mode (struct tm6000_core *dev)
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00d1, 0xd8);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00d2, 0xc0);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00d6, 0x60);

tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00e2, 0x0c);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00e8, 0xff);
tm6000_set_reg (dev, REQ_07_SET_GET_AVREG, 0x00eb, 0x08);
msleep(50);

tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00);
msleep(50);
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x01);
msleep(50);
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT, 0x0020, 0x00);

msleep(100);

return 0;
Expand Down
19 changes: 14 additions & 5 deletions trunk/drivers/staging/tm6000/tm6000-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ int tm6000_start_stream(struct tm6000_core *dev)

tm6000_init_digital_mode(dev);

// ret = usb_set_interface(dev->udev, 0, 1);
// if (ret<0)
// return ret;

/*
ret = tm6000_set_led_status(tm6000_dev, 0x1);
if(ret < 0) {
Expand Down Expand Up @@ -94,10 +90,17 @@ int tm6000_start_stream(struct tm6000_core *dev)
dvb->bulk_urb->transfer_buffer,
maxPaketSize,
tm6000_urb_received, dev);

ret = usb_set_interface(dev->udev, 0, 1);
if(ret < 0) {
printk(KERN_ERR "tm6000: error %i in %s during set interface\n", ret, __FUNCTION__);
return ret;
}

ret = usb_clear_halt(dev->udev, pipe);
if(ret < 0) {
printk(KERN_ERR "tm6000: error %i in %s during pipe reset\n",ret,__FUNCTION__);
// return ret;
return ret;
}
else {
printk(KERN_ERR "tm6000: pipe resetted\n");
Expand All @@ -121,10 +124,16 @@ int tm6000_start_stream(struct tm6000_core *dev)

void tm6000_stop_stream(struct tm6000_core *dev)
{
int ret;
struct tm6000_dvb *dvb = dev->dvb;

// tm6000_set_led_status(tm6000_dev, 0x0);

ret = usb_set_interface(dev->udev, 0, 0);
if(ret < 0) {
printk(KERN_ERR "tm6000: error %i in %s during set interface\n",ret,__FUNCTION__);
}

if(dvb->bulk_urb) {
usb_kill_urb(dvb->bulk_urb);
kfree(dvb->bulk_urb->transfer_buffer);
Expand Down
6 changes: 4 additions & 2 deletions trunk/drivers/staging/tm6000/tm6000-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,10 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg)
case 0:
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
dev->tuner_reset_gpio, 0x00);
msleep(10);
msleep(130);
tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
dev->tuner_reset_gpio, 0x01);
msleep(130);
break;
case 1:
tm6000_set_reg (dev, REQ_04_EN_DISABLE_MCU_INT,
Expand All @@ -314,9 +315,10 @@ static int tm6000_tuner_callback(void *ptr, int command, int arg)
TM6000_GPIO_CLK, 0);
if (rc<0)
return rc;
msleep(10);
msleep(100);
rc=tm6000_set_reg (dev, REQ_03_SET_GET_MCU_PIN,
TM6000_GPIO_CLK, 1);
msleep(100);
break;
}
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/tm6000/tm6000.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ struct tm6000_capabilities {
unsigned int has_dvb:1;
unsigned int has_zl10353:1;
unsigned int has_eeprom:1;
unsigned int has_remote:1;
};

struct tm6000_dvb {
Expand Down

0 comments on commit 7548964

Please sign in to comment.