initialization problem with AVerTV DVB-T USB2.0 (and patch)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an initialization problem with the DVB-T USB Tuner 
"AVerTV DVB-T USB2.0", 
http://www.avermedia.com/cgi-bin/products_digitvtuner_dvbtusb2.asp?show=2

In principal it works very fine with the driver dvb_usb_a800, however after
plugging the USB-connection, even though it recognizes and loads the proper
modules and also the firmware file, it still remains in a cold state. In
particular the blue diode is not switched on automatically and the tuner is not
working at all in this state. The dmesg message after this reads:

dvb-usb: found a 'AVerMedia AverTV DVB-T USB 2.0 (A800)' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-avertv-a800-02.fw'

According to http://www.abclinuxu.cz/forum/show/134249 one 
quite cumbersome solution (I do not understand Czech but this thread is in any
way quite clear, especially the last post) is to run:

/etc/hotplug/usb.rc restart

which somehow reinitializes the USB-device and switches the device on
(including the blue diode) and afterwards it is working well. Eventually one
has to install the old fashioned hotplug package which is normally considered
obsolete in Linux systems with a 2.6 kernel. I can confirm for two different
systems that this works (even though one of them is based on udev and should
not use hotplug, but to install the hotplug-scripts does not harm provided one
does not use them with the exception of "usb.rc restart"). 


However, I have now found a proper solution by a quite simple patch of the
kernel driver in the file "a800.c" (in drivers/media/dvb/dvb-usb/ in recent 2.6
kernel trees or in linux/drivers/media/dvb/dvb-usb/ in the dvb-driver package
of v4l). In the header file "dvb-usb.h" (in the same directory of the kernel
or v4l tree) one can find the following very interesting explanation of the
entries of the structur describing the properties of the usb-dvb-device:

* @no_reconnect: device doesn't do a reconnect after downloading the firmware,
    so do the warm initialization right after it

and this entry is not initialized in a800.c (i.e. it is zero and therefore this
assumes that the devices does a "reconnect" on its own which is not true). I
have therefore initialized this entry to "1" which forces the "warm
initialization" of the device. The patch ist:

### beginning of patch ###
--- a800.c.orig 2006-06-22 21:24:51.000000000 +0200
+++ a800.c      2006-06-22 21:25:46.000000000 +0200
@@ -104,6 +104,7 @@
        .usb_ctrl = CYPRESS_FX2,
 
        .firmware = "dvb-usb-avertv-a800-02.fw",
+       .no_reconnect = 1,
 
        .size_of_priv     = sizeof(struct dibusb_state),
### end of patch ###

Using this patch, the warm initialization works directly (without the need of
the hotplug script usb.rc) and afterwards the connection to the usb port dmesg
reads: 

dvb-usb: found a 'AVerMedia AverTV DVB-T USB 2.0 (A800)' in cold state, will try to load a firmware
dvb-usb: downloading firmware from file 'dvb-usb-avertv-a800-02.fw'
dvb-usb: found a 'AVerMedia AverTV DVB-T USB 2.0 (A800)' in warm state.
dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer.
DVB: registering new adapter (AVerMedia AverTV DVB-T USB 2.0 (A800)).
dib3000: Found a DiBcom 3000P.
DVB: registering frontend 0 (DiBcom 3000P/M-C DVB-T)...
input: IR-receiver inside an USB DVB receiver as /class/input/input3
dvb-usb: schedule remote query interval to 150 msecs.
dvb-usb: AVerMedia AverTV DVB-T USB 2.0 (A800) successfully initialized and connected.
usbcore: registered new driver dvb_usb_a800


Maybe the maintainers of the dvb-usb drivers could verify if this patch is
okay and incorporate it in the official v4l and linux-kernel trees (or provide
another patch to solve the problem if this is not the correct way).

I am not 100% sur if the initialization problem is present for all models of
the "AVerTV DVB-T USB2.0". In case if there are different variants of this
model, the program usbview provides the following informations on my device
(including the Serial Number):


A800
Manufacturer: AVerTV
Serial Number: 7218264S0591
Speed: 480Mb/s (high)
USB Version:  2.00
Device Class: 00(>ifc )
Device Subclass: 00
Device Protocol: 00
Maximum Default Endpoint Size: 64
Number of Configurations: 1
Vendor Id: 07ca
Product Id: a800
Revision Number:  0.00

Config Number: 1
	Number of Interfaces: 1
	Attributes: 80
	MaxPower Needed: 500mA

	Interface Number: 0
		Name: dvb_usb_a800
		Alternate Number: 0
		Class: ff(vend.) 
		Sub Class: 0
		Protocol: 0
		Number of Endpoints: 4

			Endpoint Address: 01
			Direction: out
			Attribute: 2
			Type: Bulk
			Max Packet Size: 512
			Interval: 0ms

			Endpoint Address: 81
			Direction: in
			Attribute: 2
			Type: Bulk
			Max Packet Size: 512
			Interval: 0ms

			Endpoint Address: 02
			Direction: out
			Attribute: 2
			Type: Bulk
			Max Packet Size: 512
			Interval: 0ms

			Endpoint Address: 86
			Direction: in
			Attribute: 2
			Type: Bulk
			Max Packet Size: 512
			Interval: 0ms


Maybe this information is of help.

A part from the initialization problem, there is some other (small) problem. I
am using the device together with VLC (with dvb-support for v4l) and very
often (but not always) the video flow is not starting automatically and one I
have to use the stop and play-buttons of VLC to restart the video flow. This is
not very important as such but it is annoying when one want to record a 
program at a given time (by some script or other software).
This may also be a bug with the dvb-access module of VLC. 



_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux