Sony CXD2820R DVB-T/T2/C demodulator driver
Subsystems (2)
Steve or Andreas can do it. I am now on holiday weekend, snowboarding maybe last time for this season :)
I cannot do much until next week. All help is welcome!
Antti
Signature · 2 lines
http://palosaari.fi/ ----- Original message -----
Quoted 63 lines
If antti doesn't do this before me, I will look at this over the weekend and generate a patch against antti's current code... if that's appropriate of course (I'm new at this ;))
Regards,
Steve Kerrison.----- Reply message -----
From: "Andreas Oberritter" <[email protected]>
Date: Fri, May 6, 2011 13:36
Subject: [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver To: "Mauro Carvalho Chehab" <[email protected]>
Cc: "Steve Kerrison" <[email protected]>, <[email protected]>, "Antti Palosaari" <[email protected]>Quoted 23 lines · Mauro Carvalho Chehab
Em 06-05-2011 07:42, Steve Kerrison escreveu:
Quoted 4 lines
Hi Andreas,
From
cxd2820r_priv.h:Quoted 15 lines
Review
Quoted 11 lines
+/*
+ * FIXME: These are totally wrong and must be added properly to the API. + * Only temporary solution in order to get driver compile. + */(quoted diff) +7
-0+#define SYS_DVBT2 SYS_DAB +#define TRANSMISSION_MODE_1K 0 +#define TRANSMISSION_MODE_16K 0 +#define TRANSMISSION_MODE_32K 0 +#define GUARD_INTERVAL_1_128 0 +#define GUARD_INTERVAL_19_128 0 +#define GUARD_INTERVAL_19_256 0I believe Antti didn't want to make
frontent.hchanges until a consensus was reached on how to develop the API for T2 support.Yeah.
Quoted 8 lines
Andreas/Antti,
It seems more appropriate to remove the above hack and add Andreas patch. I've reviewed it and it seemed ok on my eyes, provided that we also update DVB specs to reflect the changes.
In special, the new DVB command should be documented:
+#define DTV_DVBT2_PLP_ID 43In addition to the patch, the PLP ID needs to be stored in struct
dtv_frontend_propertiesand used by property cache functions indvb_frontend.c.Antti, could you please complete the patch and test it with your device? This patch was adapted from an older kernel and only compile-tested few weeks ago.
Regards,
Andreas
--
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
Em 06-05-2011 09:55, Steve Kerrison escreveu:
Quoted 1 line
If antti doesn't do this before me, I will look at this over the weekend and generate a patch against antti's current code... if that's appropriate of course (I'm new at this ;))
Feel free to do it. I suspect that Antti won't work on it during this weekend. From what I understood, he's travelling in vacations.
It helps if you could also add the bits into the frontend API DocBook:
Documentation/DocBook/dvb/dvbproperty.xml
The chapter that describes DVBv5 extensions is at:
http://linuxtv.org/downloads/v4l-dvb-apis/FE_GET_PROPERTY.html
As you may realize, this chapter were originally written with a description of the ISDB-T extensions. I've imported it from a .txt file, and did just some small adjustments to glue it into the specs, but I didn't have time to make it generic enough.
So, the descriptions there for FE_[GET|SET]_PROPERTY are focused on ISDB-T. Yet, it shouldn't be hard to make it generic.
I'm sending right now a patch I just made that will better document those two calls. I'm not adding the other non-documented properties. So, there are still lots of other DVBv5 property types not documented there (feel free to send us patches if you have time for that), and there are other missing changes from DVB APIv3 time, but at least we reduce a little bit the differences between the code and the spec [1].
In the past, the specs were shipped on a separate tree, using LaTex format, and outside the kernel. So, they weren't changed when new code were added.
Now that we have it together with the kernel, we should only extend the API together with API specs, to avoid increasing the specs gap.
With the specs at the kernel, all that needs to do to re-generate is to change the xml files and run:
$ make htmldocs
Then look at the specs using your favourite browser with an URL like:
file:///home/myhome/media-tree/Documentation/DocBook/media/FE_GET_SET_PROPERTY.html
[1] From DVB API v3 to v5, the differences are at the FE_[GET/SET]_PROPERTY ioctls.
Thanks!
Mauro.
Quoted 61 lines
Regards,
Steve Kerrison.----- Reply message -----
From: "Andreas Oberritter" <[email protected]>
Date: Fri, May 6, 2011 13:36
Subject: [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver
To: "Mauro Carvalho Chehab" <[email protected]>
Cc: "Steve Kerrison" <[email protected]>, <[email protected]>, "Antti Palosaari" <[email protected]>Quoted 23 lines · Mauro Carvalho Chehab
Em 06-05-2011 07:42, Steve Kerrison escreveu:
Quoted 4 lines
Hi Andreas,
From
cxd2820r_priv.h:Quoted 15 lines
Review
Quoted 11 lines
(quoted diff) +11
-0+/* + * FIXME: These are totally wrong and must be added properly to the API. + * Only temporary solution in order to get driver compile. + */ +#define SYS_DVBT2 SYS_DAB +#define TRANSMISSION_MODE_1K 0 +#define TRANSMISSION_MODE_16K 0 +#define TRANSMISSION_MODE_32K 0 +#define GUARD_INTERVAL_1_128 0 +#define GUARD_INTERVAL_19_128 0 +#define GUARD_INTERVAL_19_256 0I believe Antti didn't want to make
frontent.hchanges until a consensus was reached on how to develop the API for T2 support.Yeah.
Quoted 8 lines
Andreas/Antti,
It seems more appropriate to remove the above hack and add Andreas patch. I've reviewed it and it seemed ok on my eyes, provided that we also update DVB specs to reflect the changes.
In special, the new DVB command should be documented:
+#defineDTV_DVBT2_PLP_ID43In addition to the patch, the PLP ID needs to be stored in struct
dtv_frontend_propertiesand used by property cache functions indvb_frontend.c.Antti, could you please complete the patch and test it with your device? This patch was adapted from an older kernel and only compile-tested few weeks ago.
Regards,
Andreas
--
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
Em 06-05-2011 12:30, Mauro Carvalho Chehab escreveu:
Quoted 11 lines
Em 06-05-2011 09:55, Steve Kerrison escreveu:
Quoted 1 line
If antti doesn't do this before me, I will look at this over the weekend and generate a patch against antti's current code... if that's appropriate of course (I'm new at this ;))
Feel free to do it. I suspect that Antti won't work on it during this weekend. From what I understood, he's travelling in vacations.
It helps if you could also add the bits into the frontend API DocBook:
Documentation/DocBook/dvb/dvbproperty.xmlThe chapter that describes DVBv5 extensions is at:
http://linuxtv.org/downloads/v4l-dvb-apis/FE_GET_PROPERTY.html
Just updated the above URL to reflect my last patch. Of course, feel free to review the patch and send comments/fixes as usual ;)
Cheers,
Mauro.
cover DVB-T2 API updates, documentation and accompanying small fixes
Hi Mauro, Antti, Andreas,
I hope this patch set is formed appropriately - it is my first patch submission direct to the linux-media group.
Following the pull of Antti's work on support for the cxd2820r and PCTV nanoStick T2 290e, this patch set implements Andreas' modifications to the API to give provisional DVB-T2 support and the removal of a workaround for this in the cxd2820r module.
In addition, there are some minor fixes to compiler warnings as a result of the expanded enums. I cannot test these myself but they treat unrecognized values as *_AUTO and I can't see where a problem would be created.
I have updated the documentation a little. If I've done the right thing then I guess there is incentive there for me continue to expand DVB related elements of the API docs.
This patch set has been tested by me on two systems, with one running a MythTV backend utilising a long-supported DVB tuner. MythTV works fine with the old tuner and the nanoStick T2 290e works in VLC. I've yet to test the 290e in MythTV - I was more intent on making sure the patches hadn't broken userland or older devices.
Feedback, testing and discussion of where to go next is welcomed!
Regards,
Steve Kerrison.
PATCH 1/6 DVB: Add basic API support for DVB-T2 and bump minor version
In reply to Mauro Carvalho ChehabFrom: Andreas Oberritter <[email protected]>
--- drivers/media/dvb/dvb-core/dvb_frontend.c | 7 +++---- include/linux/dvb/frontend.h | 20 ++++++++++++++++---- include/linux/dvb/version.h | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +3 -4
@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)break ; } -if (c->delivery_system ==SYS_ISDBT ) { -/* Fake out a generic DVB-T request so we pass validation in the ioctl */ - p->frequency = c->frequency; - p->inversion = c->inversion; +/* Fake out a generic DVB-T request so we pass validation in the ioctl */ +if ((c->delivery_system ==SYS_ISDBT ) || + (c->delivery_system ==SYS_DVBT2 )) { p->u.ofdm.constellation =QAM_AUTO ; p->u.ofdm.code_rate_HP =FEC_AUTO ; p->u.ofdm.code_rate_LP =FEC_AUTO ;
include/linux/dvb/frontend.h +16 -4
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode {TRANSMISSION_MODE_2K ,TRANSMISSION_MODE_8K ,TRANSMISSION_MODE_AUTO , - TRANSMISSION_MODE_4K +TRANSMISSION_MODE_4K , +TRANSMISSION_MODE_1K , +TRANSMISSION_MODE_16K , +TRANSMISSION_MODE_32K , } fe_transmit_mode_t;typedef enum fe_bandwidth {BANDWIDTH_8_MHZ ,BANDWIDTH_7_MHZ ,BANDWIDTH_6_MHZ , -BANDWIDTH_AUTO +BANDWIDTH_AUTO , +BANDWIDTH_5_MHZ , +BANDWIDTH_10_MHZ , +BANDWIDTH_1_712_MHZ , }fe_bandwidth_t ;
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval {GUARD_INTERVAL_1_16 ,GUARD_INTERVAL_1_8 ,GUARD_INTERVAL_1_4 , - GUARD_INTERVAL_AUTO +GUARD_INTERVAL_AUTO , +GUARD_INTERVAL_1_128 , +GUARD_INTERVAL_19_128 , +GUARD_INTERVAL_19_256 , } fe_guard_interval_t;
@@ -305,7 +314,9 @@ struct dvb_frontend_event {#define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system {SYS_DMBTH ,SYS_CMMB ,SYS_DAB , +SYS_DVBT2 , } fe_delivery_system_t; struct dtv_cmds_h {
include/linux/dvb/version.h +1 -1
@@ -24,6 +24,6 @@#define _DVBVERSION_H_#define DVB_API_VERSION 5 -#define DVB_API_VERSION_MINOR 2 +#define DVB_API_VERSION_MINOR 3#endif /*_DVBVERSION_H_*/
Signature · 1 line
1.7.1
PATCH 2/6 cxd2820r: Remove temporary T2 API hack
In reply to Mauro Carvalho ChehabUnimplemented delivery system and modes were #define'd to arbitrary values for internal use. API now includes these values so we can remove this hack.
--- drivers/media/dvb/frontends/cxd2820r_priv.h | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-)
drivers/media/dvb/frontends/cxd2820r_priv.h +0 -12
@@ -40,18 +40,6 @@#undef warn #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) -/* -* FIXME: These are totally wrong and must be added properly to the API. -* Only temporary solution in order to get driver compile. -*/ -#define SYS_DVBT2 SYS_DAB -#define TRANSMISSION_MODE_1K 0 -#define TRANSMISSION_MODE_16K 0 -#define TRANSMISSION_MODE_32K 0 -#define GUARD_INTERVAL_1_128 0 -#define GUARD_INTERVAL_19_128 0 -#define GUARD_INTERVAL_19_256 0 -struct reg_val_mask {u32 reg;u8 val;
Signature · 1 line
1.7.1
PATCH 3/6 drxd: Fix warning caused by new entries in an enum
In reply to Mauro Carvalho ChehabAdditional bandwidth modes have been added in frontend.h drxd_hard.c had no default case so the compiler was warning about a non-exhausive switch statement.
This has been fixed by making the default behaviour the same as BANDWIDTH_AUTO, with the addition of a printk to notify if this ever happens.
--- drivers/media/dvb/frontends/drxd_hard.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/media/dvb/frontends/drxd_hard.c +3 -0
@@ -2325,6 +2325,9 @@ static int DRX_Start(struct drxd_state *state, s32 off)InitEC and ResetEC functions */ switch (p->bandwidth) { +default : +printk (KERN_INFO "drxd: Unsupported bandwidth mode %u, reverting to default\n" , + p->bandwidth);case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ :/* (64/7)*(8/8)*1000000 */
Signature · 1 line
1.7.1
PATCH 4/6 mxl5005: Fix warning caused by new entries in an enum
In reply to Mauro Carvalho ChehabAdditional bandwidth modes have been added in frontend.h mxl5005s.c had no default case so the compiler was warning about a non-exhausive switch statement.
--- drivers/media/common/tuners/mxl5005s.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/media/common/tuners/mxl5005s.c +3 -0
@@ -4020,6 +4020,9 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,case BANDWIDTH_7_MHZ : req_bw =MXL5005S_BANDWIDTH_7MHZ ;break ; +default : +dprintk (1 ,"%s: Unsupported bandwidth mode %u, reverting to default\n" , + __func__,params->u.ofdm.bandwidth);case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ : req_bw =MXL5005S_BANDWIDTH_8MHZ ;
Signature · 1 line
1.7.1
PATCH 5/6 cxd2820r: Update frontend capabilities to advertise QAM-256
In reply to Mauro Carvalho ChehabThis is supported in DVB-T2 mode, so added to the T/T2 frontend.
--- drivers/media/dvb/frontends/cxd2820r_core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/media/dvb/frontends/cxd2820r_core.c +2 -1
@@ -855,7 +855,8 @@ static struct dvb_frontend_ops cxd2820r_ops[2] = {FE_CAN_FEC_3_4 |FE_CAN_FEC_5_6 |FE_CAN_FEC_7_8 |FE_CAN_FEC_AUTO |FE_CAN_QPSK |FE_CAN_QAM_16 | -FE_CAN_QAM_64 |FE_CAN_QAM_AUTO | +FE_CAN_QAM_64 |FE_CAN_QAM_256 | +FE_CAN_QAM_AUTO |FE_CAN_TRANSMISSION_MODE_AUTO |FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
Signature · 1 line
1.7.1
PATCH 6/6 Documentation: Update to include DVB-T2 additions
In reply to Mauro Carvalho ChehabA few new capabilities added to frontend.h for DVB-T2. Added these to the documentation plus some notes explaining that they are used by the T2 delivery system.
--- Documentation/DocBook/dvb/dvbproperty.xml | 21 ++++++++++++++++++--- Documentation/DocBook/dvb/frontend.h.xml | 20 ++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-)
Documentation/DocBook/dvb/dvbproperty.xml +18 -3
@@ -217,9 +217,12 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>Bandwidth for the channel, in HZ.</para> <para>Possible values: + <constant>1712000</constant>, + <constant>5000000</constant>, <constant>6000000</constant>, <constant>7000000</constant>, - <constant>8000000</constant>. + <constant>8000000</constant>, + <constant>10000000</constant>. </para> <para>Notes:</para>
@@ -231,6 +234,8 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from other parameters (DTV_ISDBT_SB_SEGMENT_IDX, DTV_ISDBT_SB_SEGMENT_COUNT).</para> + <para>5) DVB-T supports 6, 7 and 8MHz.</para> + <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para> </section> <section id="DTV_DELIVERY_SYSTEM">
@@ -257,6 +262,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; </programlisting>
@@ -273,7 +279,10 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; </programlisting>
@@ -284,6 +293,8 @@ typedef enum fe_transmit_mode { <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the hardware will try to find the correct FFT-size (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> + <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para> </section> <section id="DTV_GUARD_INTERVAL">
@@ -296,7 +307,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t; </programlisting>
@@ -304,6 +318,7 @@ typedef enum fe_guard_interval { <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will try to find the correct guard interval (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> </section> </section>
Documentation/DocBook/dvb/frontend.h.xml +16 -4
@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO + BANDWIDTH_AUTO, + BANDWIDTH_5_MHZ, + BANDWIDTH_10_MHZ, + BANDWIDTH_1_712_MHZ, } fe_bandwidth_t;
@@ -192,7 +198,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t;
@@ -306,7 +315,9 @@ struct dvb_frontend_event { #define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,
@@ -338,6 +349,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; struct dtv_cmds_h {
Signature · 1 line
1.7.1
Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
In reply to Steve KerrisonEm 08-05-2011 12:51, Steve Kerrison escreveu:
Quoted 4 lines
Hi Mauro, Antti, Andreas,
I hope this patch set is formed appropriately - it is my first patch submission direct to the linux-media group.
They look sane on my eyes. I'll comment patch by patch were needed. Non-commented patches mean that they're ok.
PS.: as I'm traveling abroad this week, I may eventually not apply the patch series this week.
Quoted 25 lines
Following the pull of Antti's work on support for the cxd2820r and PCTV nanoStick T2 290e, this patch set implements Andreas' modifications to the API to give provisional DVB-T2 support and the removal of a workaround for this in the cxd2820r module.
In addition, there are some minor fixes to compiler warnings as a result of the expanded enums. I cannot test these myself but they treat unrecognized values as
*_AUTOand I can't see where a problem would be created.I have updated the documentation a little. If I've done the right thing then I guess there is incentive there for me continue to expand DVB related elements of the API docs.
This patch set has been tested by me on two systems, with one running a MythTV backend utilising a long-supported DVB tuner. MythTV works fine with the old tuner and the nanoStick T2 290e works in VLC. I've yet to test the 290e in MythTV - I was more intent on making sure the patches hadn't broken userland or older devices.
Feedback, testing and discussion of where to go next is welcomed!
Regards,
Steve Kerrison.
Re: [PATCH 2/6] cxd2820r: Remove temporary T2 API hack
In reply to Steve KerrisonEm 08-05-2011 12:51, Steve Kerrison escreveu:
Quoted 19 lines
Unimplemented delivery system and modes were #define'd to arbitrary values for internal use. API now includes these values so we can remove this hack.
Signed-off-by Steve Kerrison <[email protected]>--- drivers/media/dvb/frontends/cxd2820r_priv.h | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-)drivers/media/dvb/frontends/cxd2820r_priv.h +0
-2@@ -40,18 +40,6 @@#undef warn #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) -/* -* FIXME: These are totally wrong and must be added properly to the API.
drivers/media/dvb/frontends/cxd2820r_priv.h line 54
Quoted 10 lines
drivers/media/dvb/frontends/cxd2820r_priv.h +0
-10-* Only temporary solution in order to get driver compile. -*/ -#define SYS_DVBT2 SYS_DAB -#define TRANSMISSION_MODE_1K 0 -#define TRANSMISSION_MODE_16K 0 -#define TRANSMISSION_MODE_32K 0 -#define GUARD_INTERVAL_1_128 0 -#define GUARD_INTERVAL_19_128 0 -#define GUARD_INTERVAL_19_256 0 -
Please, just fold this patch with Andreas one, adding a small note like:
[steve@...: removed the priv definitions from cxd2820r]
Otherwise, you'll be breaking git disect.
Thanks,
Mauro
Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
In reply to Steve KerrisonEm 08-05-2011 12:51, Steve Kerrison escreveu:
Quoted 58 lines
A few new capabilities added to
frontend.hfor DVB-T2. Added these to the documentation plus some notes explaining that they are used by the T2 delivery system.Signed-off-by Steve Kerrison <[email protected]>--- Documentation/DocBook/dvb/dvbproperty.xml | 21 ++++++++++++++++++--- Documentation/DocBook/dvb/frontend.h.xml | 20 ++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-)Documentation/DocBook/dvb/dvbproperty.xml +11
-2@@ -217,9 +217,12 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>Bandwidth for the channel, in HZ.</para> <para>Possible values: + <constant>1712000</constant>, + <constant>5000000</constant>, <constant>6000000</constant>, <constant>7000000</constant>, - <constant>8000000</constant>. + <constant>8000000</constant>, + <constant>10000000</constant>. </para> <para>Notes:</para>@@ -231,6 +234,8 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from other parameters (DTV_ISDBT_SB_SEGMENT_IDX, DTV_ISDBT_SB_SEGMENT_COUNT).</para> + <para>5) DVB-T supports 6, 7 and 8MHz.</para> + <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para> </section> <section id="DTV_DELIVERY_SYSTEM">@@ -257,6 +262,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; </programlisting>@@ -273,7 +279,10 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; </programlisting>
Documentation/DocBook/dvb/dvbproperty.xml typedef enum fe_transmit_mode { · line 297
Quoted 5 lines
Documentation/DocBook/dvb/dvbproperty.xml +2
-0@@ -284,6 +293,8 @@ typedef enum fe_transmit_mode { <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the hardware will try to find the correct FFT-size (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> + <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>
It makes sense to add here that ISDB-T specifies 2K, 4K and 8K. (yeah, sorry, it is my fault that I didn't notice it before ;) )
Quoted 63 lines
Documentation/DocBook/dvb/dvbproperty.xml +5
-1</section> <section id="DTV_GUARD_INTERVAL">@@ -296,7 +307,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t; </programlisting>@@ -304,6 +318,7 @@ typedef enum fe_guard_interval { <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will try to find the correct guard interval (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> </section> </section>Documentation/DocBook/dvb/frontend.h.xml +12
-3@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO + BANDWIDTH_AUTO, + BANDWIDTH_5_MHZ, + BANDWIDTH_10_MHZ, + BANDWIDTH_1_712_MHZ, } fe_bandwidth_t;@@ -192,7 +198,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t;
Documentation/DocBook/dvb/frontend.h.xml struct dvb_frontend_event { · line 319
Quoted 6 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-1@@ -306,7 +315,9 @@ struct dvb_frontend_event { #define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 +
Please document the PLP_ID as well. Just like ISDB-T, the best seems to create a section with DVB-T2 specific parameters, and add this one there, explaining its meaning.
Quoted 12 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-0+#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,@@ -338,6 +349,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; struct dtv_cmds_h {
Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
Hi Mauro
Quoted 5 lines
Documentation/DocBook/dvb/dvbproperty.xml +1
-0+ <para>3) DVB-T specifies 2K and 8K as valid sizes.</para>Documentation/DocBook/dvb/dvbproperty.xml typedef enum fe_transmit_mode { · line 297
Quoted 1 line
Documentation/DocBook/dvb/dvbproperty.xml +1
-0+ <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>It makes sense to add here that ISDB-T specifies 2K, 4K and 8K. (yeah, sorry, it is my fault that I didn't notice it before ;) )
Actually note 1) in that list declares the sizes supported by ISDB-T; but the patch doesn't show it. So there is no blame to assign :)
Quoted 7 lines
-#define
DTV_MAX_COMMANDDTV_ISDBS_TS_IDDocumentation/DocBook/dvb/frontend.h.xml struct dvb_frontend_event { · line 319
Quoted 2 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-0+#define DTV_DVBT2_PLP_ID 43 +Please document the
PLP_IDas well. Just like ISDB-T, the best seems to create a section with DVB-T2 specific parameters, and add this one there, explaining its meaning.
I have created a section for DVB-T2 parameters. It's within the main ISDB-T section. If that's not appropriate I guess it can be hauled out as it grows. However, much like Antti, I don't know much about PLP or the other features of the T2 specification, so cannot contribute a great deal yet. PLP_ID isn't used by the cxd2820r driver - it's simply specified in Andreas' API patch.
Regards,
Signature · 2 lines
Steve Kerrison MEng Hons. http://www.stevekerrison.com/
Quoted 158 lines · Mauro Carvalho Chehab
Em 08-05-2011 12:51, Steve Kerrison escreveu:
Quoted 58 lines
A few new capabilities added to
frontend.hfor DVB-T2. Added these to the documentation plus some notes explaining that they are used by the T2 delivery system.Signed-off-by Steve Kerrison <[email protected]>--- Documentation/DocBook/dvb/dvbproperty.xml | 21 ++++++++++++++++++--- Documentation/DocBook/dvb/frontend.h.xml | 20 ++++++++++++++++---- 2 files changed, 34 insertions(+), 7 deletions(-)Documentation/DocBook/dvb/dvbproperty.xml +11
-2@@ -217,9 +217,12 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>Bandwidth for the channel, in HZ.</para> <para>Possible values: + <constant>1712000</constant>, + <constant>5000000</constant>, <constant>6000000</constant>, <constant>7000000</constant>, - <constant>8000000</constant>. + <constant>8000000</constant>, + <constant>10000000</constant>. </para> <para>Notes:</para>@@ -231,6 +234,8 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from other parameters (DTV_ISDBT_SB_SEGMENT_IDX, DTV_ISDBT_SB_SEGMENT_COUNT).</para> + <para>5) DVB-T supports 6, 7 and 8MHz.</para> + <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para> </section> <section id="DTV_DELIVERY_SYSTEM">@@ -257,6 +262,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; </programlisting>@@ -273,7 +279,10 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; </programlisting>Documentation/DocBook/dvb/dvbproperty.xml typedef enum fe_transmit_mode { · line 297
Quoted 5 lines
Documentation/DocBook/dvb/dvbproperty.xml +2
-0@@ -284,6 +293,8 @@ typedef enum fe_transmit_mode { <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the hardware will try to find the correct FFT-size (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> + <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>It makes sense to add here that ISDB-T specifies 2K, 4K and 8K. (yeah, sorry, it is my fault that I didn't notice it before ;) )
Quoted 63 lines
Documentation/DocBook/dvb/dvbproperty.xml +5
-1</section> <section id="DTV_GUARD_INTERVAL">@@ -296,7 +307,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t; </programlisting>@@ -304,6 +318,7 @@ typedef enum fe_guard_interval { <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will try to find the correct guard interval (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> </section> </section>Documentation/DocBook/dvb/frontend.h.xml +12
-3@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO + BANDWIDTH_AUTO, + BANDWIDTH_5_MHZ, + BANDWIDTH_10_MHZ, + BANDWIDTH_1_712_MHZ, } fe_bandwidth_t;@@ -192,7 +198,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t;Documentation/DocBook/dvb/frontend.h.xml struct dvb_frontend_event { · line 319
Quoted 6 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-1@@ -306,7 +315,9 @@ struct dvb_frontend_event { #define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 +Please document the
PLP_IDas well. Just like ISDB-T, the best seems to create a section with DVB-T2 specific parameters, and add this one there, explaining its meaning.Documentation/DocBook/dvb/frontend.h.xml typedef enum fe_delivery_system { · line 355
Quoted 12 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-0+#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,@@ -338,6 +349,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; struct dtv_cmds_h {--
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
v2 cover DVB-T2 API updates, documentation and accompanying small fixes
In reply to Mauro Carvalho ChehabGood evening all,
This is the second version of my patch set for DVB-T2 and PCTV nanoStick T2 290e support.
Changes to cxd2820r_priv.h have been rolled into patch 1 as requested by Mauro. I hope I have done this in an appropriate way.
I have updated my drxd and mxl5005 patches to include a comment to make clear that the default case should fall through into BANDWIDTH_AUTO for bandwidth selection.
My other cxd2820r patch is trivial and unchanged from the previous submission. I considered also rolling it into the first patch in the set, but it's a separate ehancement so I've kept it as it is.
Finally I've made some documentation changes. I've added a section of DVB-T2 specific parameters, but don't have the knowledge to contribute anything useful to this section yet.
Any further feedback welcomed. I won't be likely to act upon it for a few days, however. The mailing list could probably do with a break from me bungling my way around git. :)
Regards,
Steve Kerrison.
PATCH v2 1/5 DVB: Add basic API support for DVB-T2 and bump minor version
In reply to Mauro Carvalho ChehabFrom: Andreas Oberritter <[email protected]>
[email protected]: Remove private definitions from cxd2820r that existed before API was defined
--- drivers/media/dvb/dvb-core/dvb_frontend.c | 7 +++---- drivers/media/dvb/frontends/cxd2820r_priv.h | 12 ------------ include/linux/dvb/frontend.h | 20 ++++++++++++++++---- include/linux/dvb/version.h | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +3 -4
@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)break ; } -if (c->delivery_system ==SYS_ISDBT ) { -/* Fake out a generic DVB-T request so we pass validation in the ioctl */ - p->frequency = c->frequency; - p->inversion = c->inversion; +/* Fake out a generic DVB-T request so we pass validation in the ioctl */ +if ((c->delivery_system ==SYS_ISDBT ) || + (c->delivery_system ==SYS_DVBT2 )) { p->u.ofdm.constellation =QAM_AUTO ; p->u.ofdm.code_rate_HP =FEC_AUTO ; p->u.ofdm.code_rate_LP =FEC_AUTO ;
drivers/media/dvb/frontends/cxd2820r_priv.h +0 -12
@@ -40,18 +40,6 @@#undef warn #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) -/* -* FIXME: These are totally wrong and must be added properly to the API. -* Only temporary solution in order to get driver compile. -*/ -#define SYS_DVBT2 SYS_DAB -#define TRANSMISSION_MODE_1K 0 -#define TRANSMISSION_MODE_16K 0 -#define TRANSMISSION_MODE_32K 0 -#define GUARD_INTERVAL_1_128 0 -#define GUARD_INTERVAL_19_128 0 -#define GUARD_INTERVAL_19_256 0 -struct reg_val_mask {u32 reg;u8 val;
include/linux/dvb/frontend.h +16 -4
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode {TRANSMISSION_MODE_2K ,TRANSMISSION_MODE_8K ,TRANSMISSION_MODE_AUTO , - TRANSMISSION_MODE_4K +TRANSMISSION_MODE_4K , +TRANSMISSION_MODE_1K , +TRANSMISSION_MODE_16K , +TRANSMISSION_MODE_32K , } fe_transmit_mode_t;typedef enum fe_bandwidth {BANDWIDTH_8_MHZ ,BANDWIDTH_7_MHZ ,BANDWIDTH_6_MHZ , -BANDWIDTH_AUTO +BANDWIDTH_AUTO , +BANDWIDTH_5_MHZ , +BANDWIDTH_10_MHZ , +BANDWIDTH_1_712_MHZ , }fe_bandwidth_t ;
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval {GUARD_INTERVAL_1_16 ,GUARD_INTERVAL_1_8 ,GUARD_INTERVAL_1_4 , - GUARD_INTERVAL_AUTO +GUARD_INTERVAL_AUTO , +GUARD_INTERVAL_1_128 , +GUARD_INTERVAL_19_128 , +GUARD_INTERVAL_19_256 , } fe_guard_interval_t;
@@ -305,7 +314,9 @@ struct dvb_frontend_event {#define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system {SYS_DMBTH ,SYS_CMMB ,SYS_DAB , +SYS_DVBT2 , } fe_delivery_system_t; struct dtv_cmds_h {
include/linux/dvb/version.h +1 -1
@@ -24,6 +24,6 @@#define _DVBVERSION_H_#define DVB_API_VERSION 5 -#define DVB_API_VERSION_MINOR 2 +#define DVB_API_VERSION_MINOR 3#endif /*_DVBVERSION_H_*/
Signature · 1 line
1.7.1
PATCH v2 2/5 drxd: Fix warning caused by new entries in an enum
In reply to Mauro Carvalho ChehabAdditional bandwidth modes have been added in frontend.h drxd_hard.c had no default case so the compiler was warning about a non-exhausive switch statement.
This has been fixed by making the default behaviour the same as BANDWIDTH_AUTO, with the addition of a printk to notify if this ever happens.
--- drivers/media/dvb/frontends/drxd_hard.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/dvb/frontends/drxd_hard.c +4 -0
@@ -2325,6 +2325,10 @@ static int DRX_Start(struct drxd_state *state, s32 off)InitEC and ResetEC functions */ switch (p->bandwidth) { +default : +printk (KERN_INFO "drxd: Unsupported bandwidth mode %u, reverting to default\n" , + p->bandwidth); +/* Fall back to auto */ case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ :/* (64/7)*(8/8)*1000000 */
Signature · 1 line
1.7.1
PATCH v2 3/5 mxl5005: Fix warning caused by new entries in an enum
In reply to Mauro Carvalho ChehabAdditional bandwidth modes have been added in frontend.h mxl5005s.c had no default case so the compiler was warning about a non-exhausive switch statement.
--- drivers/media/common/tuners/mxl5005s.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/media/common/tuners/mxl5005s.c +4 -0
@@ -4020,6 +4020,10 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,case BANDWIDTH_7_MHZ : req_bw =MXL5005S_BANDWIDTH_7MHZ ;break ; +default : +dprintk (1 ,"%s: Unsupported bandwidth mode %u, reverting to default\n" , + __func__,params->u.ofdm.bandwidth); +/* Fall back to auto */ case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ : req_bw =MXL5005S_BANDWIDTH_8MHZ ;
Signature · 1 line
1.7.1
PATCH v2 4/5 cxd2820r: Update frontend capabilities to advertise QAM-256
In reply to Mauro Carvalho ChehabThis is supported in DVB-T2 mode, so added to the T/T2 frontend.
--- drivers/media/dvb/frontends/cxd2820r_core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/media/dvb/frontends/cxd2820r_core.c +2 -1
@@ -855,7 +855,8 @@ static struct dvb_frontend_ops cxd2820r_ops[2] = {FE_CAN_FEC_3_4 |FE_CAN_FEC_5_6 |FE_CAN_FEC_7_8 |FE_CAN_FEC_AUTO |FE_CAN_QPSK |FE_CAN_QAM_16 | -FE_CAN_QAM_64 |FE_CAN_QAM_AUTO | +FE_CAN_QAM_64 |FE_CAN_QAM_256 | +FE_CAN_QAM_AUTO |FE_CAN_TRANSMISSION_MODE_AUTO |FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
Signature · 1 line
1.7.1
PATCH v2 5/5 Documentation: Update to include DVB-T2 additions
In reply to Mauro Carvalho ChehabA few new capabilities added to frontend.h for DVB-T2. Added these to the documentation plus some notes explaining that they are used by the T2 delivery system.
--- Documentation/DocBook/dvb/dvbproperty.xml | 36 ++++++++++++++++++++++++++-- Documentation/DocBook/dvb/frontend.h.xml | 20 +++++++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-)
Documentation/DocBook/dvb/dvbproperty.xml +33 -3
@@ -217,9 +217,12 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>Bandwidth for the channel, in HZ.</para> <para>Possible values: + <constant>1712000</constant>, + <constant>5000000</constant>, <constant>6000000</constant>, <constant>7000000</constant>, - <constant>8000000</constant>. + <constant>8000000</constant>, + <constant>10000000</constant>. </para> <para>Notes:</para>
@@ -231,6 +234,8 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from other parameters (DTV_ISDBT_SB_SEGMENT_IDX, DTV_ISDBT_SB_SEGMENT_COUNT).</para> + <para>5) DVB-T supports 6, 7 and 8MHz.</para> + <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para> </section> <section id="DTV_DELIVERY_SYSTEM">
@@ -257,6 +262,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; </programlisting>
@@ -273,7 +279,10 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; </programlisting>
@@ -284,6 +293,8 @@ typedef enum fe_transmit_mode { <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the hardware will try to find the correct FFT-size (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> + <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para> </section> <section id="DTV_GUARD_INTERVAL">
@@ -296,7 +307,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t; </programlisting>
@@ -304,6 +318,7 @@ typedef enum fe_guard_interval { <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will try to find the correct guard interval (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> </section> </section>
@@ -553,5 +568,20 @@ typedef enum fe_guard_interval { </section> </section> </section> + <section id="dvbt2-params"> + <title>DVB-T2 parameters</title> + + <para>This section covers parameters that apply only to the DVB-T2 delivery method. DVB-T2 + support is currently in the early stages development so expect this section to grow + and become more detailed with time.</para> + + <section id="dvbt2-plp-id"> + <title><constant>DTV_DVBT2_PLP_ID</constant></title> + + <para>DVB-T2 supports Physical Layer Pipes (PLP) to allow transmission of + many data types via a single multiplex. The API will soon support this + at which point this section will be expanded.</para> + </section> + </section> </section> </section>
Documentation/DocBook/dvb/frontend.h.xml +16 -4
@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO + BANDWIDTH_AUTO, + BANDWIDTH_5_MHZ, + BANDWIDTH_10_MHZ, + BANDWIDTH_1_712_MHZ, } fe_bandwidth_t;
@@ -192,7 +198,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t;
@@ -306,7 +315,9 @@ struct dvb_frontend_event { #define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,
@@ -338,6 +349,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; struct dtv_cmds_h {
Signature · 1 line
1.7.1
Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
In reply to Steve KerrisonQuoted 19 lines · Steve Kerrison
Hi Mauro
Quoted 5 lines
Documentation/DocBook/dvb/dvbproperty.xml +1
-0+ <para>3) DVB-T specifies 2K and 8K as valid sizes.</para>Documentation/DocBook/dvb/dvbproperty.xml typedef enum fe_transmit_mode { · line 297
Quoted 1 line
Documentation/DocBook/dvb/dvbproperty.xml +1
-0+ <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para>It makes sense to add here that ISDB-T specifies 2K, 4K and 8K. (yeah, sorry, it is my fault that I didn't notice it before ;) )
Actually note 1) in that list declares the sizes supported by ISDB-T; but the patch doesn't show it. So there is no blame to assign :)
Quoted 7 lines
-#define
DTV_MAX_COMMANDDTV_ISDBS_TS_IDDocumentation/DocBook/dvb/frontend.h.xml struct dvb_frontend_event { · line 319
Quoted 2 lines
Documentation/DocBook/dvb/frontend.h.xml +2
-0+#define DTV_DVBT2_PLP_ID 43 +Please document the
PLP_IDas well. Just like ISDB-T, the best seems to create a section with DVB-T2 specific parameters, and add this one there, explaining its meaning.
Quoted 6 lines
I have created a section for DVB-T2 parameters. It's within the main ISDB-T section. If that's not appropriate I guess it can be hauled out as it grows. However, much like Antti, I don't know much about PLP or the other features of the T2 specification, so cannot contribute a great deal yet.
PLP_IDisn't used by the cxd2820r driver - it's simply specified in Andreas' API patch.
In DVB-T2, each TS is contained in a 'Physical Layer Pipe' (PLP). Multiple PLPs with individual tuning parameters may be combined on a single transmitter frequency.
I don't know whether multiple PLP mode is or will be used in any country. If no PLP ID or an invalid PLP ID is specified, the behaviour of a demod may be undefined, i.e. it may select a random PLP or fail to tune.
In DVB-SI, the PLP ID is carried within the T2 delivery system descriptor.
Regards,
Andreas
Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
In reply to Steve KerrisonQuoted 18 lines · Steve Kerrison
Additional bandwidth modes have been added in
frontend.hdrxd_hard.chad no default case so the compiler was warning about a non-exhausive switch statement.This has been fixed by making the default behaviour the same as
BANDWIDTH_AUTO, with the addition of a printk to notify if this ever happens.Signed-off-by Steve Kerrison <[email protected]>--- drivers/media/dvb/frontends/drxd_hard.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/media/dvb/frontends/drxd_hard.c +0
-0
drivers/media/dvb/frontends/drxd_hard.c static int DRX_Start(struct drxd_state *state, s32 off) · line 2331
Quoted 7 lines
drivers/media/dvb/frontends/drxd_hard.c +4
-0@@ -2325,6 +2325,10 @@ static int DRX_Start(struct drxd_state *state, s32 off)InitEC and ResetEC functions */ switch (p->bandwidth) { +default : +printk (KERN_INFO "drxd: Unsupported bandwidth mode %u, reverting to default\n" , + p->bandwidth); +/* Fall back to auto */
I'd prefer returning -EINVAL for unsupported parameters.
drivers/media/dvb/frontends/drxd_hard.c static int DRX_Start(struct drxd_state *state, s32 off) · line 2334
Quoted 3 lines
drivers/media/dvb/frontends/drxd_hard.c +0
-0case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ :/* (64/7)*(8/8)*1000000 */
I already had a patch for this, but forgot to submit it together with the frontend.h bits.
Quoted 1 line
From
73d630b57f584d7e35cac5e27149cbc564aedde2Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Fri, 8 Apr 2011 16:39:20 +0000
Subject: [PATCH 2/2] DVB: drxd_hard: handle new bandwidths by returning -EINVAL
--- drivers/media/dvb/frontends/drxd_hard.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/media/dvb/frontends/drxd_hard.c +3 -0
@@ -2348,6 +2348,9 @@ static int DRX_Start(struct drxd_state *state, s32 off) status =Write16 (state,FE_AG_REG_IND_DEL__A ,71 ,0x0000 );break ; +default : + status = -EINVAL ; +break ; } status = status;if (status <0 )
Signature · 3 lines
1.7.2.5 Btw., "status = status;" looks odd.
Re: [PATCH v2 3/5] mxl5005: Fix warning caused by new entries in an enum
In reply to Steve KerrisonQuoted 14 lines · Steve Kerrison
Additional bandwidth modes have been added in
frontend.hmxl5005s.chad no default case so the compiler was warning about a non-exhausive switch statement.Signed-off-by Steve Kerrison <[email protected]>--- drivers/media/common/tuners/mxl5005s.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/media/common/tuners/mxl5005s.c +0
-0
drivers/media/common/tuners/mxl5005s.c static int mxl5005s_set_params(struct dvb_frontend *fe, · line 4029
Quoted 10 lines
drivers/media/common/tuners/mxl5005s.c +4
-0@@ -4020,6 +4020,10 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,case BANDWIDTH_7_MHZ : req_bw =MXL5005S_BANDWIDTH_7MHZ ;break ; +default : +dprintk (1 ,"%s: Unsupported bandwidth mode %u, reverting to default\n" , + __func__,params->u.ofdm.bandwidth); +/* Fall back to auto */ case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ : req_bw =MXL5005S_BANDWIDTH_8MHZ ;
Same as in 2/5.
Quoted 1 line
From
9492d6c7665bf8b55ec3a42577794cea3e87ee15Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Fri, 8 Apr 2011 16:37:57 +0000
Subject: [PATCH 1/2] DVB: mxl5005s: handle new bandwidths by returning -EINVAL
--- drivers/media/common/tuners/mxl5005s.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/media/common/tuners/mxl5005s.c +2 -0
@@ -4024,6 +4024,8 @@ static int mxl5005s_set_params(struct dvb_frontend *fe,case BANDWIDTH_8_MHZ : req_bw =MXL5005S_BANDWIDTH_8MHZ ;break ; +default : +return -EINVAL ; } }
Signature · 1 line
1.7.2.5
Re: [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version
In reply to Steve KerrisonQuoted 117 lines · Steve Kerrison
From: Andreas Oberritter <[email protected]>
[email protected]: Remove private definitions from cxd2820r that existed before API was defined
Signed-off-by Andreas Oberritter <[email protected]>Signed-off-by Steve Kerrison <[email protected]>--- drivers/media/dvb/dvb-core/dvb_frontend.c | 7 +++---- drivers/media/dvb/frontends/cxd2820r_priv.h | 12 ------------ include/linux/dvb/frontend.h | 20 ++++++++++++++++---- include/linux/dvb/version.h | 2 +- 4 files changed, 20 insertions(+), 21 deletions(-)drivers/media/dvb/dvb-core/dvb_frontend.c +3
-4@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)break ; } -if (c->delivery_system ==SYS_ISDBT ) { -/* Fake out a generic DVB-T request so we pass validation in the ioctl */ - p->frequency = c->frequency; - p->inversion = c->inversion; +/* Fake out a generic DVB-T request so we pass validation in the ioctl */ +if ((c->delivery_system ==SYS_ISDBT ) || + (c->delivery_system ==SYS_DVBT2 )) { p->u.ofdm.constellation =QAM_AUTO ; p->u.ofdm.code_rate_HP =FEC_AUTO ; p->u.ofdm.code_rate_LP =FEC_AUTO ;drivers/media/dvb/frontends/cxd2820r_priv.h +0
-12@@ -40,18 +40,6 @@#undef warn #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) -/* -* FIXME: These are totally wrong and must be added properly to the API. -* Only temporary solution in order to get driver compile. -*/ -#define SYS_DVBT2 SYS_DAB -#define TRANSMISSION_MODE_1K 0 -#define TRANSMISSION_MODE_16K 0 -#define TRANSMISSION_MODE_32K 0 -#define GUARD_INTERVAL_1_128 0 -#define GUARD_INTERVAL_19_128 0 -#define GUARD_INTERVAL_19_256 0 -struct reg_val_mask {u32 reg;u8 val;include/linux/dvb/frontend.h +16
-4@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode {TRANSMISSION_MODE_2K ,TRANSMISSION_MODE_8K ,TRANSMISSION_MODE_AUTO , - TRANSMISSION_MODE_4K +TRANSMISSION_MODE_4K , +TRANSMISSION_MODE_1K , +TRANSMISSION_MODE_16K , +TRANSMISSION_MODE_32K , } fe_transmit_mode_t;typedef enum fe_bandwidth {BANDWIDTH_8_MHZ ,BANDWIDTH_7_MHZ ,BANDWIDTH_6_MHZ , -BANDWIDTH_AUTO +BANDWIDTH_AUTO , +BANDWIDTH_5_MHZ , +BANDWIDTH_10_MHZ , +BANDWIDTH_1_712_MHZ , }fe_bandwidth_t ;@@ -191,7 +197,10 @@ typedef enum fe_guard_interval {GUARD_INTERVAL_1_16 ,GUARD_INTERVAL_1_8 ,GUARD_INTERVAL_1_4 , - GUARD_INTERVAL_AUTO +GUARD_INTERVAL_AUTO , +GUARD_INTERVAL_1_128 , +GUARD_INTERVAL_19_128 , +GUARD_INTERVAL_19_256 , } fe_guard_interval_t;@@ -305,7 +314,9 @@ struct dvb_frontend_event {#define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,@@ -337,6 +348,7 @@ typedef enum fe_delivery_system {SYS_DMBTH ,SYS_CMMB ,SYS_DAB , +SYS_DVBT2 , } fe_delivery_system_t; struct dtv_cmds_h {include/linux/dvb/version.h +0
-0
include/linux/dvb/version.h line 29
Quoted 7 lines
include/linux/dvb/version.h +1
-1@@ -24,6 +24,6 @@#define _DVBVERSION_H_#define DVB_API_VERSION 5 -#define DVB_API_VERSION_MINOR 2 +#define DVB_API_VERSION_MINOR 3#endif /*_DVBVERSION_H_*/
Please also include the following (only compile-tested) lines within this commit:
Quoted 1 line
From
4329b836a6590421b178710160fcca3b39f64e18Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Sun, 8 May 2011 22:14:07 +0000
Subject: [PATCH] DVB: dvb_frontend: add PLP ID to property cache
--- drivers/media/dvb/dvb-core/dvb_frontend.c | 6 ++++++ drivers/media/dvb/dvb-core/dvb_frontend.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +6 -0
@@ -1323,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : tvp->u.data = fe->dtv_property_cache.isdbs_ts_id;break ; +case DTV_DVBT2_PLP_ID : + tvp->u.data = c->dvbt2_plp_id; +break ;default : r =-1 ; }
@@ -1478,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : fe->dtv_property_cache.isdbs_ts_id = tvp->u.data;break ; +case DTV_DVBT2_PLP_ID : + c->dvbt2_plp_id = tvp->u.data; +break ;default : r =-1 ; }
drivers/media/dvb/dvb-core/dvb_frontend.h +3 -0
@@ -358,6 +358,9 @@ struct dtv_frontend_properties {/* ISDB-T specifics */ u32 isdbs_ts_id; + +/* DVB-T2 specifics */ +u32 dvbt2_plp_id; };struct dvb_frontend {
Signature · 1 line
1.7.2.5
Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
In reply to a message not in the archiveQuoted 7 lines · Steve Kerrison
Quick question about resubmission:
Do I resubmit all 6 (5 after fold) patches as v2, or can I ignore what is currently patch 5 as it is uncommented? I don't know enough about patchwork to know whether changing the PATCH x/n will break things or what the proper procedure is. (RTFM with appropriate URL is an appropriate response to this, of course :) )
I think that previously submitted, now obsolete patches need to be marked as superseded by hand in patchwork in any case.
Regards,
Andreas
Re: [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version
In reply to Andreas OberritterQuoted 19 lines · Andreas Oberritter
Please also include the following (only compile-tested) lines within this commit:
From
4329b836a6590421b178710160fcca3b39f64e18Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Sun, 8 May 2011 22:14:07 +0000
Subject: [PATCH] DVB:dvb_frontend: add PLP ID to property cacheSigned-off-by Andreas Oberritter <[email protected]>--- drivers/media/dvb/dvb-core/dvb_frontend.c | 6 ++++++ drivers/media/dvb/dvb-core/dvb_frontend.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-)drivers/media/dvb/dvb-core/dvb_frontend.c +0
-0
drivers/media/dvb/dvb-core/dvb_frontend.c static int dtv_property_process_get(struct dvb_frontend *fe, · line 1328
Quoted 6 lines
drivers/media/dvb/dvb-core/dvb_frontend.c +3
-0@@ -1323,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : tvp->u.data = fe->dtv_property_cache.isdbs_ts_id;break ; +case DTV_DVBT2_PLP_ID : + tvp->u.data = c->dvbt2_plp_id; +break ;
Sorry, this depends on a changeset I haven't submitted yet and thus won't compile inside your tree. See below for a fixed patch.
Quoted 28 lines
drivers/media/dvb/dvb-core/dvb_frontend.c +3
-0default : r =-1 ; }@@ -1478,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : fe->dtv_property_cache.isdbs_ts_id = tvp->u.data;break ; +case DTV_DVBT2_PLP_ID : + c->dvbt2_plp_id = tvp->u.data; +break ;default : r =-1 ; }drivers/media/dvb/dvb-core/dvb_frontend.h +3
-0@@ -358,6 +358,9 @@ struct dtv_frontend_properties {/* ISDB-T specifics */ u32 isdbs_ts_id; + +/* DVB-T2 specifics */ +u32 dvbt2_plp_id; };struct dvb_frontend {
Quoted 1 line
From
6e7abb85241e7aef5783f9c216e829de5fe90cb7Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Sun, 8 May 2011 22:14:07 +0000
Subject: [PATCH] DVB: dvb_frontend: add PLP ID to property cache
--- drivers/media/dvb/dvb-core/dvb_frontend.c | 6 ++++++ drivers/media/dvb/dvb-core/dvb_frontend.h | 3 +++ 2 files changed, 9 insertions(+), 0 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +6 -0
@@ -1323,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : tvp->u.data = fe->dtv_property_cache.isdbs_ts_id;break ; +case DTV_DVBT2_PLP_ID : + tvp->u.data = fe->dtv_property_cache.dvbt2_plp_id; +break ;default : r =-1 ; }
@@ -1478,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : fe->dtv_property_cache.isdbs_ts_id = tvp->u.data;break ; +case DTV_DVBT2_PLP_ID : + fe->dtv_property_cache.dvbt2_plp_id = tvp->u.data; +break ;default : r =-1 ; }
drivers/media/dvb/dvb-core/dvb_frontend.h +3 -0
@@ -358,6 +358,9 @@ struct dtv_frontend_properties {/* ISDB-T specifics */ u32 isdbs_ts_id; + +/* DVB-T2 specifics */ +u32 dvbt2_plp_id; };struct dvb_frontend {
Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
In reply to Andreas OberritterEm 08-05-2011 19:26, Andreas Oberritter escreveu:
Quoted 11 lines · Steve Kerrison
Quoted 7 lines
Quick question about resubmission:
Do I resubmit all 6 (5 after fold) patches as v2, or can I ignore what is currently patch 5 as it is uncommented? I don't know enough about patchwork to know whether changing the PATCH x/n will break things or what the proper procedure is. (RTFM with appropriate URL is an appropriate response to this, of course :) )
I think that previously submitted, now obsolete patches need to be marked as superseded by hand in patchwork in any case.
Yes, but I think that only me do such change at patchwork. Unfortunately, patchwork has an all or nothing access: it is either Read only or full access to all patches, even on delegate mode.
I'll mark the old patches as superseded soon.
Mauro.
Quoted 3 lines
Regards,
Andreas
Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
In reply to Andreas OberritterHi Andreas,
Quoted 6 lines
I'd prefer returning
-EINVALfor unsupported parameters.[snip]
I already had a patch for this, but forgot to submit it together with the
frontend.hbits.
That seems reasonable. Do I need to do anything with this? I'm happy for Mauro to scrub my drxd and mxl patches and use yours instead.
Quoted 1 line
Btw., "status = status;" looks odd.
Heh, yes it does. I wonder if that was put in to deal with an "unused variable" compiler warning before the switch statement had a default case? Otherwise, perhaps it's from the department of redundancy department.
Regards,
Signature · 2 lines
Steve Kerrison MEng Hons. http://www.stevekerrison.com/
Quoted 59 lines · Andreas Oberritter
Quoted 18 lines · Steve Kerrison
Additional bandwidth modes have been added in
frontend.hdrxd_hard.chad no default case so the compiler was warning about a non-exhausive switch statement.This has been fixed by making the default behaviour the same as
BANDWIDTH_AUTO, with the addition of a printk to notify if this ever happens.Signed-off-by Steve Kerrison <[email protected]>--- drivers/media/dvb/frontends/drxd_hard.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)drivers/media/dvb/frontends/drxd_hard.c +0
-0drivers/media/dvb/frontends/drxd_hard.c static int DRX_Start(struct drxd_state *state, s32 off) · line 2331
Quoted 7 lines
drivers/media/dvb/frontends/drxd_hard.c +4
-0@@ -2325,6 +2325,10 @@ static int DRX_Start(struct drxd_state *state, s32 off)InitEC and ResetEC functions */ switch (p->bandwidth) { +default : +printk (KERN_INFO "drxd: Unsupported bandwidth mode %u, reverting to default\n" , + p->bandwidth); +/* Fall back to auto */ I'd prefer returning
-EINVALfor unsupported parameters.drivers/media/dvb/frontends/drxd_hard.c static int DRX_Start(struct drxd_state *state, s32 off) · line 2334
Quoted 3 lines
drivers/media/dvb/frontends/drxd_hard.c +0
-0case BANDWIDTH_AUTO :case BANDWIDTH_8_MHZ :/* (64/7)*(8/8)*1000000 */ I already had a patch for this, but forgot to submit it together with the
frontend.hbits.From
73d630b57f584d7e35cac5e27149cbc564aedde2Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <[email protected]>
Date: Fri, 8 Apr 2011 16:39:20 +0000
Subject: [PATCH 2/2] DVB:drxd_hard: handle new bandwidths by returning-EINVALSigned-off-by Andreas Oberritter <[email protected]>--- drivers/media/dvb/frontends/drxd_hard.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)drivers/media/dvb/frontends/drxd_hard.c +3
-0@@ -2348,6 +2348,9 @@ static int DRX_Start(struct drxd_state *state, s32 off) status =Write16 (state,FE_AG_REG_IND_DEL__A ,71 ,0x0000 );break ; +default : + status = -EINVAL ; +break ; } status = status;if (status <0 )
Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
Em 09-05-2011 11:15, Steve Kerrison escreveu:
Quoted 12 lines
Hi Andreas,
Quoted 6 lines
I'd prefer returning
-EINVALfor unsupported parameters.[snip]
I already had a patch for this, but forgot to submit it together with the
frontend.hbits.That seems reasonable. Do I need to do anything with this? I'm happy for Mauro to scrub my drxd and mxl patches and use yours instead.
Quoted 6 lines
Quoted 1 line
Btw., "status = status;" looks odd.
Heh, yes it does. I wonder if that was put in to deal with an "unused variable" compiler warning before the switch statement had a default case? Otherwise, perhaps it's from the department of redundancy department.
Yes, there is. Linux defines a macro for it:
uninitialized_var()
(it basically will do status = status internally with newer gcc versions, but it helps to document what's happening there)
it is sometimes better to initialize the var, as the warning may help to detect troubles after some changes.
Cheers,
Mauro.
Re: [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256
In reply to Steve KerrisonHello Steve,
All your DVB-T2 / CXD2820R are fine for me, thanks. I'll ack only this one since it is almost only having very small, but direct, effect to CXD2820R driver.
Quoted 3 lines · Steve Kerrison
This is supported in DVB-T2 mode, so added to the T/T2 frontend.
Signed-off-by Steve Kerrison<[email protected]>
Quoted 9 lines
--- drivers/media/dvb/frontends/cxd2820r_core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/media/dvb/frontends/cxd2820r_core.c +0
-0
drivers/media/dvb/frontends/cxd2820r_core.c static struct dvb_frontend_ops cxd2820r_ops[2] = { · line 862
Quoted 9 lines
drivers/media/dvb/frontends/cxd2820r_core.c +2
-1@@ -855,7 +855,8 @@ static struct dvb_frontend_ops cxd2820r_ops[2] = {FE_CAN_FEC_3_4 |FE_CAN_FEC_5_6 |FE_CAN_FEC_7_8 |FE_CAN_FEC_AUTO |FE_CAN_QPSK |FE_CAN_QAM_16 | -FE_CAN_QAM_64 |FE_CAN_QAM_AUTO | +FE_CAN_QAM_64 |FE_CAN_QAM_256 | +FE_CAN_QAM_AUTO |FE_CAN_TRANSMISSION_MODE_AUTO |FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO |
regards
Antti
Signature · 1 line
http://palosaari.fi/
PATCH v3 1/1 DVB: Add basic API support for DVB-T2 and bump minor version
In reply to Andreas OberritterFrom: Andreas Oberritter <[email protected]>
[email protected]: Remove private definitions from cxd2820r that existed before API was defined
--- drivers/media/dvb/dvb-core/dvb_frontend.c | 13 +++++++++---- drivers/media/dvb/dvb-core/dvb_frontend.h | 3 +++ drivers/media/dvb/frontends/cxd2820r_priv.h | 12 ------------ include/linux/dvb/frontend.h | 20 ++++++++++++++++---- include/linux/dvb/version.h | 2 +- 5 files changed, 29 insertions(+), 21 deletions(-)
drivers/media/dvb/dvb-core/dvb_frontend.c +9 -4
@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)break ; } -if (c->delivery_system ==SYS_ISDBT ) { -/* Fake out a generic DVB-T request so we pass validation in the ioctl */ - p->frequency = c->frequency; - p->inversion = c->inversion; +/* Fake out a generic DVB-T request so we pass validation in the ioctl */ +if ((c->delivery_system ==SYS_ISDBT ) || + (c->delivery_system ==SYS_DVBT2 )) { p->u.ofdm.constellation =QAM_AUTO ; p->u.ofdm.code_rate_HP =FEC_AUTO ; p->u.ofdm.code_rate_LP =FEC_AUTO ;
@@ -1324,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : tvp->u.data = fe->dtv_property_cache.isdbs_ts_id;break ; +case DTV_DVBT2_PLP_ID : + tvp->u.data = fe->dtv_property_cache.dvbt2_plp_id; +break ;default : r =-1 ; }
@@ -1479,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe,case DTV_ISDBS_TS_ID : fe->dtv_property_cache.isdbs_ts_id = tvp->u.data;break ; +case DTV_DVBT2_PLP_ID : + fe->dtv_property_cache.dvbt2_plp_id = tvp->u.data; +break ;default : r =-1 ; }
drivers/media/dvb/dvb-core/dvb_frontend.h +3 -0
@@ -358,6 +358,9 @@ struct dtv_frontend_properties {/* ISDB-T specifics */ u32 isdbs_ts_id; + +/* DVB-T2 specifics */ +u32 dvbt2_plp_id; };struct dvb_frontend {
drivers/media/dvb/frontends/cxd2820r_priv.h +0 -12
@@ -40,18 +40,6 @@#undef warn #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) -/* -* FIXME: These are totally wrong and must be added properly to the API. -* Only temporary solution in order to get driver compile. -*/ -#define SYS_DVBT2 SYS_DAB -#define TRANSMISSION_MODE_1K 0 -#define TRANSMISSION_MODE_16K 0 -#define TRANSMISSION_MODE_32K 0 -#define GUARD_INTERVAL_1_128 0 -#define GUARD_INTERVAL_19_128 0 -#define GUARD_INTERVAL_19_256 0 -struct reg_val_mask {u32 reg;u8 val;
include/linux/dvb/frontend.h +16 -4
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode {TRANSMISSION_MODE_2K ,TRANSMISSION_MODE_8K ,TRANSMISSION_MODE_AUTO , - TRANSMISSION_MODE_4K +TRANSMISSION_MODE_4K , +TRANSMISSION_MODE_1K , +TRANSMISSION_MODE_16K , +TRANSMISSION_MODE_32K , } fe_transmit_mode_t;typedef enum fe_bandwidth {BANDWIDTH_8_MHZ ,BANDWIDTH_7_MHZ ,BANDWIDTH_6_MHZ , -BANDWIDTH_AUTO +BANDWIDTH_AUTO , +BANDWIDTH_5_MHZ , +BANDWIDTH_10_MHZ , +BANDWIDTH_1_712_MHZ , }fe_bandwidth_t ;
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval {GUARD_INTERVAL_1_16 ,GUARD_INTERVAL_1_8 ,GUARD_INTERVAL_1_4 , - GUARD_INTERVAL_AUTO +GUARD_INTERVAL_AUTO , +GUARD_INTERVAL_1_128 , +GUARD_INTERVAL_19_128 , +GUARD_INTERVAL_19_256 , } fe_guard_interval_t;
@@ -305,7 +314,9 @@ struct dvb_frontend_event {#define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system {SYS_DMBTH ,SYS_CMMB ,SYS_DAB , +SYS_DVBT2 , } fe_delivery_system_t; struct dtv_cmds_h {
include/linux/dvb/version.h +1 -1
@@ -24,6 +24,6 @@#define _DVBVERSION_H_#define DVB_API_VERSION 5 -#define DVB_API_VERSION_MINOR 2 +#define DVB_API_VERSION_MINOR 3#endif /*_DVBVERSION_H_*/
Signature · 1 line
1.7.1
Re: [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions
In reply to Steve KerrisonI've just realised there is some illegal whitespace in this patch here:
Quoted 9 lines
Documentation/DocBook/dvb/dvbproperty.xml +4
-0@@ -553,5 +568,20 @@ typedef enum fe_guard_interval { </section> </section> </section> + <section id="dvbt2-params"> + <title>DVB-T2 parameters</title> + + <para>This section covers parameters that apply onlyto the DVB-T2 delivery method. DVB-T2
Auto-tab between the title and first paragraph. My apologies! If I need to do anything about this let me know.
Signature · 2 lines
Steve Kerrison MEng Hons. http://www.stevekerrison.com/
Quoted 165 lines · Steve Kerrison
A few new capabilities added to
frontend.hfor DVB-T2. Added these to the documentation plus some notes explaining that they are used by the T2 delivery system.Signed-off-by Steve Kerrison <[email protected]>--- Documentation/DocBook/dvb/dvbproperty.xml | 36 ++++++++++++++++++++++++++-- Documentation/DocBook/dvb/frontend.h.xml | 20 +++++++++++++--- 2 files changed, 49 insertions(+), 7 deletions(-)Documentation/DocBook/dvb/dvbproperty.xml +33
-3@@ -217,9 +217,12 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>Bandwidth for the channel, in HZ.</para> <para>Possible values: + <constant>1712000</constant>, + <constant>5000000</constant>, <constant>6000000</constant>, <constant>7000000</constant>, - <constant>8000000</constant>. + <constant>8000000</constant>, + <constant>10000000</constant>. </para> <para>Notes:</para>@@ -231,6 +234,8 @@ get/set up to 64 properties. The actual meaning of each property is described on <para>4) Bandwidth in ISDB-T is fixed (6MHz) or can be easily derived from other parameters (DTV_ISDBT_SB_SEGMENT_IDX, DTV_ISDBT_SB_SEGMENT_COUNT).</para> + <para>5) DVB-T supports 6, 7 and 8MHz.</para> + <para>6) In addition, DVB-T2 supports 1.172, 5 and 10MHz.</para> </section> <section id="DTV_DELIVERY_SYSTEM">@@ -257,6 +262,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; </programlisting>@@ -273,7 +279,10 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; </programlisting>@@ -284,6 +293,8 @@ typedef enum fe_transmit_mode { <para>2) If <constant>DTV_TRANSMISSION_MODE</constant> is set the <constant>TRANSMISSION_MODE_AUTO</constant> the hardware will try to find the correct FFT-size (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>3) DVB-T specifies 2K and 8K as valid sizes.</para> + <para>4) DVB-T2 specifies 1K, 2K, 4K, 8K, 16K and 32K.</para> </section> <section id="DTV_GUARD_INTERVAL">@@ -296,7 +307,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t; </programlisting>@@ -304,6 +318,7 @@ typedef enum fe_guard_interval { <para>1) If <constant>DTV_GUARD_INTERVAL</constant> is set the <constant>GUARD_INTERVAL_AUTO</constant> the hardware will try to find the correct guard interval (if capable) and will use TMCC to fill in the missing parameters.</para> + <para>2) Intervals 1/128, 19/128 and 19/256 are used only for DVB-T2 at present</para> </section> </section>@@ -553,5 +568,20 @@ typedef enum fe_guard_interval { </section> </section> </section> + <section id="dvbt2-params"> + <title>DVB-T2 parameters</title> + + <para>This section covers parameters that apply only to the DVB-T2 delivery method. DVB-T2 + support is currently in the early stages development so expect this section to grow + and become more detailed with time.</para> + + <section id="dvbt2-plp-id"> + <title><constant>DTV_DVBT2_PLP_ID</constant></title> + + <para>DVB-T2 supports Physical Layer Pipes (PLP) to allow transmission of + many data types via a single multiplex. The API will soon support this + at which point this section will be expanded.</para> + </section> + </section> </section> </section>Documentation/DocBook/dvb/frontend.h.xml +16
-4@@ -176,14 +176,20 @@ typedef enum fe_transmit_mode { TRANSMISSION_MODE_2K, TRANSMISSION_MODE_8K, TRANSMISSION_MODE_AUTO, - TRANSMISSION_MODE_4K + TRANSMISSION_MODE_4K, + TRANSMISSION_MODE_1K, + TRANSMISSION_MODE_16K, + TRANSMISSION_MODE_32K, } fe_transmit_mode_t; typedef enum fe_bandwidth { BANDWIDTH_8_MHZ, BANDWIDTH_7_MHZ, BANDWIDTH_6_MHZ, - BANDWIDTH_AUTO + BANDWIDTH_AUTO, + BANDWIDTH_5_MHZ, + BANDWIDTH_10_MHZ, + BANDWIDTH_1_712_MHZ, } fe_bandwidth_t;@@ -192,7 +198,10 @@ typedef enum fe_guard_interval { GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_4, - GUARD_INTERVAL_AUTO + GUARD_INTERVAL_AUTO, + GUARD_INTERVAL_1_128, + GUARD_INTERVAL_19_128, + GUARD_INTERVAL_19_256, } fe_guard_interval_t;@@ -306,7 +315,9 @@ struct dvb_frontend_event { #define DTV_ISDBS_TS_ID 42 -#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID +#define DTV_DVBT2_PLP_ID 43 + +#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID typedef enum fe_pilot { PILOT_ON,@@ -338,6 +349,7 @@ typedef enum fe_delivery_system { SYS_DMBTH, SYS_CMMB, SYS_DAB, + SYS_DVBT2, } fe_delivery_system_t; struct dtv_cmds_h {
Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
In reply to Steve KerrisonHello all,
Rémi informed he have added this new API and DVB-T2 support for VLC media player Git tree [1]. I didn't test it yet, mostly due to lack of time :i I will test that sooner or later, feel free to test!
[1] http://git.videolan.org/?p=vlc.git
regards
Antti
Quoted 29 lines · Steve Kerrison
Hi Mauro, Antti, Andreas,
I hope this patch set is formed appropriately - it is my first patch submission direct to the linux-media group.
Following the pull of Antti's work on support for the cxd2820r and PCTV nanoStick T2 290e, this patch set implements Andreas' modifications to the API to give provisional DVB-T2 support and the removal of a workaround for this in the cxd2820r module.
In addition, there are some minor fixes to compiler warnings as a result of the expanded enums. I cannot test these myself but they treat unrecognized values as
*_AUTOand I can't see where a problem would be created.I have updated the documentation a little. If I've done the right thing then I guess there is incentive there for me continue to expand DVB related elements of the API docs.
This patch set has been tested by me on two systems, with one running a MythTV backend utilising a long-supported DVB tuner. MythTV works fine with the old tuner and the nanoStick T2 290e works in VLC. I've yet to test the 290e in MythTV - I was more intent on making sure the patches hadn't broken userland or older devices.
Feedback, testing and discussion of where to go next is welcomed!
Regards,
Steve Kerrison.
Signature · 1 line
http://palosaari.fi/