summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Endriss <devnull@localhost>2004-07-18 23:24:59 +0000
committerOliver Endriss <devnull@localhost>2004-07-18 23:24:59 +0000
commitc103d051629c32e975aad5fca2d5e07ab44236cb (patch)
treedd375d771b5b95ab7a3b6631d6725d4884d27a18
parent383ee77ced096319aff72cee72d47e448f76411c (diff)
downloadmediapointer-dvb-s2-c103d051629c32e975aad5fca2d5e07ab44236cb.tar.gz
mediapointer-dvb-s2-c103d051629c32e975aad5fca2d5e07ab44236cb.tar.bz2
New ioctl OSD_GET_CAPABILITY/OSD_CAP_MEMSIZE - returns size of OSD memory.
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c14
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.h2
-rw-r--r--linux/include/linux/dvb/osd.h10
4 files changed, 27 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 3a2d1d23a..caf1f122a 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -698,6 +698,8 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file,
if (cmd == OSD_SEND_CMD)
return av7110_osd_cmd(av7110, (osd_cmd_t *) parg);
+ if (cmd == OSD_GET_CAPABILITY)
+ return av7110_osd_capability(av7110, (osd_cap_t *) parg);
return -EINVAL;
}
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index a1093ae04..ff7b0b99a 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -1034,4 +1034,18 @@ int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
return -EINVAL;
}
}
+
+int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap)
+{
+ switch (cap->cmd) {
+ case OSD_CAP_MEMSIZE:
+ if (FW_4M_SDRAM(av7110->arm_app))
+ cap->val = 1000000;
+ else
+ cap->val = 92000;
+ return 0;
+ default:
+ return -EINVAL;
+ }
+}
#endif /* CONFIG_DVB_AV7110_OSD */
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.h b/linux/drivers/media/dvb/ttpci/av7110_hw.h
index 4c7715e65..cdbdbfee7 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.h
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.h
@@ -388,6 +388,7 @@ extern void av7110_reset_arm(struct av7110 *av7110);
extern int av7110_bootarm(struct av7110 *av7110);
extern int av7110_firmversion(struct av7110 *av7110);
#define FW_CI_LL_SUPPORT(arm_app) ((arm_app) & 0x80000000)
+#define FW_4M_SDRAM(arm_app) ((arm_app) & 0x40000000)
#define FW_VERSION(arm_app) ((arm_app) & 0x0000FFFF)
extern int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...);
@@ -510,6 +511,7 @@ extern int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned
#ifdef CONFIG_DVB_AV7110_OSD
extern int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc);
+extern int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap);
#endif /* CONFIG_DVB_AV7110_OSD */
diff --git a/linux/include/linux/dvb/osd.h b/linux/include/linux/dvb/osd.h
index 0d8143960..d8b9e51f1 100644
--- a/linux/include/linux/dvb/osd.h
+++ b/linux/include/linux/dvb/osd.h
@@ -105,7 +105,15 @@ typedef struct osd_cmd_s {
} osd_cmd_t;
-#define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t)
+typedef struct osd_cap_s {
+ int cmd;
+#define OSD_CAP_MEMSIZE 1 /* memory size */
+ long val;
+} osd_cap_t;
+
+
+#define OSD_SEND_CMD _IOW('o', 160, osd_cmd_t)
+#define OSD_GET_CAPABILITY _IOR('o', 161, osd_cap_t)
#endif