Re: Thoughts about supporting more complex tuners

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OK, here is a new prototype patch:

Changes:
* tuner_priv now in dvb_frontend
* added dvb_tuner_info
* cleanups due to tuner_priv move.
diff -r 2b05b5271ae1 linux/drivers/media/dvb/dvb-core/dvb_frontend.h
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h	Thu Apr 13 12:29:04 2006 -0400
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h	Fri Apr 14 16:33:56 2006 +0100
@@ -86,7 +86,35 @@ struct dvb_frontend_ops {
 	int (*enable_high_lnb_voltage)(struct dvb_frontend* fe, long arg);
 	int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
 	int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
+
+	struct dvb_tuner_ops tuner_ops;
 };
+
+struct dvb_tuner_info {
+	char name[128];
+	u32 frequency_min;
+	u32 frequency_max;
+	u32 frequency_step;
+};
+
+struct dvb_tuner_ops {
+	struct dvb_tuner_info info;
+
+	int (*release)(struct dvb_frontend *fe);
+
+	int (*init)(struct dvb_frontend *fe);
+	int (*sleep)(struct dvb_frontend *fe);
+
+	int (*set_frequency)(struct dvb_frontend *fe, u32 frequency);
+	int (*get_frequency)(struct dvb_frontend *fe, u32 *frequency);
+	int (*set_bandwidth)(struct dvb_frontend *fe, u32 bandwidth);
+	int (*get_bandwidth)(struct dvb_frontend *fe, u32 *bandwidth);
+
+#define TUNER_STATUS_LOCKED 1
+        int (*get_status)(struct dvb_frontend *fe, u32 *status);
+};
+
+
 
 #define MAX_EVENT 8
 
@@ -103,6 +131,7 @@ struct dvb_frontend {
 	struct dvb_frontend_ops* ops;
 	struct dvb_adapter *dvb;
 	void* demodulator_priv;
+	void* tuner_priv;
 	void* frontend_priv;
 	void* misc_priv;
 };
_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux