diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/dvb/Makefile | 2 | ||||
-rw-r--r-- | drivers/media/dvb/firesat/cmp.h | 9 | ||||
-rw-r--r-- | drivers/media/dvb/firesat/firesat-ci.h | 9 | ||||
-rw-r--r-- | drivers/media/dvb/firesat/firesat-rc.h | 11 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/Kconfig (renamed from drivers/media/dvb/firesat/Kconfig) | 0 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/Makefile (renamed from drivers/media/dvb/firesat/Makefile) | 14 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/avc.c (renamed from drivers/media/dvb/firesat/avc_api.c) | 194 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/avc.h (renamed from drivers/media/dvb/firesat/avc_api.h) | 34 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/cmp.c (renamed from drivers/media/dvb/firesat/cmp.c) | 44 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/cmp.h | 9 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-1394.c (renamed from drivers/media/dvb/firesat/firesat_1394.c) | 194 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-ci.c (renamed from drivers/media/dvb/firesat/firesat-ci.c) | 112 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-ci.h | 9 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-dvb.c (renamed from drivers/media/dvb/firesat/firesat_dvb.c) | 148 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-fe.c (renamed from drivers/media/dvb/firesat/firesat_fe.c) | 126 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-iso.c (renamed from drivers/media/dvb/firesat/firesat_iso.c) | 42 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-rc.c (renamed from drivers/media/dvb/firesat/firesat-rc.c) | 22 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv-rc.h | 11 | ||||
-rw-r--r-- | drivers/media/dvb/firewire/firedtv.h (renamed from drivers/media/dvb/firesat/firesat.h) | 38 |
20 files changed, 515 insertions, 515 deletions
diff --git a/drivers/media/dvb/Kconfig b/drivers/media/dvb/Kconfig index 8a2d5f9713de..5a74c5c62f15 100644 --- a/drivers/media/dvb/Kconfig +++ b/drivers/media/dvb/Kconfig | |||
@@ -51,7 +51,7 @@ comment "Supported SDMC DM1105 Adapters" | |||
51 | depends on DVB_CORE && PCI && I2C | 51 | depends on DVB_CORE && PCI && I2C |
52 | source "drivers/media/dvb/dm1105/Kconfig" | 52 | source "drivers/media/dvb/dm1105/Kconfig" |
53 | 53 | ||
54 | source "drivers/media/dvb/firesat/Kconfig" | 54 | source "drivers/media/dvb/firewire/Kconfig" |
55 | 55 | ||
56 | comment "Supported DVB Frontends" | 56 | comment "Supported DVB Frontends" |
57 | depends on DVB_CORE | 57 | depends on DVB_CORE |
diff --git a/drivers/media/dvb/Makefile b/drivers/media/dvb/Makefile index cb765816f76c..6092a5bb5a7d 100644 --- a/drivers/media/dvb/Makefile +++ b/drivers/media/dvb/Makefile | |||
@@ -4,4 +4,4 @@ | |||
4 | 4 | ||
5 | obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/ | 5 | obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/ |
6 | 6 | ||
7 | obj-$(CONFIG_DVB_FIREDTV) += firesat/ | 7 | obj-$(CONFIG_DVB_FIREDTV) += firewire/ |
diff --git a/drivers/media/dvb/firesat/cmp.h b/drivers/media/dvb/firesat/cmp.h deleted file mode 100644 index d92f6c7fb5d5..000000000000 --- a/drivers/media/dvb/firesat/cmp.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _CMP_H | ||
2 | #define _CMP_H | ||
3 | |||
4 | struct firesat; | ||
5 | |||
6 | int cmp_establish_pp_connection(struct firesat *firesat, int plug, int channel); | ||
7 | void cmp_break_pp_connection(struct firesat *firesat, int plug, int channel); | ||
8 | |||
9 | #endif /* _CMP_H */ | ||
diff --git a/drivers/media/dvb/firesat/firesat-ci.h b/drivers/media/dvb/firesat/firesat-ci.h deleted file mode 100644 index 9c68cd2246a7..000000000000 --- a/drivers/media/dvb/firesat/firesat-ci.h +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #ifndef _FIREDTV_CI_H | ||
2 | #define _FIREDTV_CI_H | ||
3 | |||
4 | struct firesat; | ||
5 | |||
6 | int firesat_ca_register(struct firesat *firesat); | ||
7 | void firesat_ca_release(struct firesat *firesat); | ||
8 | |||
9 | #endif /* _FIREDTV_CI_H */ | ||
diff --git a/drivers/media/dvb/firesat/firesat-rc.h b/drivers/media/dvb/firesat/firesat-rc.h deleted file mode 100644 index 12c1c5c28b36..000000000000 --- a/drivers/media/dvb/firesat/firesat-rc.h +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #ifndef _FIREDTV_RC_H | ||
2 | #define _FIREDTV_RC_H | ||
3 | |||
4 | struct firesat; | ||
5 | struct device; | ||
6 | |||
7 | int firesat_register_rc(struct firesat *firesat, struct device *dev); | ||
8 | void firesat_unregister_rc(struct firesat *firesat); | ||
9 | void firesat_handle_rc(struct firesat *firesat, unsigned int code); | ||
10 | |||
11 | #endif /* _FIREDTV_RC_H */ | ||
diff --git a/drivers/media/dvb/firesat/Kconfig b/drivers/media/dvb/firewire/Kconfig index 03d25ad10350..03d25ad10350 100644 --- a/drivers/media/dvb/firesat/Kconfig +++ b/drivers/media/dvb/firewire/Kconfig | |||
diff --git a/drivers/media/dvb/firesat/Makefile b/drivers/media/dvb/firewire/Makefile index 9e49edc7c49d..628dacd10daf 100644 --- a/drivers/media/dvb/firesat/Makefile +++ b/drivers/media/dvb/firewire/Makefile | |||
@@ -1,11 +1,11 @@ | |||
1 | firedtv-objs := firesat_1394.o \ | 1 | firedtv-objs := firedtv-1394.o \ |
2 | firesat_dvb.o \ | 2 | firedtv-dvb.o \ |
3 | firesat_fe.o \ | 3 | firedtv-fe.o \ |
4 | firesat_iso.o \ | 4 | firedtv-iso.o \ |
5 | avc_api.o \ | 5 | avc.o \ |
6 | cmp.o \ | 6 | cmp.o \ |
7 | firesat-rc.o \ | 7 | firedtv-rc.o \ |
8 | firesat-ci.o | 8 | firedtv-ci.o |
9 | 9 | ||
10 | obj-$(CONFIG_DVB_FIREDTV) += firedtv.o | 10 | obj-$(CONFIG_DVB_FIREDTV) += firedtv.o |
11 | 11 | ||
diff --git a/drivers/media/dvb/firesat/avc_api.c b/drivers/media/dvb/firewire/avc.c index 3a4da73f0798..847a537b1f58 100644 --- a/drivers/media/dvb/firesat/avc_api.c +++ b/drivers/media/dvb/firewire/avc.c | |||
@@ -25,26 +25,26 @@ | |||
25 | #include <ieee1394_transactions.h> | 25 | #include <ieee1394_transactions.h> |
26 | #include <nodemgr.h> | 26 | #include <nodemgr.h> |
27 | 27 | ||
28 | #include "avc_api.h" | 28 | #include "avc.h" |
29 | #include "firesat.h" | 29 | #include "firedtv.h" |
30 | #include "firesat-rc.h" | 30 | #include "firedtv-rc.h" |
31 | 31 | ||
32 | #define FCP_COMMAND_REGISTER 0xfffff0000b00ULL | 32 | #define FCP_COMMAND_REGISTER 0xfffff0000b00ULL |
33 | 33 | ||
34 | static int __avc_write(struct firesat *firesat, | 34 | static int __avc_write(struct firedtv *fdtv, |
35 | const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) | 35 | const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) |
36 | { | 36 | { |
37 | int err, retry; | 37 | int err, retry; |
38 | 38 | ||
39 | if (RspFrm) | 39 | if (RspFrm) |
40 | firesat->avc_reply_received = false; | 40 | fdtv->avc_reply_received = false; |
41 | 41 | ||
42 | for (retry = 0; retry < 6; retry++) { | 42 | for (retry = 0; retry < 6; retry++) { |
43 | err = hpsb_node_write(firesat->ud->ne, FCP_COMMAND_REGISTER, | 43 | err = hpsb_node_write(fdtv->ud->ne, FCP_COMMAND_REGISTER, |
44 | (quadlet_t *)CmdFrm, CmdFrm->length); | 44 | (quadlet_t *)CmdFrm, CmdFrm->length); |
45 | if (err) { | 45 | if (err) { |
46 | firesat->avc_reply_received = true; | 46 | fdtv->avc_reply_received = true; |
47 | dev_err(&firesat->ud->device, | 47 | dev_err(&fdtv->ud->device, |
48 | "FCP command write failed\n"); | 48 | "FCP command write failed\n"); |
49 | return err; | 49 | return err; |
50 | } | 50 | } |
@@ -56,34 +56,34 @@ static int __avc_write(struct firesat *firesat, | |||
56 | * AV/C specs say that answers should be sent within 150 ms. | 56 | * AV/C specs say that answers should be sent within 150 ms. |
57 | * Time out after 200 ms. | 57 | * Time out after 200 ms. |
58 | */ | 58 | */ |
59 | if (wait_event_timeout(firesat->avc_wait, | 59 | if (wait_event_timeout(fdtv->avc_wait, |
60 | firesat->avc_reply_received, | 60 | fdtv->avc_reply_received, |
61 | HZ / 5) != 0) { | 61 | HZ / 5) != 0) { |
62 | memcpy(RspFrm, firesat->respfrm, firesat->resp_length); | 62 | memcpy(RspFrm, fdtv->respfrm, fdtv->resp_length); |
63 | RspFrm->length = firesat->resp_length; | 63 | RspFrm->length = fdtv->resp_length; |
64 | 64 | ||
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | } | 67 | } |
68 | dev_err(&firesat->ud->device, "FCP response timed out\n"); | 68 | dev_err(&fdtv->ud->device, "FCP response timed out\n"); |
69 | return -ETIMEDOUT; | 69 | return -ETIMEDOUT; |
70 | } | 70 | } |
71 | 71 | ||
72 | static int avc_write(struct firesat *firesat, | 72 | static int avc_write(struct firedtv *fdtv, |
73 | const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) | 73 | const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) |
74 | { | 74 | { |
75 | int ret; | 75 | int ret; |
76 | 76 | ||
77 | if (mutex_lock_interruptible(&firesat->avc_mutex)) | 77 | if (mutex_lock_interruptible(&fdtv->avc_mutex)) |
78 | return -EINTR; | 78 | return -EINTR; |
79 | 79 | ||
80 | ret = __avc_write(firesat, CmdFrm, RspFrm); | 80 | ret = __avc_write(fdtv, CmdFrm, RspFrm); |
81 | 81 | ||
82 | mutex_unlock(&firesat->avc_mutex); | 82 | mutex_unlock(&fdtv->avc_mutex); |
83 | return ret; | 83 | return ret; |
84 | } | 84 | } |
85 | 85 | ||
86 | int avc_recv(struct firesat *firesat, u8 *data, size_t length) | 86 | int avc_recv(struct firedtv *fdtv, u8 *data, size_t length) |
87 | { | 87 | { |
88 | AVCRspFrm *RspFrm = (AVCRspFrm *)data; | 88 | AVCRspFrm *RspFrm = (AVCRspFrm *)data; |
89 | 89 | ||
@@ -93,27 +93,27 @@ int avc_recv(struct firesat *firesat, u8 *data, size_t length) | |||
93 | RspFrm->operand[2] == SFE_VENDOR_DE_COMPANYID_2 && | 93 | RspFrm->operand[2] == SFE_VENDOR_DE_COMPANYID_2 && |
94 | RspFrm->operand[3] == SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL) { | 94 | RspFrm->operand[3] == SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL) { |
95 | if (RspFrm->resp == CHANGED) { | 95 | if (RspFrm->resp == CHANGED) { |
96 | firesat_handle_rc(firesat, | 96 | fdtv_handle_rc(fdtv, |
97 | RspFrm->operand[4] << 8 | RspFrm->operand[5]); | 97 | RspFrm->operand[4] << 8 | RspFrm->operand[5]); |
98 | schedule_work(&firesat->remote_ctrl_work); | 98 | schedule_work(&fdtv->remote_ctrl_work); |
99 | } else if (RspFrm->resp != INTERIM) { | 99 | } else if (RspFrm->resp != INTERIM) { |
100 | dev_info(&firesat->ud->device, | 100 | dev_info(&fdtv->ud->device, |
101 | "remote control result = %d\n", RspFrm->resp); | 101 | "remote control result = %d\n", RspFrm->resp); |
102 | } | 102 | } |
103 | return 0; | 103 | return 0; |
104 | } | 104 | } |
105 | 105 | ||
106 | if (firesat->avc_reply_received) { | 106 | if (fdtv->avc_reply_received) { |
107 | dev_err(&firesat->ud->device, | 107 | dev_err(&fdtv->ud->device, |
108 | "received out-of-order AVC response, ignored\n"); | 108 | "received out-of-order AVC response, ignored\n"); |
109 | return -EIO; | 109 | return -EIO; |
110 | } | 110 | } |
111 | 111 | ||
112 | memcpy(firesat->respfrm, data, length); | 112 | memcpy(fdtv->respfrm, data, length); |
113 | firesat->resp_length = length; | 113 | fdtv->resp_length = length; |
114 | 114 | ||
115 | firesat->avc_reply_received = true; | 115 | fdtv->avc_reply_received = true; |
116 | wake_up(&firesat->avc_wait); | 116 | wake_up(&fdtv->avc_wait); |
117 | 117 | ||
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
@@ -122,7 +122,7 @@ int avc_recv(struct firesat *firesat, u8 *data, size_t length) | |||
122 | * tuning command for setting the relative LNB frequency | 122 | * tuning command for setting the relative LNB frequency |
123 | * (not supported by the AVC standard) | 123 | * (not supported by the AVC standard) |
124 | */ | 124 | */ |
125 | static void avc_tuner_tuneqpsk(struct firesat *firesat, | 125 | static void avc_tuner_tuneqpsk(struct firedtv *fdtv, |
126 | struct dvb_frontend_parameters *params, AVCCmdFrm *CmdFrm) | 126 | struct dvb_frontend_parameters *params, AVCCmdFrm *CmdFrm) |
127 | { | 127 | { |
128 | CmdFrm->opcode = VENDOR; | 128 | CmdFrm->opcode = VENDOR; |
@@ -158,21 +158,21 @@ static void avc_tuner_tuneqpsk(struct firesat *firesat, | |||
158 | CmdFrm->operand[10] = 0x0; | 158 | CmdFrm->operand[10] = 0x0; |
159 | } | 159 | } |
160 | 160 | ||
161 | if (firesat->voltage == 0xff) | 161 | if (fdtv->voltage == 0xff) |
162 | CmdFrm->operand[11] = 0xff; | 162 | CmdFrm->operand[11] = 0xff; |
163 | else if (firesat->voltage == SEC_VOLTAGE_18) /* polarisation */ | 163 | else if (fdtv->voltage == SEC_VOLTAGE_18) /* polarisation */ |
164 | CmdFrm->operand[11] = 0; | 164 | CmdFrm->operand[11] = 0; |
165 | else | 165 | else |
166 | CmdFrm->operand[11] = 1; | 166 | CmdFrm->operand[11] = 1; |
167 | 167 | ||
168 | if (firesat->tone == 0xff) | 168 | if (fdtv->tone == 0xff) |
169 | CmdFrm->operand[12] = 0xff; | 169 | CmdFrm->operand[12] = 0xff; |
170 | else if (firesat->tone == SEC_TONE_ON) /* band */ | 170 | else if (fdtv->tone == SEC_TONE_ON) /* band */ |
171 | CmdFrm->operand[12] = 1; | 171 | CmdFrm->operand[12] = 1; |
172 | else | 172 | else |
173 | CmdFrm->operand[12] = 0; | 173 | CmdFrm->operand[12] = 0; |
174 | 174 | ||
175 | if (firesat->type == FireSAT_DVB_S2) { | 175 | if (fdtv->type == FIREDTV_DVB_S2) { |
176 | CmdFrm->operand[13] = 0x1; | 176 | CmdFrm->operand[13] = 0x1; |
177 | CmdFrm->operand[14] = 0xff; | 177 | CmdFrm->operand[14] = 0xff; |
178 | CmdFrm->operand[15] = 0xff; | 178 | CmdFrm->operand[15] = 0xff; |
@@ -394,7 +394,7 @@ static void avc_tuner_dsd_dvb_t(struct dvb_frontend_parameters *params, | |||
394 | CmdFrm->length = 24; | 394 | CmdFrm->length = 24; |
395 | } | 395 | } |
396 | 396 | ||
397 | int avc_tuner_dsd(struct firesat *firesat, | 397 | int avc_tuner_dsd(struct firedtv *fdtv, |
398 | struct dvb_frontend_parameters *params) | 398 | struct dvb_frontend_parameters *params) |
399 | { | 399 | { |
400 | AVCCmdFrm CmdFrm; | 400 | AVCCmdFrm CmdFrm; |
@@ -405,21 +405,21 @@ int avc_tuner_dsd(struct firesat *firesat, | |||
405 | CmdFrm.cts = AVC; | 405 | CmdFrm.cts = AVC; |
406 | CmdFrm.ctype = CONTROL; | 406 | CmdFrm.ctype = CONTROL; |
407 | CmdFrm.sutyp = 0x5; | 407 | CmdFrm.sutyp = 0x5; |
408 | CmdFrm.suid = firesat->subunit; | 408 | CmdFrm.suid = fdtv->subunit; |
409 | 409 | ||
410 | switch (firesat->type) { | 410 | switch (fdtv->type) { |
411 | case FireSAT_DVB_S: | 411 | case FIREDTV_DVB_S: |
412 | case FireSAT_DVB_S2: | 412 | case FIREDTV_DVB_S2: |
413 | avc_tuner_tuneqpsk(firesat, params, &CmdFrm); break; | 413 | avc_tuner_tuneqpsk(fdtv, params, &CmdFrm); break; |
414 | case FireSAT_DVB_C: | 414 | case FIREDTV_DVB_C: |
415 | avc_tuner_dsd_dvb_c(params, &CmdFrm); break; | 415 | avc_tuner_dsd_dvb_c(params, &CmdFrm); break; |
416 | case FireSAT_DVB_T: | 416 | case FIREDTV_DVB_T: |
417 | avc_tuner_dsd_dvb_t(params, &CmdFrm); break; | 417 | avc_tuner_dsd_dvb_t(params, &CmdFrm); break; |
418 | default: | 418 | default: |
419 | BUG(); | 419 | BUG(); |
420 | } | 420 | } |
421 | 421 | ||
422 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 422 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
423 | return -EIO; | 423 | return -EIO; |
424 | 424 | ||
425 | msleep(500); | 425 | msleep(500); |
@@ -432,7 +432,7 @@ int avc_tuner_dsd(struct firesat *firesat, | |||
432 | return 0; | 432 | return 0; |
433 | } | 433 | } |
434 | 434 | ||
435 | int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) | 435 | int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]) |
436 | { | 436 | { |
437 | AVCCmdFrm CmdFrm; | 437 | AVCCmdFrm CmdFrm; |
438 | AVCRspFrm RspFrm; | 438 | AVCRspFrm RspFrm; |
@@ -446,7 +446,7 @@ int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) | |||
446 | CmdFrm.cts = AVC; | 446 | CmdFrm.cts = AVC; |
447 | CmdFrm.ctype = CONTROL; | 447 | CmdFrm.ctype = CONTROL; |
448 | CmdFrm.sutyp = 0x5; | 448 | CmdFrm.sutyp = 0x5; |
449 | CmdFrm.suid = firesat->subunit; | 449 | CmdFrm.suid = fdtv->subunit; |
450 | CmdFrm.opcode = DSD; | 450 | CmdFrm.opcode = DSD; |
451 | 451 | ||
452 | CmdFrm.operand[0] = 0; // source plug | 452 | CmdFrm.operand[0] = 0; // source plug |
@@ -469,14 +469,14 @@ int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) | |||
469 | 469 | ||
470 | CmdFrm.length = ALIGN(3 + pos, 4); | 470 | CmdFrm.length = ALIGN(3 + pos, 4); |
471 | 471 | ||
472 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 472 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
473 | return -EIO; | 473 | return -EIO; |
474 | 474 | ||
475 | msleep(50); | 475 | msleep(50); |
476 | return 0; | 476 | return 0; |
477 | } | 477 | } |
478 | 478 | ||
479 | int avc_tuner_get_ts(struct firesat *firesat) | 479 | int avc_tuner_get_ts(struct firedtv *fdtv) |
480 | { | 480 | { |
481 | AVCCmdFrm CmdFrm; | 481 | AVCCmdFrm CmdFrm; |
482 | AVCRspFrm RspFrm; | 482 | AVCRspFrm RspFrm; |
@@ -486,7 +486,7 @@ int avc_tuner_get_ts(struct firesat *firesat) | |||
486 | CmdFrm.cts = AVC; | 486 | CmdFrm.cts = AVC; |
487 | CmdFrm.ctype = CONTROL; | 487 | CmdFrm.ctype = CONTROL; |
488 | CmdFrm.sutyp = 0x5; | 488 | CmdFrm.sutyp = 0x5; |
489 | CmdFrm.suid = firesat->subunit; | 489 | CmdFrm.suid = fdtv->subunit; |
490 | CmdFrm.opcode = DSIT; | 490 | CmdFrm.opcode = DSIT; |
491 | 491 | ||
492 | CmdFrm.operand[0] = 0; // source plug | 492 | CmdFrm.operand[0] = 0; // source plug |
@@ -495,21 +495,21 @@ int avc_tuner_get_ts(struct firesat *firesat) | |||
495 | CmdFrm.operand[3] = 0x20; // system id = DVB | 495 | CmdFrm.operand[3] = 0x20; // system id = DVB |
496 | CmdFrm.operand[4] = 0x00; // antenna number | 496 | CmdFrm.operand[4] = 0x00; // antenna number |
497 | CmdFrm.operand[5] = 0x0; // system_specific_search_flags | 497 | CmdFrm.operand[5] = 0x0; // system_specific_search_flags |
498 | CmdFrm.operand[6] = (firesat->type == FireSAT_DVB_T)?0x0c:0x11; // system_specific_multiplex selection_length | 498 | CmdFrm.operand[6] = (fdtv->type == FIREDTV_DVB_T)?0x0c:0x11; // system_specific_multiplex selection_length |
499 | CmdFrm.operand[7] = 0x00; // valid_flags [0] | 499 | CmdFrm.operand[7] = 0x00; // valid_flags [0] |
500 | CmdFrm.operand[8] = 0x00; // valid_flags [1] | 500 | CmdFrm.operand[8] = 0x00; // valid_flags [1] |
501 | CmdFrm.operand[7 + (firesat->type == FireSAT_DVB_T)?0x0c:0x11] = 0x00; // nr_of_dsit_sel_specs (always 0) | 501 | CmdFrm.operand[7 + (fdtv->type == FIREDTV_DVB_T)?0x0c:0x11] = 0x00; // nr_of_dsit_sel_specs (always 0) |
502 | 502 | ||
503 | CmdFrm.length = (firesat->type == FireSAT_DVB_T)?24:28; | 503 | CmdFrm.length = (fdtv->type == FIREDTV_DVB_T)?24:28; |
504 | 504 | ||
505 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 505 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
506 | return -EIO; | 506 | return -EIO; |
507 | 507 | ||
508 | msleep(250); | 508 | msleep(250); |
509 | return 0; | 509 | return 0; |
510 | } | 510 | } |
511 | 511 | ||
512 | int avc_identify_subunit(struct firesat *firesat) | 512 | int avc_identify_subunit(struct firedtv *fdtv) |
513 | { | 513 | { |
514 | AVCCmdFrm CmdFrm; | 514 | AVCCmdFrm CmdFrm; |
515 | AVCRspFrm RspFrm; | 515 | AVCRspFrm RspFrm; |
@@ -519,7 +519,7 @@ int avc_identify_subunit(struct firesat *firesat) | |||
519 | CmdFrm.cts = AVC; | 519 | CmdFrm.cts = AVC; |
520 | CmdFrm.ctype = CONTROL; | 520 | CmdFrm.ctype = CONTROL; |
521 | CmdFrm.sutyp = 0x5; // tuner | 521 | CmdFrm.sutyp = 0x5; // tuner |
522 | CmdFrm.suid = firesat->subunit; | 522 | CmdFrm.suid = fdtv->subunit; |
523 | CmdFrm.opcode = READ_DESCRIPTOR; | 523 | CmdFrm.opcode = READ_DESCRIPTOR; |
524 | 524 | ||
525 | CmdFrm.operand[0]=DESCRIPTOR_SUBUNIT_IDENTIFIER; | 525 | CmdFrm.operand[0]=DESCRIPTOR_SUBUNIT_IDENTIFIER; |
@@ -532,19 +532,19 @@ int avc_identify_subunit(struct firesat *firesat) | |||
532 | 532 | ||
533 | CmdFrm.length=12; | 533 | CmdFrm.length=12; |
534 | 534 | ||
535 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 535 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
536 | return -EIO; | 536 | return -EIO; |
537 | 537 | ||
538 | if ((RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) || | 538 | if ((RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) || |
539 | (RspFrm.operand[3] << 8) + RspFrm.operand[4] != 8) { | 539 | (RspFrm.operand[3] << 8) + RspFrm.operand[4] != 8) { |
540 | dev_err(&firesat->ud->device, | 540 | dev_err(&fdtv->ud->device, |
541 | "cannot read subunit identifier\n"); | 541 | "cannot read subunit identifier\n"); |
542 | return -EINVAL; | 542 | return -EINVAL; |
543 | } | 543 | } |
544 | return 0; | 544 | return 0; |
545 | } | 545 | } |
546 | 546 | ||
547 | int avc_tuner_status(struct firesat *firesat, | 547 | int avc_tuner_status(struct firedtv *fdtv, |
548 | ANTENNA_INPUT_INFO *antenna_input_info) | 548 | ANTENNA_INPUT_INFO *antenna_input_info) |
549 | { | 549 | { |
550 | AVCCmdFrm CmdFrm; | 550 | AVCCmdFrm CmdFrm; |
@@ -556,7 +556,7 @@ int avc_tuner_status(struct firesat *firesat, | |||
556 | CmdFrm.cts=AVC; | 556 | CmdFrm.cts=AVC; |
557 | CmdFrm.ctype=CONTROL; | 557 | CmdFrm.ctype=CONTROL; |
558 | CmdFrm.sutyp=0x05; // tuner | 558 | CmdFrm.sutyp=0x05; // tuner |
559 | CmdFrm.suid=firesat->subunit; | 559 | CmdFrm.suid=fdtv->subunit; |
560 | CmdFrm.opcode=READ_DESCRIPTOR; | 560 | CmdFrm.opcode=READ_DESCRIPTOR; |
561 | 561 | ||
562 | CmdFrm.operand[0]=DESCRIPTOR_TUNER_STATUS; | 562 | CmdFrm.operand[0]=DESCRIPTOR_TUNER_STATUS; |
@@ -568,17 +568,17 @@ int avc_tuner_status(struct firesat *firesat, | |||
568 | CmdFrm.operand[6]=0x00; | 568 | CmdFrm.operand[6]=0x00; |
569 | CmdFrm.length=12; | 569 | CmdFrm.length=12; |
570 | 570 | ||
571 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 571 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
572 | return -EIO; | 572 | return -EIO; |
573 | 573 | ||
574 | if (RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) { | 574 | if (RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) { |
575 | dev_err(&firesat->ud->device, "cannot read tuner status\n"); | 575 | dev_err(&fdtv->ud->device, "cannot read tuner status\n"); |
576 | return -EINVAL; | 576 | return -EINVAL; |
577 | } | 577 | } |
578 | 578 | ||
579 | length = RspFrm.operand[9]; | 579 | length = RspFrm.operand[9]; |
580 | if (RspFrm.operand[1] != 0x10 || length != sizeof(ANTENNA_INPUT_INFO)) { | 580 | if (RspFrm.operand[1] != 0x10 || length != sizeof(ANTENNA_INPUT_INFO)) { |
581 | dev_err(&firesat->ud->device, "got invalid tuner status\n"); | 581 | dev_err(&fdtv->ud->device, "got invalid tuner status\n"); |
582 | return -EINVAL; | 582 | return -EINVAL; |
583 | } | 583 | } |
584 | 584 | ||
@@ -586,7 +586,7 @@ int avc_tuner_status(struct firesat *firesat, | |||
586 | return 0; | 586 | return 0; |
587 | } | 587 | } |
588 | 588 | ||
589 | int avc_lnb_control(struct firesat *firesat, char voltage, char burst, | 589 | int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, |
590 | char conttone, char nrdiseq, | 590 | char conttone, char nrdiseq, |
591 | struct dvb_diseqc_master_cmd *diseqcmd) | 591 | struct dvb_diseqc_master_cmd *diseqcmd) |
592 | { | 592 | { |
@@ -599,7 +599,7 @@ int avc_lnb_control(struct firesat *firesat, char voltage, char burst, | |||
599 | CmdFrm.cts=AVC; | 599 | CmdFrm.cts=AVC; |
600 | CmdFrm.ctype=CONTROL; | 600 | CmdFrm.ctype=CONTROL; |
601 | CmdFrm.sutyp=0x05; | 601 | CmdFrm.sutyp=0x05; |
602 | CmdFrm.suid=firesat->subunit; | 602 | CmdFrm.suid=fdtv->subunit; |
603 | CmdFrm.opcode=VENDOR; | 603 | CmdFrm.opcode=VENDOR; |
604 | 604 | ||
605 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 605 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -624,18 +624,18 @@ int avc_lnb_control(struct firesat *firesat, char voltage, char burst, | |||
624 | 624 | ||
625 | CmdFrm.length = ALIGN(3 + i, 4); | 625 | CmdFrm.length = ALIGN(3 + i, 4); |
626 | 626 | ||
627 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 627 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
628 | return -EIO; | 628 | return -EIO; |
629 | 629 | ||
630 | if (RspFrm.resp != ACCEPTED) { | 630 | if (RspFrm.resp != ACCEPTED) { |
631 | dev_err(&firesat->ud->device, "LNB control failed\n"); | 631 | dev_err(&fdtv->ud->device, "LNB control failed\n"); |
632 | return -EINVAL; | 632 | return -EINVAL; |
633 | } | 633 | } |
634 | 634 | ||
635 | return 0; | 635 | return 0; |
636 | } | 636 | } |
637 | 637 | ||
638 | int avc_register_remote_control(struct firesat *firesat) | 638 | int avc_register_remote_control(struct firedtv *fdtv) |
639 | { | 639 | { |
640 | AVCCmdFrm CmdFrm; | 640 | AVCCmdFrm CmdFrm; |
641 | 641 | ||
@@ -654,20 +654,20 @@ int avc_register_remote_control(struct firesat *firesat) | |||
654 | 654 | ||
655 | CmdFrm.length = 8; | 655 | CmdFrm.length = 8; |
656 | 656 | ||
657 | return avc_write(firesat, &CmdFrm, NULL); | 657 | return avc_write(fdtv, &CmdFrm, NULL); |
658 | } | 658 | } |
659 | 659 | ||
660 | void avc_remote_ctrl_work(struct work_struct *work) | 660 | void avc_remote_ctrl_work(struct work_struct *work) |
661 | { | 661 | { |
662 | struct firesat *firesat = | 662 | struct firedtv *fdtv = |
663 | container_of(work, struct firesat, remote_ctrl_work); | 663 | container_of(work, struct firedtv, remote_ctrl_work); |
664 | 664 | ||
665 | /* Should it be rescheduled in failure cases? */ | 665 | /* Should it be rescheduled in failure cases? */ |
666 | avc_register_remote_control(firesat); | 666 | avc_register_remote_control(fdtv); |
667 | } | 667 | } |
668 | 668 | ||
669 | #if 0 /* FIXME: unused */ | 669 | #if 0 /* FIXME: unused */ |
670 | int avc_tuner_host2ca(struct firesat *firesat) | 670 | int avc_tuner_host2ca(struct firedtv *fdtv) |
671 | { | 671 | { |
672 | AVCCmdFrm CmdFrm; | 672 | AVCCmdFrm CmdFrm; |
673 | AVCRspFrm RspFrm; | 673 | AVCRspFrm RspFrm; |
@@ -676,7 +676,7 @@ int avc_tuner_host2ca(struct firesat *firesat) | |||
676 | CmdFrm.cts = AVC; | 676 | CmdFrm.cts = AVC; |
677 | CmdFrm.ctype = CONTROL; | 677 | CmdFrm.ctype = CONTROL; |
678 | CmdFrm.sutyp = 0x5; | 678 | CmdFrm.sutyp = 0x5; |
679 | CmdFrm.suid = firesat->subunit; | 679 | CmdFrm.suid = fdtv->subunit; |
680 | CmdFrm.opcode = VENDOR; | 680 | CmdFrm.opcode = VENDOR; |
681 | 681 | ||
682 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 682 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -689,7 +689,7 @@ int avc_tuner_host2ca(struct firesat *firesat) | |||
689 | CmdFrm.operand[7] = 0; // length | 689 | CmdFrm.operand[7] = 0; // length |
690 | CmdFrm.length = 12; | 690 | CmdFrm.length = 12; |
691 | 691 | ||
692 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 692 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
693 | return -EIO; | 693 | return -EIO; |
694 | 694 | ||
695 | return 0; | 695 | return 0; |
@@ -721,7 +721,7 @@ static int get_ca_object_length(AVCRspFrm *RspFrm) | |||
721 | return RspFrm->operand[7]; | 721 | return RspFrm->operand[7]; |
722 | } | 722 | } |
723 | 723 | ||
724 | int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) | 724 | int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len) |
725 | { | 725 | { |
726 | AVCCmdFrm CmdFrm; | 726 | AVCCmdFrm CmdFrm; |
727 | AVCRspFrm RspFrm; | 727 | AVCRspFrm RspFrm; |
@@ -731,7 +731,7 @@ int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
731 | CmdFrm.cts = AVC; | 731 | CmdFrm.cts = AVC; |
732 | CmdFrm.ctype = STATUS; | 732 | CmdFrm.ctype = STATUS; |
733 | CmdFrm.sutyp = 0x5; | 733 | CmdFrm.sutyp = 0x5; |
734 | CmdFrm.suid = firesat->subunit; | 734 | CmdFrm.suid = fdtv->subunit; |
735 | CmdFrm.opcode = VENDOR; | 735 | CmdFrm.opcode = VENDOR; |
736 | 736 | ||
737 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 737 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -742,7 +742,7 @@ int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
742 | CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag | 742 | CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag |
743 | CmdFrm.length = 12; | 743 | CmdFrm.length = 12; |
744 | 744 | ||
745 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 745 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
746 | return -EIO; | 746 | return -EIO; |
747 | 747 | ||
748 | /* FIXME: check response code and validate response data */ | 748 | /* FIXME: check response code and validate response data */ |
@@ -759,7 +759,7 @@ int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
759 | return 0; | 759 | return 0; |
760 | } | 760 | } |
761 | 761 | ||
762 | int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) | 762 | int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len) |
763 | { | 763 | { |
764 | AVCCmdFrm CmdFrm; | 764 | AVCCmdFrm CmdFrm; |
765 | AVCRspFrm RspFrm; | 765 | AVCRspFrm RspFrm; |
@@ -769,7 +769,7 @@ int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
769 | CmdFrm.cts = AVC; | 769 | CmdFrm.cts = AVC; |
770 | CmdFrm.ctype = STATUS; | 770 | CmdFrm.ctype = STATUS; |
771 | CmdFrm.sutyp = 0x5; | 771 | CmdFrm.sutyp = 0x5; |
772 | CmdFrm.suid = firesat->subunit; | 772 | CmdFrm.suid = fdtv->subunit; |
773 | CmdFrm.opcode = VENDOR; | 773 | CmdFrm.opcode = VENDOR; |
774 | 774 | ||
775 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 775 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -780,7 +780,7 @@ int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
780 | CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag | 780 | CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag |
781 | CmdFrm.length = 12; | 781 | CmdFrm.length = 12; |
782 | 782 | ||
783 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 783 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
784 | return -EIO; | 784 | return -EIO; |
785 | 785 | ||
786 | pos = get_ca_object_pos(&RspFrm); | 786 | pos = get_ca_object_pos(&RspFrm); |
@@ -795,7 +795,7 @@ int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) | |||
795 | return 0; | 795 | return 0; |
796 | } | 796 | } |
797 | 797 | ||
798 | int avc_ca_reset(struct firesat *firesat) | 798 | int avc_ca_reset(struct firedtv *fdtv) |
799 | { | 799 | { |
800 | AVCCmdFrm CmdFrm; | 800 | AVCCmdFrm CmdFrm; |
801 | AVCRspFrm RspFrm; | 801 | AVCRspFrm RspFrm; |
@@ -804,7 +804,7 @@ int avc_ca_reset(struct firesat *firesat) | |||
804 | CmdFrm.cts = AVC; | 804 | CmdFrm.cts = AVC; |
805 | CmdFrm.ctype = CONTROL; | 805 | CmdFrm.ctype = CONTROL; |
806 | CmdFrm.sutyp = 0x5; | 806 | CmdFrm.sutyp = 0x5; |
807 | CmdFrm.suid = firesat->subunit; | 807 | CmdFrm.suid = fdtv->subunit; |
808 | CmdFrm.opcode = VENDOR; | 808 | CmdFrm.opcode = VENDOR; |
809 | 809 | ||
810 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 810 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -818,13 +818,13 @@ int avc_ca_reset(struct firesat *firesat) | |||
818 | CmdFrm.operand[8] = 0; // force hardware reset | 818 | CmdFrm.operand[8] = 0; // force hardware reset |
819 | CmdFrm.length = 12; | 819 | CmdFrm.length = 12; |
820 | 820 | ||
821 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 821 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
822 | return -EIO; | 822 | return -EIO; |
823 | 823 | ||
824 | return 0; | 824 | return 0; |
825 | } | 825 | } |
826 | 826 | ||
827 | int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | 827 | int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) |
828 | { | 828 | { |
829 | AVCCmdFrm CmdFrm; | 829 | AVCCmdFrm CmdFrm; |
830 | AVCRspFrm RspFrm; | 830 | AVCRspFrm RspFrm; |
@@ -840,11 +840,11 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | |||
840 | CmdFrm.cts = AVC; | 840 | CmdFrm.cts = AVC; |
841 | CmdFrm.ctype = CONTROL; | 841 | CmdFrm.ctype = CONTROL; |
842 | CmdFrm.sutyp = 0x5; | 842 | CmdFrm.sutyp = 0x5; |
843 | CmdFrm.suid = firesat->subunit; | 843 | CmdFrm.suid = fdtv->subunit; |
844 | CmdFrm.opcode = VENDOR; | 844 | CmdFrm.opcode = VENDOR; |
845 | 845 | ||
846 | if (msg[0] != LIST_MANAGEMENT_ONLY) { | 846 | if (msg[0] != LIST_MANAGEMENT_ONLY) { |
847 | dev_info(&firesat->ud->device, | 847 | dev_info(&fdtv->ud->device, |
848 | "forcing list_management to ONLY\n"); | 848 | "forcing list_management to ONLY\n"); |
849 | msg[0] = LIST_MANAGEMENT_ONLY; | 849 | msg[0] = LIST_MANAGEMENT_ONLY; |
850 | } | 850 | } |
@@ -894,7 +894,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | |||
894 | if (program_info_length > 0) { | 894 | if (program_info_length > 0) { |
895 | pmt_cmd_id = msg[read_pos++]; | 895 | pmt_cmd_id = msg[read_pos++]; |
896 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) | 896 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) |
897 | dev_err(&firesat->ud->device, | 897 | dev_err(&fdtv->ud->device, |
898 | "invalid pmt_cmd_id %d\n", pmt_cmd_id); | 898 | "invalid pmt_cmd_id %d\n", pmt_cmd_id); |
899 | 899 | ||
900 | memcpy(&CmdFrm.operand[write_pos], &msg[read_pos], | 900 | memcpy(&CmdFrm.operand[write_pos], &msg[read_pos], |
@@ -916,7 +916,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | |||
916 | if (es_info_length > 0) { | 916 | if (es_info_length > 0) { |
917 | pmt_cmd_id = msg[read_pos++]; | 917 | pmt_cmd_id = msg[read_pos++]; |
918 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) | 918 | if (pmt_cmd_id != 1 && pmt_cmd_id != 4) |
919 | dev_err(&firesat->ud->device, | 919 | dev_err(&fdtv->ud->device, |
920 | "invalid pmt_cmd_id %d " | 920 | "invalid pmt_cmd_id %d " |
921 | "at stream level\n", pmt_cmd_id); | 921 | "at stream level\n", pmt_cmd_id); |
922 | 922 | ||
@@ -945,11 +945,11 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | |||
945 | 945 | ||
946 | CmdFrm.length = ALIGN(3 + write_pos, 4); | 946 | CmdFrm.length = ALIGN(3 + write_pos, 4); |
947 | 947 | ||
948 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 948 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
949 | return -EIO; | 949 | return -EIO; |
950 | 950 | ||
951 | if (RspFrm.resp != ACCEPTED) { | 951 | if (RspFrm.resp != ACCEPTED) { |
952 | dev_err(&firesat->ud->device, | 952 | dev_err(&fdtv->ud->device, |
953 | "CA PMT failed with response 0x%x\n", RspFrm.resp); | 953 | "CA PMT failed with response 0x%x\n", RspFrm.resp); |
954 | return -EFAULT; | 954 | return -EFAULT; |
955 | } | 955 | } |
@@ -957,7 +957,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) | |||
957 | return 0; | 957 | return 0; |
958 | } | 958 | } |
959 | 959 | ||
960 | int avc_ca_get_time_date(struct firesat *firesat, int *interval) | 960 | int avc_ca_get_time_date(struct firedtv *fdtv, int *interval) |
961 | { | 961 | { |
962 | AVCCmdFrm CmdFrm; | 962 | AVCCmdFrm CmdFrm; |
963 | AVCRspFrm RspFrm; | 963 | AVCRspFrm RspFrm; |
@@ -966,7 +966,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) | |||
966 | CmdFrm.cts = AVC; | 966 | CmdFrm.cts = AVC; |
967 | CmdFrm.ctype = STATUS; | 967 | CmdFrm.ctype = STATUS; |
968 | CmdFrm.sutyp = 0x5; | 968 | CmdFrm.sutyp = 0x5; |
969 | CmdFrm.suid = firesat->subunit; | 969 | CmdFrm.suid = fdtv->subunit; |
970 | CmdFrm.opcode = VENDOR; | 970 | CmdFrm.opcode = VENDOR; |
971 | 971 | ||
972 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 972 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -979,7 +979,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) | |||
979 | CmdFrm.operand[7] = 0; // length | 979 | CmdFrm.operand[7] = 0; // length |
980 | CmdFrm.length = 12; | 980 | CmdFrm.length = 12; |
981 | 981 | ||
982 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 982 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
983 | return -EIO; | 983 | return -EIO; |
984 | 984 | ||
985 | /* FIXME: check response code and validate response data */ | 985 | /* FIXME: check response code and validate response data */ |
@@ -989,7 +989,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) | |||
989 | return 0; | 989 | return 0; |
990 | } | 990 | } |
991 | 991 | ||
992 | int avc_ca_enter_menu(struct firesat *firesat) | 992 | int avc_ca_enter_menu(struct firedtv *fdtv) |
993 | { | 993 | { |
994 | AVCCmdFrm CmdFrm; | 994 | AVCCmdFrm CmdFrm; |
995 | AVCRspFrm RspFrm; | 995 | AVCRspFrm RspFrm; |
@@ -998,7 +998,7 @@ int avc_ca_enter_menu(struct firesat *firesat) | |||
998 | CmdFrm.cts = AVC; | 998 | CmdFrm.cts = AVC; |
999 | CmdFrm.ctype = STATUS; | 999 | CmdFrm.ctype = STATUS; |
1000 | CmdFrm.sutyp = 0x5; | 1000 | CmdFrm.sutyp = 0x5; |
1001 | CmdFrm.suid = firesat->subunit; | 1001 | CmdFrm.suid = fdtv->subunit; |
1002 | CmdFrm.opcode = VENDOR; | 1002 | CmdFrm.opcode = VENDOR; |
1003 | 1003 | ||
1004 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 1004 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -1011,13 +1011,13 @@ int avc_ca_enter_menu(struct firesat *firesat) | |||
1011 | CmdFrm.operand[7] = 0; // length | 1011 | CmdFrm.operand[7] = 0; // length |
1012 | CmdFrm.length = 12; | 1012 | CmdFrm.length = 12; |
1013 | 1013 | ||
1014 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 1014 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
1015 | return -EIO; | 1015 | return -EIO; |
1016 | 1016 | ||
1017 | return 0; | 1017 | return 0; |
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len) | 1020 | int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len) |
1021 | { | 1021 | { |
1022 | AVCCmdFrm CmdFrm; | 1022 | AVCCmdFrm CmdFrm; |
1023 | AVCRspFrm RspFrm; | 1023 | AVCRspFrm RspFrm; |
@@ -1026,7 +1026,7 @@ int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len) | |||
1026 | CmdFrm.cts = AVC; | 1026 | CmdFrm.cts = AVC; |
1027 | CmdFrm.ctype = STATUS; | 1027 | CmdFrm.ctype = STATUS; |
1028 | CmdFrm.sutyp = 0x5; | 1028 | CmdFrm.sutyp = 0x5; |
1029 | CmdFrm.suid = firesat->subunit; | 1029 | CmdFrm.suid = fdtv->subunit; |
1030 | CmdFrm.opcode = VENDOR; | 1030 | CmdFrm.opcode = VENDOR; |
1031 | 1031 | ||
1032 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; | 1032 | CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; |
@@ -1039,7 +1039,7 @@ int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len) | |||
1039 | CmdFrm.operand[7] = 0; // length | 1039 | CmdFrm.operand[7] = 0; // length |
1040 | CmdFrm.length = 12; | 1040 | CmdFrm.length = 12; |
1041 | 1041 | ||
1042 | if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) | 1042 | if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) |
1043 | return -EIO; | 1043 | return -EIO; |
1044 | 1044 | ||
1045 | /* FIXME: check response code and validate response data */ | 1045 | /* FIXME: check response code and validate response data */ |
diff --git a/drivers/media/dvb/firesat/avc_api.h b/drivers/media/dvb/firewire/avc.h index 9d2efd8ff17b..168f371dbde0 100644 --- a/drivers/media/dvb/firesat/avc_api.h +++ b/drivers/media/dvb/firewire/avc.h | |||
@@ -402,31 +402,31 @@ typedef struct | |||
402 | 402 | ||
403 | struct dvb_diseqc_master_cmd; | 403 | struct dvb_diseqc_master_cmd; |
404 | struct dvb_frontend_parameters; | 404 | struct dvb_frontend_parameters; |
405 | struct firesat; | 405 | struct firedtv; |
406 | 406 | ||
407 | int avc_recv(struct firesat *firesat, u8 *data, size_t length); | 407 | int avc_recv(struct firedtv *fdtv, u8 *data, size_t length); |
408 | 408 | ||
409 | int AVCTuner_DSIT(struct firesat *firesat, int Source_Plug, | 409 | int AVCTuner_DSIT(struct firedtv *fdtv, int Source_Plug, |
410 | struct dvb_frontend_parameters *params, __u8 *status); | 410 | struct dvb_frontend_parameters *params, __u8 *status); |
411 | 411 | ||
412 | int avc_tuner_status(struct firesat *firesat, | 412 | int avc_tuner_status(struct firedtv *fdtv, |
413 | ANTENNA_INPUT_INFO *antenna_input_info); | 413 | ANTENNA_INPUT_INFO *antenna_input_info); |
414 | int avc_tuner_dsd(struct firesat *firesat, | 414 | int avc_tuner_dsd(struct firedtv *fdtv, |
415 | struct dvb_frontend_parameters *params); | 415 | struct dvb_frontend_parameters *params); |
416 | int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]); | 416 | int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]); |
417 | int avc_tuner_get_ts(struct firesat *firesat); | 417 | int avc_tuner_get_ts(struct firedtv *fdtv); |
418 | int avc_identify_subunit(struct firesat *firesat); | 418 | int avc_identify_subunit(struct firedtv *fdtv); |
419 | int avc_lnb_control(struct firesat *firesat, char voltage, char burst, | 419 | int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, |
420 | char conttone, char nrdiseq, | 420 | char conttone, char nrdiseq, |
421 | struct dvb_diseqc_master_cmd *diseqcmd); | 421 | struct dvb_diseqc_master_cmd *diseqcmd); |
422 | void avc_remote_ctrl_work(struct work_struct *work); | 422 | void avc_remote_ctrl_work(struct work_struct *work); |
423 | int avc_register_remote_control(struct firesat *firesat); | 423 | int avc_register_remote_control(struct firedtv *fdtv); |
424 | int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len); | 424 | int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len); |
425 | int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len); | 425 | int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len); |
426 | int avc_ca_reset(struct firesat *firesat); | 426 | int avc_ca_reset(struct firedtv *fdtv); |
427 | int avc_ca_pmt(struct firesat *firesat, char *app_info, int length); | 427 | int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length); |
428 | int avc_ca_get_time_date(struct firesat *firesat, int *interval); | 428 | int avc_ca_get_time_date(struct firedtv *fdtv, int *interval); |
429 | int avc_ca_enter_menu(struct firesat *firesat); | 429 | int avc_ca_enter_menu(struct firedtv *fdtv); |
430 | int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len); | 430 | int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len); |
431 | 431 | ||
432 | #endif /* _AVC_API_H */ | 432 | #endif /* _AVC_API_H */ |
diff --git a/drivers/media/dvb/firesat/cmp.c b/drivers/media/dvb/firewire/cmp.c index 8e98b814e430..821e033d8195 100644 --- a/drivers/media/dvb/firesat/cmp.c +++ b/drivers/media/dvb/firewire/cmp.c | |||
@@ -20,41 +20,41 @@ | |||
20 | #include <ieee1394.h> | 20 | #include <ieee1394.h> |
21 | #include <nodemgr.h> | 21 | #include <nodemgr.h> |
22 | 22 | ||
23 | #include "avc_api.h" | 23 | #include "avc.h" |
24 | #include "cmp.h" | 24 | #include "cmp.h" |
25 | #include "firesat.h" | 25 | #include "firedtv.h" |
26 | 26 | ||
27 | #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL | 27 | #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL |
28 | 28 | ||
29 | static int cmp_read(struct firesat *firesat, void *buf, u64 addr, size_t len) | 29 | static int cmp_read(struct firedtv *fdtv, void *buf, u64 addr, size_t len) |
30 | { | 30 | { |
31 | int ret; | 31 | int ret; |
32 | 32 | ||
33 | if (mutex_lock_interruptible(&firesat->avc_mutex)) | 33 | if (mutex_lock_interruptible(&fdtv->avc_mutex)) |
34 | return -EINTR; | 34 | return -EINTR; |
35 | 35 | ||
36 | ret = hpsb_node_read(firesat->ud->ne, addr, buf, len); | 36 | ret = hpsb_node_read(fdtv->ud->ne, addr, buf, len); |
37 | if (ret < 0) | 37 | if (ret < 0) |
38 | dev_err(&firesat->ud->device, "CMP: read I/O error\n"); | 38 | dev_err(&fdtv->ud->device, "CMP: read I/O error\n"); |
39 | 39 | ||
40 | mutex_unlock(&firesat->avc_mutex); | 40 | mutex_unlock(&fdtv->avc_mutex); |
41 | return ret; | 41 | return ret; |
42 | } | 42 | } |
43 | 43 | ||
44 | static int cmp_lock(struct firesat *firesat, void *data, u64 addr, __be32 arg, | 44 | static int cmp_lock(struct firedtv *fdtv, void *data, u64 addr, __be32 arg, |
45 | int ext_tcode) | 45 | int ext_tcode) |
46 | { | 46 | { |
47 | int ret; | 47 | int ret; |
48 | 48 | ||
49 | if (mutex_lock_interruptible(&firesat->avc_mutex)) | 49 | if (mutex_lock_interruptible(&fdtv->avc_mutex)) |
50 | return -EINTR; | 50 | return -EINTR; |
51 | 51 | ||
52 | ret = hpsb_node_lock(firesat->ud->ne, addr, ext_tcode, data, | 52 | ret = hpsb_node_lock(fdtv->ud->ne, addr, ext_tcode, data, |
53 | (__force quadlet_t)arg); | 53 | (__force quadlet_t)arg); |
54 | if (ret < 0) | 54 | if (ret < 0) |
55 | dev_err(&firesat->ud->device, "CMP: lock I/O error\n"); | 55 | dev_err(&fdtv->ud->device, "CMP: lock I/O error\n"); |
56 | 56 | ||
57 | mutex_unlock(&firesat->avc_mutex); | 57 | mutex_unlock(&fdtv->avc_mutex); |
58 | return ret; | 58 | return ret; |
59 | } | 59 | } |
60 | 60 | ||
@@ -78,20 +78,20 @@ static inline void set_opcr(__be32 *opcr, u32 value, u32 mask, u32 shift) | |||
78 | #define set_opcr_data_rate(p, v) set_opcr((p), (v), 0x3, 14) | 78 | #define set_opcr_data_rate(p, v) set_opcr((p), (v), 0x3, 14) |
79 | #define set_opcr_overhead_id(p, v) set_opcr((p), (v), 0xf, 10) | 79 | #define set_opcr_overhead_id(p, v) set_opcr((p), (v), 0xf, 10) |
80 | 80 | ||
81 | int cmp_establish_pp_connection(struct firesat *firesat, int plug, int channel) | 81 | int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel) |
82 | { | 82 | { |
83 | __be32 old_opcr, opcr; | 83 | __be32 old_opcr, opcr; |
84 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); | 84 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); |
85 | int attempts = 0; | 85 | int attempts = 0; |
86 | int ret; | 86 | int ret; |
87 | 87 | ||
88 | ret = cmp_read(firesat, &opcr, opcr_address, 4); | 88 | ret = cmp_read(fdtv, &opcr, opcr_address, 4); |
89 | if (ret < 0) | 89 | if (ret < 0) |
90 | return ret; | 90 | return ret; |
91 | 91 | ||
92 | repeat: | 92 | repeat: |
93 | if (!get_opcr_online(opcr)) { | 93 | if (!get_opcr_online(opcr)) { |
94 | dev_err(&firesat->ud->device, "CMP: output offline\n"); | 94 | dev_err(&fdtv->ud->device, "CMP: output offline\n"); |
95 | return -EBUSY; | 95 | return -EBUSY; |
96 | } | 96 | } |
97 | 97 | ||
@@ -99,11 +99,11 @@ repeat: | |||
99 | 99 | ||
100 | if (get_opcr_p2p_connections(opcr)) { | 100 | if (get_opcr_p2p_connections(opcr)) { |
101 | if (get_opcr_channel(opcr) != channel) { | 101 | if (get_opcr_channel(opcr) != channel) { |
102 | dev_err(&firesat->ud->device, | 102 | dev_err(&fdtv->ud->device, |
103 | "CMP: cannot change channel\n"); | 103 | "CMP: cannot change channel\n"); |
104 | return -EBUSY; | 104 | return -EBUSY; |
105 | } | 105 | } |
106 | dev_info(&firesat->ud->device, | 106 | dev_info(&fdtv->ud->device, |
107 | "CMP: overlaying existing connection\n"); | 107 | "CMP: overlaying existing connection\n"); |
108 | 108 | ||
109 | /* We don't allocate isochronous resources. */ | 109 | /* We don't allocate isochronous resources. */ |
@@ -119,7 +119,7 @@ repeat: | |||
119 | 119 | ||
120 | set_opcr_p2p_connections(&opcr, get_opcr_p2p_connections(opcr) + 1); | 120 | set_opcr_p2p_connections(&opcr, get_opcr_p2p_connections(opcr) + 1); |
121 | 121 | ||
122 | ret = cmp_lock(firesat, &opcr, opcr_address, old_opcr, 2); | 122 | ret = cmp_lock(fdtv, &opcr, opcr_address, old_opcr, 2); |
123 | if (ret < 0) | 123 | if (ret < 0) |
124 | return ret; | 124 | return ret; |
125 | 125 | ||
@@ -137,26 +137,26 @@ repeat: | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | void cmp_break_pp_connection(struct firesat *firesat, int plug, int channel) | 140 | void cmp_break_pp_connection(struct firedtv *fdtv, int plug, int channel) |
141 | { | 141 | { |
142 | __be32 old_opcr, opcr; | 142 | __be32 old_opcr, opcr; |
143 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); | 143 | u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); |
144 | int attempts = 0; | 144 | int attempts = 0; |
145 | 145 | ||
146 | if (cmp_read(firesat, &opcr, opcr_address, 4) < 0) | 146 | if (cmp_read(fdtv, &opcr, opcr_address, 4) < 0) |
147 | return; | 147 | return; |
148 | 148 | ||
149 | repeat: | 149 | repeat: |
150 | if (!get_opcr_online(opcr) || !get_opcr_p2p_connections(opcr) || | 150 | if (!get_opcr_online(opcr) || !get_opcr_p2p_connections(opcr) || |
151 | get_opcr_channel(opcr) != channel) { | 151 | get_opcr_channel(opcr) != channel) { |
152 | dev_err(&firesat->ud->device, "CMP: no connection to break\n"); | 152 | dev_err(&fdtv->ud->device, "CMP: no connection to break\n"); |
153 | return; | 153 | return; |
154 | } | 154 | } |
155 | 155 | ||
156 | old_opcr = opcr; | 156 | old_opcr = opcr; |
157 | set_opcr_p2p_connections(&opcr, get_opcr_p2p_connections(opcr) - 1); | 157 | set_opcr_p2p_connections(&opcr, get_opcr_p2p_connections(opcr) - 1); |
158 | 158 | ||
159 | if (cmp_lock(firesat, &opcr, opcr_address, old_opcr, 2) < 0) | 159 | if (cmp_lock(fdtv, &opcr, opcr_address, old_opcr, 2) < 0) |
160 | return; | 160 | return; |
161 | 161 | ||
162 | if (old_opcr != opcr) { | 162 | if (old_opcr != opcr) { |
diff --git a/drivers/media/dvb/firewire/cmp.h b/drivers/media/dvb/firewire/cmp.h new file mode 100644 index 000000000000..17e182cf29a9 --- /dev/null +++ b/drivers/media/dvb/firewire/cmp.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _CMP_H | ||
2 | #define _CMP_H | ||
3 | |||
4 | struct firedtv; | ||
5 | |||
6 | int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel); | ||
7 | void cmp_break_pp_connection(struct firedtv *fdtv, int plug, int channel); | ||
8 | |||
9 | #endif /* _CMP_H */ | ||
diff --git a/drivers/media/dvb/firesat/firesat_1394.c b/drivers/media/dvb/firewire/firedtv-1394.c index 11db62730256..953618246e8e 100644 --- a/drivers/media/dvb/firesat/firesat_1394.c +++ b/drivers/media/dvb/firewire/firedtv-1394.c | |||
@@ -33,17 +33,17 @@ | |||
33 | #include <ieee1394_hotplug.h> | 33 | #include <ieee1394_hotplug.h> |
34 | #include <nodemgr.h> | 34 | #include <nodemgr.h> |
35 | 35 | ||
36 | #include "avc_api.h" | 36 | #include "avc.h" |
37 | #include "cmp.h" | 37 | #include "cmp.h" |
38 | #include "firesat.h" | 38 | #include "firedtv.h" |
39 | #include "firesat-ci.h" | 39 | #include "firedtv-ci.h" |
40 | #include "firesat-rc.h" | 40 | #include "firedtv-rc.h" |
41 | 41 | ||
42 | #define MATCH_FLAGS IEEE1394_MATCH_VENDOR_ID | IEEE1394_MATCH_MODEL_ID | \ | 42 | #define MATCH_FLAGS IEEE1394_MATCH_VENDOR_ID | IEEE1394_MATCH_MODEL_ID | \ |
43 | IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION | 43 | IEEE1394_MATCH_SPECIFIER_ID | IEEE1394_MATCH_VERSION |
44 | #define DIGITAL_EVERYWHERE_OUI 0x001287 | 44 | #define DIGITAL_EVERYWHERE_OUI 0x001287 |
45 | 45 | ||
46 | static struct ieee1394_device_id firesat_id_table[] = { | 46 | static struct ieee1394_device_id fdtv_id_table[] = { |
47 | 47 | ||
48 | { | 48 | { |
49 | /* FloppyDTV S/CI and FloppyDTV S2 */ | 49 | /* FloppyDTV S/CI and FloppyDTV S2 */ |
@@ -90,11 +90,11 @@ static struct ieee1394_device_id firesat_id_table[] = { | |||
90 | }, { } | 90 | }, { } |
91 | }; | 91 | }; |
92 | 92 | ||
93 | MODULE_DEVICE_TABLE(ieee1394, firesat_id_table); | 93 | MODULE_DEVICE_TABLE(ieee1394, fdtv_id_table); |
94 | 94 | ||
95 | /* list of all firesat devices */ | 95 | /* list of all firedtv devices */ |
96 | LIST_HEAD(firesat_list); | 96 | LIST_HEAD(fdtv_list); |
97 | DEFINE_SPINLOCK(firesat_list_lock); | 97 | DEFINE_SPINLOCK(fdtv_list_lock); |
98 | 98 | ||
99 | static void fcp_request(struct hpsb_host *host, | 99 | static void fcp_request(struct hpsb_host *host, |
100 | int nodeid, | 100 | int nodeid, |
@@ -103,186 +103,186 @@ static void fcp_request(struct hpsb_host *host, | |||
103 | u8 *data, | 103 | u8 *data, |
104 | size_t length) | 104 | size_t length) |
105 | { | 105 | { |
106 | struct firesat *firesat = NULL; | 106 | struct firedtv *fdtv = NULL; |
107 | struct firesat *firesat_entry; | 107 | struct firedtv *fdtv_entry; |
108 | unsigned long flags; | 108 | unsigned long flags; |
109 | 109 | ||
110 | if (length > 0 && ((data[0] & 0xf0) >> 4) == 0) { | 110 | if (length > 0 && ((data[0] & 0xf0) >> 4) == 0) { |
111 | 111 | ||
112 | spin_lock_irqsave(&firesat_list_lock, flags); | 112 | spin_lock_irqsave(&fdtv_list_lock, flags); |
113 | list_for_each_entry(firesat_entry,&firesat_list,list) { | 113 | list_for_each_entry(fdtv_entry,&fdtv_list,list) { |
114 | if (firesat_entry->ud->ne->host == host && | 114 | if (fdtv_entry->ud->ne->host == host && |
115 | firesat_entry->ud->ne->nodeid == nodeid && | 115 | fdtv_entry->ud->ne->nodeid == nodeid && |
116 | (firesat_entry->subunit == (data[1]&0x7) || | 116 | (fdtv_entry->subunit == (data[1]&0x7) || |
117 | (firesat_entry->subunit == 0 && | 117 | (fdtv_entry->subunit == 0 && |
118 | (data[1]&0x7) == 0x7))) { | 118 | (data[1]&0x7) == 0x7))) { |
119 | firesat=firesat_entry; | 119 | fdtv=fdtv_entry; |
120 | break; | 120 | break; |
121 | } | 121 | } |
122 | } | 122 | } |
123 | spin_unlock_irqrestore(&firesat_list_lock, flags); | 123 | spin_unlock_irqrestore(&fdtv_list_lock, flags); |
124 | 124 | ||
125 | if (firesat) | 125 | if (fdtv) |
126 | avc_recv(firesat, data, length); | 126 | avc_recv(fdtv, data, length); |
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | const char *firedtv_model_names[] = { | 130 | const char *fdtv_model_names[] = { |
131 | [FireSAT_UNKNOWN] = "unknown type", | 131 | [FIREDTV_UNKNOWN] = "unknown type", |
132 | [FireSAT_DVB_S] = "FireDTV S/CI", | 132 | [FIREDTV_DVB_S] = "FireDTV S/CI", |
133 | [FireSAT_DVB_C] = "FireDTV C/CI", | 133 | [FIREDTV_DVB_C] = "FireDTV C/CI", |
134 | [FireSAT_DVB_T] = "FireDTV T/CI", | 134 | [FIREDTV_DVB_T] = "FireDTV T/CI", |
135 | [FireSAT_DVB_S2] = "FireDTV S2 ", | 135 | [FIREDTV_DVB_S2] = "FireDTV S2 ", |
136 | }; | 136 | }; |
137 | 137 | ||
138 | static int firesat_probe(struct device *dev) | 138 | static int fdtv_probe(struct device *dev) |
139 | { | 139 | { |
140 | struct unit_directory *ud = | 140 | struct unit_directory *ud = |
141 | container_of(dev, struct unit_directory, device); | 141 | container_of(dev, struct unit_directory, device); |
142 | struct firesat *firesat; | 142 | struct firedtv *fdtv; |
143 | unsigned long flags; | 143 | unsigned long flags; |
144 | int kv_len; | 144 | int kv_len; |
145 | void *kv_str; | 145 | void *kv_str; |
146 | int i; | 146 | int i; |
147 | int err = -ENOMEM; | 147 | int err = -ENOMEM; |
148 | 148 | ||
149 | firesat = kzalloc(sizeof(*firesat), GFP_KERNEL); | 149 | fdtv = kzalloc(sizeof(*fdtv), GFP_KERNEL); |
150 | if (!firesat) | 150 | if (!fdtv) |
151 | return -ENOMEM; | 151 | return -ENOMEM; |
152 | 152 | ||
153 | dev->driver_data = firesat; | 153 | dev->driver_data = fdtv; |
154 | firesat->ud = ud; | 154 | fdtv->ud = ud; |
155 | firesat->subunit = 0; | 155 | fdtv->subunit = 0; |
156 | firesat->isochannel = -1; | 156 | fdtv->isochannel = -1; |
157 | firesat->tone = 0xff; | 157 | fdtv->tone = 0xff; |
158 | firesat->voltage = 0xff; | 158 | fdtv->voltage = 0xff; |
159 | 159 | ||
160 | mutex_init(&firesat->avc_mutex); | 160 | mutex_init(&fdtv->avc_mutex); |
161 | init_waitqueue_head(&firesat->avc_wait); | 161 | init_waitqueue_head(&fdtv->avc_wait); |
162 | firesat->avc_reply_received = true; | 162 | fdtv->avc_reply_received = true; |
163 | mutex_init(&firesat->demux_mutex); | 163 | mutex_init(&fdtv->demux_mutex); |
164 | INIT_WORK(&firesat->remote_ctrl_work, avc_remote_ctrl_work); | 164 | INIT_WORK(&fdtv->remote_ctrl_work, avc_remote_ctrl_work); |
165 | 165 | ||
166 | /* Reading device model from ROM */ | 166 | /* Reading device model from ROM */ |
167 | kv_len = (ud->model_name_kv->value.leaf.len - 2) * sizeof(quadlet_t); | 167 | kv_len = (ud->model_name_kv->value.leaf.len - 2) * sizeof(quadlet_t); |
168 | kv_str = CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(ud->model_name_kv); | 168 | kv_str = CSR1212_TEXTUAL_DESCRIPTOR_LEAF_DATA(ud->model_name_kv); |
169 | for (i = ARRAY_SIZE(firedtv_model_names); --i;) | 169 | for (i = ARRAY_SIZE(fdtv_model_names); --i;) |
170 | if (strlen(firedtv_model_names[i]) <= kv_len && | 170 | if (strlen(fdtv_model_names[i]) <= kv_len && |
171 | strncmp(kv_str, firedtv_model_names[i], kv_len) == 0) | 171 | strncmp(kv_str, fdtv_model_names[i], kv_len) == 0) |
172 | break; | 172 | break; |
173 | firesat->type = i; | 173 | fdtv->type = i; |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * Work around a bug in udev's path_id script: Use the fw-host's dev | 176 | * Work around a bug in udev's path_id script: Use the fw-host's dev |
177 | * instead of the unit directory's dev as parent of the input device. | 177 | * instead of the unit directory's dev as parent of the input device. |
178 | */ | 178 | */ |
179 | err = firesat_register_rc(firesat, dev->parent->parent); | 179 | err = fdtv_register_rc(fdtv, dev->parent->parent); |
180 | if (err) | 180 | if (err) |
181 | goto fail_free; | 181 | goto fail_free; |
182 | 182 | ||
183 | INIT_LIST_HEAD(&firesat->list); | 183 | INIT_LIST_HEAD(&fdtv->list); |
184 | spin_lock_irqsave(&firesat_list_lock, flags); | 184 | spin_lock_irqsave(&fdtv_list_lock, flags); |
185 | list_add_tail(&firesat->list, &firesat_list); | 185 | list_add_tail(&fdtv->list, &fdtv_list); |
186 | spin_unlock_irqrestore(&firesat_list_lock, flags); | 186 | spin_unlock_irqrestore(&fdtv_list_lock, flags); |
187 | 187 | ||
188 | err = avc_identify_subunit(firesat); | 188 | err = avc_identify_subunit(fdtv); |
189 | if (err) | 189 | if (err) |
190 | goto fail; | 190 | goto fail; |
191 | 191 | ||
192 | err = firesat_dvbdev_init(firesat, dev); | 192 | err = fdtv_dvbdev_init(fdtv, dev); |
193 | if (err) | 193 | if (err) |
194 | goto fail; | 194 | goto fail; |
195 | 195 | ||
196 | avc_register_remote_control(firesat); | 196 | avc_register_remote_control(fdtv); |
197 | return 0; | 197 | return 0; |
198 | 198 | ||
199 | fail: | 199 | fail: |
200 | spin_lock_irqsave(&firesat_list_lock, flags); | 200 | spin_lock_irqsave(&fdtv_list_lock, flags); |
201 | list_del(&firesat->list); | 201 | list_del(&fdtv->list); |
202 | spin_unlock_irqrestore(&firesat_list_lock, flags); | 202 | spin_unlock_irqrestore(&fdtv_list_lock, flags); |
203 | firesat_unregister_rc(firesat); | 203 | fdtv_unregister_rc(fdtv); |
204 | fail_free: | 204 | fail_free: |
205 | kfree(firesat); | 205 | kfree(fdtv); |
206 | return err; | 206 | return err; |
207 | } | 207 | } |
208 | 208 | ||
209 | static int firesat_remove(struct device *dev) | 209 | static int fdtv_remove(struct device *dev) |
210 | { | 210 | { |
211 | struct firesat *firesat = dev->driver_data; | 211 | struct firedtv *fdtv = dev->driver_data; |
212 | unsigned long flags; | 212 | unsigned long flags; |
213 | 213 | ||
214 | firesat_ca_release(firesat); | 214 | fdtv_ca_release(fdtv); |
215 | dvb_unregister_frontend(&firesat->fe); | 215 | dvb_unregister_frontend(&fdtv->fe); |
216 | dvb_net_release(&firesat->dvbnet); | 216 | dvb_net_release(&fdtv->dvbnet); |
217 | firesat->demux.dmx.close(&firesat->demux.dmx); | 217 | fdtv->demux.dmx.close(&fdtv->demux.dmx); |
218 | firesat->demux.dmx.remove_frontend(&firesat->demux.dmx, | 218 | fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx, |
219 | &firesat->frontend); | 219 | &fdtv->frontend); |
220 | dvb_dmxdev_release(&firesat->dmxdev); | 220 | dvb_dmxdev_release(&fdtv->dmxdev); |
221 | dvb_dmx_release(&firesat->demux); | 221 | dvb_dmx_release(&fdtv->demux); |
222 | dvb_unregister_adapter(&firesat->adapter); | 222 | dvb_unregister_adapter(&fdtv->adapter); |
223 | 223 | ||
224 | spin_lock_irqsave(&firesat_list_lock, flags); | 224 | spin_lock_irqsave(&fdtv_list_lock, flags); |
225 | list_del(&firesat->list); | 225 | list_del(&fdtv->list); |
226 | spin_unlock_irqrestore(&firesat_list_lock, flags); | 226 | spin_unlock_irqrestore(&fdtv_list_lock, flags); |
227 | 227 | ||
228 | cancel_work_sync(&firesat->remote_ctrl_work); | 228 | cancel_work_sync(&fdtv->remote_ctrl_work); |
229 | firesat_unregister_rc(firesat); | 229 | fdtv_unregister_rc(fdtv); |
230 | 230 | ||
231 | kfree(firesat); | 231 | kfree(fdtv); |
232 | return 0; | 232 | return 0; |
233 | } | 233 | } |
234 | 234 | ||
235 | static int firesat_update(struct unit_directory *ud) | 235 | static int fdtv_update(struct unit_directory *ud) |
236 | { | 236 | { |
237 | struct firesat *firesat = ud->device.driver_data; | 237 | struct firedtv *fdtv = ud->device.driver_data; |
238 | 238 | ||
239 | if (firesat->isochannel >= 0) | 239 | if (fdtv->isochannel >= 0) |
240 | cmp_establish_pp_connection(firesat, firesat->subunit, | 240 | cmp_establish_pp_connection(fdtv, fdtv->subunit, |
241 | firesat->isochannel); | 241 | fdtv->isochannel); |
242 | return 0; | 242 | return 0; |
243 | } | 243 | } |
244 | 244 | ||
245 | static struct hpsb_protocol_driver firesat_driver = { | 245 | static struct hpsb_protocol_driver fdtv_driver = { |
246 | 246 | ||
247 | .name = "firedtv", | 247 | .name = "firedtv", |
248 | .id_table = firesat_id_table, | 248 | .id_table = fdtv_id_table, |
249 | .update = firesat_update, | 249 | .update = fdtv_update, |
250 | 250 | ||
251 | .driver = { | 251 | .driver = { |
252 | //.name and .bus are filled in for us in more recent linux versions | 252 | //.name and .bus are filled in for us in more recent linux versions |
253 | //.name = "FireSAT", | 253 | //.name = "FireDTV", |
254 | //.bus = &ieee1394_bus_type, | 254 | //.bus = &ieee1394_bus_type, |
255 | .probe = firesat_probe, | 255 | .probe = fdtv_probe, |
256 | .remove = firesat_remove, | 256 | .remove = fdtv_remove, |
257 | }, | 257 | }, |
258 | }; | 258 | }; |
259 | 259 | ||
260 | static struct hpsb_highlevel firesat_highlevel = { | 260 | static struct hpsb_highlevel fdtv_highlevel = { |
261 | .name = "firedtv", | 261 | .name = "firedtv", |
262 | .fcp_request = fcp_request, | 262 | .fcp_request = fcp_request, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static int __init firesat_init(void) | 265 | static int __init fdtv_init(void) |
266 | { | 266 | { |
267 | int ret; | 267 | int ret; |
268 | 268 | ||
269 | hpsb_register_highlevel(&firesat_highlevel); | 269 | hpsb_register_highlevel(&fdtv_highlevel); |
270 | ret = hpsb_register_protocol(&firesat_driver); | 270 | ret = hpsb_register_protocol(&fdtv_driver); |
271 | if (ret) { | 271 | if (ret) { |
272 | printk(KERN_ERR "firedtv: failed to register protocol\n"); | 272 | printk(KERN_ERR "firedtv: failed to register protocol\n"); |
273 | hpsb_unregister_highlevel(&firesat_highlevel); | 273 | hpsb_unregister_highlevel(&fdtv_highlevel); |
274 | } | 274 | } |
275 | return ret; | 275 | return ret; |
276 | } | 276 | } |
277 | 277 | ||
278 | static void __exit firesat_exit(void) | 278 | static void __exit fdtv_exit(void) |
279 | { | 279 | { |
280 | hpsb_unregister_protocol(&firesat_driver); | 280 | hpsb_unregister_protocol(&fdtv_driver); |
281 | hpsb_unregister_highlevel(&firesat_highlevel); | 281 | hpsb_unregister_highlevel(&fdtv_highlevel); |
282 | } | 282 | } |
283 | 283 | ||
284 | module_init(firesat_init); | 284 | module_init(fdtv_init); |
285 | module_exit(firesat_exit); | 285 | module_exit(fdtv_exit); |
286 | 286 | ||
287 | MODULE_AUTHOR("Andreas Monitzer <andy@monitzer.com>"); | 287 | MODULE_AUTHOR("Andreas Monitzer <andy@monitzer.com>"); |
288 | MODULE_AUTHOR("Ben Backx <ben@bbackx.com>"); | 288 | MODULE_AUTHOR("Ben Backx <ben@bbackx.com>"); |
diff --git a/drivers/media/dvb/firesat/firesat-ci.c b/drivers/media/dvb/firewire/firedtv-ci.c index 783ed2000102..6d87926b8bfe 100644 --- a/drivers/media/dvb/firesat/firesat-ci.c +++ b/drivers/media/dvb/firewire/firedtv-ci.c | |||
@@ -16,11 +16,11 @@ | |||
16 | 16 | ||
17 | #include <dvbdev.h> | 17 | #include <dvbdev.h> |
18 | 18 | ||
19 | #include "avc_api.h" | 19 | #include "avc.h" |
20 | #include "firesat.h" | 20 | #include "firedtv.h" |
21 | #include "firesat-ci.h" | 21 | #include "firedtv-ci.h" |
22 | 22 | ||
23 | static int firesat_ca_ready(ANTENNA_INPUT_INFO *info) | 23 | static int fdtv_ca_ready(ANTENNA_INPUT_INFO *info) |
24 | { | 24 | { |
25 | return info->CaInitializationStatus == 1 && | 25 | return info->CaInitializationStatus == 1 && |
26 | info->CaErrorFlag == 0 && | 26 | info->CaErrorFlag == 0 && |
@@ -28,7 +28,7 @@ static int firesat_ca_ready(ANTENNA_INPUT_INFO *info) | |||
28 | info->CaModulePresentStatus == 1; | 28 | info->CaModulePresentStatus == 1; |
29 | } | 29 | } |
30 | 30 | ||
31 | static int firesat_get_ca_flags(ANTENNA_INPUT_INFO *info) | 31 | static int fdtv_get_ca_flags(ANTENNA_INPUT_INFO *info) |
32 | { | 32 | { |
33 | int flags = 0; | 33 | int flags = 0; |
34 | 34 | ||
@@ -41,12 +41,12 @@ static int firesat_get_ca_flags(ANTENNA_INPUT_INFO *info) | |||
41 | return flags; | 41 | return flags; |
42 | } | 42 | } |
43 | 43 | ||
44 | static int firesat_ca_reset(struct firesat *firesat) | 44 | static int fdtv_ca_reset(struct firedtv *fdtv) |
45 | { | 45 | { |
46 | return avc_ca_reset(firesat) ? -EFAULT : 0; | 46 | return avc_ca_reset(fdtv) ? -EFAULT : 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | static int firesat_ca_get_caps(void *arg) | 49 | static int fdtv_ca_get_caps(void *arg) |
50 | { | 50 | { |
51 | struct ca_caps *cap = arg; | 51 | struct ca_caps *cap = arg; |
52 | 52 | ||
@@ -57,73 +57,73 @@ static int firesat_ca_get_caps(void *arg) | |||
57 | return 0; | 57 | return 0; |
58 | } | 58 | } |
59 | 59 | ||
60 | static int firesat_ca_get_slot_info(struct firesat *firesat, void *arg) | 60 | static int fdtv_ca_get_slot_info(struct firedtv *fdtv, void *arg) |
61 | { | 61 | { |
62 | ANTENNA_INPUT_INFO info; | 62 | ANTENNA_INPUT_INFO info; |
63 | struct ca_slot_info *slot = arg; | 63 | struct ca_slot_info *slot = arg; |
64 | 64 | ||
65 | if (avc_tuner_status(firesat, &info)) | 65 | if (avc_tuner_status(fdtv, &info)) |
66 | return -EFAULT; | 66 | return -EFAULT; |
67 | 67 | ||
68 | if (slot->num != 0) | 68 | if (slot->num != 0) |
69 | return -EFAULT; | 69 | return -EFAULT; |
70 | 70 | ||
71 | slot->type = CA_CI; | 71 | slot->type = CA_CI; |
72 | slot->flags = firesat_get_ca_flags(&info); | 72 | slot->flags = fdtv_get_ca_flags(&info); |
73 | return 0; | 73 | return 0; |
74 | } | 74 | } |
75 | 75 | ||
76 | static int firesat_ca_app_info(struct firesat *firesat, void *arg) | 76 | static int fdtv_ca_app_info(struct firedtv *fdtv, void *arg) |
77 | { | 77 | { |
78 | struct ca_msg *reply = arg; | 78 | struct ca_msg *reply = arg; |
79 | 79 | ||
80 | return | 80 | return |
81 | avc_ca_app_info(firesat, reply->msg, &reply->length) ? -EFAULT : 0; | 81 | avc_ca_app_info(fdtv, reply->msg, &reply->length) ? -EFAULT : 0; |
82 | } | 82 | } |
83 | 83 | ||
84 | static int firesat_ca_info(struct firesat *firesat, void *arg) | 84 | static int fdtv_ca_info(struct firedtv *fdtv, void *arg) |
85 | { | 85 | { |
86 | struct ca_msg *reply = arg; | 86 | struct ca_msg *reply = arg; |
87 | 87 | ||
88 | return avc_ca_info(firesat, reply->msg, &reply->length) ? -EFAULT : 0; | 88 | return avc_ca_info(fdtv, reply->msg, &reply->length) ? -EFAULT : 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static int firesat_ca_get_mmi(struct firesat *firesat, void *arg) | 91 | static int fdtv_ca_get_mmi(struct firedtv *fdtv, void *arg) |
92 | { | 92 | { |
93 | struct ca_msg *reply = arg; | 93 | struct ca_msg *reply = arg; |
94 | 94 | ||
95 | return | 95 | return |
96 | avc_ca_get_mmi(firesat, reply->msg, &reply->length) ? -EFAULT : 0; | 96 | avc_ca_get_mmi(fdtv, reply->msg, &reply->length) ? -EFAULT : 0; |
97 | } | 97 | } |
98 | 98 | ||
99 | static int firesat_ca_get_msg(struct firesat *firesat, void *arg) | 99 | static int fdtv_ca_get_msg(struct firedtv *fdtv, void *arg) |
100 | { | 100 | { |
101 | ANTENNA_INPUT_INFO info; | 101 | ANTENNA_INPUT_INFO info; |
102 | int err; | 102 | int err; |
103 | 103 | ||
104 | switch (firesat->ca_last_command) { | 104 | switch (fdtv->ca_last_command) { |
105 | case TAG_APP_INFO_ENQUIRY: | 105 | case TAG_APP_INFO_ENQUIRY: |
106 | err = firesat_ca_app_info(firesat, arg); | 106 | err = fdtv_ca_app_info(fdtv, arg); |
107 | break; | 107 | break; |
108 | case TAG_CA_INFO_ENQUIRY: | 108 | case TAG_CA_INFO_ENQUIRY: |
109 | err = firesat_ca_info(firesat, arg); | 109 | err = fdtv_ca_info(fdtv, arg); |
110 | break; | 110 | break; |
111 | default: | 111 | default: |
112 | if (avc_tuner_status(firesat, &info)) | 112 | if (avc_tuner_status(fdtv, &info)) |
113 | err = -EFAULT; | 113 | err = -EFAULT; |
114 | else if (info.CaMmi == 1) | 114 | else if (info.CaMmi == 1) |
115 | err = firesat_ca_get_mmi(firesat, arg); | 115 | err = fdtv_ca_get_mmi(fdtv, arg); |
116 | else { | 116 | else { |
117 | printk(KERN_INFO "%s: Unhandled message 0x%08X\n", | 117 | printk(KERN_INFO "%s: Unhandled message 0x%08X\n", |
118 | __func__, firesat->ca_last_command); | 118 | __func__, fdtv->ca_last_command); |
119 | err = -EFAULT; | 119 | err = -EFAULT; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | firesat->ca_last_command = 0; | 122 | fdtv->ca_last_command = 0; |
123 | return err; | 123 | return err; |
124 | } | 124 | } |
125 | 125 | ||
126 | static int firesat_ca_pmt(struct firesat *firesat, void *arg) | 126 | static int fdtv_ca_pmt(struct firedtv *fdtv, void *arg) |
127 | { | 127 | { |
128 | struct ca_msg *msg = arg; | 128 | struct ca_msg *msg = arg; |
129 | int data_pos; | 129 | int data_pos; |
@@ -139,21 +139,21 @@ static int firesat_ca_pmt(struct firesat *firesat, void *arg) | |||
139 | data_length = msg->msg[3]; | 139 | data_length = msg->msg[3]; |
140 | } | 140 | } |
141 | 141 | ||
142 | return avc_ca_pmt(firesat, &msg->msg[data_pos], data_length) ? | 142 | return avc_ca_pmt(fdtv, &msg->msg[data_pos], data_length) ? |
143 | -EFAULT : 0; | 143 | -EFAULT : 0; |
144 | } | 144 | } |
145 | 145 | ||
146 | static int firesat_ca_send_msg(struct firesat *firesat, void *arg) | 146 | static int fdtv_ca_send_msg(struct firedtv *fdtv, void *arg) |
147 | { | 147 | { |
148 | struct ca_msg *msg = arg; | 148 | struct ca_msg *msg = arg; |
149 | int err; | 149 | int err; |
150 | 150 | ||
151 | /* Do we need a semaphore for this? */ | 151 | /* Do we need a semaphore for this? */ |
152 | firesat->ca_last_command = | 152 | fdtv->ca_last_command = |
153 | (msg->msg[0] << 16) + (msg->msg[1] << 8) + msg->msg[2]; | 153 | (msg->msg[0] << 16) + (msg->msg[1] << 8) + msg->msg[2]; |
154 | switch (firesat->ca_last_command) { | 154 | switch (fdtv->ca_last_command) { |
155 | case TAG_CA_PMT: | 155 | case TAG_CA_PMT: |
156 | err = firesat_ca_pmt(firesat, arg); | 156 | err = fdtv_ca_pmt(fdtv, arg); |
157 | break; | 157 | break; |
158 | case TAG_APP_INFO_ENQUIRY: | 158 | case TAG_APP_INFO_ENQUIRY: |
159 | /* handled in ca_get_msg */ | 159 | /* handled in ca_get_msg */ |
@@ -164,39 +164,39 @@ static int firesat_ca_send_msg(struct firesat *firesat, void *arg) | |||
164 | err = 0; | 164 | err = 0; |
165 | break; | 165 | break; |
166 | case TAG_ENTER_MENU: | 166 | case TAG_ENTER_MENU: |
167 | err = avc_ca_enter_menu(firesat); | 167 | err = avc_ca_enter_menu(fdtv); |
168 | break; | 168 | break; |
169 | default: | 169 | default: |
170 | printk(KERN_ERR "%s: Unhandled unknown message 0x%08X\n", | 170 | printk(KERN_ERR "%s: Unhandled unknown message 0x%08X\n", |
171 | __func__, firesat->ca_last_command); | 171 | __func__, fdtv->ca_last_command); |
172 | err = -EFAULT; | 172 | err = -EFAULT; |
173 | } | 173 | } |
174 | return err; | 174 | return err; |
175 | } | 175 | } |
176 | 176 | ||
177 | static int firesat_ca_ioctl(struct inode *inode, struct file *file, | 177 | static int fdtv_ca_ioctl(struct inode *inode, struct file *file, |
178 | unsigned int cmd, void *arg) | 178 | unsigned int cmd, void *arg) |
179 | { | 179 | { |
180 | struct dvb_device *dvbdev = file->private_data; | 180 | struct dvb_device *dvbdev = file->private_data; |
181 | struct firesat *firesat = dvbdev->priv; | 181 | struct firedtv *fdtv = dvbdev->priv; |
182 | ANTENNA_INPUT_INFO info; | 182 | ANTENNA_INPUT_INFO info; |
183 | int err; | 183 | int err; |
184 | 184 | ||
185 | switch(cmd) { | 185 | switch(cmd) { |
186 | case CA_RESET: | 186 | case CA_RESET: |
187 | err = firesat_ca_reset(firesat); | 187 | err = fdtv_ca_reset(fdtv); |
188 | break; | 188 | break; |
189 | case CA_GET_CAP: | 189 | case CA_GET_CAP: |
190 | err = firesat_ca_get_caps(arg); | 190 | err = fdtv_ca_get_caps(arg); |
191 | break; | 191 | break; |
192 | case CA_GET_SLOT_INFO: | 192 | case CA_GET_SLOT_INFO: |
193 | err = firesat_ca_get_slot_info(firesat, arg); | 193 | err = fdtv_ca_get_slot_info(fdtv, arg); |
194 | break; | 194 | break; |
195 | case CA_GET_MSG: | 195 | case CA_GET_MSG: |
196 | err = firesat_ca_get_msg(firesat, arg); | 196 | err = fdtv_ca_get_msg(fdtv, arg); |
197 | break; | 197 | break; |
198 | case CA_SEND_MSG: | 198 | case CA_SEND_MSG: |
199 | err = firesat_ca_send_msg(firesat, arg); | 199 | err = fdtv_ca_send_msg(fdtv, arg); |
200 | break; | 200 | break; |
201 | default: | 201 | default: |
202 | printk(KERN_INFO "%s: Unhandled ioctl, command: %u\n",__func__, | 202 | printk(KERN_INFO "%s: Unhandled ioctl, command: %u\n",__func__, |
@@ -205,57 +205,57 @@ static int firesat_ca_ioctl(struct inode *inode, struct file *file, | |||
205 | } | 205 | } |
206 | 206 | ||
207 | /* FIXME Is this necessary? */ | 207 | /* FIXME Is this necessary? */ |
208 | avc_tuner_status(firesat, &info); | 208 | avc_tuner_status(fdtv, &info); |
209 | 209 | ||
210 | return err; | 210 | return err; |
211 | } | 211 | } |
212 | 212 | ||
213 | static unsigned int firesat_ca_io_poll(struct file *file, poll_table *wait) | 213 | static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait) |
214 | { | 214 | { |
215 | return POLLIN; | 215 | return POLLIN; |
216 | } | 216 | } |
217 | 217 | ||
218 | static struct file_operations firesat_ca_fops = { | 218 | static struct file_operations fdtv_ca_fops = { |
219 | .owner = THIS_MODULE, | 219 | .owner = THIS_MODULE, |
220 | .ioctl = dvb_generic_ioctl, | 220 | .ioctl = dvb_generic_ioctl, |
221 | .open = dvb_generic_open, | 221 | .open = dvb_generic_open, |
222 | .release = dvb_generic_release, | 222 | .release = dvb_generic_release, |
223 | .poll = firesat_ca_io_poll, | 223 | .poll = fdtv_ca_io_poll, |
224 | }; | 224 | }; |
225 | 225 | ||
226 | static struct dvb_device firesat_ca = { | 226 | static struct dvb_device fdtv_ca = { |
227 | .users = 1, | 227 | .users = 1, |
228 | .readers = 1, | 228 | .readers = 1, |
229 | .writers = 1, | 229 | .writers = 1, |
230 | .fops = &firesat_ca_fops, | 230 | .fops = &fdtv_ca_fops, |
231 | .kernel_ioctl = firesat_ca_ioctl, | 231 | .kernel_ioctl = fdtv_ca_ioctl, |
232 | }; | 232 | }; |
233 | 233 | ||
234 | int firesat_ca_register(struct firesat *firesat) | 234 | int fdtv_ca_register(struct firedtv *fdtv) |
235 | { | 235 | { |
236 | ANTENNA_INPUT_INFO info; | 236 | ANTENNA_INPUT_INFO info; |
237 | int err; | 237 | int err; |
238 | 238 | ||
239 | if (avc_tuner_status(firesat, &info)) | 239 | if (avc_tuner_status(fdtv, &info)) |
240 | return -EINVAL; | 240 | return -EINVAL; |
241 | 241 | ||
242 | if (!firesat_ca_ready(&info)) | 242 | if (!fdtv_ca_ready(&info)) |
243 | return -EFAULT; | 243 | return -EFAULT; |
244 | 244 | ||
245 | err = dvb_register_device(&firesat->adapter, &firesat->cadev, | 245 | err = dvb_register_device(&fdtv->adapter, &fdtv->cadev, |
246 | &firesat_ca, firesat, DVB_DEVICE_CA); | 246 | &fdtv_ca, fdtv, DVB_DEVICE_CA); |
247 | 247 | ||
248 | if (info.CaApplicationInfo == 0) | 248 | if (info.CaApplicationInfo == 0) |
249 | printk(KERN_ERR "%s: CaApplicationInfo is not set.\n", | 249 | printk(KERN_ERR "%s: CaApplicationInfo is not set.\n", |
250 | __func__); | 250 | __func__); |
251 | if (info.CaDateTimeRequest == 1) | 251 | if (info.CaDateTimeRequest == 1) |
252 | avc_ca_get_time_date(firesat, &firesat->ca_time_interval); | 252 | avc_ca_get_time_date(fdtv, &fdtv->ca_time_interval); |
253 | 253 | ||
254 | return err; | 254 | return err; |
255 | } | 255 | } |
256 | 256 | ||
257 | void firesat_ca_release(struct firesat *firesat) | 257 | void fdtv_ca_release(struct firedtv *fdtv) |
258 | { | 258 | { |
259 | if (firesat->cadev) | 259 | if (fdtv->cadev) |
260 | dvb_unregister_device(firesat->cadev); | 260 | dvb_unregister_device(fdtv->cadev); |
261 | } | 261 | } |
diff --git a/drivers/media/dvb/firewire/firedtv-ci.h b/drivers/media/dvb/firewire/firedtv-ci.h new file mode 100644 index 000000000000..d6840f5dcbae --- /dev/null +++ b/drivers/media/dvb/firewire/firedtv-ci.h | |||
@@ -0,0 +1,9 @@ | |||
1 | #ifndef _FIREDTV_CI_H | ||
2 | #define _FIREDTV_CI_H | ||
3 | |||
4 | struct firedtv; | ||
5 | |||
6 | int fdtv_ca_register(struct firedtv *fdtv); | ||
7 | void fdtv_ca_release(struct firedtv *fdtv); | ||
8 | |||
9 | #endif /* _FIREDTV_CI_H */ | ||
diff --git a/drivers/media/dvb/firesat/firesat_dvb.c b/drivers/media/dvb/firewire/firedtv-dvb.c index cb36c0310199..1823058696f2 100644 --- a/drivers/media/dvb/firesat/firesat_dvb.c +++ b/drivers/media/dvb/firewire/firedtv-dvb.c | |||
@@ -19,65 +19,65 @@ | |||
19 | #include <dvb_frontend.h> | 19 | #include <dvb_frontend.h> |
20 | #include <dvbdev.h> | 20 | #include <dvbdev.h> |
21 | 21 | ||
22 | #include "avc_api.h" | 22 | #include "avc.h" |
23 | #include "firesat.h" | 23 | #include "firedtv.h" |
24 | #include "firesat-ci.h" | 24 | #include "firedtv-ci.h" |
25 | 25 | ||
26 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); | 26 | DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); |
27 | 27 | ||
28 | static struct firesat_channel *firesat_channel_allocate(struct firesat *firesat) | 28 | static struct firedtv_channel *fdtv_channel_allocate(struct firedtv *fdtv) |
29 | { | 29 | { |
30 | struct firesat_channel *c = NULL; | 30 | struct firedtv_channel *c = NULL; |
31 | int k; | 31 | int k; |
32 | 32 | ||
33 | if (mutex_lock_interruptible(&firesat->demux_mutex)) | 33 | if (mutex_lock_interruptible(&fdtv->demux_mutex)) |
34 | return NULL; | 34 | return NULL; |
35 | 35 | ||
36 | for (k = 0; k < 16; k++) | 36 | for (k = 0; k < 16; k++) |
37 | if (!firesat->channel[k].active) { | 37 | if (!fdtv->channel[k].active) { |
38 | firesat->channel[k].active = true; | 38 | fdtv->channel[k].active = true; |
39 | c = &firesat->channel[k]; | 39 | c = &fdtv->channel[k]; |
40 | break; | 40 | break; |
41 | } | 41 | } |
42 | 42 | ||
43 | mutex_unlock(&firesat->demux_mutex); | 43 | mutex_unlock(&fdtv->demux_mutex); |
44 | return c; | 44 | return c; |
45 | } | 45 | } |
46 | 46 | ||
47 | static int firesat_channel_collect(struct firesat *firesat, int *pidc, u16 pid[]) | 47 | static int fdtv_channel_collect(struct firedtv *fdtv, int *pidc, u16 pid[]) |
48 | { | 48 | { |
49 | int k, l = 0; | 49 | int k, l = 0; |
50 | 50 | ||
51 | if (mutex_lock_interruptible(&firesat->demux_mutex)) | 51 | if (mutex_lock_interruptible(&fdtv->demux_mutex)) |
52 | return -EINTR; | 52 | return -EINTR; |
53 | 53 | ||
54 | for (k = 0; k < 16; k++) | 54 | for (k = 0; k < 16; k++) |
55 | if (firesat->channel[k].active) | 55 | if (fdtv->channel[k].active) |
56 | pid[l++] = firesat->channel[k].pid; | 56 | pid[l++] = fdtv->channel[k].pid; |
57 | 57 | ||
58 | mutex_unlock(&firesat->demux_mutex); | 58 | mutex_unlock(&fdtv->demux_mutex); |
59 | 59 | ||
60 | *pidc = l; | 60 | *pidc = l; |
61 | 61 | ||
62 | return 0; | 62 | return 0; |
63 | } | 63 | } |
64 | 64 | ||
65 | static int firesat_channel_release(struct firesat *firesat, | 65 | static int fdtv_channel_release(struct firedtv *fdtv, |
66 | struct firesat_channel *channel) | 66 | struct firedtv_channel *channel) |
67 | { | 67 | { |
68 | if (mutex_lock_interruptible(&firesat->demux_mutex)) | 68 | if (mutex_lock_interruptible(&fdtv->demux_mutex)) |
69 | return -EINTR; | 69 | return -EINTR; |
70 | 70 | ||
71 | channel->active = false; | 71 | channel->active = false; |
72 | 72 | ||
73 | mutex_unlock(&firesat->demux_mutex); | 73 | mutex_unlock(&fdtv->demux_mutex); |
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed) | 77 | int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed) |
78 | { | 78 | { |
79 | struct firesat *firesat = (struct firesat*)dvbdmxfeed->demux->priv; | 79 | struct firedtv *fdtv = (struct firedtv*)dvbdmxfeed->demux->priv; |
80 | struct firesat_channel *channel; | 80 | struct firedtv_channel *channel; |
81 | int pidc,k; | 81 | int pidc,k; |
82 | u16 pids[16]; | 82 | u16 pids[16]; |
83 | 83 | ||
@@ -98,14 +98,14 @@ int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
98 | case DMX_TS_PES_TELETEXT: | 98 | case DMX_TS_PES_TELETEXT: |
99 | case DMX_TS_PES_PCR: | 99 | case DMX_TS_PES_PCR: |
100 | case DMX_TS_PES_OTHER: | 100 | case DMX_TS_PES_OTHER: |
101 | //Dirty fix to keep firesat->channel pid-list up to date | 101 | //Dirty fix to keep fdtv->channel pid-list up to date |
102 | for(k=0;k<16;k++){ | 102 | for(k=0;k<16;k++){ |
103 | if (!firesat->channel[k].active) | 103 | if (!fdtv->channel[k].active) |
104 | firesat->channel[k].pid = | 104 | fdtv->channel[k].pid = |
105 | dvbdmxfeed->pid; | 105 | dvbdmxfeed->pid; |
106 | break; | 106 | break; |
107 | } | 107 | } |
108 | channel = firesat_channel_allocate(firesat); | 108 | channel = fdtv_channel_allocate(fdtv); |
109 | break; | 109 | break; |
110 | default: | 110 | default: |
111 | printk(KERN_ERR "%s: invalid pes type %u\n", | 111 | printk(KERN_ERR "%s: invalid pes type %u\n", |
@@ -113,7 +113,7 @@ int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
113 | return -EINVAL; | 113 | return -EINVAL; |
114 | } | 114 | } |
115 | } else { | 115 | } else { |
116 | channel = firesat_channel_allocate(firesat); | 116 | channel = fdtv_channel_allocate(fdtv); |
117 | } | 117 | } |
118 | 118 | ||
119 | if (!channel) { | 119 | if (!channel) { |
@@ -124,24 +124,24 @@ int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
124 | dvbdmxfeed->priv = channel; | 124 | dvbdmxfeed->priv = channel; |
125 | channel->pid = dvbdmxfeed->pid; | 125 | channel->pid = dvbdmxfeed->pid; |
126 | 126 | ||
127 | if (firesat_channel_collect(firesat, &pidc, pids)) { | 127 | if (fdtv_channel_collect(fdtv, &pidc, pids)) { |
128 | firesat_channel_release(firesat, channel); | 128 | fdtv_channel_release(fdtv, channel); |
129 | printk(KERN_ERR "%s: could not collect pids!\n", __func__); | 129 | printk(KERN_ERR "%s: could not collect pids!\n", __func__); |
130 | return -EINTR; | 130 | return -EINTR; |
131 | } | 131 | } |
132 | 132 | ||
133 | if (dvbdmxfeed->pid == 8192) { | 133 | if (dvbdmxfeed->pid == 8192) { |
134 | k = avc_tuner_get_ts(firesat); | 134 | k = avc_tuner_get_ts(fdtv); |
135 | if (k) { | 135 | if (k) { |
136 | firesat_channel_release(firesat, channel); | 136 | fdtv_channel_release(fdtv, channel); |
137 | printk("%s: AVCTuner_GetTS failed with error %d\n", | 137 | printk("%s: AVCTuner_GetTS failed with error %d\n", |
138 | __func__, k); | 138 | __func__, k); |
139 | return k; | 139 | return k; |
140 | } | 140 | } |
141 | } else { | 141 | } else { |
142 | k = avc_tuner_set_pids(firesat, pidc, pids); | 142 | k = avc_tuner_set_pids(fdtv, pidc, pids); |
143 | if (k) { | 143 | if (k) { |
144 | firesat_channel_release(firesat, channel); | 144 | fdtv_channel_release(fdtv, channel); |
145 | printk("%s: AVCTuner_SetPIDs failed with error %d\n", | 145 | printk("%s: AVCTuner_SetPIDs failed with error %d\n", |
146 | __func__, k); | 146 | __func__, k); |
147 | return k; | 147 | return k; |
@@ -151,11 +151,11 @@ int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
151 | return 0; | 151 | return 0; |
152 | } | 152 | } |
153 | 153 | ||
154 | int firesat_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | 154 | int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed) |
155 | { | 155 | { |
156 | struct dvb_demux *demux = dvbdmxfeed->demux; | 156 | struct dvb_demux *demux = dvbdmxfeed->demux; |
157 | struct firesat *firesat = (struct firesat*)demux->priv; | 157 | struct firedtv *fdtv = (struct firedtv*)demux->priv; |
158 | struct firesat_channel *c = dvbdmxfeed->priv; | 158 | struct firedtv_channel *c = dvbdmxfeed->priv; |
159 | int k, l; | 159 | int k, l; |
160 | u16 pids[16]; | 160 | u16 pids[16]; |
161 | 161 | ||
@@ -179,95 +179,95 @@ int firesat_stop_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
179 | return 0; | 179 | return 0; |
180 | } | 180 | } |
181 | 181 | ||
182 | if (mutex_lock_interruptible(&firesat->demux_mutex)) | 182 | if (mutex_lock_interruptible(&fdtv->demux_mutex)) |
183 | return -EINTR; | 183 | return -EINTR; |
184 | 184 | ||
185 | /* list except channel to be removed */ | 185 | /* list except channel to be removed */ |
186 | for (k = 0, l = 0; k < 16; k++) | 186 | for (k = 0, l = 0; k < 16; k++) |
187 | if (firesat->channel[k].active) { | 187 | if (fdtv->channel[k].active) { |
188 | if (&firesat->channel[k] != c) | 188 | if (&fdtv->channel[k] != c) |
189 | pids[l++] = firesat->channel[k].pid; | 189 | pids[l++] = fdtv->channel[k].pid; |
190 | else | 190 | else |
191 | firesat->channel[k].active = false; | 191 | fdtv->channel[k].active = false; |
192 | } | 192 | } |
193 | 193 | ||
194 | k = avc_tuner_set_pids(firesat, l, pids); | 194 | k = avc_tuner_set_pids(fdtv, l, pids); |
195 | if (!k) | 195 | if (!k) |
196 | c->active = false; | 196 | c->active = false; |
197 | 197 | ||
198 | mutex_unlock(&firesat->demux_mutex); | 198 | mutex_unlock(&fdtv->demux_mutex); |
199 | return k; | 199 | return k; |
200 | } | 200 | } |
201 | 201 | ||
202 | int firesat_dvbdev_init(struct firesat *firesat, struct device *dev) | 202 | int fdtv_dvbdev_init(struct firedtv *fdtv, struct device *dev) |
203 | { | 203 | { |
204 | int err; | 204 | int err; |
205 | 205 | ||
206 | err = DVB_REGISTER_ADAPTER(&firesat->adapter, | 206 | err = DVB_REGISTER_ADAPTER(&fdtv->adapter, |
207 | firedtv_model_names[firesat->type], | 207 | fdtv_model_names[fdtv->type], |
208 | THIS_MODULE, dev, adapter_nr); | 208 | THIS_MODULE, dev, adapter_nr); |
209 | if (err < 0) | 209 | if (err < 0) |
210 | goto fail_log; | 210 | goto fail_log; |
211 | 211 | ||
212 | /*DMX_TS_FILTERING | DMX_SECTION_FILTERING*/ | 212 | /*DMX_TS_FILTERING | DMX_SECTION_FILTERING*/ |
213 | firesat->demux.dmx.capabilities = 0; | 213 | fdtv->demux.dmx.capabilities = 0; |
214 | 214 | ||
215 | firesat->demux.priv = (void *)firesat; | 215 | fdtv->demux.priv = fdtv; |
216 | firesat->demux.filternum = 16; | 216 | fdtv->demux.filternum = 16; |
217 | firesat->demux.feednum = 16; | 217 | fdtv->demux.feednum = 16; |
218 | firesat->demux.start_feed = firesat_start_feed; | 218 | fdtv->demux.start_feed = fdtv_start_feed; |
219 | firesat->demux.stop_feed = firesat_stop_feed; | 219 | fdtv->demux.stop_feed = fdtv_stop_feed; |
220 | firesat->demux.write_to_decoder = NULL; | 220 | fdtv->demux.write_to_decoder = NULL; |
221 | 221 | ||
222 | err = dvb_dmx_init(&firesat->demux); | 222 | err = dvb_dmx_init(&fdtv->demux); |
223 | if (err) | 223 | if (err) |
224 | goto fail_unreg_adapter; | 224 | goto fail_unreg_adapter; |
225 | 225 | ||
226 | firesat->dmxdev.filternum = 16; | 226 | fdtv->dmxdev.filternum = 16; |
227 | firesat->dmxdev.demux = &firesat->demux.dmx; | 227 | fdtv->dmxdev.demux = &fdtv->demux.dmx; |
228 | firesat->dmxdev.capabilities = 0; | 228 | fdtv->dmxdev.capabilities = 0; |
229 | 229 | ||
230 | err = dvb_dmxdev_init(&firesat->dmxdev, &firesat->adapter); | 230 | err = dvb_dmxdev_init(&fdtv->dmxdev, &fdtv->adapter); |
231 | if (err) | 231 | if (err) |
232 | goto fail_dmx_release; | 232 | goto fail_dmx_release; |
233 | 233 | ||
234 | firesat->frontend.source = DMX_FRONTEND_0; | 234 | fdtv->frontend.source = DMX_FRONTEND_0; |
235 | 235 | ||
236 | err = firesat->demux.dmx.add_frontend(&firesat->demux.dmx, | 236 | err = fdtv->demux.dmx.add_frontend(&fdtv->demux.dmx, |
237 | &firesat->frontend); | 237 | &fdtv->frontend); |
238 | if (err) | 238 | if (err) |
239 | goto fail_dmxdev_release; | 239 | goto fail_dmxdev_release; |
240 | 240 | ||
241 | err = firesat->demux.dmx.connect_frontend(&firesat->demux.dmx, | 241 | err = fdtv->demux.dmx.connect_frontend(&fdtv->demux.dmx, |
242 | &firesat->frontend); | 242 | &fdtv->frontend); |
243 | if (err) | 243 | if (err) |
244 | goto fail_rem_frontend; | 244 | goto fail_rem_frontend; |
245 | 245 | ||
246 | dvb_net_init(&firesat->adapter, &firesat->dvbnet, &firesat->demux.dmx); | 246 | dvb_net_init(&fdtv->adapter, &fdtv->dvbnet, &fdtv->demux.dmx); |
247 | 247 | ||
248 | firesat_frontend_init(firesat); | 248 | fdtv_frontend_init(fdtv); |
249 | err = dvb_register_frontend(&firesat->adapter, &firesat->fe); | 249 | err = dvb_register_frontend(&fdtv->adapter, &fdtv->fe); |
250 | if (err) | 250 | if (err) |
251 | goto fail_net_release; | 251 | goto fail_net_release; |
252 | 252 | ||
253 | err = firesat_ca_register(firesat); | 253 | err = fdtv_ca_register(fdtv); |
254 | if (err) | 254 | if (err) |
255 | dev_info(dev, "Conditional Access Module not enabled\n"); | 255 | dev_info(dev, "Conditional Access Module not enabled\n"); |
256 | 256 | ||
257 | return 0; | 257 | return 0; |
258 | 258 | ||
259 | fail_net_release: | 259 | fail_net_release: |
260 | dvb_net_release(&firesat->dvbnet); | 260 | dvb_net_release(&fdtv->dvbnet); |
261 | firesat->demux.dmx.close(&firesat->demux.dmx); | 261 | fdtv->demux.dmx.close(&fdtv->demux.dmx); |
262 | fail_rem_frontend: | 262 | fail_rem_frontend: |
263 | firesat->demux.dmx.remove_frontend(&firesat->demux.dmx, | 263 | fdtv->demux.dmx.remove_frontend(&fdtv->demux.dmx, |
264 | &firesat->frontend); | 264 | &fdtv->frontend); |
265 | fail_dmxdev_release: | 265 | fail_dmxdev_release: |
266 | dvb_dmxdev_release(&firesat->dmxdev); | 266 | dvb_dmxdev_release(&fdtv->dmxdev); |
267 | fail_dmx_release: | 267 | fail_dmx_release: |
268 | dvb_dmx_release(&firesat->demux); | 268 | dvb_dmx_release(&fdtv->demux); |
269 | fail_unreg_adapter: | 269 | fail_unreg_adapter: |
270 | dvb_unregister_adapter(&firesat->adapter); | 270 | dvb_unregister_adapter(&fdtv->adapter); |
271 | fail_log: | 271 | fail_log: |
272 | dev_err(dev, "DVB initialization failed\n"); | 272 | dev_err(dev, "DVB initialization failed\n"); |
273 | return err; | 273 | return err; |
diff --git a/drivers/media/dvb/firesat/firesat_fe.c b/drivers/media/dvb/firewire/firedtv-fe.c index 1ed972b79573..f8150f402bb6 100644 --- a/drivers/media/dvb/firesat/firesat_fe.c +++ b/drivers/media/dvb/firewire/firedtv-fe.c | |||
@@ -17,77 +17,77 @@ | |||
17 | 17 | ||
18 | #include <dvb_frontend.h> | 18 | #include <dvb_frontend.h> |
19 | 19 | ||
20 | #include "avc_api.h" | 20 | #include "avc.h" |
21 | #include "cmp.h" | 21 | #include "cmp.h" |
22 | #include "firesat.h" | 22 | #include "firedtv.h" |
23 | 23 | ||
24 | static int firesat_dvb_init(struct dvb_frontend *fe) | 24 | static int fdtv_dvb_init(struct dvb_frontend *fe) |
25 | { | 25 | { |
26 | struct firesat *firesat = fe->sec_priv; | 26 | struct firedtv *fdtv = fe->sec_priv; |
27 | int err; | 27 | int err; |
28 | 28 | ||
29 | /* FIXME - allocate free channel at IRM */ | 29 | /* FIXME - allocate free channel at IRM */ |
30 | firesat->isochannel = firesat->adapter.num; | 30 | fdtv->isochannel = fdtv->adapter.num; |
31 | 31 | ||
32 | err = cmp_establish_pp_connection(firesat, firesat->subunit, | 32 | err = cmp_establish_pp_connection(fdtv, fdtv->subunit, |
33 | firesat->isochannel); | 33 | fdtv->isochannel); |
34 | if (err) { | 34 | if (err) { |
35 | printk(KERN_ERR "Could not establish point to point " | 35 | printk(KERN_ERR "Could not establish point to point " |
36 | "connection.\n"); | 36 | "connection.\n"); |
37 | return err; | 37 | return err; |
38 | } | 38 | } |
39 | 39 | ||
40 | return setup_iso_channel(firesat); | 40 | return setup_iso_channel(fdtv); |
41 | } | 41 | } |
42 | 42 | ||
43 | static int firesat_sleep(struct dvb_frontend *fe) | 43 | static int fdtv_sleep(struct dvb_frontend *fe) |
44 | { | 44 | { |
45 | struct firesat *firesat = fe->sec_priv; | 45 | struct firedtv *fdtv = fe->sec_priv; |
46 | 46 | ||
47 | tear_down_iso_channel(firesat); | 47 | tear_down_iso_channel(fdtv); |
48 | cmp_break_pp_connection(firesat, firesat->subunit, firesat->isochannel); | 48 | cmp_break_pp_connection(fdtv, fdtv->subunit, fdtv->isochannel); |
49 | firesat->isochannel = -1; | 49 | fdtv->isochannel = -1; |
50 | return 0; | 50 | return 0; |
51 | } | 51 | } |
52 | 52 | ||
53 | static int firesat_diseqc_send_master_cmd(struct dvb_frontend *fe, | 53 | static int fdtv_diseqc_send_master_cmd(struct dvb_frontend *fe, |
54 | struct dvb_diseqc_master_cmd *cmd) | 54 | struct dvb_diseqc_master_cmd *cmd) |
55 | { | 55 | { |
56 | struct firesat *firesat = fe->sec_priv; | 56 | struct firedtv *fdtv = fe->sec_priv; |
57 | 57 | ||
58 | return avc_lnb_control(firesat, LNBCONTROL_DONTCARE, | 58 | return avc_lnb_control(fdtv, LNBCONTROL_DONTCARE, |
59 | LNBCONTROL_DONTCARE, LNBCONTROL_DONTCARE, 1, cmd); | 59 | LNBCONTROL_DONTCARE, LNBCONTROL_DONTCARE, 1, cmd); |
60 | } | 60 | } |
61 | 61 | ||
62 | static int firesat_diseqc_send_burst(struct dvb_frontend *fe, | 62 | static int fdtv_diseqc_send_burst(struct dvb_frontend *fe, |
63 | fe_sec_mini_cmd_t minicmd) | 63 | fe_sec_mini_cmd_t minicmd) |
64 | { | 64 | { |
65 | return 0; | 65 | return 0; |
66 | } | 66 | } |
67 | 67 | ||
68 | static int firesat_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) | 68 | static int fdtv_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) |
69 | { | 69 | { |
70 | struct firesat *firesat = fe->sec_priv; | 70 | struct firedtv *fdtv = fe->sec_priv; |
71 | 71 | ||
72 | firesat->tone = tone; | 72 | fdtv->tone = tone; |
73 | return 0; | 73 | return 0; |
74 | } | 74 | } |
75 | 75 | ||
76 | static int firesat_set_voltage(struct dvb_frontend *fe, | 76 | static int fdtv_set_voltage(struct dvb_frontend *fe, |
77 | fe_sec_voltage_t voltage) | 77 | fe_sec_voltage_t voltage) |
78 | { | 78 | { |
79 | struct firesat *firesat = fe->sec_priv; | 79 | struct firedtv *fdtv = fe->sec_priv; |
80 | 80 | ||
81 | firesat->voltage = voltage; | 81 | fdtv->voltage = voltage; |
82 | return 0; | 82 | return 0; |
83 | } | 83 | } |
84 | 84 | ||
85 | static int firesat_read_status(struct dvb_frontend *fe, fe_status_t *status) | 85 | static int fdtv_read_status(struct dvb_frontend *fe, fe_status_t *status) |
86 | { | 86 | { |
87 | struct firesat *firesat = fe->sec_priv; | 87 | struct firedtv *fdtv = fe->sec_priv; |
88 | ANTENNA_INPUT_INFO info; | 88 | ANTENNA_INPUT_INFO info; |
89 | 89 | ||
90 | if (avc_tuner_status(firesat, &info)) | 90 | if (avc_tuner_status(fdtv, &info)) |
91 | return -EINVAL; | 91 | return -EINVAL; |
92 | 92 | ||
93 | if (info.NoRF) | 93 | if (info.NoRF) |
@@ -98,12 +98,12 @@ static int firesat_read_status(struct dvb_frontend *fe, fe_status_t *status) | |||
98 | return 0; | 98 | return 0; |
99 | } | 99 | } |
100 | 100 | ||
101 | static int firesat_read_ber(struct dvb_frontend *fe, u32 *ber) | 101 | static int fdtv_read_ber(struct dvb_frontend *fe, u32 *ber) |
102 | { | 102 | { |
103 | struct firesat *firesat = fe->sec_priv; | 103 | struct firedtv *fdtv = fe->sec_priv; |
104 | ANTENNA_INPUT_INFO info; | 104 | ANTENNA_INPUT_INFO info; |
105 | 105 | ||
106 | if (avc_tuner_status(firesat, &info)) | 106 | if (avc_tuner_status(fdtv, &info)) |
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | 108 | ||
109 | *ber = info.BER[0] << 24 | info.BER[1] << 16 | | 109 | *ber = info.BER[0] << 24 | info.BER[1] << 16 | |
@@ -111,24 +111,24 @@ static int firesat_read_ber(struct dvb_frontend *fe, u32 *ber) | |||
111 | return 0; | 111 | return 0; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int firesat_read_signal_strength (struct dvb_frontend *fe, u16 *strength) | 114 | static int fdtv_read_signal_strength (struct dvb_frontend *fe, u16 *strength) |
115 | { | 115 | { |
116 | struct firesat *firesat = fe->sec_priv; | 116 | struct firedtv *fdtv = fe->sec_priv; |
117 | ANTENNA_INPUT_INFO info; | 117 | ANTENNA_INPUT_INFO info; |
118 | 118 | ||
119 | if (avc_tuner_status(firesat, &info)) | 119 | if (avc_tuner_status(fdtv, &info)) |
120 | return -EINVAL; | 120 | return -EINVAL; |
121 | 121 | ||
122 | *strength = info.SignalStrength << 8; | 122 | *strength = info.SignalStrength << 8; |
123 | return 0; | 123 | return 0; |
124 | } | 124 | } |
125 | 125 | ||
126 | static int firesat_read_snr(struct dvb_frontend *fe, u16 *snr) | 126 | static int fdtv_read_snr(struct dvb_frontend *fe, u16 *snr) |
127 | { | 127 | { |
128 | struct firesat *firesat = fe->sec_priv; | 128 | struct firedtv *fdtv = fe->sec_priv; |
129 | ANTENNA_INPUT_INFO info; | 129 | ANTENNA_INPUT_INFO info; |
130 | 130 | ||
131 | if (avc_tuner_status(firesat, &info)) | 131 | if (avc_tuner_status(fdtv, &info)) |
132 | return -EINVAL; | 132 | return -EINVAL; |
133 | 133 | ||
134 | /* C/N[dB] = -10 * log10(snr / 65535) */ | 134 | /* C/N[dB] = -10 * log10(snr / 65535) */ |
@@ -137,53 +137,53 @@ static int firesat_read_snr(struct dvb_frontend *fe, u16 *snr) | |||
137 | return 0; | 137 | return 0; |
138 | } | 138 | } |
139 | 139 | ||
140 | static int firesat_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks) | 140 | static int fdtv_read_uncorrected_blocks(struct dvb_frontend *fe, u32 *ucblocks) |
141 | { | 141 | { |
142 | return -EOPNOTSUPP; | 142 | return -EOPNOTSUPP; |
143 | } | 143 | } |
144 | 144 | ||
145 | static int firesat_set_frontend(struct dvb_frontend *fe, | 145 | static int fdtv_set_frontend(struct dvb_frontend *fe, |
146 | struct dvb_frontend_parameters *params) | 146 | struct dvb_frontend_parameters *params) |
147 | { | 147 | { |
148 | struct firesat *firesat = fe->sec_priv; | 148 | struct firedtv *fdtv = fe->sec_priv; |
149 | 149 | ||
150 | /* FIXME: avc_tuner_dsd never returns ACCEPTED. Check status? */ | 150 | /* FIXME: avc_tuner_dsd never returns ACCEPTED. Check status? */ |
151 | if (avc_tuner_dsd(firesat, params) != ACCEPTED) | 151 | if (avc_tuner_dsd(fdtv, params) != ACCEPTED) |
152 | return -EINVAL; | 152 | return -EINVAL; |
153 | else | 153 | else |
154 | return 0; /* not sure of this... */ | 154 | return 0; /* not sure of this... */ |
155 | } | 155 | } |
156 | 156 | ||
157 | static int firesat_get_frontend(struct dvb_frontend *fe, | 157 | static int fdtv_get_frontend(struct dvb_frontend *fe, |
158 | struct dvb_frontend_parameters *params) | 158 | struct dvb_frontend_parameters *params) |
159 | { | 159 | { |
160 | return -EOPNOTSUPP; | 160 | return -EOPNOTSUPP; |
161 | } | 161 | } |
162 | 162 | ||
163 | void firesat_frontend_init(struct firesat *firesat) | 163 | void fdtv_frontend_init(struct firedtv *fdtv) |
164 | { | 164 | { |
165 | struct dvb_frontend_ops *ops = &firesat->fe.ops; | 165 | struct dvb_frontend_ops *ops = &fdtv->fe.ops; |
166 | struct dvb_frontend_info *fi = &ops->info; | 166 | struct dvb_frontend_info *fi = &ops->info; |
167 | 167 | ||
168 | ops->init = firesat_dvb_init; | 168 | ops->init = fdtv_dvb_init; |
169 | ops->sleep = firesat_sleep; | 169 | ops->sleep = fdtv_sleep; |
170 | 170 | ||
171 | ops->set_frontend = firesat_set_frontend; | 171 | ops->set_frontend = fdtv_set_frontend; |
172 | ops->get_frontend = firesat_get_frontend; | 172 | ops->get_frontend = fdtv_get_frontend; |
173 | 173 | ||
174 | ops->read_status = firesat_read_status; | 174 | ops->read_status = fdtv_read_status; |
175 | ops->read_ber = firesat_read_ber; | 175 | ops->read_ber = fdtv_read_ber; |
176 | ops->read_signal_strength = firesat_read_signal_strength; | 176 | ops->read_signal_strength = fdtv_read_signal_strength; |
177 | ops->read_snr = firesat_read_snr; | 177 | ops->read_snr = fdtv_read_snr; |
178 | ops->read_ucblocks = firesat_read_uncorrected_blocks; | 178 | ops->read_ucblocks = fdtv_read_uncorrected_blocks; |
179 | 179 | ||
180 | ops->diseqc_send_master_cmd = firesat_diseqc_send_master_cmd; | 180 | ops->diseqc_send_master_cmd = fdtv_diseqc_send_master_cmd; |
181 | ops->diseqc_send_burst = firesat_diseqc_send_burst; | 181 | ops->diseqc_send_burst = fdtv_diseqc_send_burst; |
182 | ops->set_tone = firesat_set_tone; | 182 | ops->set_tone = fdtv_set_tone; |
183 | ops->set_voltage = firesat_set_voltage; | 183 | ops->set_voltage = fdtv_set_voltage; |
184 | 184 | ||
185 | switch (firesat->type) { | 185 | switch (fdtv->type) { |
186 | case FireSAT_DVB_S: | 186 | case FIREDTV_DVB_S: |
187 | fi->type = FE_QPSK; | 187 | fi->type = FE_QPSK; |
188 | 188 | ||
189 | fi->frequency_min = 950000; | 189 | fi->frequency_min = 950000; |
@@ -202,7 +202,7 @@ void firesat_frontend_init(struct firesat *firesat) | |||
202 | FE_CAN_QPSK; | 202 | FE_CAN_QPSK; |
203 | break; | 203 | break; |
204 | 204 | ||
205 | case FireSAT_DVB_C: | 205 | case FIREDTV_DVB_C: |
206 | fi->type = FE_QAM; | 206 | fi->type = FE_QAM; |
207 | 207 | ||
208 | fi->frequency_min = 47000000; | 208 | fi->frequency_min = 47000000; |
@@ -220,7 +220,7 @@ void firesat_frontend_init(struct firesat *firesat) | |||
220 | FE_CAN_QAM_AUTO; | 220 | FE_CAN_QAM_AUTO; |
221 | break; | 221 | break; |
222 | 222 | ||
223 | case FireSAT_DVB_T: | 223 | case FIREDTV_DVB_T: |
224 | fi->type = FE_OFDM; | 224 | fi->type = FE_OFDM; |
225 | 225 | ||
226 | fi->frequency_min = 49000000; | 226 | fi->frequency_min = 49000000; |
@@ -236,10 +236,10 @@ void firesat_frontend_init(struct firesat *firesat) | |||
236 | 236 | ||
237 | default: | 237 | default: |
238 | printk(KERN_ERR "FireDTV: no frontend for model type %d\n", | 238 | printk(KERN_ERR "FireDTV: no frontend for model type %d\n", |
239 | firesat->type); | 239 | fdtv->type); |
240 | } | 240 | } |
241 | strcpy(fi->name, firedtv_model_names[firesat->type]); | 241 | strcpy(fi->name, fdtv_model_names[fdtv->type]); |
242 | 242 | ||
243 | firesat->fe.dvb = &firesat->adapter; | 243 | fdtv->fe.dvb = &fdtv->adapter; |
244 | firesat->fe.sec_priv = firesat; | 244 | fdtv->fe.sec_priv = fdtv; |
245 | } | 245 | } |
diff --git a/drivers/media/dvb/firesat/firesat_iso.c b/drivers/media/dvb/firewire/firedtv-iso.c index b3c61f95fa94..a72df228e7de 100644 --- a/drivers/media/dvb/firesat/firesat_iso.c +++ b/drivers/media/dvb/firewire/firedtv-iso.c | |||
@@ -20,35 +20,35 @@ | |||
20 | #include <iso.h> | 20 | #include <iso.h> |
21 | #include <nodemgr.h> | 21 | #include <nodemgr.h> |
22 | 22 | ||
23 | #include "firesat.h" | 23 | #include "firedtv.h" |
24 | 24 | ||
25 | static void rawiso_activity_cb(struct hpsb_iso *iso); | 25 | static void rawiso_activity_cb(struct hpsb_iso *iso); |
26 | 26 | ||
27 | void tear_down_iso_channel(struct firesat *firesat) | 27 | void tear_down_iso_channel(struct firedtv *fdtv) |
28 | { | 28 | { |
29 | if (firesat->iso_handle != NULL) { | 29 | if (fdtv->iso_handle != NULL) { |
30 | hpsb_iso_stop(firesat->iso_handle); | 30 | hpsb_iso_stop(fdtv->iso_handle); |
31 | hpsb_iso_shutdown(firesat->iso_handle); | 31 | hpsb_iso_shutdown(fdtv->iso_handle); |
32 | } | 32 | } |
33 | firesat->iso_handle = NULL; | 33 | fdtv->iso_handle = NULL; |
34 | } | 34 | } |
35 | 35 | ||
36 | int setup_iso_channel(struct firesat *firesat) | 36 | int setup_iso_channel(struct firedtv *fdtv) |
37 | { | 37 | { |
38 | int result; | 38 | int result; |
39 | firesat->iso_handle = | 39 | fdtv->iso_handle = |
40 | hpsb_iso_recv_init(firesat->ud->ne->host, | 40 | hpsb_iso_recv_init(fdtv->ud->ne->host, |
41 | 256 * 200, //data_buf_size, | 41 | 256 * 200, //data_buf_size, |
42 | 256, //buf_packets, | 42 | 256, //buf_packets, |
43 | firesat->isochannel, | 43 | fdtv->isochannel, |
44 | HPSB_ISO_DMA_DEFAULT, //dma_mode, | 44 | HPSB_ISO_DMA_DEFAULT, //dma_mode, |
45 | -1, //stat.config.irq_interval, | 45 | -1, //stat.config.irq_interval, |
46 | rawiso_activity_cb); | 46 | rawiso_activity_cb); |
47 | if (firesat->iso_handle == NULL) { | 47 | if (fdtv->iso_handle == NULL) { |
48 | printk(KERN_ERR "Cannot initialize iso receive.\n"); | 48 | printk(KERN_ERR "Cannot initialize iso receive.\n"); |
49 | return -EINVAL; | 49 | return -EINVAL; |
50 | } | 50 | } |
51 | result = hpsb_iso_recv_start(firesat->iso_handle, -1, -1, 0); | 51 | result = hpsb_iso_recv_start(fdtv->iso_handle, -1, -1, 0); |
52 | if (result != 0) { | 52 | if (result != 0) { |
53 | printk(KERN_ERR "Cannot start iso receive.\n"); | 53 | printk(KERN_ERR "Cannot start iso receive.\n"); |
54 | return -EINVAL; | 54 | return -EINVAL; |
@@ -62,19 +62,19 @@ static void rawiso_activity_cb(struct hpsb_iso *iso) | |||
62 | unsigned int i; | 62 | unsigned int i; |
63 | unsigned int packet; | 63 | unsigned int packet; |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | struct firesat *firesat = NULL; | 65 | struct firedtv *fdtv = NULL; |
66 | struct firesat *firesat_iterator; | 66 | struct firedtv *fdtv_iterator; |
67 | 67 | ||
68 | spin_lock_irqsave(&firesat_list_lock, flags); | 68 | spin_lock_irqsave(&fdtv_list_lock, flags); |
69 | list_for_each_entry(firesat_iterator, &firesat_list, list) { | 69 | list_for_each_entry(fdtv_iterator, &fdtv_list, list) { |
70 | if(firesat_iterator->iso_handle == iso) { | 70 | if(fdtv_iterator->iso_handle == iso) { |
71 | firesat = firesat_iterator; | 71 | fdtv = fdtv_iterator; |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | } | 74 | } |
75 | spin_unlock_irqrestore(&firesat_list_lock, flags); | 75 | spin_unlock_irqrestore(&fdtv_list_lock, flags); |
76 | 76 | ||
77 | if (firesat) { | 77 | if (fdtv) { |
78 | packet = iso->first_packet; | 78 | packet = iso->first_packet; |
79 | num = hpsb_iso_n_ready(iso); | 79 | num = hpsb_iso_n_ready(iso); |
80 | for (i = 0; i < num; i++, | 80 | for (i = 0; i < num; i++, |
@@ -91,7 +91,7 @@ static void rawiso_activity_cb(struct hpsb_iso *iso) | |||
91 | 91 | ||
92 | while (count --) { | 92 | while (count --) { |
93 | if (buf[sizeof(struct firewireheader)] == 0x47) | 93 | if (buf[sizeof(struct firewireheader)] == 0x47) |
94 | dvb_dmx_swfilter_packets(&firesat->demux, | 94 | dvb_dmx_swfilter_packets(&fdtv->demux, |
95 | &buf[sizeof(struct firewireheader)], 1); | 95 | &buf[sizeof(struct firewireheader)], 1); |
96 | else | 96 | else |
97 | printk("%s: invalid packet, skipping\n", __func__); | 97 | printk("%s: invalid packet, skipping\n", __func__); |
diff --git a/drivers/media/dvb/firesat/firesat-rc.c b/drivers/media/dvb/firewire/firedtv-rc.c index 5f9de142ee3e..436c0c69a13d 100644 --- a/drivers/media/dvb/firesat/firesat-rc.c +++ b/drivers/media/dvb/firewire/firedtv-rc.c | |||
@@ -15,8 +15,8 @@ | |||
15 | #include <linux/string.h> | 15 | #include <linux/string.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | 17 | ||
18 | #include "firesat-rc.h" | 18 | #include "firedtv-rc.h" |
19 | #include "firesat.h" | 19 | #include "firedtv.h" |
20 | 20 | ||
21 | /* fixed table with older keycodes, geared towards MythTV */ | 21 | /* fixed table with older keycodes, geared towards MythTV */ |
22 | const static u16 oldtable[] = { | 22 | const static u16 oldtable[] = { |
@@ -125,7 +125,7 @@ const static u16 keytable[] = { | |||
125 | [0x34] = KEY_EXIT, | 125 | [0x34] = KEY_EXIT, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | int firesat_register_rc(struct firesat *firesat, struct device *dev) | 128 | int fdtv_register_rc(struct firedtv *fdtv, struct device *dev) |
129 | { | 129 | { |
130 | struct input_dev *idev; | 130 | struct input_dev *idev; |
131 | int i, err; | 131 | int i, err; |
@@ -134,7 +134,7 @@ int firesat_register_rc(struct firesat *firesat, struct device *dev) | |||
134 | if (!idev) | 134 | if (!idev) |
135 | return -ENOMEM; | 135 | return -ENOMEM; |
136 | 136 | ||
137 | firesat->remote_ctrl_dev = idev; | 137 | fdtv->remote_ctrl_dev = idev; |
138 | idev->name = "FireDTV remote control"; | 138 | idev->name = "FireDTV remote control"; |
139 | idev->dev.parent = dev; | 139 | idev->dev.parent = dev; |
140 | idev->evbit[0] = BIT_MASK(EV_KEY); | 140 | idev->evbit[0] = BIT_MASK(EV_KEY); |
@@ -162,15 +162,15 @@ fail: | |||
162 | return err; | 162 | return err; |
163 | } | 163 | } |
164 | 164 | ||
165 | void firesat_unregister_rc(struct firesat *firesat) | 165 | void fdtv_unregister_rc(struct firedtv *fdtv) |
166 | { | 166 | { |
167 | kfree(firesat->remote_ctrl_dev->keycode); | 167 | kfree(fdtv->remote_ctrl_dev->keycode); |
168 | input_unregister_device(firesat->remote_ctrl_dev); | 168 | input_unregister_device(fdtv->remote_ctrl_dev); |
169 | } | 169 | } |
170 | 170 | ||
171 | void firesat_handle_rc(struct firesat *firesat, unsigned int code) | 171 | void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code) |
172 | { | 172 | { |
173 | u16 *keycode = firesat->remote_ctrl_dev->keycode; | 173 | u16 *keycode = fdtv->remote_ctrl_dev->keycode; |
174 | 174 | ||
175 | if (code >= 0x0300 && code <= 0x031f) | 175 | if (code >= 0x0300 && code <= 0x031f) |
176 | code = keycode[code - 0x0300]; | 176 | code = keycode[code - 0x0300]; |
@@ -186,6 +186,6 @@ void firesat_handle_rc(struct firesat *firesat, unsigned int code) | |||
186 | return; | 186 | return; |
187 | } | 187 | } |
188 | 188 | ||
189 | input_report_key(firesat->remote_ctrl_dev, code, 1); | 189 | input_report_key(fdtv->remote_ctrl_dev, code, 1); |
190 | input_report_key(firesat->remote_ctrl_dev, code, 0); | 190 | input_report_key(fdtv->remote_ctrl_dev, code, 0); |
191 | } | 191 | } |
diff --git a/drivers/media/dvb/firewire/firedtv-rc.h b/drivers/media/dvb/firewire/firedtv-rc.h new file mode 100644 index 000000000000..d3e14727d3dd --- /dev/null +++ b/drivers/media/dvb/firewire/firedtv-rc.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _FIREDTV_RC_H | ||
2 | #define _FIREDTV_RC_H | ||
3 | |||
4 | struct firedtv; | ||
5 | struct device; | ||
6 | |||
7 | int fdtv_register_rc(struct firedtv *fdtv, struct device *dev); | ||
8 | void fdtv_unregister_rc(struct firedtv *fdtv); | ||
9 | void fdtv_handle_rc(struct firedtv *fdtv, unsigned int code); | ||
10 | |||
11 | #endif /* _FIREDTV_RC_H */ | ||
diff --git a/drivers/media/dvb/firesat/firesat.h b/drivers/media/dvb/firewire/firedtv.h index 51f64c0afcdb..2a34028ccbcd 100644 --- a/drivers/media/dvb/firesat/firesat.h +++ b/drivers/media/dvb/firewire/firedtv.h | |||
@@ -120,18 +120,18 @@ | |||
120 | 120 | ||
121 | 121 | ||
122 | enum model_type { | 122 | enum model_type { |
123 | FireSAT_UNKNOWN = 0, | 123 | FIREDTV_UNKNOWN = 0, |
124 | FireSAT_DVB_S = 1, | 124 | FIREDTV_DVB_S = 1, |
125 | FireSAT_DVB_C = 2, | 125 | FIREDTV_DVB_C = 2, |
126 | FireSAT_DVB_T = 3, | 126 | FIREDTV_DVB_T = 3, |
127 | FireSAT_DVB_S2 = 4, | 127 | FIREDTV_DVB_S2 = 4, |
128 | }; | 128 | }; |
129 | 129 | ||
130 | struct input_dev; | 130 | struct input_dev; |
131 | struct hpsb_iso; | 131 | struct hpsb_iso; |
132 | struct unit_directory; | 132 | struct unit_directory; |
133 | 133 | ||
134 | struct firesat { | 134 | struct firedtv { |
135 | struct dvb_adapter adapter; | 135 | struct dvb_adapter adapter; |
136 | struct dmxdev dmxdev; | 136 | struct dmxdev dmxdev; |
137 | struct dvb_demux demux; | 137 | struct dvb_demux demux; |
@@ -149,7 +149,7 @@ struct firesat { | |||
149 | struct work_struct remote_ctrl_work; | 149 | struct work_struct remote_ctrl_work; |
150 | struct input_dev *remote_ctrl_dev; | 150 | struct input_dev *remote_ctrl_dev; |
151 | 151 | ||
152 | struct firesat_channel { | 152 | struct firedtv_channel { |
153 | bool active; | 153 | bool active; |
154 | int pid; | 154 | int pid; |
155 | } channel[16]; | 155 | } channel[16]; |
@@ -206,22 +206,22 @@ struct CIPHeader { | |||
206 | }; | 206 | }; |
207 | }; | 207 | }; |
208 | 208 | ||
209 | extern const char *firedtv_model_names[]; | 209 | extern const char *fdtv_model_names[]; |
210 | extern struct list_head firesat_list; | 210 | extern struct list_head fdtv_list; |
211 | extern spinlock_t firesat_list_lock; | 211 | extern spinlock_t fdtv_list_lock; |
212 | 212 | ||
213 | struct device; | 213 | struct device; |
214 | 214 | ||
215 | /* firesat_dvb.c */ | 215 | /* firedtv-dvb.c */ |
216 | int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed); | 216 | int fdtv_start_feed(struct dvb_demux_feed *dvbdmxfeed); |
217 | int firesat_stop_feed(struct dvb_demux_feed *dvbdmxfeed); | 217 | int fdtv_stop_feed(struct dvb_demux_feed *dvbdmxfeed); |
218 | int firesat_dvbdev_init(struct firesat *firesat, struct device *dev); | 218 | int fdtv_dvbdev_init(struct firedtv *fdtv, struct device *dev); |
219 | 219 | ||
220 | /* firesat_fe.c */ | 220 | /* firedtv-fe.c */ |
221 | void firesat_frontend_init(struct firesat *firesat); | 221 | void fdtv_frontend_init(struct firedtv *fdtv); |
222 | 222 | ||
223 | /* firesat_iso.c */ | 223 | /* firedtv-iso.c */ |
224 | int setup_iso_channel(struct firesat *firesat); | 224 | int setup_iso_channel(struct firedtv *fdtv); |
225 | void tear_down_iso_channel(struct firesat *firesat); | 225 | void tear_down_iso_channel(struct firedtv *fdtv); |
226 | 226 | ||
227 | #endif /* _FIREDTV_H */ | 227 | #endif /* _FIREDTV_H */ |