[linux-dvb] AverTV A800 trouble

Klaus Frahm frahm at irsamc.ups-tlse.fr
Thu Jun 29 19:40:42 CEST 2006


On 29 Jun, Patrick Boettcher wrote:
> Hi,
> 
> On Thu, 29 Jun 2006, Klaus Frahm wrote:
> 
>> > 
>> > Can you try to not download a firmware at all? So put the a800-usb-id in 
>> > the warm-table instead of the cold-table?
>> 
>> I removed the firmware file from the folder, it seems that the device
>> works even without. According to dmesg:
>> 
>> dvb-usb: found a 'AVerMedia AverTV DVB-T USB 2.0 (A800)' in cold state, will try to load a firmware
>> dvb-usb: did not find the firmware file. (dvb-usb-avertv-a800-02.fw) Please see linux/Documentation/dvb/ for more details on firmware-problems. (-2)
>> 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/input14
>> 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
> 
> Great.
> 
> So we do something without break backward-compat with older a800-devices.
> 
> Implement the 
> 
> identify_state
> 
> function pointer and in there you look if the revision is the new one 
> (yours) then cold = 0 otherwise cold = 1 - which forces a firmware 
> download.
> 
> The no_reconnect-field should remain 0. 
> 
> Can you do this and send the patch along with signed-off-by? I will 
> commit when Martin reports success.
> 
> regards,
> Patrick.

Dear Patrick, 

It took me some time because I had to study how the different structures
work but it's done now. The patch according to your
instructions is:

#### beginning of patch
#Applies against: 2.6.17
#Signed-off-by: Klaus Frahm <frahm at irsamc.ups-tlse.fr>
#Changes: fixes initialization problem with AVerTV DVB-T USB2.0, A800, by correctly identifying warm or cold state according to the product-id
--- a/drivers/media/dvb/dvb-usb/a800.c	2006-06-22 21:24:51.000000000 +0200
+++ b/drivers/media/dvb/dvb-usb/a800.c	2006-06-29 18:55:14.000000000 +0200
@@ -26,6 +26,14 @@
 	return 0;
 }
 
+/* assure to put cold to 0 for idProduct = 0xa800 */
+static int a800_identify_state(struct usb_device *udev, struct dvb_usb_properties *props,struct dvb_usb_device_description **desc, int *cold)
+{
+  *cold=!(udev->descriptor.idProduct == 0xa800);
+
+  return 0;
+}
+
 static struct dvb_usb_rc_key a800_rc_keys[] = {
 	{ 0x02, 0x01, KEY_PROG1 },       /* SOURCE */
 	{ 0x02, 0x00, KEY_POWER },       /* POWER */
@@ -113,6 +121,7 @@
 	.power_ctrl       = a800_power_ctrl,
 	.frontend_attach  = dibusb_dib3000mc_frontend_attach,
 	.tuner_attach     = dibusb_dib3000mc_tuner_attach,
+	.identify_state   = a800_identify_state, 
 
 	.rc_interval      = DEFAULT_RC_INTERVAL,
 	.rc_key_map       = a800_rc_keys,

#### end of patch


Using this patch I get the following dmesg:

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/input26
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

i.e. the messages with firmware not found and cold state have
disappeared. 


I now understand better that this is the proper solution compared to my
first patch. The new patch works for me and I tested it with linux
kernel 2.6.17 (it should be applied with -p1 in the kernel tree or in
the folder linux of the v4l-dvb tree). 
However, I insist that this completely new for me and you should be very
careful in verifying this patch (even though it seems quite simple). My
modest understanding of all this is essentially based on the source code
and your comments here in this thread. 

Furthermore, I have choosen the criterium: "idProduct = 0xa800"
(according to the line in "lsusb -v" and also due to the information
provided by Martin Habbecke who mentions the same id for the device with
problems and 0xa801 for the other one that works). The question arises
for a better criterium to distinguish between the different types of
devices. I believe for this one may need more information from other
people have the same device and/or from the company Avermedia.

For your information, I bought the AverTV Tuner a few weeks ago from
Dell together with a new computer, where it is one option (between
analog or dvb-tuner).

Greetings, Klaus.




More information about the linux-dvb mailing list