aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/bt8xx
diff options
context:
space:
mode:
authorManu Abraham <abraham.manu@gmail.com>2006-06-21 17:03:42 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 02:05:20 -0300
commit1fd57f60f81147dc70f8249da62af48fe451f2b1 (patch)
tree0df29fab00f5377f55fd61e83007422e1ed9d6ed /drivers/media/dvb/bt8xx
parent1f19456d9760431f3a888b21fff035f875ddd189 (diff)
V4L/DVB (4182): Comment out MMI functions for now
Signed-off-by: Manu Abraham <manu@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/bt8xx')
-rw-r--r--drivers/media/dvb/bt8xx/dst_ca.c94
1 files changed, 94 insertions, 0 deletions
diff --git a/drivers/media/dvb/bt8xx/dst_ca.c b/drivers/media/dvb/bt8xx/dst_ca.c
index baa8c9aa212..6b2437501ca 100644
--- a/drivers/media/dvb/bt8xx/dst_ca.c
+++ b/drivers/media/dvb/bt8xx/dst_ca.c
@@ -308,6 +308,100 @@ static int ca_get_slot_info(struct dst_state *state, struct ca_slot_info *p_ca_s
return 0;
}
+/* MMI */
+static int ca_get_mmi(struct dst_state *state, struct ca_msg *hw_msg, struct ca_msg *mmi_msg)
+{
+ static u8 get_mmi[] = { 0x07, 0x40, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x0f };
+
+ put_checksum(&get_mmi[0], 7);
+ if ((dst_put_ci(state, get_mmi, sizeof (get_mmi), hw_msg->msg, GET_REPLY)) < 0) {
+ dprintk(verbose, DST_CA_ERROR, 1, " -->dst_put_ci FAILED !");
+ return -1;
+ }
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci SUCCESS !");
+ memcpy(mmi_msg->msg, hw_msg->msg, hw_msg->msg[4]);
+
+ return 0;
+}
+
+/**
+ * Get Menu should be the first MMI function (like open !)
+ */
+static int ca_get_menu(struct dst_state *state)
+{
+ static u8 get_menu[] = { 0x07, 0x40, 0x00, 0x00, 0x09, 0x00, 0x00, 0xff };
+
+ put_checksum(&get_menu[0], 7);
+ if ((dst_put_ci(state, get_menu, sizeof (get_menu), get_menu, NO_REPLY)) < 0) {
+ dprintk(verbose, DST_CA_ERROR, 1, " -->dst_put_ci FAILED !");
+ return -1;
+ }
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci SUCCESS !");
+
+ return 0;
+}
+
+/**
+ * MMI Enq (Enquire the application to allow user input)
+ */
+static int ca_answer_menu(struct dst_state *state, struct ca_msg *hw_msg, struct ca_msg *menu_answ)
+{
+ u8 choice = 0;
+
+ static u8 answer_menu[] = { 0x08, 0x40, 0x00, 0x00, 0x0b, 0x01, 0x00, 0x01, 0xff };
+
+ /* derive answer from menu (This comes from the user) */
+ answer_menu[7] = choice;
+ put_checksum(&answer_menu[0], 7);
+ if ((dst_put_ci(state, answer_menu, sizeof (answer_menu), hw_msg->msg, NO_REPLY)) < 0) {
+ dprintk(verbose, DST_CA_ERROR, 1, " -->dst_put_ci FAILED !");
+ return -1;
+ }
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci SUCCESS !");
+
+ return 0;
+}
+
+static int ca_answer_mmi(struct dst_state *state, struct ca_msg *hw_msg, struct ca_msg *answ_msg)
+{
+ u8 answer =0, length = 0;
+
+ static u8 answer_mmi[] = { 0x08, 0x40, 0x00, 0x00, 0x08, 0x01, 0x00, 0x01, 0xff };
+
+ /* derive answer from answ_msg (This comes from the user) */
+ if (answer == 0) /* 0x00 == Cancel */
+ answer_mmi[7] = 0x00;
+ else { /* 0x01 == Answer */
+ length = strlen(answ_msg->msg);
+ memcpy(&answer_mmi[8], answ_msg->msg, length);
+ answer_mmi[0] += length;
+ answer_mmi[5] += length;
+ }
+ put_checksum(&answer_mmi[0], (8 + length));
+ if ((dst_put_ci(state, answer_mmi, sizeof (answer_mmi), hw_msg->msg, GET_REPLY)) < 0) {
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci FAILED !");
+
+ return -1;
+ }
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci SUCCESS !");
+
+ return 0;
+}
+
+static int ca_close_mmi(struct dst_state *state, struct ca_msg *hw_msg)
+{
+ static u8 close_mmi[] = { 0x07, 0x40, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xff };
+
+ put_checksum(&close_mmi[0], 7);
+ if ((dst_put_ci(state, close_mmi, sizeof (close_mmi), hw_msg->msg, NO_REPLY)) < 0) {
+ dprintk(verbose, DST_CA_ERROR, 1, " -->dst_put_ci FAILED !");
+
+ return -1;
+ }
+ dprintk(verbose, DST_CA_NOTICE, 1, " -->dst_put_ci SUCCESS !");
+
+ return 0;
+}
static int ca_get_message(struct dst_state *state, struct ca_msg *p_ca_message, void __user *arg)
{