All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver
       [not found] <20110506125542.ADA1D162E7@stevekerrison.com>
@ 2011-05-06 13:46 ` Antti Palosaari
  2011-05-06 15:30 ` Mauro Carvalho Chehab
  1 sibling, 0 replies; 33+ messages in thread
From: Antti Palosaari @ 2011-05-06 13:46 UTC (permalink / raw)
  To: Steve Kerrison, Andreas Oberritter, Mauro Carvalho Chehab; +Cc: linux-media

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
-- 
http://palosaari.fi/
----- Original message -----
> 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" <obi@linuxtv.org>
> 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" <mchehab@redhat.com>
> Cc: "Steve Kerrison" <steve@stevekerrison.com>,
> <linux-media@vger.kernel.org>, "Antti Palosaari" <crope@iki.fi>
> 
> 
> On 05/06/2011 02:23 PM, Mauro Carvalho Chehab wrote:
> > Em 06-05-2011 07:42, Steve Kerrison escreveu:
> > > Hi Andreas,
> > > 
> > > From cxd2820r_priv.h:
> > > 
> > > > +/*
> > > > + * 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
> > > 
> > > 
> > > I believe Antti didn't want to make frontent.h changes until a
> > > consensus was reached on how to develop the API for T2 support.
> > 
> > Yeah.
> > 
> > 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    43
> 
> In addition to the patch, the PLP ID needs to be stored in struct
> dtv_frontend_properties and used by property cache functions in
> dvb_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 majordomo@vger.kernel.org
> More majordomo info at   http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver
       [not found] <20110506125542.ADA1D162E7@stevekerrison.com>
  2011-05-06 13:46 ` [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver Antti Palosaari
@ 2011-05-06 15:30 ` Mauro Carvalho Chehab
  2011-05-06 15:46   ` Mauro Carvalho Chehab
  1 sibling, 1 reply; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-06 15:30 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Andreas Oberritter, linux-media, Antti Palosaari

Em 06-05-2011 09:55, Steve Kerrison escreveu:
> 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.

> 
> Regards,
> Steve Kerrison.
> 
> ----- Reply message -----
> From: "Andreas Oberritter" <obi@linuxtv.org>
> 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" <mchehab@redhat.com>
> Cc: "Steve Kerrison" <steve@stevekerrison.com>, <linux-media@vger.kernel.org>, "Antti Palosaari" <crope@iki.fi>
> 
> 
> On 05/06/2011 02:23 PM, Mauro Carvalho Chehab wrote:
>> Em 06-05-2011 07:42, Steve Kerrison escreveu:
>>> Hi Andreas,
>>>
>>> From cxd2820r_priv.h:
>>>
>>>> +/*
>>>> + * 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
>>>
>>>
>>> I believe Antti didn't want to make frontent.h changes until a consensus
>>> was reached on how to develop the API for T2 support.
>>
>> Yeah.
>>
>> 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 43
> 
> In addition to the patch, the PLP ID needs to be stored in struct
> dtv_frontend_properties and used by property cache functions in
> dvb_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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver
  2011-05-06 15:30 ` Mauro Carvalho Chehab
@ 2011-05-06 15:46   ` Mauro Carvalho Chehab
  2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
                       ` (6 more replies)
  0 siblings, 7 replies; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-06 15:46 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Andreas Oberritter, linux-media, Antti Palosaari

Em 06-05-2011 12:30, Mauro Carvalho Chehab escreveu:
> Em 06-05-2011 09:55, Steve Kerrison escreveu:
>> 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

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.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
  2011-05-06 15:46   ` Mauro Carvalho Chehab
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 16:04       ` Mauro Carvalho Chehab
  2011-05-12 22:06       ` Antti Palosaari
  2011-05-08 15:51     ` [PATCH 1/6] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
                       ` (5 subsequent siblings)
  6 siblings, 2 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media; +Cc: Andreas Oberritter

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.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH 1/6] DVB: Add basic API support for DVB-T2 and bump minor version
  2011-05-06 15:46   ` Mauro Carvalho Chehab
  2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 15:51     ` [PATCH 2/6] cxd2820r: Remove temporary T2 API hack Steve Kerrison
                       ` (4 subsequent siblings)
  6 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

From: Andreas Oberritter <obi@linuxtv.org>

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 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(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 31e2c0d..e30beef 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 493a2bf..36a3ed6 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -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 {
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
index 5a7546c..1421cc8 100644
--- a/include/linux/dvb/version.h
+++ b/include/linux/dvb/version.h
@@ -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_*/
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 2/6] cxd2820r: Remove temporary T2 API hack
  2011-05-06 15:46   ` Mauro Carvalho Chehab
  2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
  2011-05-08 15:51     ` [PATCH 1/6] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 16:06       ` Mauro Carvalho Chehab
  2011-05-08 15:51     ` [PATCH 3/6] drxd: Fix warning caused by new entries in an enum Steve Kerrison
                       ` (3 subsequent siblings)
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

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 <steve@stevekerrison.com>
---
 drivers/media/dvb/frontends/cxd2820r_priv.h |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h
index d4e2e0b..25adbee 100644
--- a/drivers/media/dvb/frontends/cxd2820r_priv.h
+++ b/drivers/media/dvb/frontends/cxd2820r_priv.h
@@ -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;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 3/6] drxd: Fix warning caused by new entries in an enum
  2011-05-06 15:46   ` Mauro Carvalho Chehab
                       ` (2 preceding siblings ...)
  2011-05-08 15:51     ` [PATCH 2/6] cxd2820r: Remove temporary T2 API hack Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 15:51     ` [PATCH 4/6] mxl5005: " Steve Kerrison
                       ` (2 subsequent siblings)
  6 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

Additional 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/dvb/frontends/drxd_hard.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
index 30a78af..f1d64f1 100644
--- a/drivers/media/dvb/frontends/drxd_hard.c
+++ b/drivers/media/dvb/frontends/drxd_hard.c
@@ -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 */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 4/6] mxl5005: Fix warning caused by new entries in an enum
  2011-05-06 15:46   ` Mauro Carvalho Chehab
                       ` (3 preceding siblings ...)
  2011-05-08 15:51     ` [PATCH 3/6] drxd: Fix warning caused by new entries in an enum Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 15:51     ` [PATCH 5/6] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
  2011-05-08 15:51     ` [PATCH 6/6] Documentation: Update to include DVB-T2 additions Steve Kerrison
  6 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

Additional 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/common/tuners/mxl5005s.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 0d6e094..667e216 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -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;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 5/6] cxd2820r: Update frontend capabilities to advertise QAM-256
  2011-05-06 15:46   ` Mauro Carvalho Chehab
                       ` (4 preceding siblings ...)
  2011-05-08 15:51     ` [PATCH 4/6] mxl5005: " Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 15:51     ` [PATCH 6/6] Documentation: Update to include DVB-T2 additions Steve Kerrison
  6 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

This is supported in DVB-T2 mode, so added to the T/T2 frontend.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/dvb/frontends/cxd2820r_core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c
index e900c4c..0779f69 100644
--- a/drivers/media/dvb/frontends/cxd2820r_core.c
+++ b/drivers/media/dvb/frontends/cxd2820r_core.c
@@ -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 |
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH 6/6] Documentation: Update to include DVB-T2 additions
  2011-05-06 15:46   ` Mauro Carvalho Chehab
                       ` (5 preceding siblings ...)
  2011-05-08 15:51     ` [PATCH 5/6] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
@ 2011-05-08 15:51     ` Steve Kerrison
  2011-05-08 16:20       ` Mauro Carvalho Chehab
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 15:51 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

A 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 Documentation/DocBook/dvb/dvbproperty.xml |   21 ++++++++++++++++++---
 Documentation/DocBook/dvb/frontend.h.xml  |   20 ++++++++++++++++----
 2 files changed, 34 insertions(+), 7 deletions(-)

diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
index 05ce603..afe204c 100644
--- a/Documentation/DocBook/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/dvb/dvbproperty.xml
@@ -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>
 
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
index d08e0d4..d792f78 100644
--- a/Documentation/DocBook/dvb/frontend.h.xml
+++ b/Documentation/DocBook/dvb/frontend.h.xml
@@ -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 {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
  2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
@ 2011-05-08 16:04       ` Mauro Carvalho Chehab
  2011-05-08 19:17         ` [PATCH v2 0/5] " Steve Kerrison
                           ` (6 more replies)
  2011-05-12 22:06       ` Antti Palosaari
  1 sibling, 7 replies; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-08 16:04 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, linux-media, Andreas Oberritter

Em 08-05-2011 12:51, Steve Kerrison escreveu:
> 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.
> 
> 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.
> 


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 2/6] cxd2820r: Remove temporary T2 API hack
  2011-05-08 15:51     ` [PATCH 2/6] cxd2820r: Remove temporary T2 API hack Steve Kerrison
@ 2011-05-08 16:06       ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-08 16:06 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, linux-media, Andreas Oberritter

Em 08-05-2011 12:51, Steve Kerrison escreveu:
> 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 <steve@stevekerrison.com>
> ---
>  drivers/media/dvb/frontends/cxd2820r_priv.h |   12 ------------
>  1 files changed, 0 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h
> index d4e2e0b..25adbee 100644
> --- a/drivers/media/dvb/frontends/cxd2820r_priv.h
> +++ b/drivers/media/dvb/frontends/cxd2820r_priv.h
> @@ -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
> -

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
  2011-05-08 15:51     ` [PATCH 6/6] Documentation: Update to include DVB-T2 additions Steve Kerrison
@ 2011-05-08 16:20       ` Mauro Carvalho Chehab
  2011-05-08 19:13         ` Steve Kerrison
  0 siblings, 1 reply; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-08 16:20 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, linux-media, Andreas Oberritter

Em 08-05-2011 12:51, Steve Kerrison escreveu:
> A 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.
> 
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  Documentation/DocBook/dvb/dvbproperty.xml |   21 ++++++++++++++++++---
>  Documentation/DocBook/dvb/frontend.h.xml  |   20 ++++++++++++++++----
>  2 files changed, 34 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
> index 05ce603..afe204c 100644
> --- a/Documentation/DocBook/dvb/dvbproperty.xml
> +++ b/Documentation/DocBook/dvb/dvbproperty.xml
> @@ -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>

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 ;) )
>  	</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>
>  
> diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
> index d08e0d4..d792f78 100644
> --- a/Documentation/DocBook/dvb/frontend.h.xml
> +++ b/Documentation/DocBook/dvb/frontend.h.xml
> @@ -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
> +

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.

> +#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 {


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
  2011-05-08 16:20       ` Mauro Carvalho Chehab
@ 2011-05-08 19:13         ` Steve Kerrison
  2011-05-08 22:05           ` Andreas Oberritter
  0 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:13 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: Antti Palosaari, linux-media, Andreas Oberritter

Hi Mauro

> +		<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 ;) )

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 :)

> -#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.

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,
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 

On Sun, 2011-05-08 at 13:20 -0300, Mauro Carvalho Chehab wrote:
> Em 08-05-2011 12:51, Steve Kerrison escreveu:
> > A 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.
> > 
> > Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> > ---
> >  Documentation/DocBook/dvb/dvbproperty.xml |   21 ++++++++++++++++++---
> >  Documentation/DocBook/dvb/frontend.h.xml  |   20 ++++++++++++++++----
> >  2 files changed, 34 insertions(+), 7 deletions(-)
> > 
> > diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
> > index 05ce603..afe204c 100644
> > --- a/Documentation/DocBook/dvb/dvbproperty.xml
> > +++ b/Documentation/DocBook/dvb/dvbproperty.xml
> > @@ -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>
> 
> 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 ;) )
> >  	</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>
> >  
> > diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
> > index d08e0d4..d792f78 100644
> > --- a/Documentation/DocBook/dvb/frontend.h.xml
> > +++ b/Documentation/DocBook/dvb/frontend.h.xml
> > @@ -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
> > +
> 
> 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.
> 
> > +#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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v2 0/5] DVB-T2 API updates, documentation and accompanying small fixes
  2011-05-08 16:04       ` Mauro Carvalho Chehab
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-08 19:17         ` [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
                           ` (5 subsequent siblings)
  6 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media; +Cc: Andreas Oberritter

Good 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.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version
  2011-05-08 16:04       ` Mauro Carvalho Chehab
  2011-05-08 19:17         ` [PATCH v2 0/5] " Steve Kerrison
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-08 22:22           ` Andreas Oberritter
  2011-05-08 19:17         ` [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Steve Kerrison
                           ` (4 subsequent siblings)
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

From: Andreas Oberritter <obi@linuxtv.org>

steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 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(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 31e2c0d..e30beef 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;
diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h
index d4e2e0b..25adbee 100644
--- a/drivers/media/dvb/frontends/cxd2820r_priv.h
+++ b/drivers/media/dvb/frontends/cxd2820r_priv.h
@@ -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;
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 493a2bf..36a3ed6 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -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 {
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
index 5a7546c..1421cc8 100644
--- a/include/linux/dvb/version.h
+++ b/include/linux/dvb/version.h
@@ -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_*/
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
  2011-05-08 16:04       ` Mauro Carvalho Chehab
  2011-05-08 19:17         ` [PATCH v2 0/5] " Steve Kerrison
  2011-05-08 19:17         ` [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-08 22:10           ` Andreas Oberritter
  2011-05-08 19:17         ` [PATCH v2 3/5] mxl5005: " Steve Kerrison
                           ` (3 subsequent siblings)
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

Additional 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/dvb/frontends/drxd_hard.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
index 30a78af..b3b0704 100644
--- a/drivers/media/dvb/frontends/drxd_hard.c
+++ b/drivers/media/dvb/frontends/drxd_hard.c
@@ -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 */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v2 3/5] mxl5005: Fix warning caused by new entries in an enum
  2011-05-08 16:04       ` Mauro Carvalho Chehab
                           ` (2 preceding siblings ...)
  2011-05-08 19:17         ` [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Steve Kerrison
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-08 22:11           ` Andreas Oberritter
  2011-05-08 19:17         ` [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
                           ` (2 subsequent siblings)
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

Additional 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/common/tuners/mxl5005s.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 0d6e094..d80e6f3 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -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;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256
  2011-05-08 16:04       ` Mauro Carvalho Chehab
                           ` (3 preceding siblings ...)
  2011-05-08 19:17         ` [PATCH v2 3/5] mxl5005: " Steve Kerrison
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-09 21:45           ` Antti Palosaari
  2011-05-08 19:17         ` [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions Steve Kerrison
       [not found]         ` <1304875061.2920.13.camel@ares>
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

This is supported in DVB-T2 mode, so added to the T/T2 frontend.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 drivers/media/dvb/frontends/cxd2820r_core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c
index e900c4c..0779f69 100644
--- a/drivers/media/dvb/frontends/cxd2820r_core.c
+++ b/drivers/media/dvb/frontends/cxd2820r_core.c
@@ -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 |
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions
  2011-05-08 16:04       ` Mauro Carvalho Chehab
                           ` (4 preceding siblings ...)
  2011-05-08 19:17         ` [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
@ 2011-05-08 19:17         ` Steve Kerrison
  2011-05-12 21:18           ` Steve Kerrison
       [not found]         ` <1304875061.2920.13.camel@ares>
  6 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-08 19:17 UTC (permalink / raw)
  To: Antti Palosaari, Mauro Carvalho Chehab, linux-media
  Cc: Andreas Oberritter, Steve Kerrison

A 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.

Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 Documentation/DocBook/dvb/dvbproperty.xml |   36 ++++++++++++++++++++++++++--
 Documentation/DocBook/dvb/frontend.h.xml  |   20 +++++++++++++---
 2 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
index 05ce603..52d5e3c 100644
--- a/Documentation/DocBook/dvb/dvbproperty.xml
+++ b/Documentation/DocBook/dvb/dvbproperty.xml
@@ -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>
diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
index d08e0d4..d792f78 100644
--- a/Documentation/DocBook/dvb/frontend.h.xml
+++ b/Documentation/DocBook/dvb/frontend.h.xml
@@ -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 {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 6/6] Documentation: Update to include DVB-T2 additions
  2011-05-08 19:13         ` Steve Kerrison
@ 2011-05-08 22:05           ` Andreas Oberritter
  0 siblings, 0 replies; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:05 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Mauro Carvalho Chehab, Antti Palosaari, linux-media

On 05/08/2011 09:13 PM, Steve Kerrison wrote:
> Hi Mauro
> 
>> +		<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 ;) )
> 
> 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 :)
> 
>> -#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.
> 
> 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.

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

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
  2011-05-08 19:17         ` [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Steve Kerrison
@ 2011-05-08 22:10           ` Andreas Oberritter
  2011-05-09  9:15             ` Steve Kerrison
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:10 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, Mauro Carvalho Chehab, linux-media

On 05/08/2011 09:17 PM, Steve Kerrison wrote:
> Additional 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.
> 
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  drivers/media/dvb/frontends/drxd_hard.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
> index 30a78af..b3b0704 100644
> --- a/drivers/media/dvb/frontends/drxd_hard.c
> +++ b/drivers/media/dvb/frontends/drxd_hard.c
> @@ -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.

>  		case 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.

>From 73d630b57f584d7e35cac5e27149cbc564aedde2 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@linuxtv.org>
Date: Fri, 8 Apr 2011 16:39:20 +0000
Subject: [PATCH 2/2] DVB: drxd_hard: handle new bandwidths by returning -EINVAL

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 drivers/media/dvb/frontends/drxd_hard.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
index 30a78af..53319f4 100644
--- a/drivers/media/dvb/frontends/drxd_hard.c
+++ b/drivers/media/dvb/frontends/drxd_hard.c
@@ -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)
-- 
1.7.2.5

Btw., "status = status;" looks odd.

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 3/5] mxl5005: Fix warning caused by new entries in an enum
  2011-05-08 19:17         ` [PATCH v2 3/5] mxl5005: " Steve Kerrison
@ 2011-05-08 22:11           ` Andreas Oberritter
  0 siblings, 0 replies; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:11 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, Mauro Carvalho Chehab, linux-media

On 05/08/2011 09:17 PM, Steve Kerrison wrote:
> Additional 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.
> 
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  drivers/media/common/tuners/mxl5005s.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
> index 0d6e094..d80e6f3 100644
> --- a/drivers/media/common/tuners/mxl5005s.c
> +++ b/drivers/media/common/tuners/mxl5005s.c
> @@ -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.

>From 9492d6c7665bf8b55ec3a42577794cea3e87ee15 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@linuxtv.org>
Date: Fri, 8 Apr 2011 16:37:57 +0000
Subject: [PATCH 1/2] DVB: mxl5005s: handle new bandwidths by returning -EINVAL

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 drivers/media/common/tuners/mxl5005s.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 605e28b..5618b35 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -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;
 			}
 		}
 
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version
  2011-05-08 19:17         ` [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
@ 2011-05-08 22:22           ` Andreas Oberritter
  2011-05-08 22:38             ` Andreas Oberritter
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:22 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, Mauro Carvalho Chehab, linux-media

On 05/08/2011 09:17 PM, Steve Kerrison wrote:
> From: Andreas Oberritter <obi@linuxtv.org>
> 
> steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined
> 
> Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  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(-)
> 
> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
> index 31e2c0d..e30beef 100644
> --- a/drivers/media/dvb/dvb-core/dvb_frontend.c
> +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
> @@ -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;
> diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h
> index d4e2e0b..25adbee 100644
> --- a/drivers/media/dvb/frontends/cxd2820r_priv.h
> +++ b/drivers/media/dvb/frontends/cxd2820r_priv.h
> @@ -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;
> diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
> index 493a2bf..36a3ed6 100644
> --- a/include/linux/dvb/frontend.h
> +++ b/include/linux/dvb/frontend.h
> @@ -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 {
> diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
> index 5a7546c..1421cc8 100644
> --- a/include/linux/dvb/version.h
> +++ b/include/linux/dvb/version.h
> @@ -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:

>From 4329b836a6590421b178710160fcca3b39f64e18 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@linuxtv.org>
Date: Sun, 8 May 2011 22:14:07 +0000
Subject: [PATCH] DVB: dvb_frontend: add PLP ID to property cache

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 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(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index dc3457c..5af1d67 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;
 	}
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index 3b86050..fb2b13f 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -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 {
-- 
1.7.2.5



^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
       [not found]         ` <1304875061.2920.13.camel@ares>
@ 2011-05-08 22:26           ` Andreas Oberritter
  2011-05-09  3:10             ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:26 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Mauro Carvalho Chehab, Antti Palosaari, linux-media

On 05/08/2011 07:17 PM, Steve Kerrison wrote:
> 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

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version
  2011-05-08 22:22           ` Andreas Oberritter
@ 2011-05-08 22:38             ` Andreas Oberritter
  2011-05-12 21:11               ` [PATCH v3] " Steve Kerrison
  0 siblings, 1 reply; 33+ messages in thread
From: Andreas Oberritter @ 2011-05-08 22:38 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Antti Palosaari, Mauro Carvalho Chehab, linux-media

On 05/09/2011 12:22 AM, Andreas Oberritter wrote:
> 
> Please also include the following (only compile-tested) lines within this commit:
> 
> From 4329b836a6590421b178710160fcca3b39f64e18 Mon Sep 17 00:00:00 2001
> From: Andreas Oberritter <obi@linuxtv.org>
> Date: Sun, 8 May 2011 22:14:07 +0000
> Subject: [PATCH] DVB: dvb_frontend: add PLP ID to property cache
> 
> Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
> ---
>  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(-)
> 
> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
> index dc3457c..5af1d67 100644
> --- a/drivers/media/dvb/dvb-core/dvb_frontend.c
> +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
> @@ -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.

>  	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;
>  	}
> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
> index 3b86050..fb2b13f 100644
> --- a/drivers/media/dvb/dvb-core/dvb_frontend.h
> +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
> @@ -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 {

>From 6e7abb85241e7aef5783f9c216e829de5fe90cb7 Mon Sep 17 00:00:00 2001
From: Andreas Oberritter <obi@linuxtv.org>
Date: Sun, 8 May 2011 22:14:07 +0000
Subject: [PATCH] DVB: dvb_frontend: add PLP ID to property cache

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
---
 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(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index dc3457c..d04ef09 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;
 	}
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index 3b86050..fb2b13f 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -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 {

^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
  2011-05-08 22:26           ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Andreas Oberritter
@ 2011-05-09  3:10             ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-09  3:10 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: Steve Kerrison, Antti Palosaari, linux-media

Em 08-05-2011 19:26, Andreas Oberritter escreveu:
> On 05/08/2011 07:17 PM, Steve Kerrison wrote:
>> 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.

> 
> Regards,
> Andreas


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
  2011-05-08 22:10           ` Andreas Oberritter
@ 2011-05-09  9:15             ` Steve Kerrison
  2011-05-09  9:25               ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 33+ messages in thread
From: Steve Kerrison @ 2011-05-09  9:15 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: Antti Palosaari, Mauro Carvalho Chehab, linux-media

Hi Andreas,

> I'd prefer returning -EINVAL for unsupported parameters.
>
> [snip]
> 
> I already had a patch for this, but forgot to submit it together with
> the frontend.h bits.

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.

> 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,
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 

On Mon, 2011-05-09 at 00:10 +0200, Andreas Oberritter wrote:
> On 05/08/2011 09:17 PM, Steve Kerrison wrote:
> > Additional 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.
> > 
> > Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> > ---
> >  drivers/media/dvb/frontends/drxd_hard.c |    4 ++++
> >  1 files changed, 4 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
> > index 30a78af..b3b0704 100644
> > --- a/drivers/media/dvb/frontends/drxd_hard.c
> > +++ b/drivers/media/dvb/frontends/drxd_hard.c
> > @@ -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.
> 
> >  		case 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.
> 
> From 73d630b57f584d7e35cac5e27149cbc564aedde2 Mon Sep 17 00:00:00 2001
> From: Andreas Oberritter <obi@linuxtv.org>
> Date: Fri, 8 Apr 2011 16:39:20 +0000
> Subject: [PATCH 2/2] DVB: drxd_hard: handle new bandwidths by returning -EINVAL
> 
> Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
> ---
>  drivers/media/dvb/frontends/drxd_hard.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c
> index 30a78af..53319f4 100644
> --- a/drivers/media/dvb/frontends/drxd_hard.c
> +++ b/drivers/media/dvb/frontends/drxd_hard.c
> @@ -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)


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum
  2011-05-09  9:15             ` Steve Kerrison
@ 2011-05-09  9:25               ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 33+ messages in thread
From: Mauro Carvalho Chehab @ 2011-05-09  9:25 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Andreas Oberritter, Antti Palosaari, linux-media

Em 09-05-2011 11:15, Steve Kerrison escreveu:
> Hi Andreas,
> 
>> I'd prefer returning -EINVAL for unsupported parameters.
>>
>> [snip]
>>
>> I already had a patch for this, but forgot to submit it together with
>> the frontend.h bits.
> 
> 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.
> 
>> 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.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256
  2011-05-08 19:17         ` [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
@ 2011-05-09 21:45           ` Antti Palosaari
  0 siblings, 0 replies; 33+ messages in thread
From: Antti Palosaari @ 2011-05-09 21:45 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: Mauro Carvalho Chehab, linux-media, Andreas Oberritter

Hello 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.


On 05/08/2011 10:17 PM, Steve Kerrison wrote:
> This is supported in DVB-T2 mode, so added to the T/T2 frontend.
>
> Signed-off-by: Steve Kerrison<steve@stevekerrison.com>

Acked-by: Antti Palosaari <crope@iki.fi>



> ---
>   drivers/media/dvb/frontends/cxd2820r_core.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/dvb/frontends/cxd2820r_core.c b/drivers/media/dvb/frontends/cxd2820r_core.c
> index e900c4c..0779f69 100644
> --- a/drivers/media/dvb/frontends/cxd2820r_core.c
> +++ b/drivers/media/dvb/frontends/cxd2820r_core.c
> @@ -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

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH v3] DVB: Add basic API support for DVB-T2 and bump minor version
  2011-05-08 22:38             ` Andreas Oberritter
@ 2011-05-12 21:11               ` Steve Kerrison
  0 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-12 21:11 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media
  Cc: Antti Palosaari, Andreas Oberritter, Steve Kerrison

From: Andreas Oberritter <obi@linuxtv.org>

steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined

Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
---
 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(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 31e2c0d..8c9ff8a 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -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;
 	}
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index 3b86050..5590eb6 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -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 {
diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h
index d4e2e0b..25adbee 100644
--- a/drivers/media/dvb/frontends/cxd2820r_priv.h
+++ b/drivers/media/dvb/frontends/cxd2820r_priv.h
@@ -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;
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h
index 493a2bf..36a3ed6 100644
--- a/include/linux/dvb/frontend.h
+++ b/include/linux/dvb/frontend.h
@@ -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 {
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h
index 5a7546c..1421cc8 100644
--- a/include/linux/dvb/version.h
+++ b/include/linux/dvb/version.h
@@ -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_*/
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* Re: [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions
  2011-05-08 19:17         ` [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions Steve Kerrison
@ 2011-05-12 21:18           ` Steve Kerrison
  0 siblings, 0 replies; 33+ messages in thread
From: Steve Kerrison @ 2011-05-12 21:18 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: linux-media, Andreas Oberritter, Antti Palosaari

I've just realised there is some illegal whitespace in this patch here:

> @@ -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

Auto-tab between the title and first paragraph. My apologies! If I need
to do anything about this let me know.
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 

On Sun, 2011-05-08 at 20:17 +0100, Steve Kerrison wrote:
> A 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.
> 
> Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
> ---
>  Documentation/DocBook/dvb/dvbproperty.xml |   36 ++++++++++++++++++++++++++--
>  Documentation/DocBook/dvb/frontend.h.xml  |   20 +++++++++++++---
>  2 files changed, 49 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/DocBook/dvb/dvbproperty.xml b/Documentation/DocBook/dvb/dvbproperty.xml
> index 05ce603..52d5e3c 100644
> --- a/Documentation/DocBook/dvb/dvbproperty.xml
> +++ b/Documentation/DocBook/dvb/dvbproperty.xml
> @@ -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>
> diff --git a/Documentation/DocBook/dvb/frontend.h.xml b/Documentation/DocBook/dvb/frontend.h.xml
> index d08e0d4..d792f78 100644
> --- a/Documentation/DocBook/dvb/frontend.h.xml
> +++ b/Documentation/DocBook/dvb/frontend.h.xml
> @@ -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 {


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes
  2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
  2011-05-08 16:04       ` Mauro Carvalho Chehab
@ 2011-05-12 22:06       ` Antti Palosaari
  1 sibling, 0 replies; 33+ messages in thread
From: Antti Palosaari @ 2011-05-12 22:06 UTC (permalink / raw)
  To: Steve Kerrison
  Cc: Mauro Carvalho Chehab, linux-media, Andreas Oberritter,
	Rémi Denis-Courmont

Hello 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



On 05/08/2011 06:51 PM, Steve Kerrison wrote:
> 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.
>


-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2011-05-12 22:41 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20110506125542.ADA1D162E7@stevekerrison.com>
2011-05-06 13:46 ` [git:v4l-dvb/for_v2.6.40] [media] Sony CXD2820R DVB-T/T2/C demodulator driver Antti Palosaari
2011-05-06 15:30 ` Mauro Carvalho Chehab
2011-05-06 15:46   ` Mauro Carvalho Chehab
2011-05-08 15:51     ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Steve Kerrison
2011-05-08 16:04       ` Mauro Carvalho Chehab
2011-05-08 19:17         ` [PATCH v2 0/5] " Steve Kerrison
2011-05-08 19:17         ` [PATCH v2 1/5] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
2011-05-08 22:22           ` Andreas Oberritter
2011-05-08 22:38             ` Andreas Oberritter
2011-05-12 21:11               ` [PATCH v3] " Steve Kerrison
2011-05-08 19:17         ` [PATCH v2 2/5] drxd: Fix warning caused by new entries in an enum Steve Kerrison
2011-05-08 22:10           ` Andreas Oberritter
2011-05-09  9:15             ` Steve Kerrison
2011-05-09  9:25               ` Mauro Carvalho Chehab
2011-05-08 19:17         ` [PATCH v2 3/5] mxl5005: " Steve Kerrison
2011-05-08 22:11           ` Andreas Oberritter
2011-05-08 19:17         ` [PATCH v2 4/5] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
2011-05-09 21:45           ` Antti Palosaari
2011-05-08 19:17         ` [PATCH v2 5/5] Documentation: Update to include DVB-T2 additions Steve Kerrison
2011-05-12 21:18           ` Steve Kerrison
     [not found]         ` <1304875061.2920.13.camel@ares>
2011-05-08 22:26           ` [PATCH 0/6] DVB-T2 API updates, documentation and accompanying small fixes Andreas Oberritter
2011-05-09  3:10             ` Mauro Carvalho Chehab
2011-05-12 22:06       ` Antti Palosaari
2011-05-08 15:51     ` [PATCH 1/6] DVB: Add basic API support for DVB-T2 and bump minor version Steve Kerrison
2011-05-08 15:51     ` [PATCH 2/6] cxd2820r: Remove temporary T2 API hack Steve Kerrison
2011-05-08 16:06       ` Mauro Carvalho Chehab
2011-05-08 15:51     ` [PATCH 3/6] drxd: Fix warning caused by new entries in an enum Steve Kerrison
2011-05-08 15:51     ` [PATCH 4/6] mxl5005: " Steve Kerrison
2011-05-08 15:51     ` [PATCH 5/6] cxd2820r: Update frontend capabilities to advertise QAM-256 Steve Kerrison
2011-05-08 15:51     ` [PATCH 6/6] Documentation: Update to include DVB-T2 additions Steve Kerrison
2011-05-08 16:20       ` Mauro Carvalho Chehab
2011-05-08 19:13         ` Steve Kerrison
2011-05-08 22:05           ` Andreas Oberritter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.