Add support for TechniSat SkyStar S2 / CX24120-13Z frontend
PATCH 1/1 Add support for TechniSat SkyStar S2 / CX24120-13Z frontend
Hi all,
some (longer) time ago, I posted to this list concerning the CX24120-frontend
(http://www.spinics.net/lists/linux-media/msg33717.html). By now I modified the patch to work with linux-3.4-r1 (after the DVB-interface changes):
[ 2.434181] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV
receiver chip loaded successfully
[ 2.434240] flexcop-pci: will use the HW PID filter.
[ 2.434242] flexcop-pci: card revision 2
[ 2.438105] DVB: registering new adapter (FlexCop Digital TV device)
[ 2.440018] b2c2-flexcop: MAC address = 00:08:c9:e0:87:57
[ 2.440024] CX24120: cx24120_attach: -> Conexant cx24120/cx24118 -
DVBS/S2 Satellite demod/tuner
[ 2.440025] CX24120: cx24120_attach: -> Driver version: 'SVT - 0.0.4a
03.04.2012'
[ 2.440149] CX24120: cx24120_attach: -> Demod CX24120 rev. 0x07 detected.
[ 2.440150] CX24120: cx24120_attach: -> Conexant cx24120/cx24118 -
DVBS/S2 Satellite demod/tuner ATTACHED.
[ 2.440440] b2c2-flexcop: ISL6421 successfully attached.
[ 2.440440] b2c2-flexcop: found 'Conexant CX24120/CX24118' .
[ 2.440442] DVB: registering adapter 0 frontend 0 (Conexant
CX24120/CX24118)...
[ 2.440648] b2c2-flexcop: initialization of 'Sky2PC/SkyStar S2DVB-S/S2 rev 3.3' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
As stated in the original message, the patch is not written by me, the author is Sergey Tyurin, I just modified it so it keeps working with current kernels. Since I don't know an appropiate location for publishing this, I thought this is best sent upstream.
This patch was tested with some channels (SDTV, HDTV and audio only (radio)) from Astra-19.2E in Europe.
If you have any comments abouth things that stop the patch from going upstream, please feel free to tell me and I'll see if I can change them.
Best regards,
Jannis Achstetter
drivers/media/dvb/b2c2/flexcop-common.h +4 -0
@@ -91,6 +91,8 @@int feedcount;int pid_filtering;int fullts_streaming_state; +/* the stream will be activated by an externally (by the fe for example) */ +int need_external_stream_control;/* bus specific callbacks */ flexcop_ibi_value(*read_ibi_reg) (struct flexcop_device *,
@@ -177,6 +179,8 @@ struct dvb_demux_feed *dvbdmxfeed, int onoff);void flexcop_hw_filter_init (struct flexcop_device *fc); +extern void flexcop_external_stream_control (struct dvb_frontend *fe,u8 onoff); +void flexcop_smc_ctrl (struct flexcop_device *fc,int onoff);void flexcop_set_mac_filter (struct flexcop_device *fc,u8 mac[6 ]);
drivers/media/dvb/b2c2/flexcop-fe-tuner.c +40 -7
75 lines not on this page · raw message
drivers/media/dvb/b2c2/flexcop-hw-filter.c +7 -0
@@ -11,6 +11,12 @@deb_ts ("rcv_data is now: '%s'\n" , onoff ?"on" :"off" ); } +void flexcop_external_stream_control (struct dvb_frontend *fe,u8 onoff) +{ +struct flexcop_device *fc = fe->dvb->priv; +flexcop_rcv_data_ctrl (fc, onoff); +} +void flexcop_smc_ctrl (struct flexcop_device *fc,int onoff) {flexcop_set_ibi_value (ctrl_208, SMC_Enable_sig, onoff);
@@ -199,6 +205,7 @@/* if it was the first or last feed request change the stream-status */ if (fc->feedcount == onoff) { +if (!fc->need_external_stream_control)flexcop_rcv_data_ctrl (fc, onoff);if (fc->stream_control)/* device specific stream control */ fc->stream_control (fc, onoff);
drivers/media/dvb/b2c2/flexcop-misc.c +1 -0
@@ -56,6 +56,7 @@ [FC_SKY_REV26] = "Sky2PC/SkyStar 2 DVB-S rev 2.6", [FC_SKY_REV27] = "Sky2PC/SkyStar 2 DVB-S rev 2.7a/u", [FC_SKY_REV28] = "Sky2PC/SkyStar 2 DVB-S rev 2.8", + [FC_SKYS2_REV33]= "Sky2PC/SkyStar S2 DVB-S/S2 rev 3.3", };static const char *flexcop_bus_names[] = {
drivers/media/dvb/b2c2/flexcop-reg.h +1 -0
@@ -24,6 +24,7 @@FC_SKY_REV26 ,FC_SKY_REV27 ,FC_SKY_REV28 , +FC_SKYS2_REV33 , } flexcop_device_type_t; typedef enum {
drivers/media/dvb/b2c2/Kconfig +1 -0
@@ -1,6 +1,7 @@ config DVB_B2C2_FLEXCOP tristate "Technisat/B2C2 FlexCopII(b) and FlexCopIII adapters" depends on DVB_CORE && I2C + select DVB_CX24120 if !DVB_FE_CUSTOMISE select DVB_PLL if !DVB_FE_CUSTOMISE select DVB_STV0299 if !DVB_FE_CUSTOMISE select DVB_MT352 if !DVB_FE_CUSTOMISE
drivers/media/dvb/frontends/cx24120.c +1053 -0
1,053 lines not on this page · raw message
drivers/media/dvb/frontends/cx24120_const.h +259 -0
259 lines not on this page · raw message
drivers/media/dvb/frontends/cx24120.h +59 -0
59 lines not on this page · raw message
drivers/media/dvb/frontends/Kconfig +7 -0
@@ -18,6 +18,13 @@ comment "Multistandard (satellite) frontends" depends on DVB_CORE +config DVB_CX24120 + tristate "Conexant CX24120 based" + depends on DVB_CORE && I2C + default m if DVB_FE_CUSTOMISE + help + A DVB-S/DVB-S2 tuner module. Say Y when you want to support this frontend. + config DVB_STB0899 tristate "STB0899 based" depends on DVB_CORE && I2C
drivers/media/dvb/frontends/Makefile +1 -0
@@ -20,6 +20,7 @@ obj-$(CONFIG_DVB_CX22700) += cx22700.o obj-$(CONFIG_DVB_S5H1432) += s5h1432.o obj-$(CONFIG_DVB_CX24110) += cx24110.o +obj-$(CONFIG_DVB_CX24120) += cx24120.o obj-$(CONFIG_DVB_TDA8083) += tda8083.o obj-$(CONFIG_DVB_L64781) += l64781.o obj-$(CONFIG_DVB_DIB3000MB) += dib3000mb.o
Hi Jannis,
Em 04-04-2012 04:11, Jannis escreveu:
Quoted 26 lines
Hi all,
some (longer) time ago, I posted to this list concerning the CX24120-frontend
(http://www.spinics.net/lists/linux-media/msg33717.html). By now I modified the patch to work with linux-3.4-r1 (after the DVB-interface changes):[ 2.434181] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully [ 2.434240] flexcop-pci: will use the HW PID filter. [ 2.434242] flexcop-pci: card revision 2 [ 2.438105] DVB: registering new adapter (FlexCop Digital TV device) [ 2.440018] b2c2-flexcop: MAC address = 00:08:c9:e0:87:57 [ 2.440024] CX24120: cx24120_attach: -> Conexant cx24120/cx24118 - DVBS/S2 Satellite demod/tuner [ 2.440025] CX24120: cx24120_attach: -> Driver version: 'SVT - 0.0.4a 03.04.2012' [ 2.440149] CX24120: cx24120_attach: -> Demod CX24120 rev. 0x07 detected. [ 2.440150] CX24120: cx24120_attach: -> Conexant cx24120/cx24118 - DVBS/S2 Satellite demod/tuner ATTACHED. [ 2.440440] b2c2-flexcop: ISL6421 successfully attached. [ 2.440440] b2c2-flexcop: found 'Conexant CX24120/CX24118' . [ 2.440442] DVB: registering adapter 0 frontend 0 (Conexant CX24120/CX24118)... [ 2.440648] b2c2-flexcop: initialization of 'Sky2PC/SkyStar S2
Quoted 6 lines
DVB-S/S2 rev 3.3' at the 'PCI' bus controlled by a 'FlexCopIIb' complete
As stated in the original message, the patch is not written by me, the author is Sergey Tyurin, I just modified it so it keeps working with current kernels. Since I don't know an appropiate location for publishing this, I thought this is best sent upstream.
If the patch was made by Sergey, you should add, at the beginning of the body of the email, a like like:
From: Sergey Tyurin <his@email>
and add your comments like:
[[email protected]: patch ported to the current DVB kernel ABI]
You should also add your Signed-off-by:. It is also highly recommended that you would get Sergey's Signed-off-by on it.
Please see LinuxTV developer wiki pages, in order to check the proper ways to submit the patch upstream.
In particular, please check the patch using scripts/checkpatch.pl. This tool checks the patch CodingStyle. It also checks a few trivial mistakes.
It currently doesn't like this code very much:
ERROR: Missing Signed-off-by: line(s)
total: 515 errors, 394 warnings, 1522 lines checked
NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
scripts/cleanfile
As you're not the author of the original driver, the better procedure is to submit Sergey's driver as-is (but without the Kconfig/Makefile changes, in order to avoid it to break compilation), then a patch fixing it to the current ABI from you, and patch/patch series from you fixing the CodingStyle issues.
Btw, scripts/Lindent in general solves most of those issues (although it is not a perfect tool).
Quoted 5 lines
This patch was tested with some channels (SDTV, HDTV and audio only (radio)) from Astra-19.2E in Europe.
If you have any comments abouth things that stop the patch from going upstream, please feel free to tell me and I'll see if I can change them.
I just did a quick look on it, as it is harder to analyze a code with a different CodingStyle.
There are too many EXPORT_SYMBOL() there, several of them for static functions. That's wrong. Only non-static functions used by other modules should use EXPORT_SYMBOL. Probably, the only function that requires it is cx24120_attach().
Anyway, I'll do a deeper review after you fix the pointed issues.
Quoted 3 lines
Best regards,
Jannis Achstetter
Regards,
Mauro