linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH 03/13: 0003-DVB-Allow-frontend-to-set-DELSYS-Modulation
@ 2011-11-21 21:06 Manu Abraham
  2011-11-24 23:49 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Manu Abraham @ 2011-11-21 21:06 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: Mauro Carvalho Chehab, Andreas Oberritter

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0003-DVB-Allow-frontend-to-set-DELSYS-Modulation-rather-t.patch --]
[-- Type: text/x-patch, Size: 1550 bytes --]

From 0f1010bd5b1813cff087db9ccaaf95abe5858e53 Mon Sep 17 00:00:00 2001
From: Manu Abraham <abraham.manu@gmail.com>
Date: Sat, 19 Nov 2011 19:00:38 +0530
Subject: [PATCH 03/13] DVB: Allow frontend to set DELSYS/Modulation rather than querying fe->ops.info.type

With any tuner that can tune to multiple delivery systems/standards, it does
query fe->ops.info.type to determine frontend type and set the delivery
system type. fe->ops.info.type can handle only 4 delivery systems, viz FE_QPSK,
FE_QAM, FE_OFDM and FE_ATSC.

The change allows the tuner to be set to any delivery system specified in
fe_delivery_system_t and any modulation as specified in fe_modulation_t,
thereby simplification of issues.

Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
---
 drivers/media/dvb/dvb-core/dvb_frontend.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index 67bbfa7..ec6e8e9 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -113,6 +113,8 @@ enum tuner_param {
 	DVBFE_TUNER_BANDWIDTH		= (1 <<  3),
 	DVBFE_TUNER_REFCLOCK		= (1 <<  4),
 	DVBFE_TUNER_IQSENSE		= (1 <<  5),
+	DVBFE_TUNER_DELSYS              = (1 <<  6),
+	DVBFE_TUNER_MODULATION		= (1 <<  7),
 	DVBFE_TUNER_DUMMY		= (1 << 31)
 };
 
@@ -149,6 +151,8 @@ enum dvbfe_algo {
 };
 
 struct tuner_state {
+	fe_delivery_system_t delsys;
+	fe_modulation_t modulation;
 	u32 frequency;
 	u32 tunerstep;
 	u32 ifreq;
-- 
1.7.1


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

* Re: PATCH 03/13: 0003-DVB-Allow-frontend-to-set-DELSYS-Modulation
  2011-11-21 21:06 PATCH 03/13: 0003-DVB-Allow-frontend-to-set-DELSYS-Modulation Manu Abraham
@ 2011-11-24 23:49 ` Mauro Carvalho Chehab
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2011-11-24 23:49 UTC (permalink / raw)
  To: Manu Abraham; +Cc: Linux Media Mailing List, Andreas Oberritter

Em 21-11-2011 19:06, Manu Abraham escreveu:

> With any tuner that can tune to multiple delivery systems/standards, it does
> query fe->ops.info.type to determine frontend type and set the delivery
> system type. fe->ops.info.type can handle only 4 delivery systems, viz FE_QPSK,
> FE_QAM, FE_OFDM and FE_ATSC.
> 
> The change allows the tuner to be set to any delivery system specified in
> fe_delivery_system_t and any modulation as specified in fe_modulation_t,
> thereby simplification of issues.
> 
> Signed-off-by: Manu Abraham <abraham.manu@gmail.com>
> ---
>  drivers/media/dvb/dvb-core/dvb_frontend.h |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
> index 67bbfa7..ec6e8e9 100644
> --- a/drivers/media/dvb/dvb-core/dvb_frontend.h
> +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
> @@ -113,6 +113,8 @@ enum tuner_param {
>  	DVBFE_TUNER_BANDWIDTH		= (1 <<  3),
>  	DVBFE_TUNER_REFCLOCK		= (1 <<  4),
>  	DVBFE_TUNER_IQSENSE		= (1 <<  5),
> +	DVBFE_TUNER_DELSYS              = (1 <<  6),
> +	DVBFE_TUNER_MODULATION		= (1 <<  7),
>  	DVBFE_TUNER_DUMMY		= (1 << 31)
>  };
>  
> @@ -149,6 +151,8 @@ enum dvbfe_algo {
>  };
>  
>  struct tuner_state {
> +	fe_delivery_system_t delsys;
> +	fe_modulation_t modulation;
>  	u32 frequency;
>  	u32 tunerstep;
>  	u32 ifreq;

Not sure about this patch.

Currently, tuners with newer standards just don't use the dvb_frontend_parameters 
passed into them, using instead fe->dtv_property_cache.

So, in the long term, it seems to make more sense to just change the
set_parameters callback parameters from:

	static int set_params(struct dvb_frontend *fe,
		struct dvb_frontend_parameters *params)

to:

	static int set_params(struct dvb_frontend *fe)

or to explicitly pass the cache as an argument.


Regards,
Mauro.

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

end of thread, other threads:[~2011-11-24 23:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 21:06 PATCH 03/13: 0003-DVB-Allow-frontend-to-set-DELSYS-Modulation Manu Abraham
2011-11-24 23:49 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).