Basic AF9035/AF9033 driver
PATCH 2/3 Basic AF9035/AF9033 driver
Support for DVB-T USB 2.0 sticks based on AF9035/AF9033. Currently supported devices:
- Terratec T5 Ver.2 (also known as T6)
- Avermedia Volar HD Nano (A867)
http://home.arcor.de/hfvogt/af903x/af903x.patch.gz
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
PATCH 1/1 AF903X driver update, v1.02
This is an update of the patch "Basic AF9035/AF9033 driver" that I send to the mailing list on 22 Feb. The driver provides support for DVB-T USB 2.0 sticks based on AF9035/AF9033. Currently supported devices:
- Terratec T5 Ver.2 (also known as T6), Tuner FC0012
- Avermedia Volar HD Nano (A867R), Tuner MxL5007t
Ver 1.02 of the driver includes the following changes compared to the initial version:
- significantly reduced number of mutex calls (only remaining protection in low-level af903x_send_cmd) this change made some multiply defined function unnecessary (_internal functions and non _internal functions) maybe this reduction was a bit too agressive, but I didn't get any problems in several days testing
- reduced number of iterations in loop for lock detection (should improve response)
- correct errors in initial contribution and add proper entries in dvb-usb-ids.h (thanks to Gianluca Gennari)
- removed unnecessary (loading of rc key table) and commented out code
- minor cleanup (e.g. af903x_fe_is_locked)
because of the size of the patch here just a link:
http://home.arcor.de/hfvogt/af903x/af903x-1.02.patch.gz
drivers/media/dvb/dvb-usb/Kconfig | 8 drivers/media/dvb/dvb-usb/Makefile | 3 drivers/media/dvb/dvb-usb/af903x-cmd.h | 61 + drivers/media/dvb/dvb-usb/af903x-core.c | 453 ++++++++++++ drivers/media/dvb/dvb-usb/af903x-core.h | 59 + drivers/media/dvb/dvb-usb/af903x-devices.c | 1446 ++++++++++++++++++++++++++++++++++++++ drivers/media/dvb/dvb-usb/af903x-fe-priv.h | 202 +++++ drivers/media/dvb/dvb-usb/af903x-fe.c | 2070 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/media/dvb/dvb-usb/af903x-fe.h | 164 ++++ drivers/media/dvb/dvb-usb/af903x-reg.h | 214 +++++ drivers/media/dvb/dvb-usb/af903x-tuners.c | 447 +++++++++++ drivers/media/dvb/dvb-usb/af903x-tuners.h | 62 + drivers/media/dvb/dvb-usb/af903x.h | 51 + drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 16 14 files changed, 5256 insertions(+)
Please try the driver and give feedback.
Cheers,
Hans-Frieder Vogt e-mail: hfvogt <at> gmx .dot. net
Re: [PATCH] AF903X driver update, v1.02
Il 11/03/2012 16:23, Hans-Frieder Vogt ha scritto:
Quoted 7 lines
This is an update of the patch "Basic AF9035/AF9033 driver" that I send to the mailing list on 22 Feb. The driver provides support for DVB-T USB 2.0 sticks based on AF9035/AF9033. Currently supported devices:
- Terratec T5 Ver.2 (also known as T6), Tuner FC0012
- Avermedia Volar HD Nano (A867R), Tuner MxL5007tVer 1.02 of the driver includes the following changes compared to the initial version:
Quoted 8 lines
- significantly reduced number of mutex calls (only remaining protection in low-level
af903x_send_cmd) this change made some multiply defined function unnecessary (_internalfunctions and non_internalfunctions) maybe this reduction was a bit too agressive, but I didn't get any problems in several days testing
- reduced number of iterations in loop for lock detection (should improve response)
- correct errors in initial contribution and add proper entries indvb-usb-ids.h(thanks to Gianluca Gennari)
- removed unnecessary (loading of rc key table) and commented out code
- minor cleanup (e.g.af903x_fe_is_locked)
Hi Hans,
I just tested the new version of the driver on my a867 stick (single mxl5007 tuner), on Ubuntu 11.10 with a vanilla 3.2.9 kernel and the latest media_build tree installed.
I can confirm the two main issues I found on the previous version are completely solved.
In fact, Kaffeine is much more responsive now, and I can also open the window with the signal strength/quality bars without any sluggishness. I also unplugged the device from the USB port under several different conditions (watching a channel, doing a channel scan and so on) without any kernel crash.
I tested several channels (UHF, VHF, QAM64, QAM16, QPSK, 8MHz, 7MHz,...) with no problem: the reception was stable in all configurations. Zapping is also much faster with this version. I will run longer tests in the coming days.
The only minor issues that I could find are related to channel scanning. A full scan with Kaffeine takes much longer than with other sticks (most of the time is spent on empty frequencies).
Despite the long wait, some frequency is not locked (for example, the very first VHF frequency, channel 5, is missed 100% of the times). This problem seem to disappear disabling the PID filter (but I need further testing to draw any conclusion).
Also, during a full scan, Kaffeine becomes sluggish again.
In the end, the driver seem to work fine now, with only a few minor issues.
Thank you for your effort.
Regards,
Gianluca
Re: [PATCH] AF903X driver update, v1.02
Quoted 35 lines · Gianluca Gennari
Il 11/03/2012 16:23, Hans-Frieder Vogt ha scritto:
Quoted 7 lines
This is an update of the patch "Basic AF9035/AF9033 driver" that I send to the mailing list on 22 Feb. The driver provides support for DVB-T USB 2.0 sticks based on AF9035/AF9033. Currently supported devices:
- Terratec T5 Ver.2 (also known as T6), Tuner FC0012
- Avermedia Volar HD Nano (A867R), Tuner MxL5007tVer 1.02 of the driver includes the following changes compared to the initial version:
Quoted 8 lines
- significantly reduced number of mutex calls (only remaining protection in low-level
af903x_send_cmd) this change made some multiply defined function unnecessary (_internalfunctions and non_internalfunctions) maybe this reduction was a bit too agressive, but I didn't get any problems in several days testing
- reduced number of iterations in loop for lock detection (should improve response)
- correct errors in initial contribution and add proper entries indvb-usb-ids.h(thanks to Gianluca Gennari)
- removed unnecessary (loading of rc key table) and commented out code
- minor cleanup (e.g.af903x_fe_is_locked)Hi Hans,
I just tested the new version of the driver on my a867 stick (single mxl5007 tuner), on Ubuntu 11.10 with a vanilla 3.2.9 kernel and the latestmedia_buildtree installed.I can confirm the two main issues I found on the previous version are completely solved.
In fact, Kaffeine is much more responsive now, and I can also open the window with the signal strength/quality bars without any sluggishness. I also unplugged the device from the USB port under several different conditions (watching a channel, doing a channel scan and so on) without any kernel crash.I tested several channels (UHF, VHF, QAM64, QAM16, QPSK, 8MHz, 7MHz,...) with no problem: the reception was stable in all configurations. Zapping is also much faster with this version. I will run longer tests in the coming days.
Quoted 7 lines
The only minor issues that I could find are related to channel scanning. A full scan with Kaffeine takes much longer than with other sticks (most of the time is spent on empty frequencies).
Despite the long wait, some frequency is not locked (for example, the very first VHF frequency, channel 5, is missed 100% of the times). This problem seem to disappear disabling the PID filter (but I need further testing to draw any conclusion).
This is a problem with the stream USB urb buffers being too big with the PID filter on. Scan, w_scan etc only request network information PIDs
Network information PIDs are not transmitted that often so the buffer takes ages to fill up and scan etc times out.
Extended time out is required.
scan -5w_scan -F
A solution is to keep the stream USB urb buffer size low. 940(5 * 188) bytes is the ideal, but there is a concern that the USB bus may not be able to reach throughput with just 10 buffers on HD channels or when the user turns the PID filter off. A buffer size of 3948 (21 * 188) seems a compromise.
Regards
Malcolm
Quoted 8 lines
Also, during a full scan, Kaffeine becomes sluggish again.
In the end, the driver seem to work fine now, with only a few minor issues.
Thank you for your effort.
Regards,
Gianluca
Em 22-02-2012 20:21, Hans-Frieder Vogt escreveu:
Quoted 8 lines
Support for DVB-T USB 2.0 sticks based on AF9035/AF9033. Currently supported devices:
- Terratec T5 Ver.2 (also known as T6)
- Avermedia Volar HD Nano (A867)Signed-off-by Hans-Frieder Vogt <[email protected]>
Please, don't submit patches like that. The Linuxtv patchwork will never get it (http://linuxtv.org/patchwork).
Thanks,
Mauro
Quoted 6 lines
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thank you for working on a af903x driver.
I tried to test the driver on a debian 3.2 kernel, after applying a small fix:
drivers/media/dvb/dvb-usb/Makefile 2012-02-20 23:22:38.385877784 +0100 obj-$(CONFIG_DVB_USB_DTV5100) += dvb-usb · line 79
Quoted 9 lines
diff -Nupr a/drivers/media/dvb/dvb-usb/Makefile b/drivers/media/dvb/dvb-usb/Makefile
drivers/media/dvb/dvb-usb/Makefile 2012-02-20 23:22:38.385877784 +0100 renamed from drivers/media/dvb/dvb-usb/Makefile 2012-01-22 02:53:17.000000000 +0100 +2
-0@@ -75,6 +75,9 @@ obj-$(CONFIG_DVB_USB_DTV5100) += dvb-usb 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
It should be CONFIG_DVB_USB_AF903X here.
drivers/media/dvb/dvb-usb/Makefile 2012-02-20 23:22:38.385877784 +0100 obj-$(CONFIG_DVB_USB_DTV5100) += dvb-usb · line 82
Quoted 3 lines
drivers/media/dvb/dvb-usb/Makefile 2012-02-20 23:22:38.385877784 +0100 renamed from drivers/media/dvb/dvb-usb/Makefile 2012-01-22 02:53:17.000000000 +0100 +1
-0+ dvb-usb-cinergyT2-objs = cinergyT2-core.o cinergyT2-fe.o obj-$(CONFIG_DVB_USB_CINERGY_T2) += dvb-usb-cinergyT2.o
Unfortunately it turns out that my stick uses an older tuner:
[ 91.396087] usb 1-1: new high-speed USB device number 4 using ehci_hcd [ 91.534709] usb 1-1: New USB device found, idVendor=15a4, idProduct=1001 [ 91.534724] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 91.534735] usb 1-1: Product: AF9035A USB Device [ 91.534743] usb 1-1: Manufacturer: Afa Technologies Inc. [ 91.534752] usb 1-1: SerialNumber: AF0102020700001 [ 91.537709] af903x: 1 Tuners of Type=0x28, Arch Mode=DCA, Remote=NEC [ 91.552954] dvb-usb: found a 'ITEtech USB2.0 DVB-T Recevier' in cold state, will try to load a firmware [ 91.565312] dvb-usb: downloading firmware from file 'dvb-usb-af9035-03.fw' [ 91.875659] af903x: device init ... [ 91.875671] af903x: requested tuner id 40 not enabled [ 91.875682] af903x: device_init Fail: -22
So I'm wondering how big the differences between the fc0011 and fc0012 are. Can the 0011 be implemented in the 0012 driver, or does it require a separate driver? Please give me a few hints, to I can work on implementing support for that tuner.
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E
Hi Michael,
Il 20/03/2012 14:04, Michael Büsch ha scritto:
Quoted 4 lines
Thank you for working on a af903x driver.
I tried to test the driver on a debian 3.2 kernel, after applying a small fix:
It should beCONFIG_DVB_USB_AF903Xhere.
this issue is fixed in version "1.02" of the driver, posted by Hans a few days ago.
Quoted 3 lines
So I'm wondering how big the differences between the fc0011 and fc0012 are. Can the 0011 be implemented in the 0012 driver, or does it require a separate driver? Please give me a few hints, to I can work on implementing support for that tuner.
I have no idea about the real differences between the two tuner models, but here you can find an old "leaked" af9035 driver with support for several tuners, including fc0011 and fc0012:
https://bitbucket.org/voltagex/af9035/src
(look under the "api" subdir for the tuners).
The driver is not working with recent kernels, but probably you can extract the information needed to implement a proper kernel driver for fc0011, using the fc0012 driver written by Hans as a reference.
Best regards,
Gianluca
Quoted 10 lines · On Tue, 20 Mar 2012 17:27:45 +0100 Gianluca Gennari <[email protected]> wrote:
Hi Michael,
Il 20/03/2012 14:04, Michael Büsch ha scritto:
Quoted 4 lines
Thank you for working on a af903x driver.
I tried to test the driver on a debian 3.2 kernel, after applying a small fix:
It should beCONFIG_DVB_USB_AF903Xhere.this issue is fixed in version "1.02" of the driver, posted by Hans a few days ago.
I can only find the post from Feb 22th, which includes this glitch. Can you point me to the newer post in the list archives?
Quoted 11 lines
Quoted 3 lines
So I'm wondering how big the differences between the fc0011 and fc0012 are. Can the 0011 be implemented in the 0012 driver, or does it require a separate driver? Please give me a few hints, to I can work on implementing support for that tuner.
I have no idea about the real differences between the two tuner models, but here you can find an old "leaked" af9035 driver with support for several tuners, including fc0011 and fc0012:
https://bitbucket.org/voltagex/af9035/src
(look under the "api" subdir for the tuners).
Yeah I know about that "thing". It makes my eyes bleed, though.
But the author of this document pointed me to this:
http://linuxtv.org/wiki/index.php/Fitipower
That seems pretty useful, in addition to the existing crap driver.
Quoted 3 lines
The driver is not working with recent kernels, but probably you can extract the information needed to implement a proper kernel driver for fc0011, using the fc0012 driver written by Hans as a reference.
Yeah after looking at things it seems best to have a separate module. I already started to put the boilerplate code together and I'm currently putting the various device specific bits in place.
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E
Il 20/03/2012 17:37, Michael Büsch ha scritto:
Quoted 8 lines
Quoted 5 lines · On Tue, 20 Mar 2012 17:27:45 +0100 Gianluca Gennari <[email protected]> wrote:
Hi Michael,
Il 20/03/2012 14:04, Michael Büsch ha scritto:
Quoted 2 lines
Thank you for working on a af903x driver.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
I tried to test the driver on a debian 3.2 kernel, after applying a small fix:
It should beCONFIG_DVB_USB_AF903Xhere.this issue is fixed in version "1.02" of the driver, posted by Hans a few days ago.
I can only find the post from Feb 22th, which includes this glitch. Can you point me to the newer post in the list archives?
Here it is:
http://www.mail-archive.com/[email protected]/msg44169.html
Quoted 18 lines
Quoted 11 lines
Quoted 3 lines
So I'm wondering how big the differences between the fc0011 and fc0012 are. Can the 0011 be implemented in the 0012 driver, or does it require a separate driver? Please give me a few hints, to I can work on implementing support for that tuner.
I have no idea about the real differences between the two tuner models, but here you can find an old "leaked" af9035 driver with support for several tuners, including fc0011 and fc0012:
https://bitbucket.org/voltagex/af9035/src
(look under the "api" subdir for the tuners).
Yeah I know about that "thing". It makes my eyes bleed, though.
But the author of this document pointed me to this:
http://linuxtv.org/wiki/index.php/Fitipower
That seems pretty useful, in addition to the existing crap driver.
Quoted 8 lines
Quoted 3 lines
The driver is not working with recent kernels, but probably you can extract the information needed to implement a proper kernel driver for fc0011, using the fc0012 driver written by Hans as a reference.
Yeah after looking at things it seems best to have a separate module. I already started to put the boilerplate code together and I'm currently putting the various device specific bits in place.
Nice!
Regards,
Gianluca
Quoted 2 lines · On Tue, 20 Mar 2012 17:49:51 +0100 Gianluca Gennari <[email protected]> wrote:
Here it is:
http://www.mail-archive.com/[email protected]/msg44169.html
Uh thanks. I must have been blinded by the AF903x_SRC driver. ;)
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E
Add fc0011 tuner support (was: [PATCH 2/3] Basic AF9035/AF9033 driver)
Okay, here we go. These patches apply on top of the latest af903x by Hans-Frieder Vogt. This adds support for the fc0011 tuner, which is used on a "cabstone" stick. (Its USB-id is already in af903x's list).
I did some _very_ basic testing on this stuff and it basically seems to work more or less.
---
Two patches for review and testing follow (inline for commenting and attached). (Yes, the '#if 0' sections are going to be removed. I'm currently testing on a 3.2 kernel, so I need them for now.)
---
drivers/media/common/tuners/Kconfig +7 -0
@@ -204,6 +204,13 @@ help NXP TDA18212 silicon tuner driver. +config MEDIA_TUNER_FC0011 + tristate "Fitipower FC0011 silicon tuner" + depends on VIDEO_MEDIA && I2C + default m if MEDIA_TUNER_CUSTOMISE + help + Fitipower FC0011 silicon tuner driver. + config MEDIA_TUNER_FC0012 tristate "Fitipower FC0012 silicon tuner" depends on VIDEO_MEDIA && I2C
drivers/media/common/tuners/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o +obj-$(CONFIG_MEDIA_TUNER_FC0011) += fc0011.o obj-$(CONFIG_MEDIA_TUNER_FC0012) += fc0012.o ccflags-y += -Idrivers/media/dvb/dvb-core
drivers/media/common/tuners/fc0011.c new file +386 -0
386 lines not on this page · raw message
drivers/media/common/tuners/fc0011.h new file +22 -0
@@ -0,0 +1,22 @@ +#ifndef LINUX_FC0011_H_ +#define LINUX_FC0011_H_ + +#include "dvb_frontend.h" + +#if defined(CONFIG_MEDIA_TUNER_FC0011 ) ||\ + defined(CONFIG_MEDIA_TUNER_FC0011_MODULE ) +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address); +#else +static inline +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address) +{ +dev_err (&i2c->dev,"Driver disabled in Kconfig\n" ); +return NULL ; +} +#endif + +#endif /* LINUX_FC0011_H_ */
drivers/media/dvb/dvb-usb/Kconfig +1 -0
@@ -342,6 +342,7 @@ config DVB_USB_AF903X tristate "Afatech AF903X DVB-T USB2.0 support" depends on DVB_USB && EXPERIMENTAL + select MEDIA_TUNER_FC0011 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_FC0012 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE help
drivers/media/dvb/dvb-usb/af903x-devices.c +4 -0
@@ -260,6 +260,7 @@ }extern struct tuner_desc tuner_af9007; +extern struct tuner_desc tuner_fc0011;extern struct tuner_desc tuner_fc0012;extern struct tuner_desc tuner_mxl5007t;
@@ -273,6 +274,9 @@case TUNER_AF9007 : ctx->tuner_desc = &tuner_af9007;break ; +case TUNER_FC0011 : + ctx->tuner_desc = &tuner_fc0011; +break ;case TUNER_FC0012 : ctx->tuner_desc = &tuner_fc0012;break ;
drivers/media/dvb/dvb-usb/af903x-fe.c +7 -0
@@ -28,6 +28,7 @@#include "af903x-fe.h" #include "af903x-fe-priv.h" #include "dvb_frontend.h" +#include "fc0011.h" #include "fc0012.h" #include "mxl5007t.h"
@@ -1990,6 +1991,12 @@switch (ctx->tuner_desc->tunerId) {case TUNER_AF9007 :break ; +case TUNER_FC0011 : + ret =dvb_attach (fc0011_attach, frontend, i2c_adap, + id ==0 ? ctx->tuner_desc->tuner_addr : + ctx->tuner_desc->tuner_addr +1 ) + ==NULL ? -ENODEV :0 ; +break ;case TUNER_FC0012 : ret = dvb_attach(fc0012_attach, frontend, i2c_adap, id == 0 ? ctx->tuner_desc->tuner_addr :
drivers/media/dvb/dvb-usb/af903x-tuners.c +76 -0
88 lines not on this page · raw message
Signature · 3 lines
Greetings, Michael. PGP encryption is encouraged / 908D8B0E
drivers/media/common/tuners/Kconfig +7 -0
@@ -204,6 +204,13 @@ help NXP TDA18212 silicon tuner driver. +config MEDIA_TUNER_FC0011 + tristate "Fitipower FC0011 silicon tuner" + depends on VIDEO_MEDIA && I2C + default m if MEDIA_TUNER_CUSTOMISE + help + Fitipower FC0011 silicon tuner driver. + config MEDIA_TUNER_FC0012 tristate "Fitipower FC0012 silicon tuner" depends on VIDEO_MEDIA && I2C
drivers/media/common/tuners/Makefile +1 -0
@@ -27,6 +27,7 @@ obj-$(CONFIG_MEDIA_TUNER_MAX2165) += max2165.o obj-$(CONFIG_MEDIA_TUNER_TDA18218) += tda18218.o obj-$(CONFIG_MEDIA_TUNER_TDA18212) += tda18212.o +obj-$(CONFIG_MEDIA_TUNER_FC0011) += fc0011.o obj-$(CONFIG_MEDIA_TUNER_FC0012) += fc0012.o ccflags-y += -Idrivers/media/dvb/dvb-core
drivers/media/common/tuners/fc0011.c new file +386 -0
386 lines not on this page · raw message
drivers/media/common/tuners/fc0011.h new file +22 -0
@@ -0,0 +1,22 @@ +#ifndef LINUX_FC0011_H_ +#define LINUX_FC0011_H_ + +#include "dvb_frontend.h" + +#if defined(CONFIG_MEDIA_TUNER_FC0011 ) ||\ + defined(CONFIG_MEDIA_TUNER_FC0011_MODULE ) +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address); +#else +static inline +struct dvb_frontend *fc0011_attach (struct dvb_frontend *fe, +struct i2c_adapter *i2c, +u8 i2c_address) +{ +dev_err (&i2c->dev,"Driver disabled in Kconfig\n" ); +return NULL ; +} +#endif + +#endif /* LINUX_FC0011_H_ */
drivers/media/dvb/dvb-usb/Kconfig +1 -0
@@ -342,6 +342,7 @@ config DVB_USB_AF903X tristate "Afatech AF903X DVB-T USB2.0 support" depends on DVB_USB && EXPERIMENTAL + select MEDIA_TUNER_FC0011 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_FC0012 if !MEDIA_TUNER_CUSTOMISE select MEDIA_TUNER_MXL5007T if !MEDIA_TUNER_CUSTOMISE help
drivers/media/dvb/dvb-usb/af903x-devices.c +4 -0
@@ -260,6 +260,7 @@ }extern struct tuner_desc tuner_af9007; +extern struct tuner_desc tuner_fc0011;extern struct tuner_desc tuner_fc0012;extern struct tuner_desc tuner_mxl5007t;
@@ -273,6 +274,9 @@case TUNER_AF9007 : ctx->tuner_desc = &tuner_af9007;break ; +case TUNER_FC0011 : + ctx->tuner_desc = &tuner_fc0011; +break ;case TUNER_FC0012 : ctx->tuner_desc = &tuner_fc0012;break ;
drivers/media/dvb/dvb-usb/af903x-fe.c +7 -0
@@ -28,6 +28,7 @@#include "af903x-fe.h" #include "af903x-fe-priv.h" #include "dvb_frontend.h" +#include "fc0011.h" #include "fc0012.h" #include "mxl5007t.h"
@@ -1990,6 +1991,12 @@switch (ctx->tuner_desc->tunerId) {case TUNER_AF9007 :break ; +case TUNER_FC0011 : + ret =dvb_attach (fc0011_attach, frontend, i2c_adap, + id ==0 ? ctx->tuner_desc->tuner_addr : + ctx->tuner_desc->tuner_addr +1 ) + ==NULL ? -ENODEV :0 ; +break ;case TUNER_FC0012 : ret = dvb_attach(fc0012_attach, frontend, i2c_adap, id == 0 ? ctx->tuner_desc->tuner_addr :
drivers/media/dvb/dvb-usb/af903x-tuners.c +76 -0
88 lines not on this page · raw message
Quoted 10 lines · Gianluca Gennari
Hi Michael,
Il 20/03/2012 14:04, Michael Büsch ha scritto:
Quoted 4 lines
Thank you for working on a af903x driver.
I tried to test the driver on a debian 3.2 kernel, after applying a small fix:
It should beCONFIG_DVB_USB_AF903Xhere.this issue is fixed in version "1.02" of the driver, posted by Hans a few days ago.
Quoted 8 lines
Quoted 3 lines
So I'm wondering how big the differences between the fc0011 and fc0012 are. Can the 0011 be implemented in the 0012 driver, or does it require a separate driver? Please give me a few hints, to I can work on implementing support for that tuner.
I have no idea about the real differences between the two tuner models, but here you can find an old "leaked" af9035 driver with support for several tuners, including fc0011 and fc0012:
I also have a git repository, http://git.schinagl.nl/AF903x_SRC.git which should work with recent kernels. I haven't tested it extensively however, seeing what this new AF9035 driver will do for my stick :)
Quoted 12 lines
(look under the "api" subdir for the tuners).
The driver is not working with recent kernels, but probably you can extract the information needed to implement a proper kernel driver for fc0011, using the fc0012 driver written by Hans as a reference.Best regards,
Gianluca
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html