DVB update
Subsystems (2)
cover DVB update
Hi Andrew,
Here are a few more DVB bug fixes, plus a new frontend driver. Apparently the video4linux folks have patches queued which depend on this so they bugged me to push this out.
Thanks,
Johannes
PATCH 1/8 usb: A800 rc and timeout fixes
From: Andrew Hodgson <[email protected]>
o add some remote control codes
o not using HZ for control_msg-timeout
drivers/media/dvb/dvb-usb/a800.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletion(-)
drivers/media/dvb/dvb-usb/a800.c +7 -1
@@ -61,6 +61,12 @@ static struct dvb_usb_rc_key a800_rc_key { 0x02, 0x00, KEY_LAST }, /* >>| / BLUE */ { 0x02, 0x04, KEY_EPG }, /* EPG */ { 0x02, 0x15, KEY_MENU }, /* MENU */ + + { 0x03, 0x03, KEY_CHANNELUP }, /* CH UP */ + { 0x03, 0x02, KEY_CHANNELDOWN }, /* CH DOWN */ + { 0x03, 0x01, KEY_FIRST }, /* |<< / GREEN */ + { 0x03, 0x00, KEY_LAST }, /* >>| / BLUE */ + };int a800_rc_query (struct dvb_usb_device *d,u32 *event,int *state)
@@ -68,7 +74,7 @@ int a800_rc_query(struct dvb_usb_deviceu8 key[5 ];if (usb_control_msg (d->udev,usb_rcvctrlpipe (d->udev,0 ),0x04 ,USB_TYPE_VENDOR |USB_DIR_IN ,0 ,0 , key,5 , -2 *HZ ) !=5 ) +2000 ) !=5 )return -ENODEV ;/* call the universal NEC remote processor, to find out the key's state and event */
--
PATCH 2/8 usb: dont use HZ for timeouts
In reply to Johannes StezenbachFrom: Patrick Boettcher <[email protected]>
Don't use HZ for usb-transfer-timeouts.
drivers/media/dvb/dvb-usb/dvb-usb-urb.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/media/dvb/dvb-usb/dvb-usb-urb.c +2 -2
@@ -29,7 +29,7 @@ int dvb_usb_generic_rw(struct dvb_usb_de ret =usb_bulk_msg (d->udev,usb_sndbulkpipe (d->udev, d->props.generic_bulk_ctrl_endpoint), wbuf,wlen,&actlen, -2 *HZ ); +2000 );if (ret)err ("bulk message failed: %d (%d/%d)" ,ret,wlen,actlen);
@@ -43,7 +43,7 @@ int dvb_usb_generic_rw(struct dvb_usb_de ret =usb_bulk_msg (d->udev,usb_rcvbulkpipe (d->udev, d->props.generic_bulk_ctrl_endpoint),rbuf,rlen,&actlen, -2 *HZ ); +2000 );if (ret)err ("recv bulk message failed: %d" ,ret);
--
PATCH 3/8 ttpci: fix timeout handling to be save with PREEMPT
In reply to Johannes StezenbachFrom: Oliver Endriss <[email protected]>
Timeout handling fixed, especially for preemtible kernels and/or high system load.
drivers/media/common/saa7146_core.c | 11 +++-- drivers/media/dvb/ttpci/av7110_hw.c | 72 ++++++++++++++++++++++++------------ 2 files changed, 56 insertions(+), 27 deletions(-)
drivers/media/common/saa7146_core.c +7 -4
@@ -62,13 +62,15 @@ void saa7146_setgpio(struct saa7146_devint saa7146_wait_for_debi_done (struct saa7146_dev *dev,int nobusyloop) {unsigned long start; +int err;/* wait for registers to be programmed */ start = jiffies;while (1 ) { -if (saa7146_read (dev,MC2 ) &2 ) -break ; -if (time_after (jiffies, start +HZ /20 )) { + err =time_after (jiffies, start +HZ /20 ); +if (saa7146_read (dev,MC2 ) &2 ) +break ; +if (err) {DEB_S (("timed out while waiting for registers getting programmed\n" ));return -ETIMEDOUT ; }
@@ -79,10 +81,11 @@ int saa7146_wait_for_debi_done(struct sa/* wait for transfer to complete */ start = jiffies;while (1 ) { + err =time_after (jiffies, start +HZ /4 );if (!(saa7146_read (dev,PSR ) &SPCI_DEBI_S ))break ;saa7146_read (dev,MC2 ); -if (time_after (jiffies, start +HZ /4 )) { +if (err) {DEB_S (("timed out while waiting for transfer completion\n" ));return -ETIMEDOUT ; }
drivers/media/dvb/ttpci/av7110_hw.c +49 -23
160 lines not on this page · raw message
--
PATCH 4/8 frontend: add driver for LGDT3302
In reply to Johannes StezenbachFrom: Mac Michaels <[email protected]>
Add support for LGDT3302 (ATSC VSB/QAM) used in DViCO FusionHDTV3 Gold.
drivers/media/dvb/frontends/Kconfig | 7 drivers/media/dvb/frontends/Makefile | 1 drivers/media/dvb/frontends/dvb-pll.c | 13 drivers/media/dvb/frontends/dvb-pll.h | 1 drivers/media/dvb/frontends/lgdt3302.c | 618 ++++++++++++++++++++++++++++ drivers/media/dvb/frontends/lgdt3302.h | 49 ++ drivers/media/dvb/frontends/lgdt3302_priv.h | 72 +++ 7 files changed, 761 insertions(+)
drivers/media/dvb/frontends/Kconfig +7 -0
@@ -187,4 +187,11 @@ config DVB_BCM3510 An ATSC 8VSB/16VSB and QAM64/256 tuner module. Say Y when you want to support this frontend. +config DVB_LGDT3302 + tristate "LGDT3302 based (DViCO FusionHDTV3 Gold)" + depends on DVB_CORE + help + An ATSC 8VSB and QAM64/256 tuner module. Say Y when you want + to support this frontend. + endmenu
drivers/media/dvb/frontends/Makefile +1 -0
@@ -30,3 +30,4 @@ obj-$(CONFIG_DVB_OR51211) += or51211.o obj-$(CONFIG_DVB_OR51132) += or51132.o obj-$(CONFIG_DVB_BCM3510) += bcm3510.o obj-$(CONFIG_DVB_S5H1420) += s5h1420.o +obj-$(CONFIG_DVB_LGDT3302) += lgdt3302.o
drivers/media/dvb/frontends/dvb-pll.c +13 -0
@@ -93,6 +93,19 @@ struct dvb_pll_desc dvb_pll_lg_z201 = { };EXPORT_SYMBOL (dvb_pll_lg_z201); +struct dvb_pll_desc dvb_pll_microtune_4042 = { + .name ="Microtune 4042 FI5" , + .min =57000000 , + .max =858000000 , + .count =3 , + .entries = { + {162000000 ,44000000 ,62500 ,0x8e ,0xa1 }, + {457000000 ,44000000 ,62500 ,0x8e ,0x91 }, + {999999999 ,44000000 ,62500 ,0x8e ,0x31 }, + }, +}; +EXPORT_SYMBOL (dvb_pll_microtune_4042); +struct dvb_pll_desc dvb_pll_unknown_1 = { .name ="unknown 1" ,/* used by dntv live dvb-t */ .min =174000000 ,
drivers/media/dvb/frontends/dvb-pll.h +1 -0
@@ -24,6 +24,7 @@ extern struct dvb_pll_desc dvb_pll_thomsextern struct dvb_pll_desc dvb_pll_thomson_dtt759x;extern struct dvb_pll_desc dvb_pll_thomson_dtt7610;extern struct dvb_pll_desc dvb_pll_lg_z201; +extern struct dvb_pll_desc dvb_pll_microtune_4042;extern struct dvb_pll_desc dvb_pll_unknown_1;extern struct dvb_pll_desc dvb_pll_tua6010xs;
drivers/media/dvb/frontends/lgdt3302.c new file +618 -0
618 lines not on this page · raw message
drivers/media/dvb/frontends/lgdt3302.h new file +49 -0
49 lines not on this page · raw message
drivers/media/dvb/frontends/lgdt3302_priv.h new file +72 -0
72 lines not on this page · raw message
--
PATCH 5/8 usb/pci: correct syntax of driver name fields
In reply to Johannes StezenbachFrom: Patrick Boettcher <[email protected]>
Change the name-field of the pci_driver and usb_driver structs to the name of the module after compilation. It seems that this field is used in some places where special characters are not allowed.
Thanks to Alan Halverson for finding this problem.
drivers/media/dvb/b2c2/flexcop-pci.c | 2 +- drivers/media/dvb/b2c2/flexcop-usb.c | 2 +- drivers/media/dvb/dvb-usb/a800.c | 2 +- drivers/media/dvb/dvb-usb/cxusb.c | 2 +- drivers/media/dvb/dvb-usb/dibusb-mb.c | 2 +- drivers/media/dvb/dvb-usb/dibusb-mc.c | 2 +- drivers/media/dvb/dvb-usb/digitv.c | 2 +- drivers/media/dvb/dvb-usb/nova-t-usb2.c | 2 +- drivers/media/dvb/dvb-usb/umt-010.c | 2 +- drivers/media/dvb/dvb-usb/vp7045.c | 6 +++--- 10 files changed, 12 insertions(+), 12 deletions(-)
drivers/media/dvb/b2c2/flexcop-pci.c +1 -1
@@ -409,7 +409,7 @@ static struct pci_device_id flexcop_pci_MODULE_DEVICE_TABLE (pci, flexcop_pci_tbl);static struct pci_driver flexcop_pci_driver = { - .name ="Technisat/B2C2 FlexCop II/IIb PCI" , + .name ="b2c2_flexcop_pci" , .id_table = flexcop_pci_tbl, .probe = flexcop_pci_probe, .remove = flexcop_pci_remove,
drivers/media/dvb/b2c2/flexcop-usb.c +1 -1
@@ -545,7 +545,7 @@ static struct usb_device_id flexcop_usb_/* usb specific object needed to register this driver with the usb subsystem */ static struct usb_driver flexcop_usb_driver = { .owner =THIS_MODULE , - .name ="Technisat/B2C2 FlexCop II/IIb/III USB" , + .name ="b2c2_flexcop_usb" , .probe = flexcop_usb_probe, .disconnect = flexcop_usb_disconnect, .id_table = flexcop_usb_table,
drivers/media/dvb/dvb-usb/a800.c +1 -1
@@ -149,7 +149,7 @@ static struct dvb_usb_properties a800_prstatic struct usb_driver a800_driver = { .owner =THIS_MODULE , - .name ="AVerMedia AverTV DVB-T USB 2.0 (A800)" , + .name ="dvb_usb_a800" , .probe = a800_probe, .disconnect = dvb_usb_device_exit, .id_table = a800_table,
drivers/media/dvb/dvb-usb/cxusb.c +1 -1
@@ -262,7 +262,7 @@ static struct dvb_usb_properties cxusb_pstatic struct usb_driver cxusb_driver = { .owner =THIS_MODULE , - .name ="cxusb" , + .name ="dvb_usb_cxusb" , .probe = cxusb_probe, .disconnect = dvb_usb_device_exit, .id_table = cxusb_table,
drivers/media/dvb/dvb-usb/dibusb-mb.c +1 -1
@@ -317,7 +317,7 @@ static struct dvb_usb_properties dibusb2static struct usb_driver dibusb_driver = { .owner =THIS_MODULE , - .name ="DiBcom based USB DVB-T devices (DiB3000M-B based)" , + .name ="dvb_usb_dibusb_mb" , .probe = dibusb_probe, .disconnect = dvb_usb_device_exit, .id_table = dibusb_dib3000mb_table,
drivers/media/dvb/dvb-usb/dibusb-mc.c +1 -1
@@ -83,7 +83,7 @@ static struct dvb_usb_properties dibusb_static struct usb_driver dibusb_mc_driver = { .owner =THIS_MODULE , - .name ="DiBcom based USB2.0 DVB-T (DiB3000M-C/P based) devices" , + .name ="dvb_usb_dibusb_mc" , .probe = dibusb_mc_probe, .disconnect = dvb_usb_device_exit, .id_table = dibusb_dib3000mc_table,
drivers/media/dvb/dvb-usb/digitv.c +1 -1
@@ -228,7 +228,7 @@ static struct dvb_usb_properties digitv_static struct usb_driver digitv_driver = { .owner =THIS_MODULE , - .name ="Nebula Electronics uDigiTV DVB-T USB2.0 device" , + .name ="dvb_usb_digitv" , .probe = digitv_probe, .disconnect = dvb_usb_device_exit, .id_table = digitv_table,
drivers/media/dvb/dvb-usb/nova-t-usb2.c +1 -1
@@ -203,7 +203,7 @@ static struct dvb_usb_properties nova_t_static struct usb_driver nova_t_driver = { .owner =THIS_MODULE , - .name ="Hauppauge WinTV-NOVA-T usb2" , + .name ="dvb_usb_nova_t_usb2" , .probe = nova_t_probe, .disconnect = dvb_usb_device_exit, .id_table = nova_t_table,
drivers/media/dvb/dvb-usb/umt-010.c +1 -1
@@ -129,7 +129,7 @@ static struct dvb_usb_properties umt_prostatic struct usb_driver umt_driver = { .owner =THIS_MODULE , - .name ="HanfTek UMT-010 USB2.0 DVB-T devices" , + .name ="dvb_usb_umt_010" , .probe = umt_probe, .disconnect = dvb_usb_device_exit, .id_table = umt_table,
drivers/media/dvb/dvb-usb/vp7045.c +3 -3
@@ -44,7 +44,7 @@ int vp7045_usb_op(struct dvb_usb_deviceif (usb_control_msg (d->udev,usb_sndctrlpipe (d->udev,0 ),TH_COMMAND_OUT ,USB_TYPE_VENDOR |USB_DIR_OUT ,0 ,0 , - outbuf,20 ,2 *HZ ) !=20 ) { + outbuf,20 ,2000 ) !=20 ) {err ("USB control message 'out' went wrong." ); ret = -EIO ; goto unlock;
@@ -55,7 +55,7 @@ int vp7045_usb_op(struct dvb_usb_deviceif (usb_control_msg (d->udev,usb_rcvctrlpipe (d->udev,0 ),TH_COMMAND_IN ,USB_TYPE_VENDOR |USB_DIR_IN ,0 ,0 , - inbuf,12 ,2 *HZ ) !=12 ) { + inbuf,12 ,2000 ) !=12 ) {err ("USB control message 'in' went wrong." ); ret = -EIO ; goto unlock;
@@ -255,7 +255,7 @@ static struct dvb_usb_properties vp7045_/* usb specific object needed to register this driver with the usb subsystem */ static struct usb_driver vp7045_usb_driver = { .owner =THIS_MODULE , - .name ="dvb-usb-vp7045" , + .name ="dvb_usb_vp7045" , .probe = vp7045_usb_probe, .disconnect = dvb_usb_device_exit, .id_table = vp7045_usb_table,
--
PATCH 6/8 dst: fix tuning problem
In reply to Johannes StezenbachFrom: Steffen Motzer <[email protected]>
Fix tuning failure for 200103A, 200103A failed to tune to low band due to wrong tone setting on the 200103A.
drivers/media/dvb/bt8xx/dst.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletion(-)
drivers/media/dvb/bt8xx/dst.c +5 -1
@@ -1147,7 +1147,11 @@ static int dst_set_tone(struct dvb_frontswitch (tone) {case SEC_TONE_OFF : - state->tx_tuna[2 ] =0xff ; +if (state->type_flags &DST_TYPE_HAS_OBS_REGS ) + state->tx_tuna[2 ] =0x00 ; +else + state->tx_tuna[2 ] =0xff ; +break ;case SEC_TONE_ON :
--
PATCH 7/8 usb: add supprt for WideView WT-220U
In reply to Johannes StezenbachFrom: Patrick Boettcher <[email protected]>
Add support and rewrote some parts with the help of vendor information (Thanks to Steve Chang from WideView, Inc.):
o added support for the WT-220U (Pensize DVB-T receiver)
o corrected byte order for unc,ber and the pid filter
o corrected number of pids that can be fetched at the same time.
o added some comments in Kconfig-file
o added USB IDs for the WT-220U
drivers/media/dvb/dvb-usb/Kconfig | 4 + drivers/media/dvb/dvb-usb/dtt200u-fe.c | 72 +++++++++++++------------- drivers/media/dvb/dvb-usb/dtt200u.c | 86 +++++++++++++++++++++++++++----- drivers/media/dvb/dvb-usb/dtt200u.h | 38 +++++--------- drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 3 - 5 files changed, 130 insertions(+), 73 deletions(-)
drivers/media/dvb/dvb-usb/Kconfig +3 -1
@@ -109,9 +109,11 @@ config DVB_USB_NOVA_T_USB2 Say Y here to support the Hauppauge WinTV-NOVA-T usb2 DVB-T USB2.0 receiver. config DVB_USB_DTT200U - tristate "WideView/Yakumo/Hama/Typhoon/Yuan DVB-T USB2.0 support" + tristate "WideView WT-200U and WT-220U (pen) DVB-T USB2.0 support (Yakumo/Hama/Typhoon/Yuan)" depends on DVB_USB help Say Y here to support the WideView/Yakumo/Hama/Typhoon/Yuan DVB-T USB2.0 receiver. The receivers are also known as DTT200U (Yakumo) and UB300 (Yuan). + + The WT-220U and its clones are pen-sized.
drivers/media/dvb/dvb-usb/dtt200u-fe.c +37 -35
147 lines not on this page · raw message
drivers/media/dvb/dvb-usb/dtt200u.c +74 -12
172 lines not on this page · raw message
drivers/media/dvb/dvb-usb/dtt200u.h +14 -24
@@ -22,44 +22,34 @@ extern int dvb_usb_dtt200u_debug;/* guessed protocol description (reverse engineered): * read * 00 - USB type 0x02 for usb2.0, 0x01 for usb1.1 -* 81 - <TS_LOCK> <current frequency divided by 250000> -* 82 - crash - do not touch -* 83 - crash - do not touch -* 84 - remote control -* 85 - crash - do not touch (OK, stop testing here) * 88 - locking 2 bytes (0x80 0x40 == no signal, 0x89 0x20 == nice signal) -* 89 - noise-to-signal -* 8a - unkown 1 byte - signal_strength -* 8c - ber ??? -* 8d - ber -* 8e - unc */ -#define GET_SPEED 0x00 -#define GET_TUNE_STAT 0x81 -#define GET_RC_KEY 0x84 -#define GET_STATUS 0x88 -#define GET_SNR 0x89 -#define GET_SIG_STRENGTH 0x8a -#define GET_UNK 0x8c -#define GET_BER 0x8d -#define GET_UNC 0x8e +#define GET_SPEED 0x00 +#define GET_TUNE_STATUS 0x81 +#define GET_RC_CODE 0x84 +#define GET_CONFIGURATION 0x88 +#define GET_AGC 0x89 +#define GET_SNR 0x8a +#define GET_VIT_ERR_CNT 0x8c +#define GET_RS_ERR_CNT 0x8d +#define GET_RS_UNCOR_BLK_CNT 0x8e/* write -* 01 - reset the demod +* 01 - init * 02 - frequency (divided by 250000) * 03 - bandwidth * 04 - pid table (index pid(7:0) pid(12:8)) * 05 - reset the pid table -* 08 - demod transfer enabled or not (FX2 transfer is enabled by default) +* 08 - transfer switch */ -#define RESET_DEMOD 0x01 -#define SET_FREQUENCY 0x02 +#define SET_INIT 0x01 +#define SET_RF_FREQ 0x02#define SET_BANDWIDTH 0x03#define SET_PID_FILTER 0x04#define RESET_PID_FILTER 0x05 -#define SET_TS_CTRL 0x08 +#define SET_STREAMING 0x08extern struct dvb_frontend *dtt200u_fe_attach (struct dvb_usb_device *d);
drivers/media/dvb/dvb-usb/dvb-usb-ids.h +2 -1
@@ -72,6 +72,8 @@#define USB_PID_HANFTEK_UMT_010_WARM 0x0015#define USB_PID_DTT200U_COLD 0x0201#define USB_PID_DTT200U_WARM 0x0301 +#define USB_PID_WT220U_COLD 0x0222 +#define USB_PID_WT220U_WARM 0x0221#define USB_PID_WINTV_NOVA_T_USB2_COLD 0x9300#define USB_PID_WINTV_NOVA_T_USB2_WARM 0x9301#define USB_PID_NEBULA_DIGITV 0x0201
@@ -84,5 +86,4 @@#define USB_PID_KYE_DVB_T_COLD 0x701e#define USB_PID_KYE_DVB_T_WARM 0x701f -#endif
--
PATCH 8/8 usb: README update
In reply to Johannes StezenbachFrom: Patrick Boettcher <[email protected]>
Updated the readme file to point to the DVB USB wikipage to find out which firmware necessary, + minor updates.
Documentation/dvb/README.dvb-usb | 28 ++++++++++------------------ 1 files changed, 10 insertions(+), 18 deletions(-)
Documentation/dvb/README.dvb-usb +10 -18
@@ -48,6 +48,7 @@ cards/drivers/firmwares: http://www.linuxtv.org/wiki/index.php/DVB_USB 0. History & News: + 2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang) 2005-05-30 - added basic isochronous support to the dvb-usb-framework added support for Conexant Hybrid reference design and Nebula DigiTV USB 2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
@@ -64,7 +65,7 @@ http://www.linuxtv.org/wiki/index.php/DV 2005-01-31 - distorted streaming is gone for USB1.1 devices 2005-01-13 - 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 predessors of the HanfTek UMT-010 + - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010 2005-01-10 - refactoring completed, now everything is very delightful - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
@@ -114,25 +115,13 @@ http://www.linuxtv.org/wiki/index.php/DV 1. How to use? 1.1. Firmware -Most of the USB drivers need to download a firmware to start working. +Most of the USB drivers need to download a firmware to the device before start +working. -for USB1.1 (AN2135) you need: dvb-usb-dibusb-5.0.0.11.fw -for USB2.0 HanfTek: dvb-usb-umt-010-02.fw -for USB2.0 DiBcom: dvb-usb-dibusb-6.0.0.8.fw -for USB2.0 AVerMedia AverTV DVB-T USB2: dvb-usb-avertv-a800-01.fw -for USB2.0 TwinhanDTV Alpha/MagicBox II: dvb-usb-vp7045-01.fw +Have a look at the Wikipage for the DVB-USB-drivers to find out, which firmware +you need for your device: -The files can be found on http://www.linuxtv.org/download/firmware/ . - -We do not have the permission (yet) to publish the following firmware-files. -You'll need to extract them from the windows drivers. - -You should be able to use "get_dvb_firmware dvb-usb" to get the firmware: - -for USB1.1 (AN2235) (a few Artec T1 devices): dvb-usb-dibusb-an2235-01.fw -for USB2.0 Hauppauge: dvb-usb-nova-t-usb2-01.fw -for USB2.0 ADSTech/Kworld USB2.0: dvb-usb-adstech-usb2-01.fw -for USB2.0 Yakumo/Typhoon/Hama: dvb-usb-dtt200u-01.fw +http://www.linuxtv.org/wiki/index.php/DVB_USB 1.2. Compiling
@@ -226,6 +215,9 @@ Patches, comments and suggestions are ve Jennifer Chen, Jeff and Jack from Twinhan for kindly supporting by writing the vp7045-driver. + Steve Chang from WideView for providing information for new devices and + firmware files. + Michael Paxton for submitting remote control keymaps. Some guys on the linux-dvb mailing list for encouraging me.
--