summaryrefslogtreecommitdiff
path: root/linux/drivers/media
diff options
context:
space:
mode:
authorJohannes Stezenbach <devnull@localhost>2004-01-08 15:40:29 +0000
committerJohannes Stezenbach <devnull@localhost>2004-01-08 15:40:29 +0000
commita5a25009a36bcd196d7cf698a27fcd582258271d (patch)
treea4259300bd82346e63a719243b9e2c969cc7664a /linux/drivers/media
parentac2dbac8e069b0c2296830363fd475e63cc20cdc (diff)
downloadmediapointer-dvb-s2-a5a25009a36bcd196d7cf698a27fcd582258271d.tar.gz
mediapointer-dvb-s2-a5a25009a36bcd196d7cf698a27fcd582258271d.tar.bz2
rename some non-static functions to enhance readability
Diffstat (limited to 'linux/drivers/media')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c70
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_av.c105
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_av.h19
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_ca.c12
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c128
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.h39
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_v4l.c6
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-patch.c6
8 files changed, 195 insertions, 190 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 914234014..b023a6e73 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -87,10 +87,10 @@ static void recover_arm(struct av7110 *av7110)
{
DEB_EE(("av7110: %p\n",av7110));
- bootarm(av7110);
+ av7110_bootarm(av7110);
dvb_delay(100);
restart_feeds(av7110);
- outcom(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir_config);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110->ir_config);
}
static void arm_error(struct av7110 *av7110)
@@ -162,7 +162,7 @@ void av7110_setup_irc_config(struct av7110 *av7110, u32 ir_config)
last = av7110;
if (av7110) {
- outcom(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, ir_config);
av7110->ir_config = ir_config;
}
}
@@ -242,9 +242,9 @@ static inline int DvbDmxFilterCallback(u8 * buffer1, size_t buffer1_len,
&dvbdmxfilter->feed->feed.ts,
DMX_OK);
else
- pes_to_ts(buffer1, buffer1_len,
- dvbdmxfilter->feed->pid,
- &av7110->p2t_filter[dvbdmxfilter->index]);
+ av7110_p2t_write(buffer1, buffer1_len,
+ dvbdmxfilter->feed->pid,
+ &av7110->p2t_filter[dvbdmxfilter->index]);
default:
return 0;
}
@@ -300,9 +300,9 @@ static void debiirq (unsigned long data)
case DATA_PES_RECORD:
if (av7110->demux.recording)
- record_cb(&av7110->p2t[handle],
- (u8 *) av7110->debi_virt,
- av7110->debilen);
+ av7110_record_cb(&av7110->p2t[handle],
+ (u8 *) av7110->debi_virt,
+ av7110->debilen);
spin_lock(&av7110->debilock);
iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2);
ARM_ClearMailBox(av7110);
@@ -518,13 +518,13 @@ static void gpioirq (unsigned long data)
len = 0;
if (av7110->debitype & 0x100) {
spin_lock(&av7110->aout.lock);
- len=pes_play(av7110->debi_virt, &av7110->aout, 2048);
+ len=av7110_pes_play(av7110->debi_virt, &av7110->aout, 2048);
spin_unlock(&av7110->aout.lock);
}
if (len <=0 && (av7110->debitype & 0x200)
&&av7110->videostate.play_state != VIDEO_FREEZED) {
spin_lock(&av7110->avout.lock);
- len=pes_play(av7110->debi_virt, &av7110->avout, 2048);
+ len=av7110_pes_play(av7110->debi_virt, &av7110->avout, 2048);
spin_unlock(&av7110->avout.lock);
}
if (len <= 0) {
@@ -631,7 +631,7 @@ static int dvb_osd_ioctl(struct inode *inode, struct file *file,
DEB_EE(("av7110: %p\n", av7110));
if (cmd == OSD_SEND_CMD)
- return OSD_DrawCommand(av7110, (osd_cmd_t *) parg);
+ return av7110_osd_cmd(av7110, (osd_cmd_t *) parg);
return -EINVAL;
}
@@ -668,8 +668,8 @@ static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
av7110->pids[DMX_PES_PCR] = 0;
}
- return outcom(av7110, COMTYPE_PIDFILTER, MultiPID, 5,
- pcrpid, vpid, apid, ttpid, subpid);
+ return av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, MultiPID, 5,
+ pcrpid, vpid, apid, ttpid, subpid);
}
void ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid,
@@ -728,7 +728,7 @@ static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter)
}
} else if ((dvbdmxfeed->ts_type & TS_PACKET) &&
!(dvbdmxfeed->ts_type & TS_PAYLOAD_ONLY)) {
- init_p2t(&av7110->p2t_filter[dvbdmxfilter->index], dvbdmxfeed);
+ av7110_p2t_init(&av7110->p2t_filter[dvbdmxfilter->index], dvbdmxfeed);
}
buf[0] = (COMTYPE_PID_FILTER << 8) + AddPIDFilter;
@@ -736,7 +736,7 @@ static int StartHWFilter(struct dvb_demux_filter *dvbdmxfilter)
buf[2] = dvbdmxfeed->pid;
buf[3] = mode;
- ret = CommandRequest(av7110, buf, 20, &handle, 1);
+ ret = av7110_fw_request(av7110, buf, 20, &handle, 1);
if (ret < 0) {
printk("StartHWFilter error\n");
return ret;
@@ -771,7 +771,7 @@ static int StopHWFilter(struct dvb_demux_filter *dvbdmxfilter)
buf[0] = (COMTYPE_PID_FILTER << 8) + DelPIDFilter;
buf[1] = 1;
buf[2] = handle;
- ret = CommandRequest(av7110, buf, 3, answ, 2);
+ ret = av7110_fw_request(av7110, buf, 3, answ, 2);
if (ret)
printk("StopHWFilter error\n");
@@ -806,13 +806,13 @@ static void dvb_feed_start_pid(struct dvb_demux_feed *dvbdmxfeed)
if (dvbdmxfeed->pes_type < 2 && npids[0])
if (av7110->fe_synced)
- outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);
if ((dvbdmxfeed->ts_type & TS_PACKET)) {
if (dvbdmxfeed->pes_type == 0 && !(dvbdmx->pids[0] & 0x8000))
- AV_StartRecord(av7110, RP_AUDIO, dvbdmxfeed);
+ av7110_av_start_record(av7110, RP_AUDIO, dvbdmxfeed);
if (dvbdmxfeed->pes_type == 1 && !(dvbdmx->pids[1] & 0x8000))
- AV_StartRecord(av7110, RP_VIDEO, dvbdmxfeed);
+ av7110_av_start_record(av7110, RP_VIDEO, dvbdmxfeed);
}
}
@@ -826,7 +826,7 @@ static void dvb_feed_stop_pid(struct dvb_demux_feed *dvbdmxfeed)
DEB_EE(("av7110: %p\n", av7110));
if (dvbdmxfeed->pes_type <= 1) {
- AV_Stop(av7110, dvbdmxfeed->pes_type ? RP_VIDEO : RP_AUDIO);
+ av7110_av_stop(av7110, dvbdmxfeed->pes_type ? RP_VIDEO : RP_AUDIO);
if (!av7110->rec_mode)
dvbdmx->recording = 0;
if (!av7110->playing)
@@ -875,7 +875,7 @@ static int av7110_start_feed(struct dvb_demux_feed *feed)
!(demux->pids[1] & 0x8000)) {
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
- AV_StartPlay(av7110,RP_AV);
+ av7110_av_start_play(av7110,RP_AV);
demux->playing = 1;
}
break;
@@ -969,7 +969,7 @@ static void restart_feeds(struct av7110 *av7110)
}
if (mode)
- AV_StartPlay(av7110, mode);
+ av7110_av_start_play(av7110, mode);
}
static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
@@ -994,9 +994,9 @@ static int dvb_get_stc(struct dmx_demux *demux, unsigned int num,
if (num != 0)
return -EINVAL;
- ret = CommandRequest(av7110, &tag, 0, fwstc, 4);
+ ret = av7110_fw_request(av7110, &tag, 0, fwstc, 4);
if (ret) {
- printk(KERN_ERR "%s: CommandRequest error\n", __FUNCTION__);
+ printk(KERN_ERR "%s: av7110_fw_request error\n", __FUNCTION__);
return -EIO;
}
DEB_EE(("av7110: fwstc = %04hx %04hx %04hx %04hx\n",
@@ -1039,12 +1039,12 @@ static int av7110_diseqc_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *
case FE_DISEQC_SEND_MASTER_CMD:
{
struct dvb_diseqc_master_cmd *cmd = arg;
- SendDiSEqCMsg(av7110, cmd->msg_len, cmd->msg, -1);
+ av7110_diseqc_send(av7110, cmd->msg_len, cmd->msg, -1);
break;
}
case FE_DISEQC_SEND_BURST:
- SendDiSEqCMsg(av7110, 0, NULL, (unsigned long) arg);
+ av7110_diseqc_send(av7110, 0, NULL, (unsigned long) arg);
break;
default:
@@ -1074,10 +1074,10 @@ static void av7110_before_after_tune(fe_status_t s, void *data)
av7110->pids[DMX_PES_AUDIO],
av7110->pids[DMX_PES_TELETEXT], 0,
av7110->pids[DMX_PES_PCR]);
- outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);
} else {
SetPIDs(av7110, 0, 0, 0, 0, 0);
- outcom(av7110, COMTYPE_PIDFILTER, FlushTSQueue, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, FlushTSQueue, 0);
}
up(&av7110->pid_mutex);
@@ -1424,8 +1424,8 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
av7110_ca_init(av7110);
/* load firmware into AV7110 cards */
- bootarm(av7110);
- firmversion(av7110);
+ av7110_bootarm(av7110);
+ av7110_firmversion(av7110);
if (FW_VERSION(av7110->arm_app)<0x2501)
printk ("av7110: Warning, firmware version 0x%04x is too old. "
@@ -1435,7 +1435,7 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
/* set internal volume control to maximum */
av7110->adac_type = DVB_ADAC_TI;
- SetVolume(av7110, 0xff, 0xff);
+ av7110_set_volume(av7110, 0xff, 0xff);
VidMode(av7110, vidmode);
@@ -1471,14 +1471,14 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP) {
// switch DVB SCART on
- outcom(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
- outcom(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1);
+ av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
+ av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1);
if (rgb_on)
saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // RGB on, SCART pin 16
//saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // SCARTpin 8
}
- SetVolume(av7110, 0xff, 0xff);
+ av7110_set_volume(av7110, 0xff, 0xff);
av7110_setup_irc_config(av7110, 0);
av7110_register(av7110);
diff --git a/linux/drivers/media/dvb/ttpci/av7110_av.c b/linux/drivers/media/dvb/ttpci/av7110_av.c
index 51a40c25d..8d555df36 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_av.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_av.c
@@ -98,7 +98,7 @@ static void p_to_t(u8 const *buf, long int length, u16 pid,
u8 *counter, struct dvb_demux_feed *feed);
-int record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)
+int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)
{
struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *) p2t->priv;
@@ -126,8 +126,8 @@ static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data)
return 0;
}
-int AV_StartRecord(struct av7110 *av7110, int av,
- struct dvb_demux_feed *dvbdmxfeed)
+int av7110_av_start_record(struct av7110 *av7110, int av,
+ struct dvb_demux_feed *dvbdmxfeed)
{
struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
@@ -135,7 +135,7 @@ int AV_StartRecord(struct av7110 *av7110, int av,
if (av7110->playing || (av7110->rec_mode & av))
return -EBUSY;
- outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);
dvbdmx->recording = 1;
av7110->rec_mode |= av;
@@ -145,7 +145,7 @@ int AV_StartRecord(struct av7110 *av7110, int av,
dvbdmx->pesfilter[0]->pid,
dvb_filter_pes2ts_cb,
(void *) dvbdmx->pesfilter[0]);
- outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
break;
case RP_VIDEO:
@@ -153,7 +153,7 @@ int AV_StartRecord(struct av7110 *av7110, int av,
dvbdmx->pesfilter[1]->pid,
dvb_filter_pes2ts_cb,
(void *) dvbdmx->pesfilter[1]);
- outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
break;
case RP_AV:
@@ -165,13 +165,13 @@ int AV_StartRecord(struct av7110 *av7110, int av,
dvbdmx->pesfilter[1]->pid,
dvb_filter_pes2ts_cb,
(void *) dvbdmx->pesfilter[1]);
- outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0);
break;
}
return 0;
}
-int AV_StartPlay(struct av7110 *av7110, int av)
+int av7110_av_start_play(struct av7110 *av7110, int av)
{
DEB_EE(("av7110: %p\n", av7110));
@@ -180,7 +180,7 @@ int AV_StartPlay(struct av7110 *av7110, int av)
if (av7110->playing & av)
return -EBUSY;
- outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);
if (av7110->playing == RP_NONE) {
av7110_ipack_reset(&av7110->ipack[0]);
@@ -190,49 +190,49 @@ int AV_StartPlay(struct av7110 *av7110, int av)
av7110->playing |= av;
switch (av7110->playing) {
case RP_AUDIO:
- outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
break;
case RP_VIDEO:
- outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
av7110->sinfo = 0;
break;
case RP_AV:
av7110->sinfo = 0;
- outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0);
break;
}
return av7110->playing;
}
-void AV_Stop(struct av7110 *av7110, int av)
+void av7110_av_stop(struct av7110 *av7110, int av)
{
DEB_EE(("av7110: %p\n", av7110));
if (!(av7110->playing & av) && !(av7110->rec_mode & av))
return;
- outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);
if (av7110->playing) {
av7110->playing &= ~av;
switch (av7110->playing) {
case RP_AUDIO:
- outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0);
break;
case RP_VIDEO:
- outcom(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0);
break;
case RP_NONE:
- SetMode(av7110, av7110->vidmode);
+ av7110_set_vidmode(av7110, av7110->vidmode);
break;
}
} else {
av7110->rec_mode &= ~av;
switch (av7110->rec_mode) {
case RP_AUDIO:
- outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0);
break;
case RP_VIDEO:
- outcom(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0);
break;
case RP_NONE:
break;
@@ -241,7 +241,7 @@ void AV_Stop(struct av7110 *av7110, int av)
}
-int pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
+int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
{
int len;
u32 sync;
@@ -286,7 +286,7 @@ int pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen)
}
-int SetVolume(struct av7110 *av7110, int volleft, int volright)
+int av7110_set_volume(struct av7110 *av7110, int volleft, int volright)
{
int err, vol, val, balance = 0;
@@ -324,18 +324,18 @@ int SetVolume(struct av7110 *av7110, int volleft, int volright)
return 0;
}
-void SetMode(struct av7110 *av7110, int mode)
+void av7110_set_vidmode(struct av7110 *av7110, int mode)
{
DEB_EE(("av7110: %p\n", av7110));
- outcom(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode);
+ av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode);
if (!av7110->playing) {
ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO],
av7110->pids[DMX_PES_AUDIO],
av7110->pids[DMX_PES_TELETEXT],
0, av7110->pids[DMX_PES_PCR]);
- outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0);
}
}
@@ -366,7 +366,7 @@ static void get_video_format(struct av7110 *av7110, u8 *buf, int count)
hsize = ((p[1] &0xF0) >> 4) | (p[0] << 4);
vsize = ((p[1] &0x0F) << 8) | (p[2]);
sw = (p[3] & 0x0F);
- SetMode(av7110, sw2mode[sw]);
+ av7110_set_vidmode(av7110, sw2mode[sw]);
DEB_S(("dvb: playback %dx%d fr=%d\n", hsize, vsize, sw));
av7110->sinfo = 1;
break;
@@ -494,7 +494,7 @@ static ssize_t dvb_aplay(struct av7110 *av7110, const u8 *buf,
return count - todo;
}
-void init_p2t(struct av7110_p2t *p, struct dvb_demux_feed *feed)
+void av7110_p2t_init(struct av7110_p2t *p, struct dvb_demux_feed *feed)
{
memset(p->pes, 0, TS_SIZE);
p->counter = 0;
@@ -561,7 +561,7 @@ static int find_pes_header(u8 const *buf, long int length, int *frags)
return c;
}
-void pes_to_ts(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p)
+void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p)
{
int c, c2, l, add;
int check, rest;
@@ -933,7 +933,7 @@ static int play_iframe(struct av7110 *av7110, u8 *buf, unsigned int len, int non
DEB_EE(("av7110: %p\n", av7110));
if (!(av7110->playing & RP_VIDEO)) {
- if (AV_StartPlay(av7110, RP_VIDEO) < 0)
+ if (av7110_av_start_play(av7110, RP_VIDEO) < 0)
return -EBUSY;
}
@@ -973,7 +973,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
case VIDEO_STOP:
av7110->videostate.play_state = VIDEO_STOPPED;
if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY)
- AV_Stop(av7110, RP_VIDEO);
+ av7110_av_stop(av7110, RP_VIDEO);
else
vidcom(av7110, 0x000e,
av7110->videostate.video_blank ? 0 : 1);
@@ -989,13 +989,13 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) {
if (av7110->playing == RP_AV) {
- outcom(av7110, COMTYPE_REC_PLAY, __Stop, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0);
av7110->playing &= ~RP_VIDEO;
}
- AV_StartPlay(av7110, RP_VIDEO);
+ av7110_av_start_play(av7110, RP_VIDEO);
vidcom(av7110, 0x000d, 0);
} else {
- //AV_Stop(av7110, RP_VIDEO);
+ //av7110_av_stop(av7110, RP_VIDEO);
vidcom(av7110, 0x000d, 0);
}
av7110->videostate.play_state = VIDEO_PLAYING;
@@ -1004,7 +1004,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
case VIDEO_FREEZE:
av7110->videostate.play_state = VIDEO_FREEZED;
if (av7110->playing & RP_VIDEO)
- outcom(av7110, COMTYPE_REC_PLAY, __Pause, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Pause, 0);
else
vidcom(av7110, 0x0102, 1);
av7110->trickmode = TRICK_FREEZE;
@@ -1012,7 +1012,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
case VIDEO_CONTINUE:
if (av7110->playing & RP_VIDEO)
- outcom(av7110, COMTYPE_REC_PLAY, __Continue, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Continue, 0);
vidcom(av7110, 0x000d, 0);
av7110->videostate.play_state = VIDEO_PLAYING;
av7110->trickmode = TRICK_NONE;
@@ -1062,8 +1062,8 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
if (ret < 0)
break;
av7110->videostate.video_format = format;
- ret = outcom(av7110, COMTYPE_ENCODER, SetPanScanType,
- 1, (u16) val);
+ ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType,
+ 1, (u16) val);
break;
}
@@ -1073,8 +1073,8 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
break;
}
av7110->display_ar = arg;
- ret = outcom(av7110, COMTYPE_ENCODER, SetMonitorType,
- 1, (u16) arg);
+ ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType,
+ 1, (u16) arg);
break;
case VIDEO_STILLPICTURE:
@@ -1091,8 +1091,8 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
case VIDEO_FAST_FORWARD:
//note: arg is ignored by firmware
if (av7110->playing & RP_VIDEO)
- outcom(av7110, COMTYPE_REC_PLAY,
- __Scan_I, 2, AV_PES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,
+ __Scan_I, 2, AV_PES, 0);
else
vidcom(av7110, 0x16, arg);
av7110->trickmode = TRICK_FAST;
@@ -1101,7 +1101,7 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
case VIDEO_SLOWMOTION:
if (av7110->playing&RP_VIDEO) {
- outcom(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);
vidcom(av7110, 0x22, arg);
} else {
vidcom(av7110, 0x0d, 0);
@@ -1122,13 +1122,14 @@ static int dvb_video_ioctl(struct inode *inode, struct file *file,
av7110_ipack_reset(&av7110->ipack[1]);
if (av7110->playing == RP_AV) {
- outcom(av7110, COMTYPE_REC_PLAY,
- __Play, 2, AV_PES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,
+ __Play, 2, AV_PES, 0);
if (av7110->trickmode == TRICK_FAST)
- outcom(av7110, COMTYPE_REC_PLAY,
- __Scan_I, 2, AV_PES, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,
+ __Scan_I, 2, AV_PES, 0);
if (av7110->trickmode == TRICK_SLOW) {
- outcom(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0);
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,
+ __Slow, 2, 0, 0);
vidcom(av7110, 0x22, arg);
}
if (av7110->trickmode == TRICK_FREEZE)
@@ -1164,7 +1165,7 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file,
switch (cmd) {
case AUDIO_STOP:
if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)
- AV_Stop(av7110, RP_AUDIO);
+ av7110_av_stop(av7110, RP_AUDIO);
else
audcom(av7110, 1);
av7110->audiostate.play_state = AUDIO_STOPPED;
@@ -1172,7 +1173,7 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file,
case AUDIO_PLAY:
if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY)
- AV_StartPlay(av7110, RP_AUDIO);
+ av7110_av_start_play(av7110, RP_AUDIO);
audcom(av7110, 2);
av7110->audiostate.play_state = AUDIO_PLAYING;
break;
@@ -1243,7 +1244,7 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file,
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout);
av7110_ipack_reset(&av7110->ipack[0]);
if (av7110->playing == RP_AV)
- outcom(av7110, COMTYPE_REC_PLAY,
+ av7110_fw_cmd(av7110, COMTYPE_REC_PLAY,
__Play, 2, AV_PES, 0);
break;
case AUDIO_SET_ID:
@@ -1253,7 +1254,7 @@ static int dvb_audio_ioctl(struct inode *inode, struct file *file,
{
struct audio_mixer *amix = (struct audio_mixer *)parg;
- SetVolume(av7110, amix->volume_left, amix->volume_right);
+ av7110_set_volume(av7110, amix->volume_left, amix->volume_right);
break;
}
case AUDIO_SET_STREAMTYPE:
@@ -1298,7 +1299,7 @@ static int dvb_video_release(struct inode *inode, struct file *file)
DEB_EE(("av7110: %p\n", av7110));
if ((file->f_flags & O_ACCMODE) != O_RDONLY) {
- AV_Stop(av7110, RP_VIDEO);
+ av7110_av_stop(av7110, RP_VIDEO);
}
return dvb_generic_release(inode, file);
@@ -1326,7 +1327,7 @@ static int dvb_audio_release(struct inode *inode, struct file *file)
DEB_EE(("av7110: %p\n", av7110));
- AV_Stop(av7110, RP_AUDIO);
+ av7110_av_stop(av7110, RP_AUDIO);
return dvb_generic_release(inode, file);
}
diff --git a/linux/drivers/media/dvb/ttpci/av7110_av.h b/linux/drivers/media/dvb/ttpci/av7110_av.h
index c6e376fcf..9bfdf3745 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_av.h
+++ b/linux/drivers/media/dvb/ttpci/av7110_av.h
@@ -3,21 +3,22 @@
struct av7110;
-extern void SetMode(struct av7110 *av7110, int mode);
+extern void av7110_set_vidmode(struct av7110 *av7110, int mode);
-extern int record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len);
-extern int pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen);
+extern int av7110_record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len);
+extern int av7110_pes_play(void *dest, struct dvb_ringbuffer *buf, int dlen);
extern int av7110_write_to_decoder(struct dvb_demux_feed *feed, const u8 *buf, size_t len);
-extern int SetVolume(struct av7110 *av7110, int volleft, int volright);
-extern void AV_Stop(struct av7110 *av7110, int av);
-extern int AV_StartRecord(struct av7110 *av7110, int av,
+extern int av7110_set_volume(struct av7110 *av7110, int volleft, int volright);
+extern void av7110_av_stop(struct av7110 *av7110, int av);
+extern int av7110_av_start_record(struct av7110 *av7110, int av,
struct dvb_demux_feed *dvbdmxfeed);
-extern int AV_StartPlay(struct av7110 *av7110, int av);
+extern int av7110_av_start_play(struct av7110 *av7110, int av);
+
extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event);
-extern void init_p2t(struct av7110_p2t *p, struct dvb_demux_feed *feed);
-extern void pes_to_ts(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p);
+extern void av7110_p2t_init(struct av7110_p2t *p, struct dvb_demux_feed *feed);
+extern void av7110_p2t_write(u8 const *buf, long int length, u16 pid, struct av7110_p2t *p);
extern int av7110_av_register(struct av7110 *av7110);
extern void av7110_av_unregister(struct av7110 *av7110);
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ca.c b/linux/drivers/media/dvb/ttpci/av7110_ca.c
index 7b7c7a738..f5d328541 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_ca.c
@@ -286,12 +286,12 @@ static int dvb_ca_ioctl(struct inode *inode, struct file *file,
return -EINVAL;
if (descr->parity > 1)
return -EINVAL;
- outcom(av7110, COMTYPE_PIDFILTER, SetDescr, 5,
- (descr->index<<8)|descr->parity,
- (descr->cw[0]<<8)|descr->cw[1],
- (descr->cw[2]<<8)|descr->cw[3],
- (descr->cw[4]<<8)|descr->cw[5],
- (descr->cw[6]<<8)|descr->cw[7]);
+ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetDescr, 5,
+ (descr->index<<8)|descr->parity,
+ (descr->cw[0]<<8)|descr->cw[1],
+ (descr->cw[2]<<8)|descr->cw[3],
+ (descr->cw[4]<<8)|descr->cw[5],
+ (descr->cw[6]<<8)|descr->cw[7]);
break;
}
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index 028607312..9fc7652d4 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -97,7 +97,7 @@ u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, int count)
/* av7110 ARM core boot stuff */
-void reset_arm(struct av7110 *av7110)
+void av7110_reset_arm(struct av7110 *av7110)
{
saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO);
@@ -209,7 +209,7 @@ static u8 bootcode[] = {
0x2c, 0x00, 0x03, 0xf8, 0x2c, 0x00, 0x04, 0x00,
};
-int bootarm(struct av7110 *av7110)
+int av7110_bootarm(struct av7110 *av7110)
{
struct saa7146_dev *dev = av7110->dev;
u32 ret;
@@ -231,17 +231,17 @@ int bootarm(struct av7110 *av7110)
/* test DEBI */
iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4);
if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) {
- printk(KERN_ERR "dvb: debi test in bootarm() failed: "
+ printk(KERN_ERR "dvb: debi test in av7110_bootarm() failed: "
"%08x != %08x (check your BIOS notplug settings)\n",
ret, 0x10325476);
return -1;
}
for (i = 0; i < 8192; i += 4)
iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4);
- DEB_D(("bootarm: debi test OK\n"));
+ DEB_D(("av7110_bootarm: debi test OK\n"));
/* boot */
- DEB_D(("bootarm: load boot code\n"));
+ DEB_D(("av7110_bootarm: load boot code\n"));
saa7146_setgpio(dev, ARM_IRQ_LINE, SAA7146_GPIO_IRQLO);
//saa7146_setgpio(dev, DEBI_DONE_LINE, SAA7146_GPIO_INPUT);
//saa7146_setgpio(dev, 3, SAA7146_GPIO_INPUT);
@@ -255,14 +255,14 @@ int bootarm(struct av7110 *av7110)
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ);
- DEB_D(("bootarm: load dram code\n"));
+ DEB_D(("av7110_bootarm: load dram code\n"));
if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0)
return -1;
saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);
mdelay(1);
- DEB_D(("bootarm: load dpram code\n"));
+ DEB_D(("av7110_bootarm: load dpram code\n"));
mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram);
saa7146_wait_for_debi_done(av7110->dev);
@@ -285,7 +285,7 @@ int bootarm(struct av7110 *av7110)
* DEBI command polling
****************************************************************************/
-int OutCommand(struct av7110 *av7110, u16* buf, int length)
+int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
{
int i;
unsigned long start;
@@ -363,7 +363,7 @@ int OutCommand(struct av7110 *av7110, u16* buf, int length)
return 0;
}
-int SOutCommand(struct av7110 *av7110, u16* buf, int length)
+int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length)
{
int ret;
@@ -376,14 +376,14 @@ int SOutCommand(struct av7110 *av7110, u16* buf, int length)
if (down_interruptible(&av7110->dcomlock))
return -ERESTARTSYS;
- ret = OutCommand(av7110, buf, length);
+ ret = __av7110_send_fw_cmd(av7110, buf, length);
up(&av7110->dcomlock);
if (ret)
- printk("SOutCommand error\n");
+ printk("av7110_send_fw_cmd error\n");
return ret;
}
-int outcom(struct av7110 *av7110, int type, int com, int num, ...)
+int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...)
{
va_list args;
u16 buf[num + 2];
@@ -401,35 +401,36 @@ int outcom(struct av7110 *av7110, int type, int com, int num, ...)
va_end(args);
}
- ret = SOutCommand(av7110, buf, num + 2);
+ ret = av7110_send_fw_cmd(av7110, buf, num + 2);
if (ret)
- printk("outcom error\n");
+ printk("av7110_fw_cmd error\n");
return ret;
}
-int SendCICommand(struct av7110 *av7110, u8 subcom, u8 *Params, u8 ParamLen)
+int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len)
{
int i, ret;
- u16 CommandBuffer[18] = { ((COMTYPE_COMMON_IF << 8) + subcom),
- 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ u16 cmd[18] = { ((COMTYPE_COMMON_IF << 8) + subcom),
+ 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
DEB_EE(("av7110: %p\n", av7110));
- for(i = 0; i < ParamLen && i < 32; i++)
+ for(i = 0; i < len && i < 32; i++)
{
if(i % 2 == 0)
- CommandBuffer[(i / 2) + 2] = (u16)(Params[i]) << 8;
+ cmd[(i / 2) + 2] = (u16)(buf[i]) << 8;
else
- CommandBuffer[(i / 2) + 2] |= Params[i];
+ cmd[(i / 2) + 2] |= buf[i];
}
- ret = SOutCommand(av7110, CommandBuffer, 18);
+ ret = av7110_send_fw_cmd(av7110, cmd, 18);
if (ret)
- printk("SendCICommand error\n");
+ printk("av7110_send_ci_cmd error\n");
return ret;
}
-int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf, int n)
+int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
+ int request_buf_len, u16 *reply_buf, int reply_buf_len)
{
int err;
s16 i;
@@ -448,9 +449,9 @@ int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf, int n
if (down_interruptible(&av7110->dcomlock))
return -ERESTARTSYS;
- if ((err = OutCommand(av7110, Buff, length)) < 0) {
+ if ((err = __av7110_send_fw_cmd(av7110, request_buf, request_buf_len)) < 0) {
up(&av7110->dcomlock);
- printk("CommandRequest error\n");
+ printk("av7110_fw_request error\n");
return err;
}
@@ -492,19 +493,19 @@ int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf, int n
}
#endif
- for (i = 0; i < n; i++)
- buf[i] = rdebi(av7110, DEBINOSWAP, COM_BUFF + 2 * i, 0, 2);
+ for (i = 0; i < reply_buf_len; i++)
+ reply_buf[i] = rdebi(av7110, DEBINOSWAP, COM_BUFF + 2 * i, 0, 2);
up(&av7110->dcomlock);
return 0;
}
-int RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length)
+int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length)
{
int ret;
- ret = CommandRequest(av7110, &tag, 0, Buff, length);
+ ret = av7110_fw_request(av7110, &tag, 0, buf, length);
if (ret)
- printk("RequestParameter error\n");
+ printk("av7110_fw_query error\n");
return ret;
}
@@ -514,14 +515,14 @@ int RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length)
****************************************************************************/
/* get version of the firmware ROM, RTSL, video ucode and ARM application */
-void firmversion(struct av7110 *av7110)
+void av7110_firmversion(struct av7110 *av7110)
{
u16 buf[20];
u16 tag = ((COMTYPE_REQUEST << 8) + ReqVersion);
DEB_EE(("av7110: %p\n", av7110));
- RequestParameter(av7110, tag, buf, 16);
+ av7110_fw_query(av7110, tag, buf, 16);
av7110->arm_fw = (buf[0] << 16) + buf[1];
av7110->arm_rtsl = (buf[2] << 16) + buf[3];
@@ -545,7 +546,7 @@ void firmversion(struct av7110 *av7110)
}
-int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst)
+int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst)
{
int i;
u16 buf[18] = { ((COMTYPE_AUDIODAC << 8) + SendDiSEqC),
@@ -567,8 +568,8 @@ int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst)
for (i = 0; i < len; i++)
buf[i + 4] = msg[i];
- if (SOutCommand(av7110, buf, 18))
- printk("SendDiSEqCMsg error\n");
+ if (av7110_send_fw_cmd(av7110, buf, 18))
+ printk("av7110_diseqc_send error\n");
return 0;
}
@@ -578,43 +579,43 @@ int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst)
static inline int ResetBlend(struct av7110 *av7110, u8 windownr)
{
- return outcom(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, SetNonBlend, 1, windownr);
}
static inline int SetColorBlend(struct av7110 *av7110, u8 windownr)
{
- return outcom(av7110, COMTYPE_OSD, SetCBlend, 1, windownr);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, SetCBlend, 1, windownr);
}
static inline int SetWindowBlend(struct av7110 *av7110, u8 windownr, u8 blending)
{
- return outcom(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, SetWBlend, 2, windownr, blending);
}
static inline int SetBlend_(struct av7110 *av7110, u8 windownr,
enum av7110_osd_palette_type colordepth, u16 index, u8 blending)
{
- return outcom(av7110, COMTYPE_OSD, SetBlend, 4,
- windownr, colordepth, index, blending);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, SetBlend, 4,
+ windownr, colordepth, index, blending);
}
static inline int SetColor_(struct av7110 *av7110, u8 windownr,
enum av7110_osd_palette_type colordepth, u16 index, u16 colorhi, u16 colorlo)
{
- return outcom(av7110, COMTYPE_OSD, SetColor, 5,
- windownr, colordepth, index, colorhi, colorlo);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, SetColor, 5,
+ windownr, colordepth, index, colorhi, colorlo);
}
static inline int BringToTop(struct av7110 *av7110, u8 windownr)
{
- return outcom(av7110, COMTYPE_OSD, WTop, 1, windownr);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WTop, 1, windownr);
}
static inline int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize,
u16 colorfg, u16 colorbg)
{
- return outcom(av7110, COMTYPE_OSD, Set_Font, 4,
- windownr, fontsize, colorfg, colorbg);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Font, 4,
+ windownr, fontsize, colorfg, colorbg);
}
static int FlushText(struct av7110 *av7110)
@@ -674,7 +675,7 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
swab16(*(u16 *)(buf + 2 * i)), 2);
if (length & 1)
wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, 0, 2);
- ret = OutCommand(av7110, cbuf, 5);
+ ret = __av7110_send_fw_cmd(av7110, cbuf, 5);
up(&av7110->dcomlock);
if (ret)
printk("WriteText error\n");
@@ -684,43 +685,43 @@ static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, u8* buf)
static inline int DrawLine(struct av7110 *av7110, u8 windownr,
u16 x, u16 y, u16 dx, u16 dy, u16 color)
{
- return outcom(av7110, COMTYPE_OSD, DLine, 6,
- windownr, x, y, dx, dy, color);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, DLine, 6,
+ windownr, x, y, dx, dy, color);
}
static inline int DrawBlock(struct av7110 *av7110, u8 windownr,
u16 x, u16 y, u16 dx, u16 dy, u16 color)
{
- return outcom(av7110, COMTYPE_OSD, DBox, 6,
- windownr, x, y, dx, dy, color);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, DBox, 6,
+ windownr, x, y, dx, dy, color);
}
static inline int HideWindow(struct av7110 *av7110, u8 windownr)
{
- return outcom(av7110, COMTYPE_OSD, WHide, 1, windownr);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WHide, 1, windownr);
}
static inline int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y)
{
- return outcom(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y);
}
static inline int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y)
{
- return outcom(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y);
}
static inline int DestroyOSDWindow(struct av7110 *av7110, u8 windownr)
{
- return outcom(av7110, COMTYPE_OSD, WDestroy, 1, windownr);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WDestroy, 1, windownr);
}
static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr,
enum av7110_window_display_type disptype,
u16 width, u16 height)
{
- return outcom(av7110, COMTYPE_OSD, WCreate, 4,
- windownr, disptype, width, height);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, WCreate, 4,
+ windownr, disptype, width, height);
}
@@ -792,7 +793,7 @@ static inline int LoadBitmap(struct av7110 *av7110, u16 format,
}
}
av7110->bmplen += 1024;
- return outcom(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy);
}
static int BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans)
@@ -816,7 +817,7 @@ static int BlitBitmap(struct av7110 *av7110, u16 win, u16 x, u16 y, u16 trans)
remove_wait_queue(&av7110->bmpq, &wait);
}
if (av7110->bmp_state == BMP_LOADED)
- return outcom(av7110, COMTYPE_OSD, BlitBmp, 4, win, x, y, trans);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, BlitBmp, 4, win, x, y, trans);
return -1;
}
@@ -827,7 +828,7 @@ static inline int ReleaseBitmap(struct av7110 *av7110)
if (av7110->bmp_state != BMP_LOADED)
return -1;
av7110->bmp_state = BMP_NONE;
- return outcom(av7110, COMTYPE_OSD, ReleaseBmp, 0);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, ReleaseBmp, 0);
}
static u32 RGB2YUV(u16 R, u16 G, u16 B)
@@ -875,9 +876,10 @@ static int OSDSetPalette(struct av7110 *av7110, u32 *colors, u8 first, u8 last)
yuv = ((yuv & 0xFFFF0000) >> 16) | ((yuv & 0x0000FFFF) << 16);
wdebi(av7110, DEBINOSWAP, DATA_BUFF3_BASE + i * 4, yuv, 4);
}
- return outcom(av7110, COMTYPE_OSD, Set_Palette, 4,
- av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]],
- first, last);
+ return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Palette, 4,
+ av7110->osdwin,
+ bpp2pal[av7110->osdbpp[av7110->osdwin]],
+ first, last);
}
static int OSDSetBlock(struct av7110 *av7110, int x0, int y0,
@@ -914,7 +916,7 @@ static int OSDSetBlock(struct av7110 *av7110, int x0, int y0,
return 0;
}
-int OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc)
+int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc)
{
switch (dc->cmd) {
case OSD_Close:
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.h b/linux/drivers/media/dvb/ttpci/av7110_hw.h
index 06664581f..c0f539b93 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.h
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.h
@@ -360,18 +360,19 @@ enum av7110_command_type {
-extern void reset_arm(struct av7110 *av7110);
-extern int bootarm(struct av7110 *av7110);
-extern void firmversion(struct av7110 *av7110);
+extern void av7110_reset_arm(struct av7110 *av7110);
+extern int av7110_bootarm(struct av7110 *av7110);
+extern void av7110_firmversion(struct av7110 *av7110);
#define FW_CI_LL_SUPPORT(arm_app) ((arm_app) & 0x80000000)
#define FW_VERSION(arm_app) ((arm_app) & 0x0000FFFF)
-extern int outcom(struct av7110 *av7110, int type, int com, int num, ...);
-extern int OutCommand(struct av7110 *av7110, u16* buf, int length);
-extern int SOutCommand(struct av7110 *av7110, u16* buf, int length);
-extern int SendCICommand(struct av7110 *av7110, u8 subcom, u8 *Params, u8 ParamLen);
-extern int CommandRequest(struct av7110 *av7110, u16 *Buff, int length, u16 *buf, int n);
-extern int RequestParameter(struct av7110 *av7110, u16 tag, u16* Buff, s16 length);
+extern int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...);
+extern int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length);
+extern int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length);
+extern int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len);
+extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf,
+ int request_buf_len, u16 *reply_buf, int reply_buf_len);
+extern int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* Buff, s16 length);
/* DEBI (saa7146 data extension bus interface) access */
@@ -453,38 +454,38 @@ static inline void ARM_ClearIrq(struct av7110 *av7110)
static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data)
{
- return outcom(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data);
+ return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data);
}
static inline void VidMode(struct av7110 *av7110, int mode)
{
- outcom(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode);
+ av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode);
}
static int inline vidcom(struct av7110 *av7110, u32 com, u32 arg)
{
- return outcom(av7110, 0x80, 0x02, 4,
- (com>>16), (com&0xffff),
- (arg>>16), (arg&0xffff));
+ return av7110_fw_cmd(av7110, 0x80, 0x02, 4,
+ (com>>16), (com&0xffff),
+ (arg>>16), (arg&0xffff));
}
static int inline audcom(struct av7110 *av7110, u32 com)
{
- return outcom(av7110, 0x80, 0x03, 4,
- (com>>16), (com&0xffff));
+ return av7110_fw_cmd(av7110, 0x80, 0x03, 4,
+ (com>>16), (com&0xffff));
}
static inline void Set22K(struct av7110 *av7110, int state)
{
- outcom(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0);
+ av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0);
}
-extern int SendDiSEqCMsg(struct av7110 *av7110, int len, u8 *msg, unsigned long burst);
+extern int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst);
#ifdef CONFIG_DVB_AV7110_OSD
-extern int OSD_DrawCommand(struct av7110 *av7110, osd_cmd_t *dc);
+extern int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc);
#endif /* CONFIG_DVB_AV7110_OSD */
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
index 9a02ef808..faf31b607 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -218,7 +218,7 @@ int av7110_dvb_c_switch(struct saa7146_fh *fh)
}
/* hmm, this does not do anything!? */
- if (outcom(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch))
+ if (av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch))
printk("ADSwitch error\n");
if (ves1820_writereg(dev, 0x0f, band))
@@ -669,11 +669,11 @@ static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std)
if (std->id == V4L2_STD_PAL) {
av7110->vidmode = VIDEO_MODE_PAL;
- SetMode(av7110, av7110->vidmode);
+ av7110_set_vidmode(av7110, av7110->vidmode);
}
else if (std->id == V4L2_STD_NTSC) {
av7110->vidmode = VIDEO_MODE_NTSC;
- SetMode(av7110, av7110->vidmode);
+ av7110_set_vidmode(av7110, av7110->vidmode);
}
else
return -1;
diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c
index 1da883f4d..1ff5e5d1f 100644
--- a/linux/drivers/media/dvb/ttpci/budget-patch.c
+++ b/linux/drivers/media/dvb/ttpci/budget-patch.c
@@ -67,7 +67,7 @@ static int budget_wdebi(struct budget_patch *budget, u32 config, int addr, u32 v
}
-static int budget_SOutCommand(struct budget_patch *budget, u16* buf, int length)
+static int budget_av7110_send_fw_cmd(struct budget_patch *budget, u16* buf, int length)
{
int i;
@@ -91,7 +91,7 @@ static void av7110_set22k(struct budget_patch *budget, int state)
u16 buf[2] = {( COMTYPE_AUDIODAC << 8) | (state ? ON22K : OFF22K), 0};
DEB_EE(("budget: %p\n", budget));
- budget_SOutCommand(budget, buf, 2);
+ budget_av7110_send_fw_cmd(budget, buf, 2);
}
@@ -117,7 +117,7 @@ static int av7110_send_diseqc_msg(struct budget_patch *budget, int len, u8 *msg,
for (i=0; i<len; i++)
buf[i+4]=msg[i];
- budget_SOutCommand(budget, buf, 18);
+ budget_av7110_send_fw_cmd(budget, buf, 18);
return 0;
}