[linux-dvb] Additional USB-id for Nova-T Stick

Michael Krufky mkrufky at linuxtv.org
Fri Nov 10 02:23:17 CET 2006


Stefan Traby wrote:
> On Thu, Nov 09, 2006 at 04:57:19PM -0500, Michael Krufky wrote:
>  
>> In order to add support for your device without removing support
>> for the 7050 device, you should create a new #define got 7060...
>> perhaps like this:
>>
>> #define USB_PID_HAUPPAUGE_NOVA_T_STICK_REV2               0x7060
>>
>> ... or maybe replace the "REV2" with the hauppauge model # found on the device.
> 
> I appended _2 because it's used the same way on NOVA_T_500

I like model number better, but what you did is fine. However, it's a bit
strange that we've skipped both zero and one, jumping straight to two. Oh
well...

>> hg diff > nova-t-new-revision.patch
> 
> Patch attached (I read somewhere in the archive that you want patches
> attached and not inlined).

Either way is fine with me.  Attaching is better if your email client mangles
whitespace or enforces wordrapping.

> diff -r f48b072c5676 linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
> --- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Thu Nov 09 00:06:26 2006 -0200
> +++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c	Fri Nov 10 01:23:50 2006 +0100
> @@ -274,6 +274,7 @@ struct usb_device_id dib0700_usb_id_tabl
>  		{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500) },
>  		{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_500_2) },
>  		{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK) },
> +		{ USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_T_STICK_2) },
>  		{ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR) },
>  		{ USB_DEVICE(USB_VID_COMPRO,    USB_PID_COMPRO_VIDEOMATE_U500) },
>  		{ USB_DEVICE(USB_VID_UNIWILL,   USB_PID_UNIWILL_STK7700P) },

No.  Inserting this into the middle of the array will shift the indices of all of the
other PID/VID combinations by one, breaking ALL of the other devices supported by this
driver.  Instead, you should add this to the end.

Also, you are missing a very important part of the patch.  On lines 328-331, you
should see:

			{   "Hauppauge Nova-T Stick",
				{ &dib0700_usb_id_table[4], NULL },
				{ NULL },
			},

After adding your usb id to the end of the usb table, you will be using index 9.
You should change the above lines to read as follows:

			{   "Hauppauge Nova-T Stick",
				{ &dib0700_usb_id_table[4], &dib0700_usb_id_table[9], NULL },
				{ NULL },
			},

It is obvious to me that you didn't test your patch before sending it in.  Without the
change above, autodetection is guaranteed to fail.

> diff -r f48b072c5676 linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
> --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Thu Nov 09 00:06:26 2006 -0200
> +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h	Fri Nov 10 01:22:44 2006 +0100
> @@ -101,6 +101,7 @@
>  #define USB_PID_HAUPPAUGE_NOVA_T_500			0x9941
>  #define USB_PID_HAUPPAUGE_NOVA_T_500_2			0x9950
>  #define USB_PID_HAUPPAUGE_NOVA_T_STICK			0x7050
> +#define USB_PID_HAUPPAUGE_NOVA_T_STICK_2		0x7060
>  #define USB_PID_AVERMEDIA_VOLAR				0xa807
>  #define USB_PID_NEBULA_DIGITV				0x0201
>  #define USB_PID_DVICO_BLUEBIRD_LGDT			0xd820

Cheers,

Mike



More information about the linux-dvb mailing list