diff options
author | Patrick Boettcher <devnull@localhost> | 2005-01-13 13:24:11 +0000 |
---|---|---|
committer | Patrick Boettcher <devnull@localhost> | 2005-01-13 13:24:11 +0000 |
commit | 7e949443baebedef67aaa31d742fa994e218a39b (patch) | |
tree | 46d594c6dcb3327a659aec8e75d68c0c192c803b /linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c | |
parent | abec1400ec7e1b351d714078a12d365f2929f7ab (diff) | |
download | mediapointer-dvb-s2-7e949443baebedef67aaa31d742fa994e218a39b.tar.gz mediapointer-dvb-s2-7e949443baebedef67aaa31d742fa994e218a39b.tar.bz2 |
- moved the mirrored pid_filter_table back to dvb-dibusb
- first almost working version for HanfTek UMT-010
- found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek
- minor cleanups
Diffstat (limited to 'linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c')
-rw-r--r-- | linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c | 69 |
1 files changed, 54 insertions, 15 deletions
diff --git a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c index 36aa76da1..031f4bd93 100644 --- a/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c +++ b/linux/drivers/media/dvb/dibusb/dvb-dibusb-usb.c @@ -80,15 +80,6 @@ int dibusb_interrupt_read_loop(struct usb_dibusb *dib) return dibusb_write_usb(dib,b,1); } -/* - * ioctl for power control - */ -int dibusb_hw_sleep(struct usb_dibusb *dib) -{ - u8 b[1] = { DIBUSB_IOCTL_POWER_SLEEP }; - return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); -} - #endif static int dibusb_write_usb(struct usb_dibusb *dib, u8 *buf, u16 len) { @@ -112,10 +103,33 @@ static int dibusb_ioctl_cmd(struct usb_dibusb *dib, u8 cmd, u8 *param, int plen) return dibusb_write_usb(dib,b,34); //2+size); } -int dibusb_hw_wakeup(struct usb_dibusb *dib) +/* + * ioctl for power control + */ +int dibusb_hw_wakeup(struct dvb_frontend *fe) { + struct usb_dibusb *dib = (struct usb_dibusb *) fe->dvb->priv; u8 b[1] = { DIBUSB_IOCTL_POWER_WAKEUP }; - return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); + deb_info("dibusb-device is getting up.\n"); + dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); + + if (dib->fe_init) + return dib->fe_init(fe); + + return 0; +} + +int dibusb_hw_sleep(struct dvb_frontend *fe) +{ + struct usb_dibusb *dib = (struct usb_dibusb *) fe->dvb->priv; + u8 b[1] = { DIBUSB_IOCTL_POWER_SLEEP }; + deb_info("dibusb-device is going to bed.\n"); + dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_POWER_MODE, b,1); + + if (dib->fe_sleep) + return dib->fe_sleep(fe); + + return 0; } int dibusb_set_streaming_mode(struct usb_dibusb *dib,u8 mode) @@ -126,10 +140,20 @@ int dibusb_set_streaming_mode(struct usb_dibusb *dib,u8 mode) int dibusb_streaming(struct usb_dibusb *dib,int onoff) { - if (onoff) - return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_ENABLE_STREAM,NULL,0); - else - return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_DISABLE_STREAM,NULL,0); + switch (dib->dibdev->dev_cl->id) { + case DIBUSB2_0: + if (onoff) + return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_ENABLE_STREAM,NULL,0); + else + return dibusb_ioctl_cmd(dib,DIBUSB_IOCTL_CMD_DISABLE_STREAM,NULL,0); + break; + case UMT2_0: + return dibusb_set_streaming_mode(dib,onoff); + break; + default: + break; + } + return 0; } int dibusb_urb_init(struct usb_dibusb *dib) @@ -185,6 +209,21 @@ int dibusb_urb_init(struct usb_dibusb *dib) } dib->init_state |= DIBUSB_STATE_URB_SUBMIT; } + + + dib->pid_parse = 1; + switch (dib->dibdev->dev_cl->id) { + case DIBUSB2_0: + if (dib->udev->speed == USB_SPEED_HIGH && !pid_parse) { + dib->pid_parse = 0; + info("running at HIGH speed, will deliver the complete TS."); + } else + info("will use pid_parsing."); + break; + default: + break; + } + return 0; } |