summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110_av.c
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/dvb/ttpci/av7110_av.c
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/dvb/ttpci/av7110_av.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_av.c105
1 files changed, 53 insertions, 52 deletions
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);
}