af9035: add several new USB IDs
Commit Message
Add several new USB IDs extracted from the Windows and Linux drivers published
by the manufacturers (Terratec and AVerMedia).
Terratec Cinergy T Stick rev. 2 (tua9001):
http://linux.terratec.de/tv_en.html
AVerMedia AverTV TwinStar A825 (2 x mxl5007t):
http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=3145
AVerMedia A835 (tda18218):
http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=4528
Afatech Sticks and AVerMedia A867 (mxl5007t):
http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=5172
http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=5171
http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=4591 (Linux driver)
The AVerMedia A825 is a dual tuner stick that was reported as fully working
on the OpenPli forum, using a modified version of the old af9035 driver:
http://openpli.org/forums/topic/22295-is-the-avertv-twinstar-a825-dvb-t-usb-twin-tuner-supported-by-the-newest-openpli/page__view__findpost__p__254634
so I think it should work also on the new driver version, at least in
single-tuner mode.
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
drivers/media/dvb/dvb-usb/af9035.c | 60 +++++++++++++++++++++++++++++-
drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 15 +++++++-
2 files changed, 72 insertions(+), 3 deletions(-)
Comments
On 04.04.2012 14:47, Gianluca Gennari wrote:
> Add several new USB IDs extracted from the Windows and Linux drivers published
> by the manufacturers (Terratec and AVerMedia).
> + [AF9035_07CA_0867] = {
> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
> [AF9035_07CA_1867] = {
> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
> + [AF9035_07CA_3867] = {
> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
> [AF9035_07CA_A867] = {
> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
> + [AF9035_07CA_B867] = {
> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
It have been common practise to use product names for USB PID
definitions instead of USB ID numbers. I vote to continue that practise.
Also, I am not very sure if it is wise to add new IDs without any
testing. Likely those are just reference design and will work, but
sometimes there is also some changes done for schematic wiring.
Especially for Avermedia, see hacks needed some AF9015 Avermedia
devices. They have put invalid data to eeprom and thus hacks are needed
for overriding tuner IDs etc.
Not to mention, driver supports also dynamic IDs and even device ID is
missing user can load driver using dynamic ID and report it working or
non-working.
Anyone else any thoughts about adding IDs without testing ?
regards
Antti
Hi Antti,
On 04/04/2012 02:59 PM, Antti Palosaari wrote:
> On 04.04.2012 14:47, Gianluca Gennari wrote:
>> Add several new USB IDs extracted from the Windows and Linux drivers
>> published
>> by the manufacturers (Terratec and AVerMedia).
>> + [AF9035_07CA_0867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
>> [AF9035_07CA_1867] = {
>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
>> + [AF9035_07CA_3867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
>> [AF9035_07CA_A867] = {
>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
>> + [AF9035_07CA_B867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
>
> It have been common practise to use product names for USB PID
> definitions instead of USB ID numbers. I vote to continue that practise.
>
> Also, I am not very sure if it is wise to add new IDs without any
> testing. Likely those are just reference design and will work, but
> sometimes there is also some changes done for schematic wiring.
> Especially for Avermedia, see hacks needed some AF9015 Avermedia
> devices. They have put invalid data to eeprom and thus hacks are needed
> for overriding tuner IDs etc.
> Not to mention, driver supports also dynamic IDs and even device ID is
> missing user can load driver using dynamic ID and report it working or
> non-working.
>
> Anyone else any thoughts about adding IDs without testing ?
In my experience, it's not always workable out-of-the-box (for the
reasons you mentioned).
IMO it would be better either them adding as long as they're been
tested, or at least to add comments when untested but likely to work.
Br,
David
>
> regards
> Antti
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Il 04/04/2012 13:59, Antti Palosaari ha scritto:
> On 04.04.2012 14:47, Gianluca Gennari wrote:
>> Add several new USB IDs extracted from the Windows and Linux drivers
>> published
>> by the manufacturers (Terratec and AVerMedia).
>> + [AF9035_07CA_0867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
>> [AF9035_07CA_1867] = {
>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
>> + [AF9035_07CA_3867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
>> [AF9035_07CA_A867] = {
>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
>> + [AF9035_07CA_B867] = {
>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
>
> It have been common practise to use product names for USB PID
> definitions instead of USB ID numbers. I vote to continue that practise.
>
> Also, I am not very sure if it is wise to add new IDs without any
> testing. Likely those are just reference design and will work, but
> sometimes there is also some changes done for schematic wiring.
> Especially for Avermedia, see hacks needed some AF9015 Avermedia
> devices. They have put invalid data to eeprom and thus hacks are needed
> for overriding tuner IDs etc.
> Not to mention, driver supports also dynamic IDs and even device ID is
> missing user can load driver using dynamic ID and report it working or
> non-working.
>
> Anyone else any thoughts about adding IDs without testing ?
>
> regards
> Antti
Regarding the USB PID definition naming, there is no problem for me.
Actually, some product names were used in the modified versions of your
old driver, so I converted them to the format above just for
convenience. The only problem is that there are so many variations of
the Avermedia sticks that it's hard to give them proper names.
Some of this IDs are already tested (if we include the several
modifications of your old driver).
In particular:
AF9035_0CCD_00AA : confirmed working on Ubuntu.it forum with the old
driver (don't have the link);
AF9035_07CA_0825 : confirmed working on OpenPli forum with the old
driver (see link above);
Others comes from the official Windows drivers so they should be just
little variations of the retail products:
AF9035_07CA_A825, AF9035_07CA_0835, AF9035_07CA_3867.
This IDs are can be the more problematic:
AF9035_15A4_1000, AF9035_15A4_1002, AF9035_15A4_1003,
AF9035_07CA_A333, AF9035_07CA_0337, AF9035_07CA_F337
since there is little or no information about this products.
Anyway, this patch can be a reference for users willing to test the new
driver.
Regards,
Gianluca
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04.04.2012 15:40, Gianluca Gennari wrote:
> Il 04/04/2012 13:59, Antti Palosaari ha scritto:
>> On 04.04.2012 14:47, Gianluca Gennari wrote:
>>> Add several new USB IDs extracted from the Windows and Linux drivers
>>> published
>>> by the manufacturers (Terratec and AVerMedia).
>>> + [AF9035_07CA_0867] = {
>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
>>> [AF9035_07CA_1867] = {
>>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
>>> + [AF9035_07CA_3867] = {
>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
>>> [AF9035_07CA_A867] = {
>>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
>>> + [AF9035_07CA_B867] = {
>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
>>
>> It have been common practise to use product names for USB PID
>> definitions instead of USB ID numbers. I vote to continue that practise.
>>
>> Also, I am not very sure if it is wise to add new IDs without any
>> testing. Likely those are just reference design and will work, but
>> sometimes there is also some changes done for schematic wiring.
>> Especially for Avermedia, see hacks needed some AF9015 Avermedia
>> devices. They have put invalid data to eeprom and thus hacks are needed
>> for overriding tuner IDs etc.
>> Not to mention, driver supports also dynamic IDs and even device ID is
>> missing user can load driver using dynamic ID and report it working or
>> non-working.
>>
>> Anyone else any thoughts about adding IDs without testing ?
>>
>> regards
>> Antti
>
> Regarding the USB PID definition naming, there is no problem for me.
> Actually, some product names were used in the modified versions of your
> old driver, so I converted them to the format above just for
> convenience. The only problem is that there are so many variations of
> the Avermedia sticks that it's hard to give them proper names.
>
> Some of this IDs are already tested (if we include the several
> modifications of your old driver).
>
> In particular:
> AF9035_0CCD_00AA : confirmed working on Ubuntu.it forum with the old
> driver (don't have the link);
> AF9035_07CA_0825 : confirmed working on OpenPli forum with the old
> driver (see link above);
>
> Others comes from the official Windows drivers so they should be just
> little variations of the retail products:
> AF9035_07CA_A825, AF9035_07CA_0835, AF9035_07CA_3867.
>
> This IDs are can be the more problematic:
> AF9035_15A4_1000, AF9035_15A4_1002, AF9035_15A4_1003,
> AF9035_07CA_A333, AF9035_07CA_0337, AF9035_07CA_F337
> since there is little or no information about this products.
>
> Anyway, this patch can be a reference for users willing to test the new
> driver.
I mean those definitions that goes to common file named: dvb-usb-ids.h.
Those are named as a USB_PID_<VENDOR_NAME>_<PRODUCT_NAME>
PIDs inside af9035.c (enum af9035_id_entry) are used only for generating
table index. Before it was used plain index numbers but that causes in
past few times problems when people added new device IDs between then
the table. Meaning of that enum is only keep index in order
automatically - and it is just fine as it is short unique name as
currently AF9035_<VID>_<PID>.
Add those IDs you know working and sent patch. Lets add more IDs when
those are confirmed to work. And as I said I added dynamic ID support
for that driver, so even there is no USB ID defined inside driver, it
can be still used without compiling whole Kernel.
regards
Antti
Il 04/04/2012 15:09, Antti Palosaari ha scritto:
> On 04.04.2012 15:40, Gianluca Gennari wrote:
>> Il 04/04/2012 13:59, Antti Palosaari ha scritto:
>>> On 04.04.2012 14:47, Gianluca Gennari wrote:
>>>> Add several new USB IDs extracted from the Windows and Linux drivers
>>>> published
>>>> by the manufacturers (Terratec and AVerMedia).
>>>> + [AF9035_07CA_0867] = {
>>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
>>>> [AF9035_07CA_1867] = {
>>>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
>>>> + [AF9035_07CA_3867] = {
>>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
>>>> [AF9035_07CA_A867] = {
>>>> USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
>>>> + [AF9035_07CA_B867] = {
>>>> + USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
>>>
>>> It have been common practise to use product names for USB PID
>>> definitions instead of USB ID numbers. I vote to continue that practise.
>>>
>>> Also, I am not very sure if it is wise to add new IDs without any
>>> testing. Likely those are just reference design and will work, but
>>> sometimes there is also some changes done for schematic wiring.
>>> Especially for Avermedia, see hacks needed some AF9015 Avermedia
>>> devices. They have put invalid data to eeprom and thus hacks are needed
>>> for overriding tuner IDs etc.
>>> Not to mention, driver supports also dynamic IDs and even device ID is
>>> missing user can load driver using dynamic ID and report it working or
>>> non-working.
>>>
>>> Anyone else any thoughts about adding IDs without testing ?
>>>
>>> regards
>>> Antti
>>
>> Regarding the USB PID definition naming, there is no problem for me.
>> Actually, some product names were used in the modified versions of your
>> old driver, so I converted them to the format above just for
>> convenience. The only problem is that there are so many variations of
>> the Avermedia sticks that it's hard to give them proper names.
>>
>> Some of this IDs are already tested (if we include the several
>> modifications of your old driver).
>>
>> In particular:
>> AF9035_0CCD_00AA : confirmed working on Ubuntu.it forum with the old
>> driver (don't have the link);
>> AF9035_07CA_0825 : confirmed working on OpenPli forum with the old
>> driver (see link above);
>>
>> Others comes from the official Windows drivers so they should be just
>> little variations of the retail products:
>> AF9035_07CA_A825, AF9035_07CA_0835, AF9035_07CA_3867.
>>
>> This IDs are can be the more problematic:
>> AF9035_15A4_1000, AF9035_15A4_1002, AF9035_15A4_1003,
>> AF9035_07CA_A333, AF9035_07CA_0337, AF9035_07CA_F337
>> since there is little or no information about this products.
>>
>> Anyway, this patch can be a reference for users willing to test the new
>> driver.
>
> I mean those definitions that goes to common file named: dvb-usb-ids.h.
> Those are named as a USB_PID_<VENDOR_NAME>_<PRODUCT_NAME>
>
> PIDs inside af9035.c (enum af9035_id_entry) are used only for generating
> table index. Before it was used plain index numbers but that causes in
> past few times problems when people added new device IDs between then
> the table. Meaning of that enum is only keep index in order
> automatically - and it is just fine as it is short unique name as
> currently AF9035_<VID>_<PID>.
>
> Add those IDs you know working and sent patch. Lets add more IDs when
> those are confirmed to work. And as I said I added dynamic ID support
> for that driver, so even there is no USB ID defined inside driver, it
> can be still used without compiling whole Kernel.
>
> regards
> Antti
>
Ok, roger.
As soon as the new driver is merged into the media_build tree, we should
start getting feedback anyway, so let's wait.
Regards,
Gianluca
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -821,29 +821,68 @@ err:
enum af9035_id_entry {
AF9035_0CCD_0093,
+ AF9035_0CCD_00AA,
AF9035_15A4_9035,
+ AF9035_15A4_1000,
AF9035_15A4_1001,
+ AF9035_15A4_1002,
+ AF9035_15A4_1003,
+ AF9035_07CA_0825,
+ AF9035_07CA_A825,
+ AF9035_07CA_0835,
AF9035_07CA_A835,
AF9035_07CA_B835,
+ AF9035_07CA_A333,
+ AF9035_07CA_0337,
+ AF9035_07CA_F337,
+ AF9035_07CA_0867,
AF9035_07CA_1867,
+ AF9035_07CA_3867,
AF9035_07CA_A867,
+ AF9035_07CA_B867,
};
static struct usb_device_id af9035_id[] = {
[AF9035_0CCD_0093] = {
USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK)},
+ [AF9035_0CCD_00AA] = {
+ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_STICK_2)},
[AF9035_15A4_9035] = {
USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035)},
- [AF9035_15A4_1001] = {
+ [AF9035_15A4_1000] = {
USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_2)},
+ [AF9035_15A4_1001] = {
+ USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_3)},
+ [AF9035_15A4_1002] = {
+ USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_4)},
+ [AF9035_15A4_1003] = {
+ USB_DEVICE(USB_VID_AFATECH, USB_PID_AFATECH_AF9035_5)},
+ [AF9035_07CA_0825] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0825)},
+ [AF9035_07CA_A825] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A825)},
+ [AF9035_07CA_0835] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0835)},
[AF9035_07CA_A835] = {
USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A835)},
[AF9035_07CA_B835] = {
USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B835)},
+ [AF9035_07CA_A333] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A333)},
+ [AF9035_07CA_0337] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0337)},
+ [AF9035_07CA_F337] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_F337)},
+ [AF9035_07CA_0867] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_0867)},
[AF9035_07CA_1867] = {
USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_1867)},
+ [AF9035_07CA_3867] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_3867)},
[AF9035_07CA_A867] = {
USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_A867)},
+ [AF9035_07CA_B867] = {
+ USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_B867)},
{},
};
@@ -886,30 +925,47 @@ static struct dvb_usb_device_properties af9035_properties[] = {
.i2c_algo = &af9035_i2c_algo,
- .num_device_descs = 4,
+ .num_device_descs = 5,
.devices = {
{
.name = "TerraTec Cinergy T Stick",
.cold_ids = {
&af9035_id[AF9035_0CCD_0093],
+ &af9035_id[AF9035_0CCD_00AA],
},
}, {
.name = "Afatech Technologies DVB-T stick",
.cold_ids = {
&af9035_id[AF9035_15A4_9035],
+ &af9035_id[AF9035_15A4_1000],
&af9035_id[AF9035_15A4_1001],
+ &af9035_id[AF9035_15A4_1002],
+ &af9035_id[AF9035_15A4_1003],
+ },
+ }, {
+ .name = "AVerMedia AVerTV TwinStar (A825)",
+ .cold_ids = {
+ &af9035_id[AF9035_07CA_0825],
+ &af9035_id[AF9035_07CA_A825],
},
}, {
.name = "AVerMedia AVerTV Volar HD/PRO (A835)",
.cold_ids = {
+ &af9035_id[AF9035_07CA_0835],
&af9035_id[AF9035_07CA_A835],
&af9035_id[AF9035_07CA_B835],
},
}, {
.name = "AVerMedia HD Volar (A867)",
.cold_ids = {
+ &af9035_id[AF9035_07CA_A333],
+ &af9035_id[AF9035_07CA_0337],
+ &af9035_id[AF9035_07CA_F337],
+ &af9035_id[AF9035_07CA_0867],
&af9035_id[AF9035_07CA_1867],
+ &af9035_id[AF9035_07CA_3867],
&af9035_id[AF9035_07CA_A867],
+ &af9035_id[AF9035_07CA_B867],
},
},
}
@@ -77,7 +77,10 @@
#define USB_PID_AFATECH_AF9015_9015 0x9015
#define USB_PID_AFATECH_AF9015_9016 0x9016
#define USB_PID_AFATECH_AF9035 0x9035
-#define USB_PID_AFATECH_AF9035_2 0x1001
+#define USB_PID_AFATECH_AF9035_2 0x1000
+#define USB_PID_AFATECH_AF9035_3 0x1001
+#define USB_PID_AFATECH_AF9035_4 0x1002
+#define USB_PID_AFATECH_AF9035_5 0x1003
#define USB_PID_TREKSTOR_DVBT 0x901b
#define USB_VID_ALINK_DTU 0xf170
#define USB_PID_ANSONIC_DVBT_USB 0x6000
@@ -155,6 +158,7 @@
#define USB_PID_TERRATEC_CINERGY_T_USB_XE 0x0055
#define USB_PID_TERRATEC_CINERGY_T_USB_XE_REV2 0x0069
#define USB_PID_TERRATEC_CINERGY_T_STICK 0x0093
+#define USB_PID_TERRATEC_CINERGY_T_STICK_2 0x00aa
#define USB_PID_TERRATEC_CINERGY_T_STICK_RC 0x0097
#define USB_PID_TERRATEC_CINERGY_T_STICK_DUAL_RC 0x0099
#define USB_PID_TWINHAN_VP7041_COLD 0x3201
@@ -224,10 +228,19 @@
#define USB_PID_AVERMEDIA_A850T 0x850b
#define USB_PID_AVERMEDIA_A805 0xa805
#define USB_PID_AVERMEDIA_A815M 0x815a
+#define USB_PID_AVERMEDIA_0825 0x0825
+#define USB_PID_AVERMEDIA_A825 0xa825
+#define USB_PID_AVERMEDIA_0835 0x0835
#define USB_PID_AVERMEDIA_A835 0xa835
#define USB_PID_AVERMEDIA_B835 0xb835
+#define USB_PID_AVERMEDIA_A333 0xa333
+#define USB_PID_AVERMEDIA_0337 0x0337
+#define USB_PID_AVERMEDIA_F337 0xf337
+#define USB_PID_AVERMEDIA_0867 0x0867
#define USB_PID_AVERMEDIA_1867 0x1867
+#define USB_PID_AVERMEDIA_3867 0x3867
#define USB_PID_AVERMEDIA_A867 0xa867
+#define USB_PID_AVERMEDIA_B867 0xb867
#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
#define USB_PID_TECHNOTREND_CONNECT_CT3650 0x300d
#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a