diff options
author | Rambaldi <Rambaldi@xs4all.nl> | 2009-01-17 14:47:34 +0100 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2009-02-24 14:51:29 +0100 |
commit | a70f81c1c0dac113ac4705e7701e2676e67905cd (patch) | |
tree | 2ff18425bc3b9a4cbf083c82e011a06a0f88f926 | |
parent | 291f006efeebeeb2073289e44efb8f97cf157220 (diff) |
firedtv: rename files, variables, functions from firesat to firedtv
Combination of the following changes:
Sat, 17 Jan 2009 14:47:34 +0100
firedtv: rename variables and functions from firesat to firedtv
Signed-off-by: Rambaldi <Rambaldi@xs4all.nl>
Additional changes by Stefan Richter:
Renamed struct firedtv *firedtv to struct firedtv *fdtv and
firedtv_foo_bar() to fdtv_foo_bar() for brevity.
Sat, 17 Jan 2009 13:07:44 +0100
firedtv: rename files from firesat to firedtv
Signed-off-by: Rambaldi <Rambaldi@xs4all.nl>
Additional changes by Stefan Richter:
Name the directory "firewire" instead of "firedtv".
Standardize on "-" instead of "_" in file names, because that's what
drivers/firewire/ and drivers/media/dvb/dvb-usb/ use too.
Build fix.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-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" depends on DVB_CORE && PCI && I2C source "drivers/media/dvb/dm1105/Kconfig" -source "drivers/media/dvb/firesat/Kconfig" +source "drivers/media/dvb/firewire/Kconfig" comment "Supported DVB Frontends" 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 @@ obj-y := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/ dvb-usb/ pluto2/ siano/ dm1105/ -obj-$(CONFIG_DVB_FIREDTV) += firesat/ +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 @@ -#ifndef _CMP_H -#define _CMP_H - -struct firesat; - -int cmp_establish_pp_connection(struct firesat *firesat, int plug, int channel); -void cmp_break_pp_connection(struct firesat *firesat, int plug, int channel); - -#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 @@ -#ifndef _FIREDTV_CI_H -#define _FIREDTV_CI_H - -struct firesat; - -int firesat_ca_register(struct firesat *firesat); -void firesat_ca_release(struct firesat *firesat); - -#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 @@ -#ifndef _FIREDTV_RC_H -#define _FIREDTV_RC_H - -struct firesat; -struct device; - -int firesat_register_rc(struct firesat *firesat, struct device *dev); -void firesat_unregister_rc(struct firesat *firesat); -void firesat_handle_rc(struct firesat *firesat, unsigned int code); - -#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 @@ -firedtv-objs := firesat_1394.o \ - firesat_dvb.o \ - firesat_fe.o \ - firesat_iso.o \ - avc_api.o \ +firedtv-objs := firedtv-1394.o \ + firedtv-dvb.o \ + firedtv-fe.o \ + firedtv-iso.o \ + avc.o \ cmp.o \ - firesat-rc.o \ - firesat-ci.o + firedtv-rc.o \ + firedtv-ci.o obj-$(CONFIG_DVB_FIREDTV) += firedtv.o 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 @@ #include <ieee1394_transactions.h> #include <nodemgr.h> -#include "avc_api.h" -#include "firesat.h" -#include "firesat-rc.h" +#include "avc.h" +#include "firedtv.h" +#include "firedtv-rc.h" #define FCP_COMMAND_REGISTER 0xfffff0000b00ULL -static int __avc_write(struct firesat *firesat, +static int __avc_write(struct firedtv *fdtv, const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) { int err, retry; if (RspFrm) - firesat->avc_reply_received = false; + fdtv->avc_reply_received = false; for (retry = 0; retry < 6; retry++) { - err = hpsb_node_write(firesat->ud->ne, FCP_COMMAND_REGISTER, + err = hpsb_node_write(fdtv->ud->ne, FCP_COMMAND_REGISTER, (quadlet_t *)CmdFrm, CmdFrm->length); if (err) { - firesat->avc_reply_received = true; - dev_err(&firesat->ud->device, + fdtv->avc_reply_received = true; + dev_err(&fdtv->ud->device, "FCP command write failed\n"); return err; } @@ -56,34 +56,34 @@ static int __avc_write(struct firesat *firesat, * AV/C specs say that answers should be sent within 150 ms. * Time out after 200 ms. */ - if (wait_event_timeout(firesat->avc_wait, - firesat->avc_reply_received, + if (wait_event_timeout(fdtv->avc_wait, + fdtv->avc_reply_received, HZ / 5) != 0) { - memcpy(RspFrm, firesat->respfrm, firesat->resp_length); - RspFrm->length = firesat->resp_length; + memcpy(RspFrm, fdtv->respfrm, fdtv->resp_length); + RspFrm->length = fdtv->resp_length; return 0; } } - dev_err(&firesat->ud->device, "FCP response timed out\n"); + dev_err(&fdtv->ud->device, "FCP response timed out\n"); return -ETIMEDOUT; } -static int avc_write(struct firesat *firesat, +static int avc_write(struct firedtv *fdtv, const AVCCmdFrm *CmdFrm, AVCRspFrm *RspFrm) { int ret; - if (mutex_lock_interruptible(&firesat->avc_mutex)) + if (mutex_lock_interruptible(&fdtv->avc_mutex)) return -EINTR; - ret = __avc_write(firesat, CmdFrm, RspFrm); + ret = __avc_write(fdtv, CmdFrm, RspFrm); - mutex_unlock(&firesat->avc_mutex); + mutex_unlock(&fdtv->avc_mutex); return ret; } -int avc_recv(struct firesat *firesat, u8 *data, size_t length) +int avc_recv(struct firedtv *fdtv, u8 *data, size_t length) { AVCRspFrm *RspFrm = (AVCRspFrm *)data; @@ -93,27 +93,27 @@ int avc_recv(struct firesat *firesat, u8 *data, size_t length) RspFrm->operand[2] == SFE_VENDOR_DE_COMPANYID_2 && RspFrm->operand[3] == SFE_VENDOR_OPCODE_REGISTER_REMOTE_CONTROL) { if (RspFrm->resp == CHANGED) { - firesat_handle_rc(firesat, + fdtv_handle_rc(fdtv, RspFrm->operand[4] << 8 | RspFrm->operand[5]); - schedule_work(&firesat->remote_ctrl_work); + schedule_work(&fdtv->remote_ctrl_work); } else if (RspFrm->resp != INTERIM) { - dev_info(&firesat->ud->device, + dev_info(&fdtv->ud->device, "remote control result = %d\n", RspFrm->resp); } return 0; } - if (firesat->avc_reply_received) { - dev_err(&firesat->ud->device, + if (fdtv->avc_reply_received) { + dev_err(&fdtv->ud->device, "received out-of-order AVC response, ignored\n"); return -EIO; } - memcpy(firesat->respfrm, data, length); - firesat->resp_length = length; + memcpy(fdtv->respfrm, data, length); + fdtv->resp_length = length; - firesat->avc_reply_received = true; - wake_up(&firesat->avc_wait); + fdtv->avc_reply_received = true; + wake_up(&fdtv->avc_wait); return 0; } @@ -122,7 +122,7 @@ int avc_recv(struct firesat *firesat, u8 *data, size_t length) * tuning command for setting the relative LNB frequency * (not supported by the AVC standard) */ -static void avc_tuner_tuneqpsk(struct firesat *firesat, +static void avc_tuner_tuneqpsk(struct firedtv *fdtv, struct dvb_frontend_parameters *params, AVCCmdFrm *CmdFrm) { CmdFrm->opcode = VENDOR; @@ -158,21 +158,21 @@ static void avc_tuner_tuneqpsk(struct firesat *firesat, CmdFrm->operand[10] = 0x0; } - if (firesat->voltage == 0xff) + if (fdtv->voltage == 0xff) CmdFrm->operand[11] = 0xff; - else if (firesat->voltage == SEC_VOLTAGE_18) /* polarisation */ + else if (fdtv->voltage == SEC_VOLTAGE_18) /* polarisation */ CmdFrm->operand[11] = 0; else CmdFrm->operand[11] = 1; - if (firesat->tone == 0xff) + if (fdtv->tone == 0xff) CmdFrm->operand[12] = 0xff; - else if (firesat->tone == SEC_TONE_ON) /* band */ + else if (fdtv->tone == SEC_TONE_ON) /* band */ CmdFrm->operand[12] = 1; else CmdFrm->operand[12] = 0; - if (firesat->type == FireSAT_DVB_S2) { + if (fdtv->type == FIREDTV_DVB_S2) { CmdFrm->operand[13] = 0x1; CmdFrm->operand[14] = 0xff; CmdFrm->operand[15] = 0xff; @@ -394,7 +394,7 @@ static void avc_tuner_dsd_dvb_t(struct dvb_frontend_parameters *params, CmdFrm->length = 24; } -int avc_tuner_dsd(struct firesat *firesat, +int avc_tuner_dsd(struct firedtv *fdtv, struct dvb_frontend_parameters *params) { AVCCmdFrm CmdFrm; @@ -405,21 +405,21 @@ int avc_tuner_dsd(struct firesat *firesat, CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; - switch (firesat->type) { - case FireSAT_DVB_S: - case FireSAT_DVB_S2: - avc_tuner_tuneqpsk(firesat, params, &CmdFrm); break; - case FireSAT_DVB_C: + switch (fdtv->type) { + case FIREDTV_DVB_S: + case FIREDTV_DVB_S2: + avc_tuner_tuneqpsk(fdtv, params, &CmdFrm); break; + case FIREDTV_DVB_C: avc_tuner_dsd_dvb_c(params, &CmdFrm); break; - case FireSAT_DVB_T: + case FIREDTV_DVB_T: avc_tuner_dsd_dvb_t(params, &CmdFrm); break; default: BUG(); } - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; msleep(500); @@ -432,7 +432,7 @@ int avc_tuner_dsd(struct firesat *firesat, return 0; } -int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) +int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -446,7 +446,7 @@ int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = DSD; CmdFrm.operand[0] = 0; // source plug @@ -469,14 +469,14 @@ int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]) CmdFrm.length = ALIGN(3 + pos, 4); - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; msleep(50); return 0; } -int avc_tuner_get_ts(struct firesat *firesat) +int avc_tuner_get_ts(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -486,7 +486,7 @@ int avc_tuner_get_ts(struct firesat *firesat) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = DSIT; CmdFrm.operand[0] = 0; // source plug @@ -495,21 +495,21 @@ int avc_tuner_get_ts(struct firesat *firesat) CmdFrm.operand[3] = 0x20; // system id = DVB CmdFrm.operand[4] = 0x00; // antenna number CmdFrm.operand[5] = 0x0; // system_specific_search_flags - CmdFrm.operand[6] = (firesat->type == FireSAT_DVB_T)?0x0c:0x11; // system_specific_multiplex selection_length + CmdFrm.operand[6] = (fdtv->type == FIREDTV_DVB_T)?0x0c:0x11; // system_specific_multiplex selection_length CmdFrm.operand[7] = 0x00; // valid_flags [0] CmdFrm.operand[8] = 0x00; // valid_flags [1] - CmdFrm.operand[7 + (firesat->type == FireSAT_DVB_T)?0x0c:0x11] = 0x00; // nr_of_dsit_sel_specs (always 0) + CmdFrm.operand[7 + (fdtv->type == FIREDTV_DVB_T)?0x0c:0x11] = 0x00; // nr_of_dsit_sel_specs (always 0) - CmdFrm.length = (firesat->type == FireSAT_DVB_T)?24:28; + CmdFrm.length = (fdtv->type == FIREDTV_DVB_T)?24:28; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; msleep(250); return 0; } -int avc_identify_subunit(struct firesat *firesat) +int avc_identify_subunit(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -519,7 +519,7 @@ int avc_identify_subunit(struct firesat *firesat) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; // tuner - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = READ_DESCRIPTOR; CmdFrm.operand[0]=DESCRIPTOR_SUBUNIT_IDENTIFIER; @@ -532,19 +532,19 @@ int avc_identify_subunit(struct firesat *firesat) CmdFrm.length=12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; if ((RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) || (RspFrm.operand[3] << 8) + RspFrm.operand[4] != 8) { - dev_err(&firesat->ud->device, + dev_err(&fdtv->ud->device, "cannot read subunit identifier\n"); return -EINVAL; } return 0; } -int avc_tuner_status(struct firesat *firesat, +int avc_tuner_status(struct firedtv *fdtv, ANTENNA_INPUT_INFO *antenna_input_info) { AVCCmdFrm CmdFrm; @@ -556,7 +556,7 @@ int avc_tuner_status(struct firesat *firesat, CmdFrm.cts=AVC; CmdFrm.ctype=CONTROL; CmdFrm.sutyp=0x05; // tuner - CmdFrm.suid=firesat->subunit; + CmdFrm.suid=fdtv->subunit; CmdFrm.opcode=READ_DESCRIPTOR; CmdFrm.operand[0]=DESCRIPTOR_TUNER_STATUS; @@ -568,17 +568,17 @@ int avc_tuner_status(struct firesat *firesat, CmdFrm.operand[6]=0x00; CmdFrm.length=12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; if (RspFrm.resp != STABLE && RspFrm.resp != ACCEPTED) { - dev_err(&firesat->ud->device, "cannot read tuner status\n"); + dev_err(&fdtv->ud->device, "cannot read tuner status\n"); return -EINVAL; } length = RspFrm.operand[9]; if (RspFrm.operand[1] != 0x10 || length != sizeof(ANTENNA_INPUT_INFO)) { - dev_err(&firesat->ud->device, "got invalid tuner status\n"); + dev_err(&fdtv->ud->device, "got invalid tuner status\n"); return -EINVAL; } @@ -586,7 +586,7 @@ int avc_tuner_status(struct firesat *firesat, return 0; } -int avc_lnb_control(struct firesat *firesat, char voltage, char burst, +int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, char conttone, char nrdiseq, struct dvb_diseqc_master_cmd *diseqcmd) { @@ -599,7 +599,7 @@ int avc_lnb_control(struct firesat *firesat, char voltage, char burst, CmdFrm.cts=AVC; CmdFrm.ctype=CONTROL; CmdFrm.sutyp=0x05; - CmdFrm.suid=firesat->subunit; + CmdFrm.suid=fdtv->subunit; CmdFrm.opcode=VENDOR; CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; @@ -624,18 +624,18 @@ int avc_lnb_control(struct firesat *firesat, char voltage, char burst, CmdFrm.length = ALIGN(3 + i, 4); - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; if (RspFrm.resp != ACCEPTED) { - dev_err(&firesat->ud->device, "LNB control failed\n"); + dev_err(&fdtv->ud->device, "LNB control failed\n"); return -EINVAL; } return 0; } -int avc_register_remote_control(struct firesat *firesat) +int avc_register_remote_control(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; @@ -654,20 +654,20 @@ int avc_register_remote_control(struct firesat *firesat) CmdFrm.length = 8; - return avc_write(firesat, &CmdFrm, NULL); + return avc_write(fdtv, &CmdFrm, NULL); } void avc_remote_ctrl_work(struct work_struct *work) { - struct firesat *firesat = - container_of(work, struct firesat, remote_ctrl_work); + struct firedtv *fdtv = + container_of(work, struct firedtv, remote_ctrl_work); /* Should it be rescheduled in failure cases? */ - avc_register_remote_control(firesat); + avc_register_remote_control(fdtv); } #if 0 /* FIXME: unused */ -int avc_tuner_host2ca(struct firesat *firesat) +int avc_tuner_host2ca(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -676,7 +676,7 @@ int avc_tuner_host2ca(struct firesat *firesat) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; @@ -689,7 +689,7 @@ int avc_tuner_host2ca(struct firesat *firesat) CmdFrm.operand[7] = 0; // length CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; return 0; @@ -721,7 +721,7 @@ static int get_ca_object_length(AVCRspFrm *RspFrm) return RspFrm->operand[7]; } -int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) +int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -731,7 +731,7 @@ int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len) CmdFrm.cts = AVC; CmdFrm.ctype = STATUS; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; 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) CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; /* 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) return 0; } -int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) +int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -769,7 +769,7 @@ int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) CmdFrm.cts = AVC; CmdFrm.ctype = STATUS; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; 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) CmdFrm.operand[5] = SFE_VENDOR_TAG_CA_APPLICATION_INFO; // ca tag CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; pos = get_ca_object_pos(&RspFrm); @@ -795,7 +795,7 @@ int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len) return 0; } -int avc_ca_reset(struct firesat *firesat) +int avc_ca_reset(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -804,7 +804,7 @@ int avc_ca_reset(struct firesat *firesat) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; @@ -818,13 +818,13 @@ int avc_ca_reset(struct firesat *firesat) CmdFrm.operand[8] = 0; // force hardware reset CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; return 0; } -int avc_ca_pmt(struct firesat *firesat, char *msg, int length) +int avc_ca_pmt(struct firedtv *fdtv, char *msg, int length) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -840,11 +840,11 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) CmdFrm.cts = AVC; CmdFrm.ctype = CONTROL; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; if (msg[0] != LIST_MANAGEMENT_ONLY) { - dev_info(&firesat->ud->device, + dev_info(&fdtv->ud->device, "forcing list_management to ONLY\n"); msg[0] = LIST_MANAGEMENT_ONLY; } @@ -894,7 +894,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) if (program_info_length > 0) { pmt_cmd_id = msg[read_pos++]; if (pmt_cmd_id != 1 && pmt_cmd_id != 4) - dev_err(&firesat->ud->device, + dev_err(&fdtv->ud->device, "invalid pmt_cmd_id %d\n", pmt_cmd_id); memcpy(&CmdFrm.operand[write_pos], &msg[read_pos], @@ -916,7 +916,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) if (es_info_length > 0) { pmt_cmd_id = msg[read_pos++]; if (pmt_cmd_id != 1 && pmt_cmd_id != 4) - dev_err(&firesat->ud->device, + dev_err(&fdtv->ud->device, "invalid pmt_cmd_id %d " "at stream level\n", pmt_cmd_id); @@ -945,11 +945,11 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) CmdFrm.length = ALIGN(3 + write_pos, 4); - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; if (RspFrm.resp != ACCEPTED) { - dev_err(&firesat->ud->device, + dev_err(&fdtv->ud->device, "CA PMT failed with response 0x%x\n", RspFrm.resp); return -EFAULT; } @@ -957,7 +957,7 @@ int avc_ca_pmt(struct firesat *firesat, char *msg, int length) return 0; } -int avc_ca_get_time_date(struct firesat *firesat, int *interval) +int avc_ca_get_time_date(struct firedtv *fdtv, int *interval) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -966,7 +966,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) CmdFrm.cts = AVC; CmdFrm.ctype = STATUS; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; @@ -979,7 +979,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) CmdFrm.operand[7] = 0; // length CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; /* FIXME: check response code and validate response data */ @@ -989,7 +989,7 @@ int avc_ca_get_time_date(struct firesat *firesat, int *interval) return 0; } -int avc_ca_enter_menu(struct firesat *firesat) +int avc_ca_enter_menu(struct firedtv *fdtv) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -998,7 +998,7 @@ int avc_ca_enter_menu(struct firesat *firesat) CmdFrm.cts = AVC; CmdFrm.ctype = STATUS; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; CmdFrm.operand[0]=SFE_VENDOR_DE_COMPANYID_0; @@ -1011,13 +1011,13 @@ int avc_ca_enter_menu(struct firesat *firesat) CmdFrm.operand[7] = 0; // length CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; return 0; } -int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len) +int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len) { AVCCmdFrm CmdFrm; AVCRspFrm RspFrm; @@ -1026,7 +1026,7 @@ int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len) CmdFrm.cts = AVC; CmdFrm.ctype = STATUS; CmdFrm.sutyp = 0x5; - CmdFrm.suid = firesat->subunit; + CmdFrm.suid = fdtv->subunit; CmdFrm.opcode = VENDOR; 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) CmdFrm.operand[7] = 0; // length CmdFrm.length = 12; - if (avc_write(firesat, &CmdFrm, &RspFrm) < 0) + if (avc_write(fdtv, &CmdFrm, &RspFrm) < 0) return -EIO; /* 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 struct dvb_diseqc_master_cmd; struct dvb_frontend_parameters; -struct firesat; +struct firedtv; -int avc_recv(struct firesat *firesat, u8 *data, size_t length); +int avc_recv(struct firedtv *fdtv, u8 *data, size_t length); -int AVCTuner_DSIT(struct firesat *firesat, int Source_Plug, +int AVCTuner_DSIT(struct firedtv *fdtv, int Source_Plug, struct dvb_frontend_parameters *params, __u8 *status); -int avc_tuner_status(struct firesat *firesat, +int avc_tuner_status(struct firedtv *fdtv, ANTENNA_INPUT_INFO *antenna_input_info); -int avc_tuner_dsd(struct firesat *firesat, +int avc_tuner_dsd(struct firedtv *fdtv, struct dvb_frontend_parameters *params); -int avc_tuner_set_pids(struct firesat *firesat, unsigned char pidc, u16 pid[]); -int avc_tuner_get_ts(struct firesat *firesat); -int avc_identify_subunit(struct firesat *firesat); -int avc_lnb_control(struct firesat *firesat, char voltage, char burst, +int avc_tuner_set_pids(struct firedtv *fdtv, unsigned char pidc, u16 pid[]); +int avc_tuner_get_ts(struct firedtv *fdtv); +int avc_identify_subunit(struct firedtv *fdtv); +int avc_lnb_control(struct firedtv *fdtv, char voltage, char burst, char conttone, char nrdiseq, struct dvb_diseqc_master_cmd *diseqcmd); void avc_remote_ctrl_work(struct work_struct *work); -int avc_register_remote_control(struct firesat *firesat); -int avc_ca_app_info(struct firesat *firesat, char *app_info, unsigned int *len); -int avc_ca_info(struct firesat *firesat, char *app_info, unsigned int *len); -int avc_ca_reset(struct firesat *firesat); -int avc_ca_pmt(struct firesat *firesat, char *app_info, int length); -int avc_ca_get_time_date(struct firesat *firesat, int *interval); -int avc_ca_enter_menu(struct firesat *firesat); -int avc_ca_get_mmi(struct firesat *firesat, char *mmi_object, unsigned int *len); +int avc_register_remote_control(struct firedtv *fdtv); +int avc_ca_app_info(struct firedtv *fdtv, char *app_info, unsigned int *len); +int avc_ca_info(struct firedtv *fdtv, char *app_info, unsigned int *len); +int avc_ca_reset(struct firedtv *fdtv); +int avc_ca_pmt(struct firedtv *fdtv, char *app_info, int length); +int avc_ca_get_time_date(struct firedtv *fdtv, int *interval); +int avc_ca_enter_menu(struct firedtv *fdtv); +int avc_ca_get_mmi(struct firedtv *fdtv, char *mmi_object, unsigned int *len); #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 @@ #include <ieee1394.h> #include <nodemgr.h> -#include "avc_api.h" +#include "avc.h" #include "cmp.h" -#include "firesat.h" +#include "firedtv.h" #define CMP_OUTPUT_PLUG_CONTROL_REG_0 0xfffff0000904ULL -static int cmp_read(struct firesat *firesat, void *buf, u64 addr, size_t len) +static int cmp_read(struct firedtv *fdtv, void *buf, u64 addr, size_t len) { int ret; - if (mutex_lock_interruptible(&firesat->avc_mutex)) + if (mutex_lock_interruptible(&fdtv->avc_mutex)) return -EINTR; - ret = hpsb_node_read(firesat->ud->ne, addr, buf, len); + ret = hpsb_node_read(fdtv->ud->ne, addr, buf, len); if (ret < 0) - dev_err(&firesat->ud->device, "CMP: read I/O error\n"); + dev_err(&fdtv->ud->device, "CMP: read I/O error\n"); - mutex_unlock(&firesat->avc_mutex); + mutex_unlock(&fdtv->avc_mutex); return ret; } -static int cmp_lock(struct firesat *firesat, void *data, u64 addr, __be32 arg, +static int cmp_lock(struct firedtv *fdtv, void *data, u64 addr, __be32 arg, int ext_tcode) { int ret; - if (mutex_lock_interruptible(&firesat->avc_mutex)) + if (mutex_lock_interruptible(&fdtv->avc_mutex)) return -EINTR; - ret = hpsb_node_lock(firesat->ud->ne, addr, ext_tcode, data, + ret = hpsb_node_lock(fdtv->ud->ne, addr, ext_tcode, data, (__force quadlet_t)arg); if (ret < 0) - dev_err(&firesat->ud->device, "CMP: lock I/O error\n"); + dev_err(&fdtv->ud->device, "CMP: lock I/O error\n"); - mutex_unlock(&firesat->avc_mutex); + mutex_unlock(&fdtv->avc_mutex); return ret; } @@ -78,20 +78,20 @@ static inline void set_opcr(__be32 *opcr, u32 value, u32 mask, u32 shift) #define set_opcr_data_rate(p, v) set_opcr((p), (v), 0x3, 14) #define set_opcr_overhead_id(p, v) set_opcr((p), (v), 0xf, 10) -int cmp_establish_pp_connection(struct firesat *firesat, int plug, int channel) +int cmp_establish_pp_connection(struct firedtv *fdtv, int plug, int channel) { __be32 old_opcr, opcr; u64 opcr_address = CMP_OUTPUT_PLUG_CONTROL_REG_0 + (plug << 2); int attempts = 0; int ret; - ret = cmp_read(firesat, &opcr, opcr_address, 4); + ret = cmp_read(fdtv, &opcr, opcr_address, 4); if (ret < 0) return ret; repeat: if (!get_opcr_online(opcr)) { - dev_err(&firesat->ud->device, "CMP: output offline\n"); + dev_err(&fdtv->ud->device, "CMP: output offline\n"); return -EBUSY; } @@ -99,11 +99,11 @@ repeat: if (get_opcr_p2p_connections(opcr)) { if (get_opcr_channel(opcr) != channel) { - dev_err(&firesat->ud->device, + dev_err(&fdtv->ud->device, "CMP: cannot change channel\n"); return -EBUSY; } - dev_info(&firesat->ud->device, + dev_info(&fdtv->ud->device, "CMP: overlaying existing connection\n"); /* We don't allocate isochronous resources. */ @@ -119,7 +119,7 @@ repeat: set_opcr_p2p_connections(&opcr, get_opcr_p2p_connections(opcr) + 1); - ret = cmp_lock(firesat, &opcr, opcr_address, old_opcr, 2); + ret = cmp_lock(fdtv, &opcr, opcr_addres |