* [PATCH 0/3] Support for AF9035/AF9033
@ 2012-02-22 22:20 Hans-Frieder Vogt
2012-02-23 9:19 ` Oliver Schinagl
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Hans-Frieder Vogt @ 2012-02-22 22:20 UTC (permalink / raw)
To: linux-media
I have written a driver for the AF9035 & AF9033 (called af903x), based on the
various drivers and information floating around for these chips.
Currently, my driver only supports the devices that I am able to test. These
are
- Terratec T5 Ver.2 (also known as T6)
- Avermedia Volar HD Nano (A867)
The driver supports:
- diversity and dual tuner (when the first frontend is used, it is in diversity
mode, when two frontends are used in dual tuner mode)
- multiple devices
- pid filtering
- remote control in NEC and RC-6 mode (currently not switchable, but depending
on device)
- support for kernel 3.1, 3.2 and 3.3 series
I have not tried to split the driver in a DVB-T receiver (af9035) and a
frontend (af9033), because I do not see the sense in doing that for a
demodulator, that seems to be always used in combination with the very same
receiver.
The patch is split in three parts:
Patch 1: support for tuner fitipower FC0012
Patch 2: basic driver
Patch 3: firmware
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-22 22:20 [PATCH 0/3] Support for AF9035/AF9033 Hans-Frieder Vogt
@ 2012-02-23 9:19 ` Oliver Schinagl
2012-02-23 22:02 ` Hans-Frieder Vogt
2012-02-23 16:40 ` Gianluca Gennari
2012-02-23 17:59 ` Antti Palosaari
2 siblings, 1 reply; 12+ messages in thread
From: Oliver Schinagl @ 2012-02-23 9:19 UTC (permalink / raw)
To: Hans-Frieder Vogt; +Cc: linux-media
Hi Hans,
I also have an AF9035 based device, the Asus 3100 Mini Plus. It has an
AF9035B demodulator and uses an FCI2580 tuner. I've used the driver
supplied by afa in the past, but haven't tested it in the last few
months. I have a git repository for that driver at
http://git.schinagl.nl/AF903x_SRC.git (it is also linked from
http://www.linuxtv.org/wiki/index.php/Asus_U3100_Mini_plus_DVB-T).
So when you say it is also coupled with the same tuner, that's not true
:) With that driver there where a bunch of other tuners that are used
with this chip. I think the Asus EEEPC supported a USB dvb tuner at some
point and there are reverences in that code for it.
As of the legality of the code, that is uncertain. The module (compiled
from all these sources) is very specifically marked as GPL. Most
headers/source files have no copyright notice at all, some however do,
but no license in it.
I asked about afa-tech and there driver status a while ago, but I guess
there is no news as of yet?
To summarize, I would love to test your driver, and I think i can code
something up for my tuner, once these are split?
Oliver
On 22-02-12 23:20, Hans-Frieder Vogt wrote:
> I have written a driver for the AF9035& AF9033 (called af903x), based on the
> various drivers and information floating around for these chips.
> Currently, my driver only supports the devices that I am able to test. These
> are
> - Terratec T5 Ver.2 (also known as T6)
> - Avermedia Volar HD Nano (A867)
>
> The driver supports:
> - diversity and dual tuner (when the first frontend is used, it is in diversity
> mode, when two frontends are used in dual tuner mode)
> - multiple devices
> - pid filtering
> - remote control in NEC and RC-6 mode (currently not switchable, but depending
> on device)
> - support for kernel 3.1, 3.2 and 3.3 series
>
> I have not tried to split the driver in a DVB-T receiver (af9035) and a
> frontend (af9033), because I do not see the sense in doing that for a
> demodulator, that seems to be always used in combination with the very same
> receiver.
>
> The patch is split in three parts:
> Patch 1: support for tuner fitipower FC0012
> Patch 2: basic driver
> Patch 3: firmware
>
> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
> --
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-22 22:20 [PATCH 0/3] Support for AF9035/AF9033 Hans-Frieder Vogt
2012-02-23 9:19 ` Oliver Schinagl
@ 2012-02-23 16:40 ` Gianluca Gennari
2012-02-23 22:12 ` Hans-Frieder Vogt
2012-02-23 17:59 ` Antti Palosaari
2 siblings, 1 reply; 12+ messages in thread
From: Gianluca Gennari @ 2012-02-23 16:40 UTC (permalink / raw)
To: Hans-Frieder Vogt, linux-media
[-- Attachment #1: Type: text/plain, Size: 3764 bytes --]
Il 22/02/2012 23:20, Hans-Frieder Vogt ha scritto:
> I have written a driver for the AF9035 & AF9033 (called af903x), based on the
> various drivers and information floating around for these chips.
> Currently, my driver only supports the devices that I am able to test. These
> are
> - Terratec T5 Ver.2 (also known as T6)
> - Avermedia Volar HD Nano (A867)
>
> The driver supports:
> - diversity and dual tuner (when the first frontend is used, it is in diversity
> mode, when two frontends are used in dual tuner mode)
> - multiple devices
> - pid filtering
> - remote control in NEC and RC-6 mode (currently not switchable, but depending
> on device)
> - support for kernel 3.1, 3.2 and 3.3 series
>
> I have not tried to split the driver in a DVB-T receiver (af9035) and a
> frontend (af9033), because I do not see the sense in doing that for a
> demodulator, that seems to be always used in combination with the very same
> receiver.
>
> The patch is split in three parts:
> Patch 1: support for tuner fitipower FC0012
> Patch 2: basic driver
> Patch 3: firmware
>
> Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
Hi Hans,
thank you for the new af903x driver.
A few comments:
1) I think you should set up a git repository with your driver and then
send a PULL request to the list; as it is, the first patch is affected
by line-wrapping problems so it must be manually edited to be
applicable, and the second patch is compressed so it will be ignored by
patchwork.
2) There are a couple of small errors in the patches (see my attached
patches): in the dvb-usb Makefile, DVB_USB_AF903X must be replaced by
CONFIG_DVB_USB_AF903X otherwise the driver will not compile; also, in
the dvb_frontend_ops struct, the field info.type should be removed for
kernels >= 3.3.0.
3) The USB VID/PID IDs should be moved into dvb-usb-ids.h (see patch 3);
I also added a few IDs from the Avermedia A867 driver*. As your driver
supports both AF9007 and mxl5007t tuners I think this is safe.
*http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=4591
4) the driver also looks for a firmware file called "af35irtbl.bin" that
comes from the "official" ITEtech driver (if it's not present the driver
works anyway, but it prints an error message);
I tested the driver with an Avermedia A867 stick (it's an OEM stick also
known as the Sky Italia Digital Key with blue led: 07ca:a867) on a
Ubuntu 10.04 system with kernel 2.6.32-38-generic-pae and the latest
media_build tree installed.
The good news:
the driver loads properly, and, using Kaffeine, I could watch several
channels with a small portable antenna; I could also perform a full
frequency scan, finding several UHF and VHF stations. Signal strength
and SNR reports works really well, and they seems to give a "realistic"
figure of the signal quality (with both the portable and the rooftop
antenna).
When the stick is unplugged from the USB port, the driver unloads properly.
The bad news:
the driver seems to "lock" the application when it tries to tune a weak
channel: in this cases, Kaffeine becomes unresponsive and sometimes it
gives a stream error; for the same reason, the full scan fails to find
all stations and takes a long time to complete.
Also, when I tried to extract the stick from the USB port during one of
this "freezing" periods, the system crashed :-(
I reproduced this bug 3 times, and the last time I was able to see a
kernel dump for a moment: the function that crashed the kernel was
"af903x_streaming_ctrl".
Neither of those issues are present with the Avermedia A867 original
driver or Antti Palosaari's af9035 driver modified to support the A867
stick.
I hope this feedback will be useful to improve the driver.
Best regards,
Gianluca Gennari
[-- Attachment #2: 0001-af903x-fixed-Makefile.patch --]
[-- Type: text/x-patch, Size: 794 bytes --]
[PATCH 1/3] af903x: fixed Makefile
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
drivers/media/dvb/dvb-usb/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile
index 75780e2..49c5425 100644
--- a/drivers/media/dvb/dvb-usb/Makefile
+++ b/drivers/media/dvb/dvb-usb/Makefile
@@ -76,7 +76,7 @@ dvb-usb-af9015-objs = af9015.o
obj-$(CONFIG_DVB_USB_AF9015) += dvb-usb-af9015.o
dvb-usb-af903x-objs = af903x-core.o af903x-devices.o af903x-fe.o af903x-tuners.o
-obj-$(DVB_USB_AF903X) += dvb-usb-af903x.o
+obj-$(CONFIG_DVB_USB_AF903X) += dvb-usb-af903x.o
dvb-usb-cinergyT2-objs = cinergyT2-core.o cinergyT2-fe.o
obj-$(CONFIG_DVB_USB_CINERGY_T2) += dvb-usb-cinergyT2.o
--
1.7.0.4
[-- Attachment #3: 0002-af903x-removed-frontend-info.type-for-kernel-3.3.0.patch --]
[-- Type: text/x-patch, Size: 766 bytes --]
[PATCH 2/3] af903x: removed frontend info.type for kernels >= 3.3.0
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
drivers/media/dvb/dvb-usb/af903x-fe.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/af903x-fe.c b/drivers/media/dvb/dvb-usb/af903x-fe.c
index a782c96..8d58efb 100644
--- a/drivers/media/dvb/dvb-usb/af903x-fe.c
+++ b/drivers/media/dvb/dvb-usb/af903x-fe.c
@@ -2110,7 +2110,9 @@ static struct dvb_frontend_ops af903x_ops = {
#endif
.info = {
.name = "AF903X USB DVB-T",
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0)
.type = FE_OFDM,
+#endif
.frequency_min = AF903X_FE_FREQ_MIN,
.frequency_max = AF903X_FE_FREQ_MAX,
.frequency_stepsize = 62500,
--
1.7.0.4
[-- Attachment #4: 0003-af903x-add-new-USB-VID-PID-IDs.patch --]
[-- Type: text/x-patch, Size: 5912 bytes --]
[PATCH 3/3] af903x: add new USB VID/PID IDs and move definitions to dvb-usb-ids.h
Signed-off-by: Gianluca Gennari <gennarone@gmail.com>
---
drivers/media/dvb/dvb-usb/af903x-devices.c | 72 +++++++++++++++++++++++-----
drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 16 ++++++
2 files changed, 76 insertions(+), 12 deletions(-)
diff --git a/drivers/media/dvb/dvb-usb/af903x-devices.c b/drivers/media/dvb/dvb-usb/af903x-devices.c
index 21ece97..06e96f4 100644
--- a/drivers/media/dvb/dvb-usb/af903x-devices.c
+++ b/drivers/media/dvb/dvb-usb/af903x-devices.c
@@ -1216,18 +1216,50 @@ enum af903x_table_entry {
AFATECH_AF9035,
TERRATEC_T6, /* Terratec T6 */
TERRATEC_T5_REV2, /* Terratec T5 Rev.2 */
+ AVERMEDIA_TWINSTAR, /* Avermedia TwinStar */
AVERMEDIA_A867, /* Avermedia HD Volar / A867 */
+ AVERMEDIA_A333, /* Avermedia A333 */
+ AVERMEDIA_B867,
+ AVERMEDIA_1867,
+ AVERMEDIA_0337,
+ AVERMEDIA_0867,
+ AVERMEDIA_F337,
+ AVERMEDIA_3867,
};
struct usb_device_id af903x_usb_table[] = {
- [AFATECH_1000] = { USB_DEVICE(0x15A4,0x1000) },
- [AFATECH_1001] = { USB_DEVICE(0x15A4,0x1001) },
- [AFATECH_1002] = { USB_DEVICE(0x15A4,0x1002) },
- [AFATECH_1003] = { USB_DEVICE(0x15A4,0x1003) },
- [AFATECH_AF9035] = { USB_DEVICE(0x15A4,0x9035) },
- [TERRATEC_T6] = { USB_DEVICE(0x0ccd,0x10b3) },
- [TERRATEC_T5_REV2] = { USB_DEVICE(0x0ccd,0x10b7) },
- [AVERMEDIA_A867] = { USB_DEVICE(0x07ca,0x1867) },
+ [AFATECH_1000] = {USB_DEVICE(USB_VID_AFATECH,
+ USB_PID_AFATECH_AF9035_1000)},
+ [AFATECH_1001] = {USB_DEVICE(USB_VID_AFATECH,
+ USB_PID_AFATECH_AF9035_1001)},
+ [AFATECH_1002] = {USB_DEVICE(USB_VID_AFATECH,
+ USB_PID_AFATECH_AF9035_1002)},
+ [AFATECH_1003] = {USB_DEVICE(USB_VID_AFATECH,
+ USB_PID_AFATECH_AF9035_1003)},
+ [AFATECH_AF9035] = {USB_DEVICE(USB_VID_AFATECH,
+ USB_PID_AFATECH_AF9035_9035)},
+ [TERRATEC_T6] = {USB_DEVICE(USB_VID_TERRATEC,
+ USB_PID_TERRATEC_T6)},
+ [TERRATEC_T5_REV2] = {USB_DEVICE(USB_VID_TERRATEC,
+ USB_PID_TERRATEC_T5_REV2)},
+ [AVERMEDIA_TWINSTAR] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_A825)},
+ [AVERMEDIA_A333] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_A333)},
+ [AVERMEDIA_B867] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_B867)},
+ [AVERMEDIA_1867] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_1867)},
+ [AVERMEDIA_0337] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_0337)},
+ [AVERMEDIA_A867] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_A867)},
+ [AVERMEDIA_0867] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_0867)},
+ [AVERMEDIA_F337] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_F337)},
+ [AVERMEDIA_3867] = {USB_DEVICE(USB_VID_AVERMEDIA,
+ USB_PID_AVERMEDIA_3867)},
{ 0}, /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, af903x_usb_table);
@@ -1310,9 +1342,9 @@ struct dvb_usb_device_properties af903x_properties[] = {
.rc_codes = NULL, /* will be set in
af903x_identify_state */
},
- .num_device_descs =4,
+ .num_device_descs = 6,
.devices = {
- { "ITEtech USB2.0 DVB-T Recevier",
+ { "ITEtech AF903x USB2.0 DVB-T Receiver",
{ &af903x_usb_table[AFATECH_1000],
&af903x_usb_table[AFATECH_1001],
&af903x_usb_table[AFATECH_1002],
@@ -1329,8 +1361,24 @@ struct dvb_usb_device_properties af903x_properties[] = {
{ NULL },
},
{
- "AVerMedia A867 DVB-T Recevier",
- { &af903x_usb_table[AVERMEDIA_A867], NULL},
+ "Avermedia TwinStar",
+ { &af903x_usb_table[AVERMEDIA_TWINSTAR], NULL},
+ { NULL },
+ },
+ {
+ "AVerMedia A333 DVB-T Receiver",
+ { &af903x_usb_table[AVERMEDIA_A333],
+ &af903x_usb_table[AVERMEDIA_B867], NULL},
+ { NULL },
+ },
+ {
+ "AVerMedia A867 DVB-T Receiver",
+ { &af903x_usb_table[AVERMEDIA_1867],
+ &af903x_usb_table[AVERMEDIA_0337],
+ &af903x_usb_table[AVERMEDIA_A867],
+ &af903x_usb_table[AVERMEDIA_0867],
+ &af903x_usb_table[AVERMEDIA_F337],
+ &af903x_usb_table[AVERMEDIA_3867], NULL},
{ NULL },
},
{NULL},
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index 9c3dae1..6ed83fd 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -75,6 +75,11 @@
#define USB_PID_AFATECH_AF9005 0x9020
#define USB_PID_AFATECH_AF9015_9015 0x9015
#define USB_PID_AFATECH_AF9015_9016 0x9016
+#define USB_PID_AFATECH_AF9035_1000 0x1000
+#define USB_PID_AFATECH_AF9035_1001 0x1001
+#define USB_PID_AFATECH_AF9035_1002 0x1002
+#define USB_PID_AFATECH_AF9035_1003 0x1003
+#define USB_PID_AFATECH_AF9035_9035 0x9035
#define USB_PID_TREKSTOR_DVBT 0x901b
#define USB_VID_ALINK_DTU 0xf170
#define USB_PID_ANSONIC_DVBT_USB 0x6000
@@ -218,6 +223,15 @@
#define USB_PID_AVERMEDIA_A850T 0x850b
#define USB_PID_AVERMEDIA_A805 0xa805
#define USB_PID_AVERMEDIA_A815M 0x815a
+#define USB_PID_AVERMEDIA_A825 0x0825
+#define USB_PID_AVERMEDIA_A333 0xa333
+#define USB_PID_AVERMEDIA_B867 0xb867
+#define USB_PID_AVERMEDIA_1867 0x1867
+#define USB_PID_AVERMEDIA_0337 0x0337
+#define USB_PID_AVERMEDIA_A867 0xa867
+#define USB_PID_AVERMEDIA_0867 0x0867
+#define USB_PID_AVERMEDIA_F337 0xf337
+#define USB_PID_AVERMEDIA_3867 0x3867
#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
#define USB_PID_TECHNOTREND_CONNECT_CT3650 0x300d
#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a
@@ -231,6 +245,8 @@
#define USB_PID_TERRATEC_H7_2 0x10a3
#define USB_PID_TERRATEC_T3 0x10a0
#define USB_PID_TERRATEC_T5 0x10a1
+#define USB_PID_TERRATEC_T5_REV2 0x10b7
+#define USB_PID_TERRATEC_T6 0x10b3
#define USB_PID_PINNACLE_EXPRESSCARD_320CX 0x022e
#define USB_PID_PINNACLE_PCTV2000E 0x022c
#define USB_PID_PINNACLE_PCTV_DVB_T_FLASH 0x0228
--
1.7.0.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-22 22:20 [PATCH 0/3] Support for AF9035/AF9033 Hans-Frieder Vogt
2012-02-23 9:19 ` Oliver Schinagl
2012-02-23 16:40 ` Gianluca Gennari
@ 2012-02-23 17:59 ` Antti Palosaari
2012-02-23 22:28 ` Hans-Frieder Vogt
2 siblings, 1 reply; 12+ messages in thread
From: Antti Palosaari @ 2012-02-23 17:59 UTC (permalink / raw)
To: Hans-Frieder Vogt; +Cc: linux-media
On 23.02.2012 00:20, Hans-Frieder Vogt wrote:
> I have written a driver for the AF9035& AF9033 (called af903x), based on the
> various drivers and information floating around for these chips.
> Currently, my driver only supports the devices that I am able to test. These
> are
> - Terratec T5 Ver.2 (also known as T6)
> - Avermedia Volar HD Nano (A867)
>
> The driver supports:
> - diversity and dual tuner (when the first frontend is used, it is in diversity
> mode, when two frontends are used in dual tuner mode)
> - multiple devices
> - pid filtering
> - remote control in NEC and RC-6 mode (currently not switchable, but depending
> on device)
> - support for kernel 3.1, 3.2 and 3.3 series
>
> I have not tried to split the driver in a DVB-T receiver (af9035) and a
> frontend (af9033), because I do not see the sense in doing that for a
> demodulator, that seems to be always used in combination with the very same
> receiver.
That was how I originally implemented it. Reason for that is simple:
af9033 demodulator exists as single chip. I think it is also used for
dual tuner devices or is there 2 af9035 chips used, like one is master
and one is slave and working as a demod?
Situation is rather same for af9005/af9003 and af9015/af9013. Search
from the mailing list and see there is devices using af9003 demod but as
it is not split correctly from the af9005 those devices are never
supported (due to fact af9003 demod is not split out).
Reason behind my af9035/af9033 is not merged to the Kernel is that I
never found people from ITE who was able to give permission to merge
that. As it contains some vendor code I didn't want to merge it without
permission.
It is not many day work to write all vendor code out from the driver and
get it clean. If you want I can do it for you and merge that to the
Kernel. You can then take whole driver and start hacking if you wish.
What do you think? I am currently busy as hell and I don't want more
drivers to maintain so you can take maintaining responsibility.
> The patch is split in three parts:
> Patch 1: support for tuner fitipower FC0012
> Patch 2: basic driver
> Patch 3: firmware
>
> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
regards
Antti
--
http://palosaari.fi/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 9:19 ` Oliver Schinagl
@ 2012-02-23 22:02 ` Hans-Frieder Vogt
2012-02-24 10:04 ` Oliver Schinagl
0 siblings, 1 reply; 12+ messages in thread
From: Hans-Frieder Vogt @ 2012-02-23 22:02 UTC (permalink / raw)
To: Oliver Schinagl; +Cc: linux-media
Am Donnerstag, 23. Februar 2012 schrieb Oliver Schinagl:
> Hi Hans,
>
> I also have an AF9035 based device, the Asus 3100 Mini Plus. It has an
> AF9035B demodulator and uses an FCI2580 tuner. I've used the driver
> supplied by afa in the past, but haven't tested it in the last few
> months. I have a git repository for that driver at
> http://git.schinagl.nl/AF903x_SRC.git (it is also linked from
> http://www.linuxtv.org/wiki/index.php/Asus_U3100_Mini_plus_DVB-T).
>
> So when you say it is also coupled with the same tuner, that's not true
>
> :) With that driver there where a bunch of other tuners that are used
>
> with this chip. I think the Asus EEEPC supported a USB dvb tuner at some
> point and there are reverences in that code for it.
>
> As of the legality of the code, that is uncertain. The module (compiled
> from all these sources) is very specifically marked as GPL. Most
> headers/source files have no copyright notice at all, some however do,
> but no license in it.
>
> I asked about afa-tech and there driver status a while ago, but I guess
> there is no news as of yet?
>
> To summarize, I would love to test your driver, and I think i can code
> something up for my tuner, once these are split?
>
> Oliver
>
> On 22-02-12 23:20, Hans-Frieder Vogt wrote:
> > I have written a driver for the AF9035& AF9033 (called af903x), based on
> > the various drivers and information floating around for these chips.
> > Currently, my driver only supports the devices that I am able to test.
> > These are
> > - Terratec T5 Ver.2 (also known as T6)
> > - Avermedia Volar HD Nano (A867)
> >
> > The driver supports:
> > - diversity and dual tuner (when the first frontend is used, it is in
> > diversity mode, when two frontends are used in dual tuner mode)
> > - multiple devices
> > - pid filtering
> > - remote control in NEC and RC-6 mode (currently not switchable, but
> > depending on device)
> > - support for kernel 3.1, 3.2 and 3.3 series
> >
> > I have not tried to split the driver in a DVB-T receiver (af9035) and a
> > frontend (af9033), because I do not see the sense in doing that for a
> > demodulator, that seems to be always used in combination with the very
> > same receiver.
> >
> > The patch is split in three parts:
> > Patch 1: support for tuner fitipower FC0012
> > Patch 2: basic driver
> > Patch 3: firmware
> >
> > Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
> > --
> > 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
>
> --
> 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
Hi Oliver,
the AF9035B is in fact a DVB-T demodulator with an integrated USB interface +
further interfaces (I erroneously called it receiver). It needs a tuner to be
a full DVB-T stick (it seems that the it9135 is basically the AF9035 + an
integrated tuner).
the Terratec T5 Rev. 2 and T6 consists of an AF9035B, an AF9033B (Second
demodulator) and dual FC0012 tuners
the Avermedia Volar HD Nano (A867) uses an AF9035B and an Mxl5007t tuner
your Asus 3100 mini uses the FCI2580 tuner.
If there is a driver for the FCI2580 tuner then it is not a big issue to make
it usable with the af903x driver.
I know of these Afatech drivers, but the main disadvantage of them is in my
eyes that they
- have a lot of useless and unused code
- define own error codes (instead of using the standard error codes)
- have a compiled in firmware
- have all supported tuners directly compiled in, which means that they
prevent tuner support to be shared between various drivers
So, you see, there are good reasons to write a new driver for these devices.
The point with the legality: I agree that the AF903X_SRC driver is unclear in
that respect. The glue code (under src) is explicitly marked as GPL, but the
api code (under api) isn't marked.
Luckily, there is the it9135-driver from Jason Dong which is clearly GPL and
which uses the same functions. Therefore there is effectivly example code from
Afatech/Ite technology available that is under GPL.
Cheers,
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 16:40 ` Gianluca Gennari
@ 2012-02-23 22:12 ` Hans-Frieder Vogt
2012-02-24 15:44 ` Gianluca Gennari
0 siblings, 1 reply; 12+ messages in thread
From: Hans-Frieder Vogt @ 2012-02-23 22:12 UTC (permalink / raw)
To: gennarone; +Cc: linux-media
Am Donnerstag, 23. Februar 2012 schrieb Gianluca Gennari:
> Il 22/02/2012 23:20, Hans-Frieder Vogt ha scritto:
> > I have written a driver for the AF9035 & AF9033 (called af903x), based on
> > the various drivers and information floating around for these chips.
> > Currently, my driver only supports the devices that I am able to test.
> > These are
> > - Terratec T5 Ver.2 (also known as T6)
> > - Avermedia Volar HD Nano (A867)
> >
> > The driver supports:
> > - diversity and dual tuner (when the first frontend is used, it is in
> > diversity mode, when two frontends are used in dual tuner mode)
> > - multiple devices
> > - pid filtering
> > - remote control in NEC and RC-6 mode (currently not switchable, but
> > depending on device)
> > - support for kernel 3.1, 3.2 and 3.3 series
> >
> > I have not tried to split the driver in a DVB-T receiver (af9035) and a
> > frontend (af9033), because I do not see the sense in doing that for a
> > demodulator, that seems to be always used in combination with the very
> > same receiver.
> >
> > The patch is split in three parts:
> > Patch 1: support for tuner fitipower FC0012
> > Patch 2: basic driver
> > Patch 3: firmware
> >
> > Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
>
> Hi Hans,
> thank you for the new af903x driver.
> A few comments:
>
> 1) I think you should set up a git repository with your driver and then
> send a PULL request to the list; as it is, the first patch is affected
> by line-wrapping problems so it must be manually edited to be
> applicable, and the second patch is compressed so it will be ignored by
> patchwork.
>
> 2) There are a couple of small errors in the patches (see my attached
> patches): in the dvb-usb Makefile, DVB_USB_AF903X must be replaced by
> CONFIG_DVB_USB_AF903X otherwise the driver will not compile; also, in
> the dvb_frontend_ops struct, the field info.type should be removed for
> kernels >= 3.3.0.
>
> 3) The USB VID/PID IDs should be moved into dvb-usb-ids.h (see patch 3);
> I also added a few IDs from the Avermedia A867 driver*. As your driver
> supports both AF9007 and mxl5007t tuners I think this is safe.
>
> *http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=4591
>
> 4) the driver also looks for a firmware file called "af35irtbl.bin" that
> comes from the "official" ITEtech driver (if it's not present the driver
> works anyway, but it prints an error message);
>
> I tested the driver with an Avermedia A867 stick (it's an OEM stick also
> known as the Sky Italia Digital Key with blue led: 07ca:a867) on a
> Ubuntu 10.04 system with kernel 2.6.32-38-generic-pae and the latest
> media_build tree installed.
>
> The good news:
> the driver loads properly, and, using Kaffeine, I could watch several
> channels with a small portable antenna; I could also perform a full
> frequency scan, finding several UHF and VHF stations. Signal strength
> and SNR reports works really well, and they seems to give a "realistic"
> figure of the signal quality (with both the portable and the rooftop
> antenna).
> When the stick is unplugged from the USB port, the driver unloads properly.
>
> The bad news:
> the driver seems to "lock" the application when it tries to tune a weak
> channel: in this cases, Kaffeine becomes unresponsive and sometimes it
> gives a stream error; for the same reason, the full scan fails to find
> all stations and takes a long time to complete.
> Also, when I tried to extract the stick from the USB port during one of
> this "freezing" periods, the system crashed :-(
> I reproduced this bug 3 times, and the last time I was able to see a
> kernel dump for a moment: the function that crashed the kernel was
> "af903x_streaming_ctrl".
> Neither of those issues are present with the Avermedia A867 original
> driver or Antti Palosaari's af9035 driver modified to support the A867
> stick.
>
> I hope this feedback will be useful to improve the driver.
>
> Best regards,
> Gianluca Gennari
Gianluca,
thanks very much for your comments and patches. I will try the patches over
the weekend.
With respect to your comment about the locking: I suspect this is because I
have used quite a lot of mutex locks. In particular the dual tuner stick
behaves very sensitive to any code changes and I have fought for months (no
joke) to get it working reasonably well (besides the bad reception problems).
A lot of the complexity in the driver is for the dual tuner and to support the
diversity feature.
As to the af35irtbl.bin firmware: this is something I just copied from previous
drivers. I will probably just throw it out, because, as you also saw, it is
not needed (only needed for the HID mode of the remote control).
Thanks very much for your input!
Regards,
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 17:59 ` Antti Palosaari
@ 2012-02-23 22:28 ` Hans-Frieder Vogt
2012-02-24 3:46 ` Antti Palosaari
0 siblings, 1 reply; 12+ messages in thread
From: Hans-Frieder Vogt @ 2012-02-23 22:28 UTC (permalink / raw)
To: Antti Palosaari; +Cc: linux-media
Am Donnerstag, 23. Februar 2012 schrieb Antti Palosaari:
> On 23.02.2012 00:20, Hans-Frieder Vogt wrote:
> > I have written a driver for the AF9035& AF9033 (called af903x), based on
> > the various drivers and information floating around for these chips.
> > Currently, my driver only supports the devices that I am able to test.
> > These are
> > - Terratec T5 Ver.2 (also known as T6)
> > - Avermedia Volar HD Nano (A867)
> >
> > The driver supports:
> > - diversity and dual tuner (when the first frontend is used, it is in
> > diversity mode, when two frontends are used in dual tuner mode)
> > - multiple devices
> > - pid filtering
> > - remote control in NEC and RC-6 mode (currently not switchable, but
> > depending on device)
> > - support for kernel 3.1, 3.2 and 3.3 series
> >
> > I have not tried to split the driver in a DVB-T receiver (af9035) and a
> > frontend (af9033), because I do not see the sense in doing that for a
> > demodulator, that seems to be always used in combination with the very
> > same receiver.
>
> That was how I originally implemented it. Reason for that is simple:
> af9033 demodulator exists as single chip. I think it is also used for
> dual tuner devices or is there 2 af9035 chips used, like one is master
> and one is slave and working as a demod?
>
> Situation is rather same for af9005/af9003 and af9015/af9013. Search
> from the mailing list and see there is devices using af9003 demod but as
> it is not split correctly from the af9005 those devices are never
> supported (due to fact af9003 demod is not split out).
>
> Reason behind my af9035/af9033 is not merged to the Kernel is that I
> never found people from ITE who was able to give permission to merge
> that. As it contains some vendor code I didn't want to merge it without
> permission.
>
> It is not many day work to write all vendor code out from the driver and
> get it clean. If you want I can do it for you and merge that to the
> Kernel. You can then take whole driver and start hacking if you wish.
> What do you think? I am currently busy as hell and I don't want more
> drivers to maintain so you can take maintaining responsibility.
>
> > The patch is split in three parts:
> > Patch 1: support for tuner fitipower FC0012
> > Patch 2: basic driver
> > Patch 3: firmware
> >
> > Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
>
> regards
> Antti
Antti,
of course I understand that the af9033 is a separate chip, but still I don't
know of any device that uses the af9033 without the af9035. Clearly, the
situation is very similar with the other Afatech chips and you managed the
"splitting job" very well for the af9015/af9013 and for the af9005/af9003
chips. In fact, when you look at the EEPROM code and the register sequence
(not the actual addresses, they have been moved), then it seems that in
particular the af9015 and the af9035 have quite a lot in common (The main
difference in the description on the afatech web page is the "low power" for
the af9035).
The main reason for me to leave the code together is rather the diversity
code. I liked the idea of the driver selecting diversity and dual tuner code
depending on how many tuners are actually used, and I simply struggled to make
a clean split between frontend and main driver code.
Thanks very much for your offer to support me in getting rid of vendor code.
Honestly I was of the opinion that I already got rid of all of it, but if you
still see some then I really appreciate if you can help me removing it once
and for all. I am happy to do the maintainer job on that driver, but if it can
be improved using some of your experience that would be great!
Thanks very much!
Regards,
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 22:28 ` Hans-Frieder Vogt
@ 2012-02-24 3:46 ` Antti Palosaari
0 siblings, 0 replies; 12+ messages in thread
From: Antti Palosaari @ 2012-02-24 3:46 UTC (permalink / raw)
To: Hans-Frieder Vogt; +Cc: linux-media
pe 24.2.2012 0:28 Hans-Frieder Vogt kirjoitti:
> Am Donnerstag, 23. Februar 2012 schrieb Antti Palosaari:
>> On 23.02.2012 00:20, Hans-Frieder Vogt wrote:
>> > I have written a driver for the AF9035& AF9033 (called af903x), based
>> on
>> > the various drivers and information floating around for these chips.
>> > Currently, my driver only supports the devices that I am able to test.
>> > These are
>> > - Terratec T5 Ver.2 (also known as T6)
>> > - Avermedia Volar HD Nano (A867)
>> >
>> > The driver supports:
>> > - diversity and dual tuner (when the first frontend is used, it is in
>> > diversity mode, when two frontends are used in dual tuner mode)
>> > - multiple devices
>> > - pid filtering
>> > - remote control in NEC and RC-6 mode (currently not switchable, but
>> > depending on device)
>> > - support for kernel 3.1, 3.2 and 3.3 series
>> >
>> > I have not tried to split the driver in a DVB-T receiver (af9035) and
>> a
>> > frontend (af9033), because I do not see the sense in doing that for a
>> > demodulator, that seems to be always used in combination with the very
>> > same receiver.
>>
>> That was how I originally implemented it. Reason for that is simple:
>> af9033 demodulator exists as single chip. I think it is also used for
>> dual tuner devices or is there 2 af9035 chips used, like one is master
>> and one is slave and working as a demod?
>>
>> Situation is rather same for af9005/af9003 and af9015/af9013. Search
>> from the mailing list and see there is devices using af9003 demod but as
>> it is not split correctly from the af9005 those devices are never
>> supported (due to fact af9003 demod is not split out).
>>
>> Reason behind my af9035/af9033 is not merged to the Kernel is that I
>> never found people from ITE who was able to give permission to merge
>> that. As it contains some vendor code I didn't want to merge it without
>> permission.
>>
>> It is not many day work to write all vendor code out from the driver and
>> get it clean. If you want I can do it for you and merge that to the
>> Kernel. You can then take whole driver and start hacking if you wish.
>> What do you think? I am currently busy as hell and I don't want more
>> drivers to maintain so you can take maintaining responsibility.
>>
>> > The patch is split in three parts:
>> > Patch 1: support for tuner fitipower FC0012
>> > Patch 2: basic driver
>> > Patch 3: firmware
>> >
>> > Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot.
>> net
>>
>> regards
>> Antti
>
> Antti,
>
> of course I understand that the af9033 is a separate chip, but still I
> don't
> know of any device that uses the af9033 without the af9035. Clearly, the
> situation is very similar with the other Afatech chips and you managed the
> "splitting job" very well for the af9015/af9013 and for the af9005/af9003
> chips. In fact, when you look at the EEPROM code and the register sequence
> (not the actual addresses, they have been moved), then it seems that in
> particular the af9015 and the af9035 have quite a lot in common (The main
> difference in the description on the afatech web page is the "low power"
> for
> the af9035).
> The main reason for me to leave the code together is rather the diversity
> code. I liked the idea of the driver selecting diversity and dual tuner
> code
> depending on how many tuners are actually used, and I simply struggled to
> make
> a clean split between frontend and main driver code.
>
> Thanks very much for your offer to support me in getting rid of vendor
> code.
> Honestly I was of the opinion that I already got rid of all of it, but if
> you
> still see some then I really appreciate if you can help me removing it
> once
> and for all. I am happy to do the maintainer job on that driver, but if it
> can
> be improved using some of your experience that would be great!
> Thanks very much!
I have few days after 12.3. All the others are clear but diversity mode
needs some work. I have currently no idea how it should be implemented.
Antti
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 22:02 ` Hans-Frieder Vogt
@ 2012-02-24 10:04 ` Oliver Schinagl
2012-02-24 10:22 ` Oliver Schinagl
0 siblings, 1 reply; 12+ messages in thread
From: Oliver Schinagl @ 2012-02-24 10:04 UTC (permalink / raw)
To: Hans-Frieder Vogt; +Cc: linux-media
On 23-02-12 23:02, Hans-Frieder Vogt wrote:
> Am Donnerstag, 23. Februar 2012 schrieb Oliver Schinagl:
>> Hi Hans,
>>
>> I also have an AF9035 based device, the Asus 3100 Mini Plus. It has an
>> AF9035B demodulator and uses an FCI2580 tuner. I've used the driver
>> supplied by afa in the past, but haven't tested it in the last few
>> months. I have a git repository for that driver at
>> http://git.schinagl.nl/AF903x_SRC.git (it is also linked from
>> http://www.linuxtv.org/wiki/index.php/Asus_U3100_Mini_plus_DVB-T).
>>
>> So when you say it is also coupled with the same tuner, that's not true
>>
>> :) With that driver there where a bunch of other tuners that are used
>>
>> with this chip. I think the Asus EEEPC supported a USB dvb tuner at some
>> point and there are reverences in that code for it.
>>
>> As of the legality of the code, that is uncertain. The module (compiled
>> from all these sources) is very specifically marked as GPL. Most
>> headers/source files have no copyright notice at all, some however do,
>> but no license in it.
>>
>> I asked about afa-tech and there driver status a while ago, but I guess
>> there is no news as of yet?
>>
>> To summarize, I would love to test your driver, and I think i can code
>> something up for my tuner, once these are split?
>>
>> Oliver
>>
>> On 22-02-12 23:20, Hans-Frieder Vogt wrote:
>>> I have written a driver for the AF9035& AF9033 (called af903x), based on
>>> the various drivers and information floating around for these chips.
>>> Currently, my driver only supports the devices that I am able to test.
>>> These are
>>> - Terratec T5 Ver.2 (also known as T6)
>>> - Avermedia Volar HD Nano (A867)
>>>
>>> The driver supports:
>>> - diversity and dual tuner (when the first frontend is used, it is in
>>> diversity mode, when two frontends are used in dual tuner mode)
>>> - multiple devices
>>> - pid filtering
>>> - remote control in NEC and RC-6 mode (currently not switchable, but
>>> depending on device)
>>> - support for kernel 3.1, 3.2 and 3.3 series
>>>
>>> I have not tried to split the driver in a DVB-T receiver (af9035) and a
>>> frontend (af9033), because I do not see the sense in doing that for a
>>> demodulator, that seems to be always used in combination with the very
>>> same receiver.
>>>
>>> The patch is split in three parts:
>>> Patch 1: support for tuner fitipower FC0012
>>> Patch 2: basic driver
>>> Patch 3: firmware
>>>
>>> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
>>> --
>>> 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
>> --
>> 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
> Hi Oliver,
>
> the AF9035B is in fact a DVB-T demodulator with an integrated USB interface +
> further interfaces (I erroneously called it receiver). It needs a tuner to be
> a full DVB-T stick (it seems that the it9135 is basically the AF9035 + an
> integrated tuner).
>
> the Terratec T5 Rev. 2 and T6 consists of an AF9035B, an AF9033B (Second
> demodulator) and dual FC0012 tuners
> the Avermedia Volar HD Nano (A867) uses an AF9035B and an Mxl5007t tuner
> your Asus 3100 mini uses the FCI2580 tuner.
>
> If there is a driver for the FCI2580 tuner then it is not a big issue to make
> it usable with the af903x driver.
The driver is 'available' but in the AF903x_SRC package. If I would take
the endevour into writing a driver for the FCI2580, what driver would be
best suited as template you reccon?
> I know of these Afatech drivers, but the main disadvantage of them is in my
> eyes that they
> - have a lot of useless and unused code
> - define own error codes (instead of using the standard error codes)
> - have a compiled in firmware
This bit I don't understand. I have not found any binary image in the
source tree at all. If the firmware is compiled from the sources, it is
compiled into the driver, and not uploaded to the stick when plugged in.
The other firmware is as mentioned the infrared receive 'table', which
provides some mapping I guess?
> - have all supported tuners directly compiled in, which means that they
> prevent tuner support to be shared between various drivers
>
> So, you see, there are good reasons to write a new driver for these devices.
>
> The point with the legality: I agree that the AF903X_SRC driver is unclear in
> that respect. The glue code (under src) is explicitly marked as GPL, but the
> api code (under api) isn't marked.
> Luckily, there is the it9135-driver from Jason Dong which is clearly GPL and
> which uses the same functions. Therefore there is effectivly example code from
> Afatech/Ite technology available that is under GPL.
>
> Cheers,
>
> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-24 10:04 ` Oliver Schinagl
@ 2012-02-24 10:22 ` Oliver Schinagl
2012-02-25 23:42 ` Hans-Frieder Vogt
0 siblings, 1 reply; 12+ messages in thread
From: Oliver Schinagl @ 2012-02-24 10:22 UTC (permalink / raw)
To: Hans-Frieder Vogt; +Cc: linux-media
On 24-02-12 11:04, Oliver Schinagl wrote:
>
>
> On 23-02-12 23:02, Hans-Frieder Vogt wrote:
>> Am Donnerstag, 23. Februar 2012 schrieb Oliver Schinagl:
>>> Hi Hans,
>>>
>>> I also have an AF9035 based device, the Asus 3100 Mini Plus. It has an
>>> AF9035B demodulator and uses an FCI2580 tuner. I've used the driver
>>> supplied by afa in the past, but haven't tested it in the last few
>>> months. I have a git repository for that driver at
>>> http://git.schinagl.nl/AF903x_SRC.git (it is also linked from
>>> http://www.linuxtv.org/wiki/index.php/Asus_U3100_Mini_plus_DVB-T).
>>>
>>> So when you say it is also coupled with the same tuner, that's not true
>>>
>>> :) With that driver there where a bunch of other tuners that are used
>>>
>>> with this chip. I think the Asus EEEPC supported a USB dvb tuner at
>>> some
>>> point and there are reverences in that code for it.
>>>
>>> As of the legality of the code, that is uncertain. The module (compiled
>>> from all these sources) is very specifically marked as GPL. Most
>>> headers/source files have no copyright notice at all, some however do,
>>> but no license in it.
>>>
>>> I asked about afa-tech and there driver status a while ago, but I guess
>>> there is no news as of yet?
>>>
>>> To summarize, I would love to test your driver, and I think i can code
>>> something up for my tuner, once these are split?
>>>
>>> Oliver
>>>
>>> On 22-02-12 23:20, Hans-Frieder Vogt wrote:
>>>> I have written a driver for the AF9035& AF9033 (called af903x),
>>>> based on
>>>> the various drivers and information floating around for these chips.
>>>> Currently, my driver only supports the devices that I am able to test.
>>>> These are
>>>> - Terratec T5 Ver.2 (also known as T6)
>>>> - Avermedia Volar HD Nano (A867)
>>>>
>>>> The driver supports:
>>>> - diversity and dual tuner (when the first frontend is used, it is in
>>>> diversity mode, when two frontends are used in dual tuner mode)
>>>> - multiple devices
>>>> - pid filtering
>>>> - remote control in NEC and RC-6 mode (currently not switchable, but
>>>> depending on device)
>>>> - support for kernel 3.1, 3.2 and 3.3 series
>>>>
>>>> I have not tried to split the driver in a DVB-T receiver (af9035)
>>>> and a
>>>> frontend (af9033), because I do not see the sense in doing that for a
>>>> demodulator, that seems to be always used in combination with the very
>>>> same receiver.
>>>>
>>>> The patch is split in three parts:
>>>> Patch 1: support for tuner fitipower FC0012
>>>> Patch 2: basic driver
>>>> Patch 3: firmware
>>>>
>>>> Hans-Frieder Vogt e-mail: hfvogt<at> gmx
>>>> .dot. net
>>>> --
>>>> 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
>>> --
>>> 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
>> Hi Oliver,
>>
>> the AF9035B is in fact a DVB-T demodulator with an integrated USB
>> interface +
>> further interfaces (I erroneously called it receiver). It needs a
>> tuner to be
>> a full DVB-T stick (it seems that the it9135 is basically the AF9035
>> + an
>> integrated tuner).
>>
>> the Terratec T5 Rev. 2 and T6 consists of an AF9035B, an AF9033B (Second
>> demodulator) and dual FC0012 tuners
>> the Avermedia Volar HD Nano (A867) uses an AF9035B and an Mxl5007t tuner
>> your Asus 3100 mini uses the FCI2580 tuner.
>>
>> If there is a driver for the FCI2580 tuner then it is not a big issue
>> to make
>> it usable with the af903x driver.
> The driver is 'available' but in the AF903x_SRC package. If I would
> take the endevour into writing a driver for the FCI2580, what driver
> would be best suited as template you reccon?
>> I know of these Afatech drivers, but the main disadvantage of them is
>> in my
>> eyes that they
>> - have a lot of useless and unused code
>> - define own error codes (instead of using the standard error codes)
>> - have a compiled in firmware
> This bit I don't understand. I have not found any binary image in the
> source tree at all. If the firmware is compiled from the sources, it
> is compiled into the driver, and not uploaded to the stick when
> plugged in.
>
> The other firmware is as mentioned the infrared receive 'table', which
> provides some mapping I guess?
I was wrong, there is a headerfile, 'api/firmware.h' that does indeed
contain binary only data. Very ugly indeed.
Is this firmware specific for the AF903x chip or for the tuners? Looking
at the code it seems firmware.h contains firmware for a lot different
combinations, but I think 1 image is 'used'. I notice that one of your
firmwares contains a version number of 0.00.00 and the other one
v.10.something. Firmware.h lists the version as v.8.something so it
seems that there's several firmwares in circulation. I wonder if
firmwares are backwards compatible with various boards...
>> - have all supported tuners directly compiled in, which means that they
>> prevent tuner support to be shared between various drivers
>>
>> So, you see, there are good reasons to write a new driver for these
>> devices.
>>
>> The point with the legality: I agree that the AF903X_SRC driver is
>> unclear in
>> that respect. The glue code (under src) is explicitly marked as GPL,
>> but the
>> api code (under api) isn't marked.
>> Luckily, there is the it9135-driver from Jason Dong which is clearly
>> GPL and
>> which uses the same functions. Therefore there is effectivly example
>> code from
>> Afatech/Ite technology available that is under GPL.
>>
>> Cheers,
>>
>> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot.
>> net
> --
> 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
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-23 22:12 ` Hans-Frieder Vogt
@ 2012-02-24 15:44 ` Gianluca Gennari
0 siblings, 0 replies; 12+ messages in thread
From: Gianluca Gennari @ 2012-02-24 15:44 UTC (permalink / raw)
To: Hans-Frieder Vogt, linux-media
Il 23/02/2012 23:12, Hans-Frieder Vogt ha scritto:
> Am Donnerstag, 23. Februar 2012 schrieb Gianluca Gennari:
>> Il 22/02/2012 23:20, Hans-Frieder Vogt ha scritto:
>>> I have written a driver for the AF9035 & AF9033 (called af903x), based on
>>> the various drivers and information floating around for these chips.
>>> Currently, my driver only supports the devices that I am able to test.
>>> These are
>>> - Terratec T5 Ver.2 (also known as T6)
>>> - Avermedia Volar HD Nano (A867)
>>>
>>> The driver supports:
>>> - diversity and dual tuner (when the first frontend is used, it is in
>>> diversity mode, when two frontends are used in dual tuner mode)
>>> - multiple devices
>>> - pid filtering
>>> - remote control in NEC and RC-6 mode (currently not switchable, but
>>> depending on device)
>>> - support for kernel 3.1, 3.2 and 3.3 series
>>>
>>> I have not tried to split the driver in a DVB-T receiver (af9035) and a
>>> frontend (af9033), because I do not see the sense in doing that for a
>>> demodulator, that seems to be always used in combination with the very
>>> same receiver.
>>>
>>> The patch is split in three parts:
>>> Patch 1: support for tuner fitipower FC0012
>>> Patch 2: basic driver
>>> Patch 3: firmware
>>>
>>> Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
>>
>> Hi Hans,
>> thank you for the new af903x driver.
>> A few comments:
>>
>> 1) I think you should set up a git repository with your driver and then
>> send a PULL request to the list; as it is, the first patch is affected
>> by line-wrapping problems so it must be manually edited to be
>> applicable, and the second patch is compressed so it will be ignored by
>> patchwork.
>>
>> 2) There are a couple of small errors in the patches (see my attached
>> patches): in the dvb-usb Makefile, DVB_USB_AF903X must be replaced by
>> CONFIG_DVB_USB_AF903X otherwise the driver will not compile; also, in
>> the dvb_frontend_ops struct, the field info.type should be removed for
>> kernels >= 3.3.0.
>>
>> 3) The USB VID/PID IDs should be moved into dvb-usb-ids.h (see patch 3);
>> I also added a few IDs from the Avermedia A867 driver*. As your driver
>> supports both AF9007 and mxl5007t tuners I think this is safe.
>>
>> *http://www.avermedia.com/Support/DownloadCount.aspx?FDFId=4591
>>
>> 4) the driver also looks for a firmware file called "af35irtbl.bin" that
>> comes from the "official" ITEtech driver (if it's not present the driver
>> works anyway, but it prints an error message);
>>
>> I tested the driver with an Avermedia A867 stick (it's an OEM stick also
>> known as the Sky Italia Digital Key with blue led: 07ca:a867) on a
>> Ubuntu 10.04 system with kernel 2.6.32-38-generic-pae and the latest
>> media_build tree installed.
>>
>> The good news:
>> the driver loads properly, and, using Kaffeine, I could watch several
>> channels with a small portable antenna; I could also perform a full
>> frequency scan, finding several UHF and VHF stations. Signal strength
>> and SNR reports works really well, and they seems to give a "realistic"
>> figure of the signal quality (with both the portable and the rooftop
>> antenna).
>> When the stick is unplugged from the USB port, the driver unloads properly.
>>
>> The bad news:
>> the driver seems to "lock" the application when it tries to tune a weak
>> channel: in this cases, Kaffeine becomes unresponsive and sometimes it
>> gives a stream error; for the same reason, the full scan fails to find
>> all stations and takes a long time to complete.
>> Also, when I tried to extract the stick from the USB port during one of
>> this "freezing" periods, the system crashed :-(
>> I reproduced this bug 3 times, and the last time I was able to see a
>> kernel dump for a moment: the function that crashed the kernel was
>> "af903x_streaming_ctrl".
>> Neither of those issues are present with the Avermedia A867 original
>> driver or Antti Palosaari's af9035 driver modified to support the A867
>> stick.
>>
>> I hope this feedback will be useful to improve the driver.
>>
>> Best regards,
>> Gianluca Gennari
>
> Gianluca,
>
> thanks very much for your comments and patches. I will try the patches over
> the weekend.
>
> With respect to your comment about the locking: I suspect this is because I
> have used quite a lot of mutex locks. In particular the dual tuner stick
> behaves very sensitive to any code changes and I have fought for months (no
> joke) to get it working reasonably well (besides the bad reception problems).
> A lot of the complexity in the driver is for the dual tuner and to support the
> diversity feature.
Hi Hans,
I'm not an expert on this kind of problems, so take this further
comments with a grain of salt.
I see you always use mutex_lock(), while both the it913x driver and
Antti's af9035 driver are often using mutex_lock_interruptible() and
returning -EAGAIN when the lock request is interrupted. Could this be
the reason of the kernel crash when the stick is unplugged from the USB
port?
Moreover, you are requesting a mutex lock even for functions that are
just reading a bunch of registers (for example, to get the status or the
SNR/signal strength values). Is this really necessary? I guess this is
what is making Kaffeine unresponsive while the driver is struggling to
tune a weak channel.
Finally, I noticed that af903x_set_bus_tuner() is just setting up the
tuner_desc data structure. Is a mutex_lock really necessary in this
function?
A possible small bug: af903x_streaming_ctrl is always returning 0. I
think it should be returning "ret" in case of errors.
> As to the af35irtbl.bin firmware: this is something I just copied from previous
> drivers. I will probably just throw it out, because, as you also saw, it is
> not needed (only needed for the HID mode of the remote control).
>
> Thanks very much for your input!
>
> Regards,
>
> Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
>
Thank you for your effort.
Regards,
Gianluca
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] Support for AF9035/AF9033
2012-02-24 10:22 ` Oliver Schinagl
@ 2012-02-25 23:42 ` Hans-Frieder Vogt
0 siblings, 0 replies; 12+ messages in thread
From: Hans-Frieder Vogt @ 2012-02-25 23:42 UTC (permalink / raw)
To: Oliver Schinagl; +Cc: linux-media
Am Freitag, 24. Februar 2012 schrieb Oliver Schinagl:
> On 24-02-12 11:04, Oliver Schinagl wrote:
> > On 23-02-12 23:02, Hans-Frieder Vogt wrote:
> >> Am Donnerstag, 23. Februar 2012 schrieb Oliver Schinagl:
> >>> Hi Hans,
> >>>
> >>> I also have an AF9035 based device, the Asus 3100 Mini Plus. It has an
> >>> AF9035B demodulator and uses an FCI2580 tuner. I've used the driver
> >>> supplied by afa in the past, but haven't tested it in the last few
> >>> months. I have a git repository for that driver at
> >>> http://git.schinagl.nl/AF903x_SRC.git (it is also linked from
> >>> http://www.linuxtv.org/wiki/index.php/Asus_U3100_Mini_plus_DVB-T).
> >>>
> >>> So when you say it is also coupled with the same tuner, that's not true
> >>>
> >>> :) With that driver there where a bunch of other tuners that are used
> >>>
> >>> with this chip. I think the Asus EEEPC supported a USB dvb tuner at
> >>> some
> >>> point and there are reverences in that code for it.
> >>>
> >>> As of the legality of the code, that is uncertain. The module (compiled
> >>> from all these sources) is very specifically marked as GPL. Most
> >>> headers/source files have no copyright notice at all, some however do,
> >>> but no license in it.
> >>>
> >>> I asked about afa-tech and there driver status a while ago, but I guess
> >>> there is no news as of yet?
> >>>
> >>> To summarize, I would love to test your driver, and I think i can code
> >>> something up for my tuner, once these are split?
> >>>
> >>> Oliver
> >>>
> >>> On 22-02-12 23:20, Hans-Frieder Vogt wrote:
> >>>> I have written a driver for the AF9035& AF9033 (called af903x),
> >>>> based on
> >>>> the various drivers and information floating around for these chips.
> >>>> Currently, my driver only supports the devices that I am able to test.
> >>>> These are
> >>>> - Terratec T5 Ver.2 (also known as T6)
> >>>> - Avermedia Volar HD Nano (A867)
> >>>>
> >>>> The driver supports:
> >>>> - diversity and dual tuner (when the first frontend is used, it is in
> >>>> diversity mode, when two frontends are used in dual tuner mode)
> >>>> - multiple devices
> >>>> - pid filtering
> >>>> - remote control in NEC and RC-6 mode (currently not switchable, but
> >>>> depending on device)
> >>>> - support for kernel 3.1, 3.2 and 3.3 series
> >>>>
> >>>> I have not tried to split the driver in a DVB-T receiver (af9035)
> >>>> and a
> >>>> frontend (af9033), because I do not see the sense in doing that for a
> >>>> demodulator, that seems to be always used in combination with the very
> >>>> same receiver.
> >>>>
> >>>> The patch is split in three parts:
> >>>> Patch 1: support for tuner fitipower FC0012
> >>>> Patch 2: basic driver
> >>>> Patch 3: firmware
> >>>>
> >>>> Hans-Frieder Vogt e-mail: hfvogt<at> gmx
> >>>> .dot. net
> >>
> >> Hi Oliver,
> >>
> >> the AF9035B is in fact a DVB-T demodulator with an integrated USB
> >> interface +
> >> further interfaces (I erroneously called it receiver). It needs a
> >> tuner to be
> >> a full DVB-T stick (it seems that the it9135 is basically the AF9035
> >> + an
> >> integrated tuner).
> >>
> >> the Terratec T5 Rev. 2 and T6 consists of an AF9035B, an AF9033B (Second
> >> demodulator) and dual FC0012 tuners
> >> the Avermedia Volar HD Nano (A867) uses an AF9035B and an Mxl5007t tuner
> >> your Asus 3100 mini uses the FCI2580 tuner.
> >>
> >> If there is a driver for the FCI2580 tuner then it is not a big issue
> >> to make
> >> it usable with the af903x driver.
> >
> > The driver is 'available' but in the AF903x_SRC package. If I would
> > take the endevour into writing a driver for the FCI2580, what driver
> > would be best suited as template you reccon?
> >
> >> I know of these Afatech drivers, but the main disadvantage of them is
> >> in my
> >> eyes that they
> >> - have a lot of useless and unused code
> >> - define own error codes (instead of using the standard error codes)
> >> - have a compiled in firmware
> >
> > This bit I don't understand. I have not found any binary image in the
> > source tree at all. If the firmware is compiled from the sources, it
> > is compiled into the driver, and not uploaded to the stick when
> > plugged in.
> >
> > The other firmware is as mentioned the infrared receive 'table', which
> > provides some mapping I guess?
>
> I was wrong, there is a headerfile, 'api/firmware.h' that does indeed
> contain binary only data. Very ugly indeed.
>
> Is this firmware specific for the AF903x chip or for the tuners? Looking
> at the code it seems firmware.h contains firmware for a lot different
> combinations, but I think 1 image is 'used'. I notice that one of your
> firmwares contains a version number of 0.00.00 and the other one
> v.10.something. Firmware.h lists the version as v.8.something so it
> seems that there's several firmwares in circulation. I wonder if
> firmwares are backwards compatible with various boards...
>
All firmware that I packed in the firmware files is specific for the AF903x chip
and probably some configuration of the chip. This is however just a suggestion
based on the fact that windows drivers for the af9035 typically contain
several firmwares and several scripts (initialisation code, address/value
pairs) that are selected based on an unknown logic. Maybe all af9035/af9033
devices can be run with a single firmware, but for the moment I chose to create
several firmware files.
The tuner related initialisation is in the af903x-tuners file and should
therefore not hinder running all af9035 devices (i.e. with various tuner
types) with a single firmware.
The firmware file dvb-usb-af9035-03.fw was created based on an USB snoop of the
Terratec T6 driver. The Windows driver has the version 10.09.20.01 and I just
recorded that in the firmware.
The firmware file dvb-usb-af9035-04.fw was created from the firmware.h file of the
Avermedia Linux driver v1.0.28. I should have used this version number, but
(due to laziness) called it simply 00.00.00.00.
To make it more confusing, there is also a "link" version number and an "ofdm"
version number...
> >> - have all supported tuners directly compiled in, which means that they
> >> prevent tuner support to be shared between various drivers
> >>
> >> So, you see, there are good reasons to write a new driver for these
> >> devices.
> >>
> >> The point with the legality: I agree that the AF903X_SRC driver is
> >> unclear in
> >> that respect. The glue code (under src) is explicitly marked as GPL,
> >> but the
> >> api code (under api) isn't marked.
> >> Luckily, there is the it9135-driver from Jason Dong which is clearly
> >> GPL and
> >> which uses the same functions. Therefore there is effectivly example
> >> code from
> >> Afatech/Ite technology available that is under GPL.
> >>
> >> Cheers,
> >>
> >> Hans-Frieder Vogt e-mail: hfvogt<at> gmx .dot.
> >> net
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-02-25 23:42 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-22 22:20 [PATCH 0/3] Support for AF9035/AF9033 Hans-Frieder Vogt
2012-02-23 9:19 ` Oliver Schinagl
2012-02-23 22:02 ` Hans-Frieder Vogt
2012-02-24 10:04 ` Oliver Schinagl
2012-02-24 10:22 ` Oliver Schinagl
2012-02-25 23:42 ` Hans-Frieder Vogt
2012-02-23 16:40 ` Gianluca Gennari
2012-02-23 22:12 ` Hans-Frieder Vogt
2012-02-24 15:44 ` Gianluca Gennari
2012-02-23 17:59 ` Antti Palosaari
2012-02-23 22:28 ` Hans-Frieder Vogt
2012-02-24 3:46 ` Antti Palosaari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox