/linux-4.4.14/drivers/media/pci/ttpci/ |
H A D | av7110_ca.h | 4 struct av7110; 6 extern void CI_handle(struct av7110 *av7110, u8 *data, u16 len); 9 extern int av7110_ca_register(struct av7110 *av7110); 10 extern void av7110_ca_unregister(struct av7110 *av7110); 11 extern int av7110_ca_init(struct av7110* av7110); 12 extern void av7110_ca_exit(struct av7110* av7110);
|
H A D | av7110_av.h | 4 struct av7110; 6 extern int av7110_set_vidmode(struct av7110 *av7110, 13 extern int av7110_set_volume(struct av7110 *av7110, int volleft, int volright); 14 extern int av7110_av_stop(struct av7110 *av7110, int av); 15 extern int av7110_av_start_record(struct av7110 *av7110, int av, 17 extern int av7110_av_start_play(struct av7110 *av7110, int av); 19 extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event); 24 extern int av7110_av_register(struct av7110 *av7110); 25 extern void av7110_av_unregister(struct av7110 *av7110); 26 extern int av7110_av_init(struct av7110 *av7110); 27 extern void av7110_av_exit(struct av7110 *av7110);
|
H A D | av7110_av.c | 37 #include "av7110.h" 92 static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len); 119 int av7110_av_start_record(struct av7110 *av7110, int av, av7110_av_start_record() argument 125 dprintk(2, "av7110:%p, , dvb_demux_feed:%p\n", av7110, dvbdmxfeed); av7110_av_start_record() 127 if (av7110->playing || (av7110->rec_mode & av)) av7110_av_start_record() 129 av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110_av_start_record() 131 av7110->rec_mode |= av; av7110_av_start_record() 133 switch (av7110->rec_mode) { av7110_av_start_record() 135 dvb_filter_pes2ts_init(&av7110->p2t[0], av7110_av_start_record() 139 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0); av7110_av_start_record() 143 dvb_filter_pes2ts_init(&av7110->p2t[1], av7110_av_start_record() 147 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0); av7110_av_start_record() 151 dvb_filter_pes2ts_init(&av7110->p2t[0], av7110_av_start_record() 155 dvb_filter_pes2ts_init(&av7110->p2t[1], av7110_av_start_record() 159 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0); av7110_av_start_record() 165 int av7110_av_start_play(struct av7110 *av7110, int av) av7110_av_start_play() argument 168 dprintk(2, "av7110:%p, \n", av7110); av7110_av_start_play() 170 if (av7110->rec_mode) av7110_av_start_play() 172 if (av7110->playing & av) av7110_av_start_play() 175 av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110_av_start_play() 177 if (av7110->playing == RP_NONE) { av7110_av_start_play() 178 av7110_ipack_reset(&av7110->ipack[0]); av7110_av_start_play() 179 av7110_ipack_reset(&av7110->ipack[1]); av7110_av_start_play() 182 av7110->playing |= av; av7110_av_start_play() 183 switch (av7110->playing) { av7110_av_start_play() 185 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0); av7110_av_start_play() 188 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0); av7110_av_start_play() 189 av7110->sinfo = 0; av7110_av_start_play() 192 av7110->sinfo = 0; av7110_av_start_play() 193 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0); av7110_av_start_play() 199 int av7110_av_stop(struct av7110 *av7110, int av) av7110_av_stop() argument 202 dprintk(2, "av7110:%p, \n", av7110); av7110_av_stop() 204 if (!(av7110->playing & av) && !(av7110->rec_mode & av)) av7110_av_stop() 206 av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110_av_stop() 207 if (av7110->playing) { av7110_av_stop() 208 av7110->playing &= ~av; av7110_av_stop() 209 switch (av7110->playing) { av7110_av_stop() 211 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0); av7110_av_stop() 214 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0); av7110_av_stop() 217 ret = av7110_set_vidmode(av7110, av7110->vidmode); av7110_av_stop() 221 av7110->rec_mode &= ~av; av7110_av_stop() 222 switch (av7110->rec_mode) { av7110_av_stop() 224 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0); av7110_av_stop() 227 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0); av7110_av_stop() 283 int av7110_set_volume(struct av7110 *av7110, int volleft, int volright) av7110_set_volume() argument 287 dprintk(2, "av7110:%p, \n", av7110); av7110_set_volume() 289 av7110->mixer.volume_left = volleft; av7110_set_volume() 290 av7110->mixer.volume_right = volright; av7110_set_volume() 292 switch (av7110->adac_type) { av7110_set_volume() 300 if ((err = SendDAC(av7110, 3, 0x80 + volleft))) av7110_set_volume() 302 return SendDAC(av7110, 4, volright); av7110_set_volume() 307 i2c_writereg(av7110, 0x20, 0x03, volleft); av7110_set_volume() 308 i2c_writereg(av7110, 0x20, 0x04, volright); av7110_set_volume() 316 msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); av7110_set_volume() 317 msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ av7110_set_volume() 318 msp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */ av7110_set_volume() 326 msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); av7110_set_volume() 327 msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ av7110_set_volume() 334 int av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode) av7110_set_vidmode() argument 337 dprintk(2, "av7110:%p, \n", av7110); av7110_set_vidmode() 339 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode); av7110_set_vidmode() 341 if (!ret && !av7110->playing) { av7110_set_vidmode() 342 ret = ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO], av7110_set_vidmode() 343 av7110->pids[DMX_PES_AUDIO], av7110_set_vidmode() 344 av7110->pids[DMX_PES_TELETEXT], av7110_set_vidmode() 345 0, av7110->pids[DMX_PES_PCR]); av7110_set_vidmode() 347 ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); av7110_set_vidmode() 364 static int get_video_format(struct av7110 *av7110, u8 *buf, int count) get_video_format() argument 372 dprintk(2, "av7110:%p, \n", av7110); get_video_format() 374 if (av7110->sinfo) get_video_format() 384 ret = av7110_set_vidmode(av7110, sw2mode[sw]); get_video_format() 387 av7110->sinfo = 1; get_video_format() 424 struct av7110 *av7110 = (struct av7110 *) priv; play_video_cb() local 425 dprintk(2, "av7110:%p, \n", av7110); play_video_cb() 428 get_video_format(av7110, buf, count); play_video_cb() 429 aux_ring_buffer_write(&av7110->avout, buf, count); play_video_cb() 431 aux_ring_buffer_write(&av7110->aout, buf, count); play_video_cb() 436 struct av7110 *av7110 = (struct av7110 *) priv; play_audio_cb() local 437 dprintk(2, "av7110:%p, \n", av7110); play_audio_cb() 439 aux_ring_buffer_write(&av7110->aout, buf, count); play_audio_cb() 445 static ssize_t ts_play(struct av7110 *av7110, const char __user *buf, ts_play() argument 454 rb = (type) ? &av7110->avout : &av7110->aout; ts_play() 455 kb = av7110->kbuf[type]; ts_play() 472 write_ts_to_decoder(av7110, type, kb, TS_SIZE); ts_play() 481 #define FREE_COND (dvb_ringbuffer_free(&av7110->avout) >= 20 * 1024 && \ 482 dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024) 484 static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, dvb_play() argument 488 dprintk(2, "av7110:%p, \n", av7110); dvb_play() 490 if (!av7110->kbuf[type]) dvb_play() 500 if (wait_event_interruptible(av7110->avout.queue, dvb_play() 507 if (copy_from_user(av7110->kbuf[type], buf, n)) dvb_play() 509 av7110_ipack_instant_repack(av7110->kbuf[type], n, dvb_play() 510 &av7110->ipack[type]); dvb_play() 517 static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf, dvb_play_kernel() argument 521 dprintk(2, "av7110:%p, \n", av7110); dvb_play_kernel() 523 if (!av7110->kbuf[type]) dvb_play_kernel() 533 if (wait_event_interruptible(av7110->avout.queue, dvb_play_kernel() 540 av7110_ipack_instant_repack(buf, n, &av7110->ipack[type]); dvb_play_kernel() 547 static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, dvb_aplay() argument 551 dprintk(2, "av7110:%p, \n", av7110); dvb_aplay() 553 if (!av7110->kbuf[type]) dvb_aplay() 555 if (nonblock && dvb_ringbuffer_free(&av7110->aout) < 20 * 1024) dvb_aplay() 559 if (dvb_ringbuffer_free(&av7110->aout) < 20 * 1024) { dvb_aplay() 562 if (wait_event_interruptible(av7110->aout.queue, dvb_aplay() 563 (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024))) dvb_aplay() 569 if (copy_from_user(av7110->kbuf[type], buf, n)) dvb_aplay() 571 av7110_ipack_instant_repack(av7110->kbuf[type], n, dvb_aplay() 572 &av7110->ipack[type]); dvb_aplay() 824 static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len) write_ts_to_decoder() argument 826 struct ipack *ipack = &av7110->ipack[type]; write_ts_to_decoder() 854 struct av7110 *av7110 = (struct av7110 *) demux->priv; av7110_write_to_decoder() local 856 dprintk(2, "av7110:%p, \n", av7110); av7110_write_to_decoder() 858 if (av7110->full_ts && demux->dmx.frontend->source != DMX_MEMORY_FE) av7110_write_to_decoder() 863 if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) av7110_write_to_decoder() 867 if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) av7110_write_to_decoder() 874 return write_ts_to_decoder(av7110, feed->pes_type, buf, len); av7110_write_to_decoder() 882 void dvb_video_add_event(struct av7110 *av7110, struct video_event *event) dvb_video_add_event() argument 884 struct dvb_video_events *events = &av7110->video_events; dvb_video_add_event() 905 static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags) dvb_video_get_event() argument 907 struct dvb_video_events *events = &av7110->video_events; dvb_video_get_event() 944 struct av7110 *av7110 = dvbdev->priv; dvb_video_poll() local 947 dprintk(2, "av7110:%p, \n", av7110); dvb_video_poll() 950 poll_wait(file, &av7110->avout.queue, wait); dvb_video_poll() 952 poll_wait(file, &av7110->video_events.wait_queue, wait); dvb_video_poll() 954 if (av7110->video_events.eventw != av7110->video_events.eventr) dvb_video_poll() 958 if (av7110->playing) { dvb_video_poll() 974 struct av7110 *av7110 = dvbdev->priv; dvb_video_write() local 977 dprintk(2, "av7110:%p, \n", av7110); dvb_video_write() 982 if (av7110->videostate.stream_source != VIDEO_SOURCE_MEMORY) dvb_video_write() 988 return ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); dvb_video_write() 990 return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); dvb_video_write() 996 struct av7110 *av7110 = dvbdev->priv; dvb_audio_poll() local 999 dprintk(2, "av7110:%p, \n", av7110); dvb_audio_poll() 1001 poll_wait(file, &av7110->aout.queue, wait); dvb_audio_poll() 1003 if (av7110->playing) { dvb_audio_poll() 1004 if (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024) dvb_audio_poll() 1016 struct av7110 *av7110 = dvbdev->priv; dvb_audio_write() local 1019 dprintk(2, "av7110:%p, \n", av7110); dvb_audio_write() 1021 if (av7110->audiostate.stream_source != AUDIO_SOURCE_MEMORY) { dvb_audio_write() 1029 return ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 0); dvb_audio_write() 1031 return dvb_aplay(av7110, buf, count, file->f_flags & O_NONBLOCK, 0); dvb_audio_write() 1038 static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) play_iframe() argument 1044 dprintk(2, "av7110:%p, \n", av7110); play_iframe() 1046 if (!(av7110->playing & RP_VIDEO)) { play_iframe() 1047 if (av7110_av_start_play(av7110, RP_VIDEO) < 0) play_iframe() 1083 dvb_play_kernel(av7110, iframe_header, sizeof(iframe_header), 0, 1); play_iframe() 1086 dvb_play(av7110, buf, len, 0, 1); play_iframe() 1088 av7110_ipack_flush(&av7110->ipack[1]); play_iframe() 1091 return vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1); play_iframe() 1101 struct av7110 *av7110 = dvbdev->priv; dvb_video_ioctl() local 1105 dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); dvb_video_ioctl() 1114 if (mutex_lock_interruptible(&av7110->ioctl_mutex)) dvb_video_ioctl() 1119 av7110->videostate.play_state = VIDEO_STOPPED; dvb_video_ioctl() 1120 if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) dvb_video_ioctl() 1121 ret = av7110_av_stop(av7110, RP_VIDEO); dvb_video_ioctl() 1123 ret = vidcom(av7110, AV_VIDEO_CMD_STOP, dvb_video_ioctl() 1124 av7110->videostate.video_blank ? 0 : 1); dvb_video_ioctl() 1126 av7110->trickmode = TRICK_NONE; dvb_video_ioctl() 1130 av7110->trickmode = TRICK_NONE; dvb_video_ioctl() 1131 if (av7110->videostate.play_state == VIDEO_FREEZED) { dvb_video_ioctl() 1132 av7110->videostate.play_state = VIDEO_PLAYING; dvb_video_ioctl() 1133 ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); dvb_video_ioctl() 1137 if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) { dvb_video_ioctl() 1138 if (av7110->playing == RP_AV) { dvb_video_ioctl() 1139 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); dvb_video_ioctl() 1142 av7110->playing &= ~RP_VIDEO; dvb_video_ioctl() 1144 ret = av7110_av_start_play(av7110, RP_VIDEO); dvb_video_ioctl() 1147 ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); dvb_video_ioctl() 1149 av7110->videostate.play_state = VIDEO_PLAYING; dvb_video_ioctl() 1153 av7110->videostate.play_state = VIDEO_FREEZED; dvb_video_ioctl() 1154 if (av7110->playing & RP_VIDEO) dvb_video_ioctl() 1155 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Pause, 0); dvb_video_ioctl() 1157 ret = vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1); dvb_video_ioctl() 1159 av7110->trickmode = TRICK_FREEZE; dvb_video_ioctl() 1163 if (av7110->playing & RP_VIDEO) dvb_video_ioctl() 1164 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Continue, 0); dvb_video_ioctl() 1166 ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); dvb_video_ioctl() 1168 av7110->videostate.play_state = VIDEO_PLAYING; dvb_video_ioctl() 1169 av7110->trickmode = TRICK_NONE; dvb_video_ioctl() 1174 av7110->videostate.stream_source = (video_stream_source_t) arg; dvb_video_ioctl() 1178 av7110->videostate.video_blank = (int) arg; dvb_video_ioctl() 1182 memcpy(parg, &av7110->videostate, sizeof(struct video_status)); dvb_video_ioctl() 1186 ret = dvb_video_get_event(av7110, parg, file->f_flags); dvb_video_ioctl() 1190 memcpy(parg, &av7110->video_size, sizeof(video_size_t)); dvb_video_ioctl() 1198 av7110->display_panscan = VID_PAN_SCAN_PREF; dvb_video_ioctl() 1201 av7110->display_panscan = VID_VC_AND_PS_PREF; dvb_video_ioctl() 1204 av7110->display_panscan = VID_CENTRE_CUT_PREF; dvb_video_ioctl() 1211 av7110->videostate.display_format = format; dvb_video_ioctl() 1212 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, dvb_video_ioctl() 1213 1, av7110->display_panscan); dvb_video_ioctl() 1222 av7110->display_ar = arg; dvb_video_ioctl() 1223 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, dvb_video_ioctl() 1231 av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; dvb_video_ioctl() 1232 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); dvb_video_ioctl() 1233 ret = play_iframe(av7110, pic->iFrame, pic->size, dvb_video_ioctl() 1240 if (av7110->playing & RP_VIDEO) dvb_video_ioctl() 1241 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, dvb_video_ioctl() 1244 ret = vidcom(av7110, AV_VIDEO_CMD_FFWD, arg); dvb_video_ioctl() 1246 av7110->trickmode = TRICK_FAST; dvb_video_ioctl() 1247 av7110->videostate.play_state = VIDEO_PLAYING; dvb_video_ioctl() 1252 if (av7110->playing&RP_VIDEO) { dvb_video_ioctl() 1253 if (av7110->trickmode != TRICK_SLOW) dvb_video_ioctl() 1254 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0); dvb_video_ioctl() 1256 ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); dvb_video_ioctl() 1258 ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); dvb_video_ioctl() 1260 ret = vidcom(av7110, AV_VIDEO_CMD_STOP, 0); dvb_video_ioctl() 1262 ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); dvb_video_ioctl() 1265 av7110->trickmode = TRICK_SLOW; dvb_video_ioctl() 1266 av7110->videostate.play_state = VIDEO_PLAYING; dvb_video_ioctl() 1276 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); dvb_video_ioctl() 1277 av7110_ipack_reset(&av7110->ipack[1]); dvb_video_ioctl() 1278 if (av7110->playing == RP_AV) { dvb_video_ioctl() 1279 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, dvb_video_ioctl() 1283 if (av7110->trickmode == TRICK_FAST) dvb_video_ioctl() 1284 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, dvb_video_ioctl() 1286 if (av7110->trickmode == TRICK_SLOW) { dvb_video_ioctl() 1287 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, dvb_video_ioctl() 1290 ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); dvb_video_ioctl() 1292 if (av7110->trickmode == TRICK_FREEZE) dvb_video_ioctl() 1293 ret = vidcom(av7110, AV_VIDEO_CMD_STOP, 1); dvb_video_ioctl() 1305 mutex_unlock(&av7110->ioctl_mutex); dvb_video_ioctl() 1313 struct av7110 *av7110 = dvbdev->priv; dvb_audio_ioctl() local 1317 dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); dvb_audio_ioctl() 1323 if (mutex_lock_interruptible(&av7110->ioctl_mutex)) dvb_audio_ioctl() 1328 if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) dvb_audio_ioctl() 1329 ret = av7110_av_stop(av7110, RP_AUDIO); dvb_audio_ioctl() 1331 ret = audcom(av7110, AUDIO_CMD_MUTE); dvb_audio_ioctl() 1333 av7110->audiostate.play_state = AUDIO_STOPPED; dvb_audio_ioctl() 1337 if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) dvb_audio_ioctl() 1338 ret = av7110_av_start_play(av7110, RP_AUDIO); dvb_audio_ioctl() 1340 ret = audcom(av7110, AUDIO_CMD_UNMUTE); dvb_audio_ioctl() 1342 av7110->audiostate.play_state = AUDIO_PLAYING; dvb_audio_ioctl() 1346 ret = audcom(av7110, AUDIO_CMD_MUTE); dvb_audio_ioctl() 1348 av7110->audiostate.play_state = AUDIO_PAUSED; dvb_audio_ioctl() 1352 if (av7110->audiostate.play_state == AUDIO_PAUSED) { dvb_audio_ioctl() 1353 av7110->audiostate.play_state = AUDIO_PLAYING; dvb_audio_ioctl() 1354 ret = audcom(av7110, AUDIO_CMD_UNMUTE | AUDIO_CMD_PCM16); dvb_audio_ioctl() 1359 av7110->audiostate.stream_source = (audio_stream_source_t) arg; dvb_audio_ioctl() 1364 ret = audcom(av7110, arg ? AUDIO_CMD_MUTE : AUDIO_CMD_UNMUTE); dvb_audio_ioctl() 1366 av7110->audiostate.mute_state = (int) arg; dvb_audio_ioctl() 1371 av7110->audiostate.AV_sync_state = (int) arg; dvb_audio_ioctl() 1372 ret = audcom(av7110, arg ? AUDIO_CMD_SYNC_ON : AUDIO_CMD_SYNC_OFF); dvb_audio_ioctl() 1376 if (FW_VERSION(av7110->arm_app) < 0x2621) dvb_audio_ioctl() 1378 av7110->audiostate.bypass_mode = (int)arg; dvb_audio_ioctl() 1382 av7110->audiostate.channel_select = (audio_channel_select_t) arg; dvb_audio_ioctl() 1383 switch(av7110->audiostate.channel_select) { dvb_audio_ioctl() 1385 ret = audcom(av7110, AUDIO_CMD_STEREO); dvb_audio_ioctl() 1387 if (av7110->adac_type == DVB_ADAC_CRYSTAL) dvb_audio_ioctl() 1388 i2c_writereg(av7110, 0x20, 0x02, 0x49); dvb_audio_ioctl() 1389 else if (av7110->adac_type == DVB_ADAC_MSP34x5) dvb_audio_ioctl() 1390 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); dvb_audio_ioctl() 1394 ret = audcom(av7110, AUDIO_CMD_MONO_L); dvb_audio_ioctl() 1396 if (av7110->adac_type == DVB_ADAC_CRYSTAL) dvb_audio_ioctl() 1397 i2c_writereg(av7110, 0x20, 0x02, 0x4a); dvb_audio_ioctl() 1398 else if (av7110->adac_type == DVB_ADAC_MSP34x5) dvb_audio_ioctl() 1399 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0200); dvb_audio_ioctl() 1403 ret = audcom(av7110, AUDIO_CMD_MONO_R); dvb_audio_ioctl() 1405 if (av7110->adac_type == DVB_ADAC_CRYSTAL) dvb_audio_ioctl() 1406 i2c_writereg(av7110, 0x20, 0x02, 0x45); dvb_audio_ioctl() 1407 else if (av7110->adac_type == DVB_ADAC_MSP34x5) dvb_audio_ioctl() 1408 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0210); dvb_audio_ioctl() 1418 memcpy(parg, &av7110->audiostate, sizeof(struct audio_status)); dvb_audio_ioctl() 1422 if (FW_VERSION(av7110->arm_app) < 0x2621) dvb_audio_ioctl() 1430 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); dvb_audio_ioctl() 1431 av7110_ipack_reset(&av7110->ipack[0]); dvb_audio_ioctl() 1432 if (av7110->playing == RP_AV) dvb_audio_ioctl() 1433 ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, dvb_audio_ioctl() 1443 ret = av7110_set_volume(av7110, amix->volume_left, amix->volume_right); dvb_audio_ioctl() 1454 mutex_unlock(&av7110->ioctl_mutex); dvb_audio_ioctl() 1462 struct av7110 *av7110 = dvbdev->priv; dvb_video_open() local 1465 dprintk(2, "av7110:%p, \n", av7110); dvb_video_open() 1471 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); dvb_video_open() 1472 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); dvb_video_open() 1473 av7110->video_blank = 1; dvb_video_open() 1474 av7110->audiostate.AV_sync_state = 1; dvb_video_open() 1475 av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; dvb_video_open() 1478 av7110->video_events.eventr = av7110->video_events.eventw = 0; dvb_video_open() 1487 struct av7110 *av7110 = dvbdev->priv; dvb_video_release() local 1489 dprintk(2, "av7110:%p, \n", av7110); dvb_video_release() 1492 av7110_av_stop(av7110, RP_VIDEO); dvb_video_release() 1501 struct av7110 *av7110 = dvbdev->priv; dvb_audio_open() local 1504 dprintk(2, "av7110:%p, \n", av7110); dvb_audio_open() 1508 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); dvb_audio_open() 1509 av7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX; dvb_audio_open() 1516 struct av7110 *av7110 = dvbdev->priv; dvb_audio_release() local 1518 dprintk(2, "av7110:%p, \n", av7110); dvb_audio_release() 1520 av7110_av_stop(av7110, RP_AUDIO); dvb_audio_release() 1568 int av7110_av_register(struct av7110 *av7110) av7110_av_register() argument 1570 av7110->audiostate.AV_sync_state = 0; av7110_av_register() 1571 av7110->audiostate.mute_state = 0; av7110_av_register() 1572 av7110->audiostate.play_state = AUDIO_STOPPED; av7110_av_register() 1573 av7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX; av7110_av_register() 1574 av7110->audiostate.channel_select = AUDIO_STEREO; av7110_av_register() 1575 av7110->audiostate.bypass_mode = 0; av7110_av_register() 1577 av7110->videostate.video_blank = 0; av7110_av_register() 1578 av7110->videostate.play_state = VIDEO_STOPPED; av7110_av_register() 1579 av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; av7110_av_register() 1580 av7110->videostate.video_format = VIDEO_FORMAT_4_3; av7110_av_register() 1581 av7110->videostate.display_format = VIDEO_LETTER_BOX; av7110_av_register() 1582 av7110->display_ar = VIDEO_FORMAT_4_3; av7110_av_register() 1583 av7110->display_panscan = VID_VC_AND_PS_PREF; av7110_av_register() 1585 init_waitqueue_head(&av7110->video_events.wait_queue); av7110_av_register() 1586 spin_lock_init(&av7110->video_events.lock); av7110_av_register() 1587 av7110->video_events.eventw = av7110->video_events.eventr = 0; av7110_av_register() 1588 av7110->video_events.overflow = 0; av7110_av_register() 1589 memset(&av7110->video_size, 0, sizeof (video_size_t)); av7110_av_register() 1591 dvb_register_device(&av7110->dvb_adapter, &av7110->video_dev, av7110_av_register() 1592 &dvbdev_video, av7110, DVB_DEVICE_VIDEO); av7110_av_register() 1594 dvb_register_device(&av7110->dvb_adapter, &av7110->audio_dev, av7110_av_register() 1595 &dvbdev_audio, av7110, DVB_DEVICE_AUDIO); av7110_av_register() 1600 void av7110_av_unregister(struct av7110 *av7110) av7110_av_unregister() argument 1602 dvb_unregister_device(av7110->audio_dev); av7110_av_unregister() 1603 dvb_unregister_device(av7110->video_dev); av7110_av_unregister() 1606 int av7110_av_init(struct av7110 *av7110) av7110_av_init() argument 1612 struct ipack *ipack = av7110->ipack + i; av7110_av_init() 1620 ipack->data = av7110; av7110_av_init() 1623 dvb_ringbuffer_init(&av7110->avout, av7110->iobuf, AVOUTLEN); av7110_av_init() 1624 dvb_ringbuffer_init(&av7110->aout, av7110->iobuf + AVOUTLEN, AOUTLEN); av7110_av_init() 1626 av7110->kbuf[0] = (u8 *)(av7110->iobuf + AVOUTLEN + AOUTLEN + BMPLEN); av7110_av_init() 1627 av7110->kbuf[1] = av7110->kbuf[0] + 2 * IPACKS; av7110_av_init() 1632 void av7110_av_exit(struct av7110 *av7110) av7110_av_exit() argument 1634 av7110_ipack_free(&av7110->ipack[0]); av7110_av_exit() 1635 av7110_ipack_free(&av7110->ipack[1]); av7110_av_exit()
|
H A D | av7110_hw.c | 2 * av7110_hw.c: av7110 low level hardware access and firmware interface 38 #include "av7110.h" 58 int av7110_debiwrite(struct av7110 *av7110, u32 config, av7110_debiwrite() argument 61 struct saa7146_dev *dev = av7110->dev; av7110_debiwrite() 67 if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110_debiwrite() 75 saa7146_write(dev, DEBI_AD, av7110->debi_bus); av7110_debiwrite() 81 u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, int count) av7110_debiread() argument 83 struct saa7146_dev *dev = av7110->dev; av7110_debiread() 90 if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110_debiread() 94 saa7146_write(dev, DEBI_AD, av7110->debi_bus); av7110_debiread() 101 if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110_debiread() 113 /* av7110 ARM core boot stuff */ 115 void av7110_reset_arm(struct av7110 *av7110) 117 saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO); 120 SAA7146_IER_DISABLE(av7110->dev, MASK_19 | MASK_03); 121 SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); 123 saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTHI); 126 ARM_ResetMailBox(av7110); 128 SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); 129 SAA7146_IER_ENABLE(av7110->dev, MASK_03); 131 av7110->arm_ready = 1; 136 static int waitdebi(struct av7110 *av7110, int adr, int state) waitdebi() argument 140 dprintk(4, "%p\n", av7110); waitdebi() 143 if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state) waitdebi() 150 static int load_dram(struct av7110 *av7110, u32 *data, int len) load_dram() argument 156 dprintk(4, "%p\n", av7110); load_dram() 163 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { load_dram() 168 mwdebi(av7110, DEBISWAB, bootblock, load_dram() 171 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); load_dram() 172 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2); load_dram() 173 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); load_dram() 178 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { load_dram() 183 mwdebi(av7110, DEBISWAB, bootblock, load_dram() 186 mwdebi(av7110, DEBISWAB, bootblock, load_dram() 189 iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); load_dram() 190 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2); load_dram() 191 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); load_dram() 193 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { load_dram() 197 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, 0, 2); load_dram() 198 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); load_dram() 199 if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_AV7110_BOOT_COMPLETE) < 0) { load_dram() 207 /* we cannot write av7110 DRAM directly, so load a bootloader into 209 int av7110_bootarm(struct av7110 *av7110) av7110_bootarm() argument 212 const char *fw_name = "av7110/bootcode.bin"; av7110_bootarm() 213 struct saa7146_dev *dev = av7110->dev; av7110_bootarm() 217 dprintk(4, "%p\n", av7110); av7110_bootarm() 219 av7110->arm_ready = 0; av7110_bootarm() 224 SAA7146_IER_DISABLE(av7110->dev, MASK_03 | MASK_19); av7110_bootarm() 225 SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110_bootarm() 228 saa7146_write(av7110->dev, MC1, 0x08800880); av7110_bootarm() 229 saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000); av7110_bootarm() 230 saa7146_write(av7110->dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); av7110_bootarm() 233 iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); av7110_bootarm() 235 iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); av7110_bootarm() 237 if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) { av7110_bootarm() 244 iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4); av7110_bootarm() 260 mwdebi(av7110, DEBISWAB, DPRAM_BASE, fw->data, fw->size); av7110_bootarm() 262 iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); av7110_bootarm() 264 if (saa7146_wait_for_debi_done(av7110->dev, 1)) { av7110_bootarm() 273 if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) { av7110_bootarm() 283 mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram); av7110_bootarm() 285 if (saa7146_wait_for_debi_done(av7110->dev, 1)) { av7110_bootarm() 293 //ARM_ClearIrq(av7110); av7110_bootarm() 294 ARM_ResetMailBox(av7110); av7110_bootarm() 295 SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110_bootarm() 296 SAA7146_IER_ENABLE(av7110->dev, MASK_03); av7110_bootarm() 298 av7110->arm_errors = 0; av7110_bootarm() 299 av7110->arm_ready = 1; av7110_bootarm() 302 MODULE_FIRMWARE("av7110/bootcode.bin"); 308 int av7110_wait_msgstate(struct av7110 *av7110, u16 flags) av7110_wait_msgstate() argument 314 if (FW_VERSION(av7110->arm_app) <= 0x261c) { av7110_wait_msgstate() 324 if (mutex_lock_interruptible(&av7110->dcomlock)) av7110_wait_msgstate() 326 stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110_wait_msgstate() 327 mutex_unlock(&av7110->dcomlock); av7110_wait_msgstate() 340 static int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length) __av7110_send_fw_cmd() argument 349 // dprintk(4, "%p\n", av7110); __av7110_send_fw_cmd() 351 if (!av7110->arm_ready) { __av7110_send_fw_cmd() 359 if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) __av7110_send_fw_cmd() 363 av7110->arm_errors++; __av7110_send_fw_cmd() 369 if (FW_VERSION(av7110->arm_app) <= 0x261f) __av7110_send_fw_cmd() 370 wdebi(av7110, DEBINOSWAP, COM_IF_LOCK, 0xffff, 2); __av7110_send_fw_cmd() 376 if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) __av7110_send_fw_cmd() 401 if (FW_VERSION(av7110->arm_app) >= 0x261d) { __av7110_send_fw_cmd() 416 stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); __av7110_send_fw_cmd() 427 av7110->arm_errors++; __av7110_send_fw_cmd() 435 wdebi(av7110, DEBINOSWAP, COMMAND + 2 * i, (u32) buf[i], 2); __av7110_send_fw_cmd() 438 wdebi(av7110, DEBINOSWAP, COMMAND + 2, (u32) buf[1], 2); __av7110_send_fw_cmd() 440 wdebi(av7110, DEBINOSWAP, COMMAND + 2, 0, 2); __av7110_send_fw_cmd() 442 wdebi(av7110, DEBINOSWAP, COMMAND, (u32) buf[0], 2); __av7110_send_fw_cmd() 444 if (FW_VERSION(av7110->arm_app) <= 0x261f) __av7110_send_fw_cmd() 445 wdebi(av7110, DEBINOSWAP, COM_IF_LOCK, 0x0000, 2); __av7110_send_fw_cmd() 451 if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) __av7110_send_fw_cmd() 461 stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); __av7110_send_fw_cmd() 475 static int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length) av7110_send_fw_cmd() argument 479 // dprintk(4, "%p\n", av7110); av7110_send_fw_cmd() 481 if (!av7110->arm_ready) { av7110_send_fw_cmd() 485 if (mutex_lock_interruptible(&av7110->dcomlock)) av7110_send_fw_cmd() 488 ret = __av7110_send_fw_cmd(av7110, buf, length); av7110_send_fw_cmd() 489 mutex_unlock(&av7110->dcomlock); av7110_send_fw_cmd() 496 int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...) av7110_fw_cmd() argument 502 // dprintk(4, "%p\n", av7110); av7110_fw_cmd() 521 ret = av7110_send_fw_cmd(av7110, buf, num + 2); av7110_fw_cmd() 528 int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len) 534 dprintk(4, "%p\n", av7110); 544 ret = av7110_send_fw_cmd(av7110, cmd, 18); 551 int av7110_fw_request(struct av7110 *av7110, u16 *request_buf, av7110_fw_request() argument 561 dprintk(4, "%p\n", av7110); av7110_fw_request() 563 if (!av7110->arm_ready) { av7110_fw_request() 568 if (mutex_lock_interruptible(&av7110->dcomlock)) av7110_fw_request() 571 if ((err = __av7110_send_fw_cmd(av7110, request_buf, request_buf_len)) < 0) { av7110_fw_request() 572 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 580 if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) av7110_fw_request() 584 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 596 if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) av7110_fw_request() 600 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 608 stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110_fw_request() 611 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 616 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 622 reply_buf[i] = rdebi(av7110, DEBINOSWAP, COM_BUFF + 2 * i, 0, 2); av7110_fw_request() 624 mutex_unlock(&av7110->dcomlock); av7110_fw_request() 628 static int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length) av7110_fw_query() argument 631 ret = av7110_fw_request(av7110, &tag, 0, buf, length); av7110_fw_query() 643 int av7110_firmversion(struct av7110 *av7110) av7110_firmversion() argument 648 dprintk(4, "%p\n", av7110); av7110_firmversion() 650 if (av7110_fw_query(av7110, tag, buf, 16)) { av7110_firmversion() 652 av7110->dvb_adapter.num); av7110_firmversion() 656 av7110->arm_fw = (buf[0] << 16) + buf[1]; av7110_firmversion() 657 av7110->arm_rtsl = (buf[2] << 16) + buf[3]; av7110_firmversion() 658 av7110->arm_vid = (buf[4] << 16) + buf[5]; av7110_firmversion() 659 av7110->arm_app = (buf[6] << 16) + buf[7]; av7110_firmversion() 660 av7110->avtype = (buf[8] << 16) + buf[9]; av7110_firmversion() 663 av7110->dvb_adapter.num, av7110->arm_fw, av7110_firmversion() 664 av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app); av7110_firmversion() 667 if (FW_CI_LL_SUPPORT(av7110->arm_app)) av7110_firmversion() 669 av7110->dvb_adapter.num); av7110_firmversion() 672 av7110->dvb_adapter.num); av7110_firmversion() 678 int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) av7110_diseqc_send() argument 684 dprintk(4, "%p\n", av7110); av7110_diseqc_send() 700 ret = av7110_send_fw_cmd(av7110, buf, 18); av7110_diseqc_send() 709 static inline int SetColorBlend(struct av7110 *av7110, u8 windownr) SetColorBlend() argument 711 return av7110_fw_cmd(av7110, COMTYPE_OSD, SetCBlend, 1, windownr); SetColorBlend() 714 static inline int SetBlend_(struct av7110 *av7110, u8 windownr, SetBlend_() argument 717 return av7110_fw_cmd(av7110, COMTYPE_OSD, SetBlend, 4, SetBlend_() 721 static inline int SetColor_(struct av7110 *av7110, u8 windownr, SetColor_() argument 724 return av7110_fw_cmd(av7110, COMTYPE_OSD, SetColor, 5, SetColor_() 728 static inline int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize, SetFont() argument 731 return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Font, 4, SetFont() 735 static int FlushText(struct av7110 *av7110) FlushText() argument 740 if (mutex_lock_interruptible(&av7110->dcomlock)) FlushText() 745 if (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2) == 0) FlushText() 750 mutex_unlock(&av7110->dcomlock); FlushText() 755 mutex_unlock(&av7110->dcomlock); FlushText() 759 static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf) WriteText() argument 766 if (mutex_lock_interruptible(&av7110->dcomlock)) WriteText() 772 if (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2) == 0) WriteText() 777 mutex_unlock(&av7110->dcomlock); WriteText() 786 if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) WriteText() 791 mutex_unlock(&av7110->dcomlock); WriteText() 798 wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, WriteText() 801 wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, 0, 2); WriteText() 802 ret = __av7110_send_fw_cmd(av7110, cbuf, 5); WriteText() 803 mutex_unlock(&av7110->dcomlock); WriteText() 809 static inline int DrawLine(struct av7110 *av7110, u8 windownr, DrawLine() argument 812 return av7110_fw_cmd(av7110, COMTYPE_OSD, DLine, 6, DrawLine() 816 static inline int DrawBlock(struct av7110 *av7110, u8 windownr, DrawBlock() argument 819 return av7110_fw_cmd(av7110, COMTYPE_OSD, DBox, 6, DrawBlock() 823 static inline int HideWindow(struct av7110 *av7110, u8 windownr) HideWindow() argument 825 return av7110_fw_cmd(av7110, COMTYPE_OSD, WHide, 1, windownr); HideWindow() 828 static inline int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y) MoveWindowRel() argument 830 return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y); MoveWindowRel() 833 static inline int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y) MoveWindowAbs() argument 835 return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y); MoveWindowAbs() 838 static inline int DestroyOSDWindow(struct av7110 *av7110, u8 windownr) DestroyOSDWindow() argument 840 return av7110_fw_cmd(av7110, COMTYPE_OSD, WDestroy, 1, windownr); DestroyOSDWindow() 843 static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr, CreateOSDWindow() argument 847 return av7110_fw_cmd(av7110, COMTYPE_OSD, WCreate, 4, CreateOSDWindow() 859 static inline int WaitUntilBmpLoaded(struct av7110 *av7110) WaitUntilBmpLoaded() argument 861 int ret = wait_event_timeout(av7110->bmpq, WaitUntilBmpLoaded() 862 av7110->bmp_state != BMP_LOADING, 10*HZ); WaitUntilBmpLoaded() 865 ret, av7110->bmp_state); WaitUntilBmpLoaded() 866 av7110->bmp_state = BMP_NONE; WaitUntilBmpLoaded() 872 static inline int LoadBitmap(struct av7110 *av7110, LoadBitmap() argument 882 dprintk(4, "%p\n", av7110); LoadBitmap() 884 format = bpp2bit[av7110->osdbpp[av7110->osdwin]]; LoadBitmap() 886 av7110->bmp_state = BMP_LOADING; LoadBitmap() 896 av7110->bmp_state = BMP_NONE; LoadBitmap() 899 av7110->bmplen = ((dx * dy * bpp + 7) & ~7) / 8; LoadBitmap() 900 av7110->bmpp = 0; LoadBitmap() 901 if (av7110->bmplen > 32768) { LoadBitmap() 902 av7110->bmp_state = BMP_NONE; LoadBitmap() 906 if (copy_from_user(av7110->bmpbuf + 1024 + i * dx, data + i * inc, dx)) { LoadBitmap() 907 av7110->bmp_state = BMP_NONE; LoadBitmap() 913 c = ((u8 *)av7110->bmpbuf)[1024 + i * delta + delta - 1]; LoadBitmap() 915 c |= (((u8 *)av7110->bmpbuf)[1024 + i * delta + d] LoadBitmap() 917 ((u8 *)av7110->bmpbuf)[1024 + i] = c; LoadBitmap() 921 av7110->bmplen += 1024; LoadBitmap() 922 dprintk(4, "av7110_fw_cmd: LoadBmp size %d\n", av7110->bmplen); LoadBitmap() 923 ret = av7110_fw_cmd(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy); LoadBitmap() 925 ret = WaitUntilBmpLoaded(av7110); LoadBitmap() 929 static int BlitBitmap(struct av7110 *av7110, u16 x, u16 y) BlitBitmap() argument 931 dprintk(4, "%p\n", av7110); BlitBitmap() 933 return av7110_fw_cmd(av7110, COMTYPE_OSD, BlitBmp, 4, av7110->osdwin, x, y, 0); BlitBitmap() 936 static inline int ReleaseBitmap(struct av7110 *av7110) ReleaseBitmap() argument 938 dprintk(4, "%p\n", av7110); ReleaseBitmap() 940 if (av7110->bmp_state != BMP_LOADED && FW_VERSION(av7110->arm_app) < 0x261e) ReleaseBitmap() 942 if (av7110->bmp_state == BMP_LOADING) ReleaseBitmap() 944 av7110->bmp_state = BMP_NONE; ReleaseBitmap() 945 return av7110_fw_cmd(av7110, COMTYPE_OSD, ReleaseBmp, 0); ReleaseBitmap() 964 static int OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) OSDSetColor() argument 974 ret = SetColor_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]], OSDSetColor() 977 ret = SetBlend_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]], OSDSetColor() 982 static int OSDSetPalette(struct av7110 *av7110, u32 __user * colors, u8 first, u8 last) OSDSetPalette() argument 999 wdebi(av7110, DEBINOSWAP, DATA_BUFF3_BASE + i * 4, yuv, 4); OSDSetPalette() 1001 return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Palette, 4, OSDSetPalette() 1002 av7110->osdwin, OSDSetPalette() 1003 bpp2pal[av7110->osdbpp[av7110->osdwin]], OSDSetPalette() 1007 static int OSDSetBlock(struct av7110 *av7110, int x0, int y0, OSDSetBlock() argument 1020 bpp = av7110->osdbpp[av7110->osdwin] + 1; OSDSetBlock() 1027 if (av7110->bmp_state == BMP_LOADING) { OSDSetBlock() 1029 BUG_ON (FW_VERSION(av7110->arm_app) >= 0x261e); OSDSetBlock() 1030 rc = WaitUntilBmpLoaded(av7110); OSDSetBlock() 1040 rc = LoadBitmap(av7110, w, lpb, inc, data); OSDSetBlock() 1043 rc = BlitBitmap(av7110, x0, y0 + i * lpb); OSDSetBlock() 1049 rc = LoadBitmap(av7110, w, brest / bpl, inc, data); OSDSetBlock() 1051 rc = BlitBitmap(av7110, x0, y0 + bnum * lpb); OSDSetBlock() 1053 release_rc = ReleaseBitmap(av7110); OSDSetBlock() 1061 int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) av7110_osd_cmd() argument 1065 if (mutex_lock_interruptible(&av7110->osd_mutex)) av7110_osd_cmd() 1070 ret = DestroyOSDWindow(av7110, av7110->osdwin); av7110_osd_cmd() 1073 av7110->osdbpp[av7110->osdwin] = (dc->color - 1) & 7; av7110_osd_cmd() 1074 ret = CreateOSDWindow(av7110, av7110->osdwin, av7110_osd_cmd() 1075 bpp2bit[av7110->osdbpp[av7110->osdwin]], av7110_osd_cmd() 1080 ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110_osd_cmd() 1083 ret = SetColorBlend(av7110, av7110->osdwin); av7110_osd_cmd() 1087 ret = MoveWindowRel(av7110, av7110->osdwin, 0, 0); av7110_osd_cmd() 1090 ret = HideWindow(av7110, av7110->osdwin); av7110_osd_cmd() 1093 ret = DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, 0); av7110_osd_cmd() 1096 ret = DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, dc->color); av7110_osd_cmd() 1099 ret = OSDSetColor(av7110, dc->color, dc->x0, dc->y0, dc->x1, dc->y1); av7110_osd_cmd() 1102 if (FW_VERSION(av7110->arm_app) >= 0x2618) av7110_osd_cmd() 1103 ret = OSDSetPalette(av7110, dc->data, dc->color, dc->x0); av7110_osd_cmd() 1117 ret = OSDSetColor(av7110, dc->color + i, r, g, b, blend); av7110_osd_cmd() 1124 ret = DrawLine(av7110, av7110->osdwin, av7110_osd_cmd() 1131 ret = OSDSetBlock(av7110, dc->x0, dc->y0, dc->x1, dc->y1, dc->color, dc->data); av7110_osd_cmd() 1134 ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, av7110_osd_cmd() 1138 ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, av7110_osd_cmd() 1142 ret = DrawLine(av7110, av7110->osdwin, av7110_osd_cmd() 1156 ret = SetFont(av7110, av7110->osdwin, dc->x1, av7110_osd_cmd() 1159 ret = FlushText(av7110); av7110_osd_cmd() 1161 ret = WriteText(av7110, av7110->osdwin, dc->x0, dc->y0, textbuf); av7110_osd_cmd() 1168 av7110->osdwin = dc->x0; av7110_osd_cmd() 1173 ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110_osd_cmd() 1175 ret = SetColorBlend(av7110, av7110->osdwin); av7110_osd_cmd() 1183 av7110->osdbpp[av7110->osdwin] = (1 << (dc->color & 3)) - 1; av7110_osd_cmd() 1185 av7110->osdbpp[av7110->osdwin] = 0; av7110_osd_cmd() 1186 ret = CreateOSDWindow(av7110, av7110->osdwin, (osd_raw_window_t)dc->color, av7110_osd_cmd() 1191 ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110_osd_cmd() 1193 ret = SetColorBlend(av7110, av7110->osdwin); av7110_osd_cmd() 1201 mutex_unlock(&av7110->osd_mutex); av7110_osd_cmd() 1210 int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap) av7110_osd_capability() argument 1214 if (FW_4M_SDRAM(av7110->arm_app)) av7110_osd_capability()
|
H A D | av7110.c | 3 * av7110.c: initialization and demux stuff 62 #include "av7110.h" 120 static void restart_feeds(struct av7110 *av7110); 135 static void init_av7110_av(struct av7110 *av7110) init_av7110_av() argument 138 struct saa7146_dev *dev = av7110->dev; init_av7110_av() 141 av7110->adac_type = DVB_ADAC_TI; init_av7110_av() 142 ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); init_av7110_av() 146 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, init_av7110_av() 147 1, (u16) av7110->display_ar); init_av7110_av() 150 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, init_av7110_av() 151 1, av7110->display_panscan); init_av7110_av() 155 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3); init_av7110_av() 158 ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 3, wss_cfg_16_9); init_av7110_av() 162 ret = av7710_set_video_mode(av7110, vidmode); init_av7110_av() 168 av7110->analog_tuner_flags = 0; init_av7110_av() 169 av7110->current_input = 0; init_av7110_av() 171 av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 0); // SPDIF on init_av7110_av() 172 if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { init_av7110_av() 174 av7110->dvb_adapter.num); init_av7110_av() 175 av7110->adac_type = DVB_ADAC_CRYSTAL; init_av7110_av() 176 i2c_writereg(av7110, 0x20, 0x01, 0xd2); init_av7110_av() 177 i2c_writereg(av7110, 0x20, 0x02, 0x49); init_av7110_av() 178 i2c_writereg(av7110, 0x20, 0x03, 0x00); init_av7110_av() 179 i2c_writereg(av7110, 0x20, 0x04, 0x00); init_av7110_av() 184 } else if (0 == av7110_init_analog_module(av7110)) { init_av7110_av() 189 av7110->dvb_adapter.num); init_av7110_av() 190 av7110->adac_type = DVB_ADAC_NONE; init_av7110_av() 193 av7110->adac_type = adac; init_av7110_av() 195 av7110->adac_type, av7110->dvb_adapter.num); init_av7110_av() 198 if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP34x0) { init_av7110_av() 200 ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0); init_av7110_av() 203 ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1); init_av7110_av() 207 ((av7110->dev->pci->subsystem_vendor == 0x110a) || init_av7110_av() 208 (av7110->dev->pci->subsystem_vendor == 0x13c2)) && init_av7110_av() 209 (av7110->dev->pci->subsystem_device == 0x0000)) { init_av7110_av() 216 av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on init_av7110_av() 218 ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); init_av7110_av() 223 static void recover_arm(struct av7110 *av7110) recover_arm() argument 225 dprintk(4, "%p\n",av7110); recover_arm() 227 av7110_bootarm(av7110); recover_arm() 230 init_av7110_av(av7110); recover_arm() 233 if (av7110->recover) recover_arm() 234 av7110->recover(av7110); recover_arm() 236 restart_feeds(av7110); recover_arm() 239 av7110_check_ir_config(av7110, true); recover_arm() 243 static void av7110_arm_sync(struct av7110 *av7110) av7110_arm_sync() argument 245 if (av7110->arm_thread) av7110_arm_sync() 246 kthread_stop(av7110->arm_thread); av7110_arm_sync() 248 av7110->arm_thread = NULL; av7110_arm_sync() 253 struct av7110 *av7110 = data; arm_thread() local 257 dprintk(4, "%p\n",av7110); arm_thread() 260 timeout = wait_event_interruptible_timeout(av7110->arm_wait, arm_thread() 268 if (!av7110->arm_ready) arm_thread() 272 av7110_check_ir_config(av7110, false); arm_thread() 275 if (mutex_lock_interruptible(&av7110->dcomlock)) arm_thread() 277 newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2); arm_thread() 278 mutex_unlock(&av7110->dcomlock); arm_thread() 280 if (newloops == av7110->arm_loops || av7110->arm_errors > 3) { arm_thread() 282 av7110->dvb_adapter.num); arm_thread() 284 recover_arm(av7110); arm_thread() 286 if (mutex_lock_interruptible(&av7110->dcomlock)) arm_thread() 288 newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2) - 1; arm_thread() 289 mutex_unlock(&av7110->dcomlock); arm_thread() 291 av7110->arm_loops = newloops; arm_thread() 292 av7110->arm_errors = 0; arm_thread() 306 struct av7110 *av7110) DvbDmxFilterCallback() 342 &av7110->p2t_filter[dvbdmxfilter->index]); DvbDmxFilterCallback() 361 static inline void start_debi_dma(struct av7110 *av7110, int dir, start_debi_dma() argument 365 if (saa7146_wait_for_debi_done(av7110->dev, 0)) { start_debi_dma() 370 SAA7146_ISR_CLEAR(av7110->dev, MASK_19); /* for good measure */ start_debi_dma() 371 SAA7146_IER_ENABLE(av7110->dev, MASK_19); start_debi_dma() 375 iwdebi(av7110, DEBISWAB, addr, 0, (len + 3) & ~3); start_debi_dma() 377 irdebi(av7110, DEBISWAB, addr, 0, len); start_debi_dma() 382 struct av7110 *av7110 = (struct av7110 *)cookie; debiirq() local 383 int type = av7110->debitype; debiirq() 392 jiffies, saa7146_read(av7110->dev, PSR), debiirq() 393 saa7146_read(av7110->dev, SSR)); debiirq() 396 av7110->debitype = -1; debiirq() 401 dvb_dmx_swfilter_packets(&av7110->demux, debiirq() 402 (const u8 *) av7110->debi_virt, debiirq() 403 av7110->debilen / 188); debiirq() 408 if (av7110->demux.recording) debiirq() 409 av7110_record_cb(&av7110->p2t[handle], debiirq() 410 (u8 *) av7110->debi_virt, debiirq() 411 av7110->debilen); debiirq() 418 if (av7110->handle2filter[handle]) debiirq() 419 DvbDmxFilterCallback((u8 *)av7110->debi_virt, debiirq() 420 av7110->debilen, NULL, 0, debiirq() 421 av7110->handle2filter[handle], debiirq() 422 av7110); debiirq() 428 u8 *data = av7110->debi_virt; debiirq() 436 av7110->ci_slot[data[0]].flags = flags; debiirq() 438 ci_get_data(&av7110->ci_rbuffer, debiirq() 439 av7110->debi_virt, debiirq() 440 av7110->debilen); debiirq() 446 CI_handle(av7110, (u8 *)av7110->debi_virt, av7110->debilen); debiirq() 451 printk("av7110%d: ", av7110->num); debiirq() 452 printk("%02x ", *(u8 *)av7110->debi_virt); debiirq() 453 printk("%02x ", *(1+(u8 *)av7110->debi_virt)); debiirq() 454 for (i = 2; i < av7110->debilen; i++) debiirq() 455 printk("%02x ", (*(i+(unsigned char *)av7110->debi_virt))); debiirq() 456 for (i = 2; i < av7110->debilen; i++) debiirq() 457 printk("%c", chtrans(*(i+(unsigned char *)av7110->debi_virt))); debiirq() 466 ((s8*)av7110->debi_virt)[Reserved_SIZE - 1] = 0; debiirq() 467 printk("%s\n", (s8 *) av7110->debi_virt); debiirq() 483 spin_lock(&av7110->debilock); debiirq() 485 iwdebi(av7110, DEBINOSWAP, xfer, 0, 2); debiirq() 486 ARM_ClearMailBox(av7110); debiirq() 487 spin_unlock(&av7110->debilock); debiirq() 490 /* irq from av7110 firmware writing the mailbox register in the DPRAM */ gpioirq() 493 struct av7110 *av7110 = (struct av7110 *)cookie; gpioirq() local 497 if (av7110->debitype != -1) gpioirq() 500 jiffies, saa7146_read(av7110->dev, PSR), gpioirq() 501 saa7146_read(av7110->dev, SSR)); gpioirq() 503 if (saa7146_wait_for_debi_done(av7110->dev, 0)) { gpioirq() 508 spin_lock(&av7110->debilock); gpioirq() 509 ARM_ClearIrq(av7110); gpioirq() 511 /* see what the av7110 wants */ gpioirq() 512 av7110->debitype = irdebi(av7110, DEBINOSWAP, IRQ_STATE, 0, 2); gpioirq() 513 av7110->debilen = irdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 514 rxbuf = irdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); gpioirq() 515 txbuf = irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 516 len = (av7110->debilen + 3) & ~3; gpioirq() 519 dprintk(8, "GPIO0 irq 0x%04x %d\n", av7110->debitype, av7110->debilen); gpioirq() 521 switch (av7110->debitype & 0xff) { gpioirq() 532 av7110->video_size.w = irdebi(av7110, DEBINOSWAP, STATUS_MPEG_WIDTH, 0, 2); gpioirq() 533 h_ar = irdebi(av7110, DEBINOSWAP, STATUS_MPEG_HEIGHT_AR, 0, 2); gpioirq() 535 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 536 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); gpioirq() 538 av7110->video_size.h = h_ar & 0xfff; gpioirq() 541 event.u.size.w = av7110->video_size.w; gpioirq() 542 event.u.size.h = av7110->video_size.h; gpioirq() 546 av7110->video_size.aspect_ratio = VIDEO_FORMAT_16_9; gpioirq() 548 av7110->videostate.video_format = VIDEO_FORMAT_16_9; gpioirq() 551 av7110->video_size.aspect_ratio = VIDEO_FORMAT_221_1; gpioirq() 553 av7110->videostate.video_format = VIDEO_FORMAT_221_1; gpioirq() 556 av7110->video_size.aspect_ratio = VIDEO_FORMAT_4_3; gpioirq() 558 av7110->videostate.video_format = VIDEO_FORMAT_4_3; gpioirq() 562 av7110->video_size.w, av7110->video_size.h, gpioirq() 563 av7110->video_size.aspect_ratio); gpioirq() 565 dvb_video_add_event(av7110, &event); gpioirq() 572 struct dvb_ringbuffer *cibuf = &av7110->ci_wbuffer; gpioirq() 576 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 577 iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); gpioirq() 578 iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 584 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 585 iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); gpioirq() 586 iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 591 dvb_ringbuffer_read(cibuf, av7110->debi_virt, len); gpioirq() 593 iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); gpioirq() 594 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); gpioirq() 596 start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE + txbuf, len); gpioirq() 597 spin_unlock(&av7110->debilock); gpioirq() 603 if (!av7110->playing) { gpioirq() 604 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 605 iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); gpioirq() 606 iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 610 if (av7110->debitype & 0x100) { gpioirq() 611 spin_lock(&av7110->aout.lock); gpioirq() 612 len = av7110_pes_play(av7110->debi_virt, &av7110->aout, 2048); gpioirq() 613 spin_unlock(&av7110->aout.lock); gpioirq() 615 if (len <= 0 && (av7110->debitype & 0x200) gpioirq() 616 &&av7110->videostate.play_state != VIDEO_FREEZED) { gpioirq() 617 spin_lock(&av7110->avout.lock); gpioirq() 618 len = av7110_pes_play(av7110->debi_virt, &av7110->avout, 2048); gpioirq() 619 spin_unlock(&av7110->avout.lock); gpioirq() 622 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 623 iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); gpioirq() 624 iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 628 iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); gpioirq() 629 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); gpioirq() 631 start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE + txbuf, len); gpioirq() 632 spin_unlock(&av7110->debilock); gpioirq() 636 len = av7110->debilen; gpioirq() 639 av7110->bmp_state = BMP_LOADED; gpioirq() 640 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); gpioirq() 641 iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); gpioirq() 642 iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); gpioirq() 643 wake_up(&av7110->bmpq); gpioirq() 647 if (len > av7110->bmplen) gpioirq() 648 len = av7110->bmplen; gpioirq() 651 iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); gpioirq() 652 iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); gpioirq() 653 memcpy(av7110->debi_virt, av7110->bmpbuf+av7110->bmpp, len); gpioirq() 654 av7110->bmpp += len; gpioirq() 655 av7110->bmplen -= len; gpioirq() 657 start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE+txbuf, len); gpioirq() 658 spin_unlock(&av7110->debilock); gpioirq() 667 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); gpioirq() 675 start_debi_dma(av7110, DEBI_READ, DPRAM_BASE+rxbuf, len); gpioirq() 676 spin_unlock(&av7110->debilock); gpioirq() 681 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); gpioirq() 684 start_debi_dma(av7110, DEBI_READ, Reserved, len); gpioirq() 685 spin_unlock(&av7110->debilock); gpioirq() 689 if (av7110->ir.ir_handler) gpioirq() 690 av7110->ir.ir_handler(av7110, gpioirq() 691 swahw32(irdebi(av7110, DEBINOSWAP, Reserved, 0, 4))); gpioirq() 692 iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); gpioirq() 697 av7110->debitype, av7110->debilen); gpioirq() 700 av7110->debitype = -1; gpioirq() 701 ARM_ClearMailBox(av7110); gpioirq() 702 spin_unlock(&av7110->debilock); gpioirq() 711 struct av7110 *av7110 = dvbdev->priv; dvb_osd_ioctl() local 713 dprintk(4, "%p\n", av7110); dvb_osd_ioctl() 716 return av7110_osd_cmd(av7110, (osd_cmd_t *) parg); dvb_osd_ioctl() 718 return av7110_osd_capability(av7110, (osd_cap_t *) parg); dvb_osd_ioctl() 742 static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, SetPIDs() argument 747 dprintk(4, "%p\n", av7110); SetPIDs() 752 av7110->pids[DMX_PES_VIDEO] = 0; SetPIDs() 753 av7110->pids[DMX_PES_AUDIO] = 0; SetPIDs() 754 av7110->pids[DMX_PES_TELETEXT] = 0; SetPIDs() 755 av7110->pids[DMX_PES_PCR] = 0; SetPIDs() 758 if (av7110->audiostate.bypass_mode) SetPIDs() 761 return av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, MultiPID, 6, SetPIDs() 765 int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, ChangePIDs() argument 769 dprintk(4, "%p\n", av7110); ChangePIDs() 771 if (mutex_lock_interruptible(&av7110->pid_mutex)) ChangePIDs() 775 av7110->pids[DMX_PES_VIDEO] = vpid; ChangePIDs() 777 av7110->pids[DMX_PES_AUDIO] = apid; ChangePIDs() 779 av7110->pids[DMX_PES_TELETEXT] = ttpid; ChangePIDs() 781 av7110->pids[DMX_PES_PCR] = pcrpid; ChangePIDs() 783 av7110->pids[DMX_PES_SUBTITLE] = 0; ChangePIDs() 785 if (av7110->fe_synced) { ChangePIDs() 786 pcrpid = av7110->pids[DMX_PES_PCR]; ChangePIDs() 787 ret = SetPIDs(av7110, vpid, apid, ttpid, subpid, pcrpid); ChangePIDs() 790 mutex_unlock(&av7110->pid_mutex); ChangePIDs() 802 struct av7110 *av7110 = dvbdmxfeed->demux->priv; StartHWFilter() local 809 dprintk(4, "%p\n", av7110); StartHWFilter() 811 if (av7110->full_ts) StartHWFilter() 826 av7110_p2t_init(&av7110->p2t_filter[dvbdmxfilter->index], dvbdmxfeed); StartHWFilter() 834 ret = av7110_fw_request(av7110, buf, 20, &handle, 1); StartHWFilter() 846 av7110->handle2filter[handle] = dvbdmxfilter; StartHWFilter() 854 struct av7110 *av7110 = dvbdmxfilter->feed->demux->priv; StopHWFilter() local 860 dprintk(4, "%p\n", av7110); StopHWFilter() 862 if (av7110->full_ts) StopHWFilter() 872 av7110->handle2filter[handle] = NULL; StopHWFilter() 877 ret = av7110_fw_request(av7110, buf, 3, answ, 2); StopHWFilter() 893 struct av7110 *av7110 = dvbdmx->priv; dvb_feed_start_pid() local 898 dprintk(4, "%p\n", av7110); dvb_feed_start_pid() 905 ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); dvb_feed_start_pid() 911 ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); dvb_feed_start_pid() 917 if (av7110->fe_synced) dvb_feed_start_pid() 919 ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); dvb_feed_start_pid() 924 if ((dvbdmxfeed->ts_type & TS_PACKET) && !av7110->full_ts) { dvb_feed_start_pid() 926 ret = av7110_av_start_record(av7110, RP_AUDIO, dvbdmxfeed); dvb_feed_start_pid() 928 ret = av7110_av_start_record(av7110, RP_VIDEO, dvbdmxfeed); dvb_feed_start_pid() 936 struct av7110 *av7110 = dvbdmx->priv; dvb_feed_stop_pid() local 942 dprintk(4, "%p\n", av7110); dvb_feed_stop_pid() 945 ret = av7110_av_stop(av7110, dvbdmxfeed->pes_type ? RP_VIDEO : RP_AUDIO); dvb_feed_stop_pid() 948 if (!av7110->rec_mode) dvb_feed_stop_pid() 950 if (!av7110->playing) dvb_feed_stop_pid() 970 ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); dvb_feed_stop_pid() 977 struct av7110 *av7110 = demux->priv; av7110_start_feed() local 980 dprintk(4, "%p\n", av7110); av7110_start_feed() 985 if (!av7110->full_ts && feed->pid > 0x1fff) av7110_start_feed() 997 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110_start_feed() 998 dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); av7110_start_feed() 999 ret = av7110_av_start_play(av7110,RP_AV); av7110_start_feed() 1014 if (av7110->full_ts) { av7110_start_feed() 1045 struct av7110 *av7110 = demux->priv; av7110_stop_feed() local 1047 dprintk(4, "%p\n", av7110); av7110_stop_feed() 1066 if (av7110->full_ts) { av7110_stop_feed() 1090 static void restart_feeds(struct av7110 *av7110) restart_feeds() argument 1092 struct dvb_demux *dvbdmx = &av7110->demux; restart_feeds() 1098 dprintk(4, "%p\n", av7110); restart_feeds() 1100 mode = av7110->playing; restart_feeds() 1101 av7110->playing = 0; restart_feeds() 1102 av7110->rec_mode = 0; restart_feeds() 1104 feeding = av7110->feeding1; /* full_ts mod */ restart_feeds() 1123 av7110->feeding1 = feeding; /* full_ts mod */ restart_feeds() 1126 av7110_av_start_play(av7110, mode); restart_feeds() 1136 struct av7110 *av7110; dvb_get_stc() local 1142 av7110 = dvbdemux->priv; dvb_get_stc() 1144 dprintk(4, "%p\n", av7110); dvb_get_stc() 1149 ret = av7110_fw_request(av7110, &tag, 0, fwstc, 4); dvb_get_stc() 1174 struct av7110* av7110 = fe->dvb->priv; av7110_set_tone() local 1178 return Set22K(av7110, 1); av7110_set_tone() 1181 return Set22K(av7110, 0); av7110_set_tone() 1191 struct av7110* av7110 = fe->dvb->priv; av7110_diseqc_send_master_cmd() local 1193 return av7110_diseqc_send(av7110, cmd->msg_len, cmd->msg, -1); av7110_diseqc_send_master_cmd() 1199 struct av7110* av7110 = fe->dvb->priv; av7110_diseqc_send_burst() local 1201 return av7110_diseqc_send(av7110, 0, NULL, minicmd); av7110_diseqc_send_burst() 1205 static int stop_ts_capture(struct av7110 *budget) stop_ts_capture() 1217 static int start_ts_capture(struct av7110 *budget) start_ts_capture() 1237 struct av7110 *budget = demux->priv; budget_start_feed() 1240 dprintk(2, "av7110: %p\n", budget); budget_start_feed() 1252 struct av7110 *budget = demux->priv; budget_stop_feed() 1265 struct av7110 *budget = (struct av7110 *)cookie; vpeirq() 1302 static int av7110_register(struct av7110 *av7110) av7110_register() argument 1305 struct dvb_demux *dvbdemux = &av7110->demux; av7110_register() 1306 struct dvb_demux *dvbdemux1 = &av7110->demux1; av7110_register() 1308 dprintk(4, "%p\n", av7110); av7110_register() 1310 if (av7110->registered) av7110_register() 1313 av7110->registered = 1; av7110_register() 1315 dvbdemux->priv = (void *) av7110; av7110_register() 1318 av7110->handle2filter[i] = NULL; av7110_register() 1320 dvbdemux->filternum = (av7110->full_ts) ? 256 : 32; av7110_register() 1321 dvbdemux->feednum = (av7110->full_ts) ? 256 : 32; av7110_register() 1328 dvb_dmx_init(&av7110->demux); av7110_register() 1329 av7110->demux.dmx.get_stc = dvb_get_stc; av7110_register() 1331 av7110->dmxdev.filternum = (av7110->full_ts) ? 256 : 32; av7110_register() 1332 av7110->dmxdev.demux = &dvbdemux->dmx; av7110_register() 1333 av7110->dmxdev.capabilities = 0; av7110_register() 1335 dvb_dmxdev_init(&av7110->dmxdev, &av7110->dvb_adapter); av7110_register() 1337 av7110->hw_frontend.source = DMX_FRONTEND_0; av7110_register() 1339 ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &av7110->hw_frontend); av7110_register() 1344 av7110->mem_frontend.source = DMX_MEMORY_FE; av7110_register() 1346 ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &av7110->mem_frontend); av7110_register() 1352 &av7110->hw_frontend); av7110_register() 1356 av7110_av_register(av7110); av7110_register() 1357 av7110_ca_register(av7110); av7110_register() 1360 dvb_register_device(&av7110->dvb_adapter, &av7110->osd_dev, av7110_register() 1361 &dvbdev_osd, av7110, DVB_DEVICE_OSD); av7110_register() 1364 dvb_net_init(&av7110->dvb_adapter, &av7110->dvb_net, &dvbdemux->dmx); av7110_register() 1370 dvbdemux1->priv = (void *) av7110; av7110_register() 1381 dvb_dmx_init(&av7110->demux1); av7110_register() 1383 av7110->dmxdev1.filternum = 256; av7110_register() 1384 av7110->dmxdev1.demux = &dvbdemux1->dmx; av7110_register() 1385 av7110->dmxdev1.capabilities = 0; av7110_register() 1387 dvb_dmxdev_init(&av7110->dmxdev1, &av7110->dvb_adapter); av7110_register() 1389 dvb_net_init(&av7110->dvb_adapter, &av7110->dvb_net1, &dvbdemux1->dmx); av7110_register() 1396 static void dvb_unregister(struct av7110 *av7110) dvb_unregister() argument 1398 struct dvb_demux *dvbdemux = &av7110->demux; dvb_unregister() 1399 struct dvb_demux *dvbdemux1 = &av7110->demux1; dvb_unregister() 1401 dprintk(4, "%p\n", av7110); dvb_unregister() 1403 if (!av7110->registered) dvb_unregister() 1407 dvb_net_release(&av7110->dvb_net1); dvb_unregister() 1409 dvb_dmxdev_release(&av7110->dmxdev1); dvb_unregister() 1410 dvb_dmx_release(&av7110->demux1); dvb_unregister() 1413 dvb_net_release(&av7110->dvb_net); dvb_unregister() 1416 dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->hw_frontend); dvb_unregister() 1417 dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->mem_frontend); dvb_unregister() 1419 dvb_dmxdev_release(&av7110->dmxdev); dvb_unregister() 1420 dvb_dmx_release(&av7110->demux); dvb_unregister() 1422 if (av7110->fe != NULL) { dvb_unregister() 1423 dvb_unregister_frontend(av7110->fe); dvb_unregister() 1424 dvb_frontend_detach(av7110->fe); dvb_unregister() 1426 dvb_unregister_device(av7110->osd_dev); dvb_unregister() 1427 av7110_av_unregister(av7110); dvb_unregister() 1428 av7110_ca_unregister(av7110); dvb_unregister() 1436 int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) i2c_writereg() argument 1445 return i2c_transfer(&av7110->i2c_adap, &msgs, 1); i2c_writereg() 1448 u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg) i2c_readreg() argument 1460 i2c_transfer(&av7110->i2c_adap, msgs, 2); i2c_readreg() 1470 static int check_firmware(struct av7110* av7110) check_firmware() argument 1476 ptr = av7110->bin_fw; check_firmware() 1479 printk("dvb-ttpci: this is not an av7110 firmware\n"); check_firmware() 1497 av7110->bin_dpram = ptr; check_firmware() 1498 av7110->size_dpram = len; check_firmware() 1508 len > ((av7110->bin_fw + av7110->size_fw) - ptr)) { check_firmware() 1516 av7110->bin_root = ptr; check_firmware() 1517 av7110->size_root = len; check_firmware() 1521 static void put_firmware(struct av7110* av7110) put_firmware() argument 1523 vfree(av7110->bin_fw); put_firmware() 1526 static int get_firmware(struct av7110* av7110) get_firmware() argument 1531 /* request the av7110 firmware, this will block until someone uploads it */ get_firmware() 1532 ret = request_firmware(&fw, "dvb-ttpci-01.fw", &av7110->dev->pci->dev); get_firmware() 1554 av7110->bin_fw = vmalloc(fw->size); get_firmware() 1555 if (NULL == av7110->bin_fw) { get_firmware() 1561 memcpy(av7110->bin_fw, fw->data, fw->size); get_firmware() 1562 av7110->size_fw = fw->size; get_firmware() 1563 if ((ret = check_firmware(av7110))) get_firmware() 1564 vfree(av7110->bin_fw); get_firmware() 1573 struct av7110* av7110 = fe->dvb->priv; alps_bsrv2_tuner_set_params() local 1602 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) alps_bsrv2_tuner_set_params() 1616 struct av7110* av7110 = fe->dvb->priv; alps_tdbe2_tuner_set_params() local 1630 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) alps_tdbe2_tuner_set_params() 1648 struct av7110* av7110 = fe->dvb->priv; grundig_29504_451_tuner_set_params() local 1661 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) grundig_29504_451_tuner_set_params() 1675 struct av7110* av7110 = fe->dvb->priv; philips_cd1516_tuner_set_params() local 1690 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) philips_cd1516_tuner_set_params() 1707 struct av7110* av7110 = fe->dvb->priv; alps_tdlb7_tuner_set_params() local 1726 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) alps_tdlb7_tuner_set_params() 1734 struct av7110* av7110 = fe->dvb->priv; alps_tdlb7_request_firmware() local 1736 return request_firmware(fw, name, &av7110->dev->pci->dev); alps_tdlb7_request_firmware() 1845 struct av7110* av7110 = fe->dvb->priv; nexusca_stv0297_tuner_set_params() local 1871 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { nexusca_stv0297_tuner_set_params() 1880 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) nexusca_stv0297_tuner_set_params() 1901 struct av7110* av7110 = fe->dvb->priv; grundig_29504_401_tuner_set_params() local 1936 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; grundig_29504_401_tuner_set_params() 1946 static int av7110_fe_lock_fix(struct av7110 *av7110, enum fe_status status) av7110_fe_lock_fix() argument 1951 av7110->fe_status = status; av7110_fe_lock_fix() 1953 if (av7110->fe_synced == synced) av7110_fe_lock_fix() 1956 if (av7110->playing) { av7110_fe_lock_fix() 1957 av7110->fe_synced = synced; av7110_fe_lock_fix() 1961 if (mutex_lock_interruptible(&av7110->pid_mutex)) av7110_fe_lock_fix() 1965 ret = SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], av7110_fe_lock_fix() 1966 av7110->pids[DMX_PES_AUDIO], av7110_fe_lock_fix() 1967 av7110->pids[DMX_PES_TELETEXT], 0, av7110_fe_lock_fix() 1968 av7110->pids[DMX_PES_PCR]); av7110_fe_lock_fix() 1970 ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); av7110_fe_lock_fix() 1972 ret = SetPIDs(av7110, 0, 0, 0, 0, 0); av7110_fe_lock_fix() 1974 ret = av7110_fw_cmd(av7110, COMTYPE_PID_FILTER, FlushTSQueue, 0); av7110_fe_lock_fix() 1976 ret = av7110_wait_msgstate(av7110, GPMQBusy); av7110_fe_lock_fix() 1981 av7110->fe_synced = synced; av7110_fe_lock_fix() 1983 mutex_unlock(&av7110->pid_mutex); av7110_fe_lock_fix() 1989 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_frontend() local 1991 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_set_frontend() 1993 ret = av7110->fe_set_frontend(fe); av7110_fe_set_frontend() 2000 struct av7110* av7110 = fe->dvb->priv; av7110_fe_init() local 2002 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_init() 2004 ret = av7110->fe_init(fe); av7110_fe_init() 2011 struct av7110* av7110 = fe->dvb->priv; av7110_fe_read_status() local 2014 int ret = av7110->fe_read_status(fe, status); av7110_fe_read_status() 2016 if (((*status ^ av7110->fe_status) & FE_HAS_LOCK) && (*status & FE_HAS_LOCK)) av7110_fe_read_status() 2017 ret = av7110_fe_lock_fix(av7110, *status); av7110_fe_read_status() 2023 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_reset_overload() local 2025 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_diseqc_reset_overload() 2027 ret = av7110->fe_diseqc_reset_overload(fe); av7110_fe_diseqc_reset_overload() 2034 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_send_master_cmd() local 2036 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_diseqc_send_master_cmd() 2038 av7110->saved_master_cmd = *cmd; av7110_fe_diseqc_send_master_cmd() 2039 ret = av7110->fe_diseqc_send_master_cmd(fe, cmd); av7110_fe_diseqc_send_master_cmd() 2047 struct av7110* av7110 = fe->dvb->priv; av7110_fe_diseqc_send_burst() local 2049 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_diseqc_send_burst() 2051 av7110->saved_minicmd = minicmd; av7110_fe_diseqc_send_burst() 2052 ret = av7110->fe_diseqc_send_burst(fe, minicmd); av7110_fe_diseqc_send_burst() 2060 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_tone() local 2062 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_set_tone() 2064 av7110->saved_tone = tone; av7110_fe_set_tone() 2065 ret = av7110->fe_set_tone(fe, tone); av7110_fe_set_tone() 2073 struct av7110* av7110 = fe->dvb->priv; av7110_fe_set_voltage() local 2075 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_set_voltage() 2077 av7110->saved_voltage = voltage; av7110_fe_set_voltage() 2078 ret = av7110->fe_set_voltage(fe, voltage); av7110_fe_set_voltage() 2085 struct av7110* av7110 = fe->dvb->priv; av7110_fe_dishnetwork_send_legacy_command() local 2087 int ret = av7110_fe_lock_fix(av7110, 0); av7110_fe_dishnetwork_send_legacy_command() 2089 ret = av7110->fe_dishnetwork_send_legacy_command(fe, cmd); av7110_fe_dishnetwork_send_legacy_command() 2093 static void dvb_s_recover(struct av7110* av7110) dvb_s_recover() argument 2095 av7110_fe_init(av7110->fe); dvb_s_recover() 2097 av7110_fe_set_voltage(av7110->fe, av7110->saved_voltage); dvb_s_recover() 2098 if (av7110->saved_master_cmd.msg_len) { dvb_s_recover() 2100 av7110_fe_diseqc_send_master_cmd(av7110->fe, &av7110->saved_master_cmd); dvb_s_recover() 2103 av7110_fe_diseqc_send_burst(av7110->fe, av7110->saved_minicmd); dvb_s_recover() 2105 av7110_fe_set_tone(av7110->fe, av7110->saved_tone); dvb_s_recover() 2107 av7110_fe_set_frontend(av7110->fe); dvb_s_recover() 2110 static u8 read_pwm(struct av7110* av7110) read_pwm() argument 2117 if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) read_pwm() 2123 static int frontend_init(struct av7110 *av7110) frontend_init() argument 2127 if (av7110->dev->pci->subsystem_vendor == 0x110a) { frontend_init() 2128 switch(av7110->dev->pci->subsystem_device) { frontend_init() 2130 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, frontend_init() 2131 &av7110->i2c_adap, read_pwm(av7110)); frontend_init() 2132 if (av7110->fe) { frontend_init() 2133 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; frontend_init() 2138 } else if (av7110->dev->pci->subsystem_vendor == 0x13c2) { frontend_init() 2139 switch(av7110->dev->pci->subsystem_device) { frontend_init() 2145 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); frontend_init() 2146 if (av7110->fe) { frontend_init() 2147 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; frontend_init() 2148 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init() 2149 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init() 2150 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init() 2151 av7110->recover = dvb_s_recover; frontend_init() 2156 av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap); frontend_init() 2157 if (av7110->fe) { frontend_init() 2158 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; frontend_init() 2159 av7110->fe->tuner_priv = &av7110->i2c_adap; frontend_init() 2161 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init() 2162 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init() 2163 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init() 2164 av7110->recover = dvb_s_recover; frontend_init() 2169 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); frontend_init() 2170 if (av7110->fe) { frontend_init() 2171 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; frontend_init() 2172 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init() 2173 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init() 2174 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init() 2175 av7110->recover = dvb_s_recover; frontend_init() 2180 switch(av7110->dev->pci->subsystem_device) { frontend_init() 2183 av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, frontend_init() 2184 read_pwm(av7110)); frontend_init() 2185 if (av7110->fe) { frontend_init() 2186 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; frontend_init() 2191 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, frontend_init() 2192 read_pwm(av7110)); frontend_init() 2193 if (av7110->fe) { frontend_init() 2194 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; frontend_init() 2202 av7110->fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); frontend_init() 2203 if (av7110->fe) { frontend_init() 2204 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params; frontend_init() 2211 av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); frontend_init() 2212 if (av7110->fe) frontend_init() 2213 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; frontend_init() 2218 av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); frontend_init() 2219 if (av7110->fe) { frontend_init() 2220 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; frontend_init() 2226 av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); frontend_init() 2227 if (av7110->fe) { frontend_init() 2228 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; frontend_init() 2229 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init() 2230 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init() 2231 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init() 2232 av7110->recover = dvb_s_recover; frontend_init() 2238 av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); frontend_init() 2239 if (av7110->fe) { frontend_init() 2240 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; frontend_init() 2241 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; frontend_init() 2242 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; frontend_init() 2243 av7110->fe->ops.set_tone = av7110_set_tone; frontend_init() 2244 av7110->recover = dvb_s_recover; frontend_init() 2250 av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); frontend_init() 2251 if (av7110->fe) { frontend_init() 2252 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; frontend_init() 2255 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) frontend_init() 2256 saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) frontend_init() 2259 av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; frontend_init() 2266 av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap); frontend_init() 2267 if (av7110->fe) { frontend_init() 2268 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; frontend_init() 2269 av7110->fe->tuner_priv = &av7110->i2c_adap; frontend_init() 2271 if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { frontend_init() 2273 if (av7110->fe->ops.release) frontend_init() 2274 av7110->fe->ops.release(av7110->fe); frontend_init() 2275 av7110->fe = NULL; frontend_init() 2277 av7110->fe->ops.dishnetwork_send_legacy_command = NULL; frontend_init() 2278 av7110->recover = dvb_s_recover; frontend_init() 2285 if (!av7110->fe) { frontend_init() 2289 av7110->dev->pci->vendor, frontend_init() 2290 av7110->dev->pci->device, frontend_init() 2291 av7110->dev->pci->subsystem_vendor, frontend_init() 2292 av7110->dev->pci->subsystem_device); frontend_init() 2294 FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init); frontend_init() 2295 FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status); frontend_init() 2296 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); frontend_init() 2297 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); frontend_init() 2298 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); frontend_init() 2299 FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone); frontend_init() 2300 FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage); frontend_init() 2301 FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); frontend_init() 2302 FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); frontend_init() 2304 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); frontend_init() 2306 printk("av7110: Frontend registration failed!\n"); frontend_init() 2307 dvb_frontend_detach(av7110->fe); frontend_init() 2308 av7110->fe = NULL; frontend_init() 2379 struct av7110 *av7110; av7110_attach() local 2474 /* prepare the av7110 device struct */ av7110_attach() 2475 av7110 = kzalloc(sizeof(struct av7110), GFP_KERNEL); av7110_attach() 2476 if (!av7110) { av7110_attach() 2481 av7110->card_name = (char*) pci_ext->ext_priv; av7110_attach() 2482 av7110->dev = dev; av7110_attach() 2483 dev->ext_priv = av7110; av7110_attach() 2485 ret = get_firmware(av7110); av7110_attach() 2489 ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, av7110_attach() 2498 strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name)); av7110_attach() 2500 saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */ av7110_attach() 2502 ret = i2c_add_adapter(&av7110->i2c_adap); av7110_attach() 2506 ttpci_eeprom_parse_mac(&av7110->i2c_adap, av7110_attach() 2507 av7110->dvb_adapter.proposed_mac); av7110_attach() 2512 av7110->full_ts = true; av7110_attach() 2515 if (i2c_readreg(av7110, 0xaa, 0) == 0x4f && i2c_readreg(av7110, 0xaa, 1) == 0x45) { av7110_attach() 2516 u8 flags = i2c_readreg(av7110, 0xaa, 2); av7110_attach() 2518 av7110->full_ts = true; av7110_attach() 2521 if (av7110->full_ts) { av7110_attach() 2523 spin_lock_init(&av7110->feedlock1); av7110_attach() 2524 av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, av7110_attach() 2525 &av7110->pt); av7110_attach() 2526 if (!av7110->grabbing) av7110_attach() 2544 saa7146_write(dev, BASE_PAGE3, av7110->pt.dma | ME1 | 0x90); av7110_attach() 2548 tasklet_init(&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110); av7110_attach() 2551 spin_lock_init(&av7110->feedlock1); av7110_attach() 2552 av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, av7110_attach() 2553 &av7110->pt); av7110_attach() 2554 if (!av7110->grabbing) av7110_attach() 2567 saa7146_write(dev, BASE_PAGE3, av7110->pt.dma | ME1 | 0x90); av7110_attach() 2629 tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110); av7110_attach() 2644 tasklet_init (&av7110->debi_tasklet, debiirq, (unsigned long) av7110); av7110_attach() 2645 tasklet_init (&av7110->gpio_tasklet, gpioirq, (unsigned long) av7110); av7110_attach() 2647 mutex_init(&av7110->pid_mutex); av7110_attach() 2650 spin_lock_init(&av7110->debilock); av7110_attach() 2651 mutex_init(&av7110->dcomlock); av7110_attach() 2652 av7110->debitype = -1; av7110_attach() 2655 av7110->osdwin = 1; av7110_attach() 2656 mutex_init(&av7110->osd_mutex); av7110_attach() 2659 av7110->vidmode = tv_standard == 1 ? AV7110_VIDEO_MODE_NTSC av7110_attach() 2663 init_waitqueue_head(&av7110->arm_wait); av7110_attach() 2664 av7110->arm_thread = NULL; av7110_attach() 2667 av7110->debi_virt = pci_alloc_consistent(pdev, 8192, &av7110->debi_bus); av7110_attach() 2668 if (!av7110->debi_virt) av7110_attach() 2672 av7110->iobuf = vmalloc(AVOUTLEN+AOUTLEN+BMPLEN+4*IPACKS); av7110_attach() 2673 if (!av7110->iobuf) av7110_attach() 2676 ret = av7110_av_init(av7110); av7110_attach() 2681 av7110->bmpbuf = av7110->iobuf+AVOUTLEN+AOUTLEN; av7110_attach() 2682 init_waitqueue_head(&av7110->bmpq); av7110_attach() 2684 ret = av7110_ca_init(av7110); av7110_attach() 2689 ret = av7110_bootarm(av7110); av7110_attach() 2693 ret = av7110_firmversion(av7110); av7110_attach() 2697 if (FW_VERSION(av7110->arm_app)<0x2501) av7110_attach() 2699 "System might be unstable!\n", FW_VERSION(av7110->arm_app)); av7110_attach() 2701 thread = kthread_run(arm_thread, (void *) av7110, "arm_mon"); av7110_attach() 2706 av7110->arm_thread = thread; av7110_attach() 2709 av7110->mixer.volume_left = volume; av7110_attach() 2710 av7110->mixer.volume_right = volume; av7110_attach() 2712 ret = av7110_register(av7110); av7110_attach() 2716 init_av7110_av(av7110); av7110_attach() 2721 ret = av7110_init_v4l(av7110); av7110_attach() 2725 av7110->dvb_adapter.priv = av7110; av7110_attach() 2726 ret = frontend_init(av7110); av7110_attach() 2730 mutex_init(&av7110->ioctl_mutex); av7110_attach() 2733 av7110_ir_init(av7110); av7110_attach() 2735 printk(KERN_INFO "dvb-ttpci: found av7110-%d.\n", av7110_num); av7110_attach() 2741 av7110_exit_v4l(av7110); av7110_attach() 2743 dvb_unregister(av7110); av7110_attach() 2745 av7110_arm_sync(av7110); av7110_attach() 2749 av7110_ca_exit(av7110); av7110_attach() 2751 av7110_av_exit(av7110); av7110_attach() 2753 vfree(av7110->iobuf); av7110_attach() 2755 pci_free_consistent(pdev, 8192, av7110->debi_virt, av7110->debi_bus); av7110_attach() 2757 if (av7110->grabbing) av7110_attach() 2758 saa7146_vfree_destroy_pgtable(pdev, av7110->grabbing, &av7110->pt); av7110_attach() 2760 i2c_del_adapter(&av7110->i2c_adap); av7110_attach() 2762 dvb_unregister_adapter(&av7110->dvb_adapter); av7110_attach() 2764 put_firmware(av7110); av7110_attach() 2766 kfree(av7110); av7110_attach() 2772 struct av7110 *av7110 = saa->ext_priv; av7110_detach() local 2773 dprintk(4, "%p\n", av7110); av7110_detach() 2776 av7110_ir_exit(av7110); av7110_detach() 2778 if (budgetpatch || av7110->full_ts) { av7110_detach() 2789 tasklet_kill(&av7110->vpe_tasklet); av7110_detach() 2790 saa7146_vfree_destroy_pgtable(saa->pci, av7110->grabbing, &av7110->pt); av7110_detach() 2792 av7110_exit_v4l(av7110); av7110_detach() 2794 av7110_arm_sync(av7110); av7110_detach() 2796 tasklet_kill(&av7110->debi_tasklet); av7110_detach() 2797 tasklet_kill(&av7110->gpio_tasklet); av7110_detach() 2799 dvb_unregister(av7110); av7110_detach() 2804 av7110_ca_exit(av7110); av7110_detach() 2805 av7110_av_exit(av7110); av7110_detach() 2807 vfree(av7110->iobuf); av7110_detach() 2808 pci_free_consistent(saa->pci, 8192, av7110->debi_virt, av7110_detach() 2809 av7110->debi_bus); av7110_detach() 2811 i2c_del_adapter(&av7110->i2c_adap); av7110_detach() 2813 dvb_unregister_adapter (&av7110->dvb_adapter); av7110_detach() 2817 put_firmware(av7110); av7110_detach() 2819 kfree(av7110); av7110_detach() 2829 struct av7110 *av7110 = dev->ext_priv; av7110_irq() local 2854 SAA7146_IER_DISABLE(av7110->dev, MASK_19); av7110_irq() 2855 SAA7146_ISR_CLEAR(av7110->dev, MASK_19); av7110_irq() 2856 tasklet_schedule(&av7110->debi_tasklet); av7110_irq() 2861 tasklet_schedule(&av7110->gpio_tasklet); av7110_irq() 2865 tasklet_schedule(&av7110->vpe_tasklet); av7110_irq() 2913 .name = "av7110", 303 DvbDmxFilterCallback(u8 *buffer1, size_t buffer1_len, u8 *buffer2, size_t buffer2_len, struct dvb_demux_filter *dvbdmxfilter, struct av7110 *av7110) DvbDmxFilterCallback() argument
|
H A D | av7110_ca.c | 39 #include "av7110.h" 44 void CI_handle(struct av7110 *av7110, u8 *data, u16 len) CI_handle() argument 46 dprintk(8, "av7110:%p\n",av7110); CI_handle() 56 av7110->ci_slot[data[2] - 1].flags = 0; CI_handle() 59 av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_PRESENT; CI_handle() 62 av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_READY; CI_handle() 67 //av7110->ci_stat=data[1]; CI_handle() 218 struct av7110 *av7110 = dvbdev->priv; dvb_ca_open() local 221 dprintk(8, "av7110:%p\n",av7110); dvb_ca_open() 225 ci_ll_flush(&av7110->ci_rbuffer, &av7110->ci_wbuffer); dvb_ca_open() 232 struct av7110 *av7110 = dvbdev->priv; dvb_ca_poll() local 233 struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; dvb_ca_poll() 234 struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; dvb_ca_poll() 237 dprintk(8, "av7110:%p\n",av7110); dvb_ca_poll() 254 struct av7110 *av7110 = dvbdev->priv; dvb_ca_ioctl() local 258 dprintk(8, "av7110:%p\n",av7110); dvb_ca_ioctl() 260 if (mutex_lock_interruptible(&av7110->ioctl_mutex)) dvb_ca_ioctl() 265 ret = ci_ll_reset(&av7110->ci_wbuffer, file, arg, dvb_ca_ioctl() 266 &av7110->ci_slot[0]); dvb_ca_ioctl() 273 cap.slot_type = (FW_CI_LL_SUPPORT(av7110->arm_app) ? dvb_ca_ioctl() 286 mutex_unlock(&av7110->ioctl_mutex); dvb_ca_ioctl() 289 av7110->ci_slot[info->num].num = info->num; dvb_ca_ioctl() 290 av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ? dvb_ca_ioctl() 292 memcpy(info, &av7110->ci_slot[info->num], sizeof(ca_slot_info_t)); dvb_ca_ioctl() 317 mutex_unlock(&av7110->ioctl_mutex); dvb_ca_ioctl() 320 av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetDescr, 5, dvb_ca_ioctl() 334 mutex_unlock(&av7110->ioctl_mutex); dvb_ca_ioctl() 342 struct av7110 *av7110 = dvbdev->priv; dvb_ca_write() local 344 dprintk(8, "av7110:%p\n",av7110); dvb_ca_write() 345 return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); dvb_ca_write() 352 struct av7110 *av7110 = dvbdev->priv; dvb_ca_read() local 354 dprintk(8, "av7110:%p\n",av7110); dvb_ca_read() 355 return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); dvb_ca_read() 378 int av7110_ca_register(struct av7110 *av7110) av7110_ca_register() argument 380 return dvb_register_device(&av7110->dvb_adapter, &av7110->ca_dev, av7110_ca_register() 381 &dvbdev_ca, av7110, DVB_DEVICE_CA); av7110_ca_register() 384 void av7110_ca_unregister(struct av7110 *av7110) av7110_ca_unregister() argument 386 dvb_unregister_device(av7110->ca_dev); av7110_ca_unregister() 389 int av7110_ca_init(struct av7110* av7110) av7110_ca_init() argument 391 return ci_ll_init(&av7110->ci_rbuffer, &av7110->ci_wbuffer, 8192); av7110_ca_init() 394 void av7110_ca_exit(struct av7110* av7110) av7110_ca_exit() argument 396 ci_ll_release(&av7110->ci_rbuffer, &av7110->ci_wbuffer); av7110_ca_exit()
|
H A D | av7110_v4l.c | 2 * av7110_v4l.c: av7110 video4linux interface for DVB and Siemens DVB-C analog module 37 #include "av7110.h" 41 int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) msp_writereg() argument 46 switch (av7110->adac_type) { msp_writereg() 57 if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) { msp_writereg() 59 av7110->dvb_adapter.num, reg, val); msp_writereg() 65 static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val) msp_readreg() argument 74 switch (av7110->adac_type) { msp_readreg() 87 if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { msp_readreg() 89 av7110->dvb_adapter.num, reg); msp_readreg() 138 struct av7110 *av7110 = dev->ext_priv; ves1820_writereg() local 144 if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) ves1820_writereg() 151 struct av7110 *av7110 = dev->ext_priv; tuner_write() local 156 if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) tuner_write() 192 struct av7110 *av7110 = (struct av7110*)dev->ext_priv; stv0297_set_tv_freq() local 213 if (av7110->fe->ops.i2c_gate_ctrl) stv0297_set_tv_freq() 214 av7110->fe->ops.i2c_gate_ctrl(av7110->fe, 1); stv0297_set_tv_freq() 234 struct av7110 *av7110 = (struct av7110*)dev->ext_priv; av7110_dvb_c_switch() local 238 dprintk(4, "%p\n", av7110); av7110_dvb_c_switch() 249 if (0 != av7110->current_input) { av7110_dvb_c_switch() 256 switch (av7110->current_input) { av7110_dvb_c_switch() 259 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source av7110_dvb_c_switch() 260 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source av7110_dvb_c_switch() 261 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source av7110_dvb_c_switch() 262 msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono av7110_dvb_c_switch() 263 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone av7110_dvb_c_switch() 264 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume av7110_dvb_c_switch() 266 if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110_dvb_c_switch() 269 } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110_dvb_c_switch() 273 if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) av7110_dvb_c_switch() 274 dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110_dvb_c_switch() 278 if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1) av7110_dvb_c_switch() 279 dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110_dvb_c_switch() 283 if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1) av7110_dvb_c_switch() 284 dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110_dvb_c_switch() 295 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source av7110_dvb_c_switch() 296 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source av7110_dvb_c_switch() 297 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source av7110_dvb_c_switch() 298 msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono av7110_dvb_c_switch() 299 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone av7110_dvb_c_switch() 300 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume av7110_dvb_c_switch() 302 if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110_dvb_c_switch() 305 } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110_dvb_c_switch() 312 if (av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch)) av7110_dvb_c_switch() 328 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_tuner() local 334 if (!av7110->analog_tuner_flags || t->index != 0) vidioc_g_tuner() 350 msp_readreg(av7110, MSP_RD_DEM, 0x007e, &stereo_det); vidioc_g_tuner() 352 msp_readreg(av7110, MSP_RD_DSP, 0x0018, &stereo_det); vidioc_g_tuner() 372 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_s_tuner() local 376 if (!av7110->analog_tuner_flags || av7110->current_input != 1) vidioc_s_tuner() 406 msp_writereg(av7110, MSP_WR_DSP, 0x000e, fm_matrix); vidioc_s_tuner() 407 msp_writereg(av7110, MSP_WR_DSP, 0x0008, src); vidioc_s_tuner() 408 msp_writereg(av7110, MSP_WR_DSP, 0x0009, src); vidioc_s_tuner() 409 msp_writereg(av7110, MSP_WR_DSP, 0x000a, src); vidioc_s_tuner() 416 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_frequency() local 420 if (!av7110->analog_tuner_flags || av7110->current_input != 1) vidioc_g_frequency() 425 f->frequency = av7110->current_freq; vidioc_g_frequency() 432 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_s_frequency() local 436 if (!av7110->analog_tuner_flags || av7110->current_input != 1) vidioc_s_frequency() 442 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0xffe0); /* fast mute */ vidioc_s_frequency() 443 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0xffe0); vidioc_s_frequency() 446 if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) vidioc_s_frequency() 448 else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) vidioc_s_frequency() 450 av7110->current_freq = f->frequency; vidioc_s_frequency() 452 msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x003f); /* start stereo detection */ vidioc_s_frequency() 453 msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x0000); vidioc_s_frequency() 454 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); /* loudspeaker + headphone */ vidioc_s_frequency() 455 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); /* SCART 1 volume */ vidioc_s_frequency() 462 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_enum_input() local 466 if (av7110->analog_tuner_flags) { vidioc_enum_input() 482 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_input() local 484 *input = av7110->current_input; vidioc_g_input() 492 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_s_input() local 496 if (!av7110->analog_tuner_flags) vidioc_s_input() 502 av7110->current_input = input; vidioc_s_input() 518 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_audio() local 523 if (av7110->current_input >= 2) vidioc_g_audio() 532 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_s_audio() local 535 if (av7110->current_input >= 2) vidioc_s_audio() 544 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_sliced_vbi_cap() local 549 if (FW_VERSION(av7110->arm_app) >= 0x2623) { vidioc_g_sliced_vbi_cap() 560 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_g_fmt_sliced_vbi_out() local 563 if (FW_VERSION(av7110->arm_app) < 0x2623) vidioc_g_fmt_sliced_vbi_out() 566 if (av7110->wssMode) { vidioc_g_fmt_sliced_vbi_out() 578 struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; vidioc_s_fmt_sliced_vbi_out() local 581 if (FW_VERSION(av7110->arm_app) < 0x2623) vidioc_s_fmt_sliced_vbi_out() 587 av7110->wssMode = 0; vidioc_s_fmt_sliced_vbi_out() 588 av7110->wssData = 0; vidioc_s_fmt_sliced_vbi_out() 589 return av7110_fw_cmd(av7110, COMTYPE_ENCODER, vidioc_s_fmt_sliced_vbi_out() 597 av7110->wssMode = 1; vidioc_s_fmt_sliced_vbi_out() 598 av7110->wssData = 0; vidioc_s_fmt_sliced_vbi_out() 607 struct av7110 *av7110 = (struct av7110*) dev->ext_priv; av7110_vbi_reset() local 610 av7110->wssMode = 0; av7110_vbi_reset() 611 av7110->wssData = 0; av7110_vbi_reset() 612 if (FW_VERSION(av7110->arm_app) < 0x2623) av7110_vbi_reset() 615 return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 1, 0); av7110_vbi_reset() 622 struct av7110 *av7110 = (struct av7110*) dev->ext_priv; av7110_vbi_write() local 627 if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof d) av7110_vbi_write() 634 av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0]; av7110_vbi_write() 636 av7110->wssData = 0x8000; av7110_vbi_write() 637 rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 1, av7110->wssData); av7110_vbi_write() 707 int av7110_init_analog_module(struct av7110 *av7110) av7110_init_analog_module() argument 711 if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && av7110_init_analog_module() 712 i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { av7110_init_analog_module() 714 av7110->dvb_adapter.num); av7110_init_analog_module() 715 av7110->adac_type = DVB_ADAC_MSP34x0; av7110_init_analog_module() 716 } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && av7110_init_analog_module() 717 i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { av7110_init_analog_module() 719 av7110->dvb_adapter.num); av7110_init_analog_module() 720 av7110->adac_type = DVB_ADAC_MSP34x5; av7110_init_analog_module() 725 msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); av7110_init_analog_module() 726 msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); av7110_init_analog_module() 728 av7110->dvb_adapter.num, version1, version2); av7110_init_analog_module() 729 msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); av7110_init_analog_module() 730 msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone av7110_init_analog_module() 731 msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source av7110_init_analog_module() 732 msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source av7110_init_analog_module() 733 msp_writereg(av7110, MSP_WR_DSP, 0x0004, 0x7f00); // loudspeaker volume av7110_init_analog_module() 734 msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source av7110_init_analog_module() 735 msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume av7110_init_analog_module() 736 msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART av7110_init_analog_module() 738 if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { av7110_init_analog_module() 743 if ((av7110->dev->pci->subsystem_vendor == 0x110a) && (av7110->dev->pci->subsystem_device == 0x0000)) { av7110_init_analog_module() 745 av7110->analog_tuner_flags |= ANALOG_TUNER_VES1820; av7110_init_analog_module() 746 } else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device == 0x0002)) { av7110_init_analog_module() 748 av7110->analog_tuner_flags |= ANALOG_TUNER_VES1820; av7110_init_analog_module() 749 } else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device == 0x000A)) { av7110_init_analog_module() 751 av7110->analog_tuner_flags |= ANALOG_TUNER_STV0297; av7110_init_analog_module() 755 if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110_init_analog_module() 756 if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) av7110_init_analog_module() 758 } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110_init_analog_module() 759 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) av7110_init_analog_module() 760 saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) av7110_init_analog_module() 765 if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) { av7110_init_analog_module() 766 dprintk(1, "saa7113 initialization failed @ card %d", av7110->dvb_adapter.num); av7110_init_analog_module() 772 msp_writereg(av7110, MSP_WR_DEM, 0x00bb, 0x02d0); // AD_CV av7110_init_analog_module() 773 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 3); // FIR1 av7110_init_analog_module() 774 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 18); // FIR1 av7110_init_analog_module() 775 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 27); // FIR1 av7110_init_analog_module() 776 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 48); // FIR1 av7110_init_analog_module() 777 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 66); // FIR1 av7110_init_analog_module() 778 msp_writereg(av7110, MSP_WR_DEM, 0x0001, 72); // FIR1 av7110_init_analog_module() 779 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 4); // FIR2 av7110_init_analog_module() 780 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 64); // FIR2 av7110_init_analog_module() 781 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 0); // FIR2 av7110_init_analog_module() 782 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 3); // FIR2 av7110_init_analog_module() 783 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 18); // FIR2 av7110_init_analog_module() 784 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 27); // FIR2 av7110_init_analog_module() 785 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 48); // FIR2 av7110_init_analog_module() 786 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 66); // FIR2 av7110_init_analog_module() 787 msp_writereg(av7110, MSP_WR_DEM, 0x0005, 72); // FIR2 av7110_init_analog_module() 788 msp_writereg(av7110, MSP_WR_DEM, 0x0083, 0xa000); // MODE_REG av7110_init_analog_module() 789 msp_writereg(av7110, MSP_WR_DEM, 0x0093, 0x00aa); // DCO1_LO 5.74MHz av7110_init_analog_module() 790 msp_writereg(av7110, MSP_WR_DEM, 0x009b, 0x04fc); // DCO1_HI av7110_init_analog_module() 791 msp_writereg(av7110, MSP_WR_DEM, 0x00a3, 0x038e); // DCO2_LO 5.5MHz av7110_init_analog_module() 792 msp_writereg(av7110, MSP_WR_DEM, 0x00ab, 0x04c6); // DCO2_HI av7110_init_analog_module() 793 msp_writereg(av7110, MSP_WR_DEM, 0x0056, 0); // LOAD_REG 1/2 av7110_init_analog_module() 798 saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000); av7110_init_analog_module() 799 saa7146_write(av7110->dev, DD1_INIT, 0x03000700); av7110_init_analog_module() 800 saa7146_write(av7110->dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); av7110_init_analog_module() 805 int av7110_init_v4l(struct av7110 *av7110) av7110_init_v4l() argument 807 struct saa7146_dev* dev = av7110->dev; av7110_init_v4l() 814 if (av7110->analog_tuner_flags) av7110_init_v4l() 845 if (FW_VERSION(av7110->arm_app) < 0x2623) av7110_init_v4l() 848 if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) { av7110_init_v4l() 853 if (FW_VERSION(av7110->arm_app) >= 0x2623) { av7110_init_v4l() 854 if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) av7110_init_v4l() 860 int av7110_exit_v4l(struct av7110 *av7110) av7110_exit_v4l() argument 862 struct saa7146_dev* dev = av7110->dev; av7110_exit_v4l() 864 saa7146_unregister_device(&av7110->v4l_dev, av7110->dev); av7110_exit_v4l() 865 saa7146_unregister_device(&av7110->vbi_dev, av7110->dev); av7110_exit_v4l() 920 struct av7110 *av7110 = (struct av7110*) dev->ext_priv; std_callback() local 923 av7110->vidmode = AV7110_VIDEO_MODE_PAL; std_callback() 924 av7110_set_vidmode(av7110, av7110->vidmode); std_callback() 927 av7110->vidmode = AV7110_VIDEO_MODE_NTSC; std_callback() 928 av7110_set_vidmode(av7110, av7110->vidmode); std_callback()
|
H A D | av7110_hw.h | 4 #include "av7110.h" 293 * area between PCI bus and av7110, 355 /* used by boot protocol to load firmware into av7110 DRAM */ 366 extern int av7110_bootarm(struct av7110 *av7110); 367 extern int av7110_firmversion(struct av7110 *av7110); 372 extern int av7110_wait_msgstate(struct av7110 *av7110, u16 flags); 373 extern int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...); 374 extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf, 379 extern int av7110_debiwrite(struct av7110 *av7110, u32 config, 381 extern u32 av7110_debiread(struct av7110 *av7110, u32 config, 387 static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) iwdebi() argument 389 av7110_debiwrite(av7110, config, addr, val, count); iwdebi() 393 static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, mwdebi() argument 396 memcpy(av7110->debi_virt, val, count); mwdebi() 397 av7110_debiwrite(av7110, config, addr, 0, count); mwdebi() 400 static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) irdebi() argument 404 res=av7110_debiread(av7110, config, addr, count); irdebi() 406 memcpy(av7110->debi_virt, (char *) &res, count); irdebi() 411 static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) wdebi() argument 415 spin_lock_irqsave(&av7110->debilock, flags); wdebi() 416 av7110_debiwrite(av7110, config, addr, val, count); wdebi() 417 spin_unlock_irqrestore(&av7110->debilock, flags); wdebi() 420 static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, int count) rdebi() argument 425 spin_lock_irqsave(&av7110->debilock, flags); rdebi() 426 res=av7110_debiread(av7110, config, addr, count); rdebi() 427 spin_unlock_irqrestore(&av7110->debilock, flags); rdebi() 432 static inline void ARM_ResetMailBox(struct av7110 *av7110) ARM_ResetMailBox() argument 436 spin_lock_irqsave(&av7110->debilock, flags); ARM_ResetMailBox() 437 av7110_debiread(av7110, DEBINOSWAP, IRQ_RX, 2); ARM_ResetMailBox() 438 av7110_debiwrite(av7110, DEBINOSWAP, IRQ_RX, 0, 2); ARM_ResetMailBox() 439 spin_unlock_irqrestore(&av7110->debilock, flags); ARM_ResetMailBox() 442 static inline void ARM_ClearMailBox(struct av7110 *av7110) ARM_ClearMailBox() argument 444 iwdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); ARM_ClearMailBox() 447 static inline void ARM_ClearIrq(struct av7110 *av7110) ARM_ClearIrq() argument 449 irdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); ARM_ClearIrq() 456 static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data) SendDAC() argument 458 return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data); SendDAC() 461 static inline int av7710_set_video_mode(struct av7110 *av7110, int mode) av7710_set_video_mode() argument 463 return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode); av7710_set_video_mode() 466 static inline int vidcom(struct av7110 *av7110, u32 com, u32 arg) vidcom() argument 468 return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_VIDEO_COMMAND, 4, vidcom() 473 static inline int audcom(struct av7110 *av7110, u32 com) audcom() argument 475 return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_AUDIO_COMMAND, 2, audcom() 479 static inline int Set22K(struct av7110 *av7110, int state) Set22K() argument 481 return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0); Set22K() 485 extern int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst); 489 extern int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc); 490 extern int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap);
|
H A D | av7110_ir.c | 32 #include "av7110.h" 63 static struct av7110 *av_list[AV_CNT]; 221 int av7110_check_ir_config(struct av7110 *av7110, int force) av7110_check_ir_config() argument 228 if (av7110 == av_list[i]) av7110_check_ir_config() 231 if (i < av_cnt && av7110) { av7110_check_ir_config() 232 if ((av7110->ir.protocol & 1) != ir_protocol[i] || av7110_check_ir_config() 233 av7110->ir.inversion != ir_inversion[i]) av7110_check_ir_config() 240 av7110->ir.protocol = IR_RCMM; av7110_check_ir_config() 241 av7110->ir.ir_config = 0x0001; av7110_check_ir_config() 242 } else if (FW_VERSION(av7110->arm_app) >= 0x2620) { av7110_check_ir_config() 243 av7110->ir.protocol = IR_RC5_EXT; av7110_check_ir_config() 244 av7110->ir.ir_config = 0x0002; av7110_check_ir_config() 246 av7110->ir.protocol = IR_RC5; av7110_check_ir_config() 247 av7110->ir.ir_config = 0x0000; av7110_check_ir_config() 252 av7110->ir.ir_config |= 0x8000; av7110_check_ir_config() 254 av7110->ir.inversion = ir_inversion[i]; av7110_check_ir_config() 256 ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110_check_ir_config() 257 av7110->ir.ir_config); av7110_check_ir_config() 262 if (av7110->ir.device_mask != ir_device_mask[i]) av7110_check_ir_config() 263 av7110->ir.device_mask = ir_device_mask[i]; av7110_check_ir_config() 319 static void ir_handler(struct av7110 *av7110, u32 ircom) ir_handler() argument 322 av7110->ir.ir_command = ircom; ir_handler() 323 tasklet_schedule(&av7110->ir.ir_tasklet); ir_handler() 327 int av7110_ir_init(struct av7110 *av7110) av7110_ir_init() argument 336 av_list[av_cnt++] = av7110; av7110_ir_init() 337 av7110_check_ir_config(av7110, true); av7110_ir_init() 339 init_timer(&av7110->ir.keyup_timer); av7110_ir_init() 340 av7110->ir.keyup_timer.function = av7110_emit_keyup; av7110_ir_init() 341 av7110->ir.keyup_timer.data = (unsigned long) &av7110->ir; av7110_ir_init() 347 av7110->ir.input_dev = input_dev; av7110_ir_init() 348 snprintf(av7110->ir.input_phys, sizeof(av7110->ir.input_phys), av7110_ir_init() 349 "pci-%s/ir0", pci_name(av7110->dev->pci)); av7110_ir_init() 353 input_dev->phys = av7110->ir.input_phys; av7110_ir_init() 356 if (av7110->dev->pci->subsystem_vendor) { av7110_ir_init() 357 input_dev->id.vendor = av7110->dev->pci->subsystem_vendor; av7110_ir_init() 358 input_dev->id.product = av7110->dev->pci->subsystem_device; av7110_ir_init() 360 input_dev->id.vendor = av7110->dev->pci->vendor; av7110_ir_init() 361 input_dev->id.product = av7110->dev->pci->device; av7110_ir_init() 363 input_dev->dev.parent = &av7110->dev->pci->dev; av7110_ir_init() 365 memcpy(av7110->ir.key_map, default_key_map, sizeof av7110->ir.key_map); av7110_ir_init() 366 input_register_keys(&av7110->ir); av7110_ir_init() 373 input_dev->timer.data = (unsigned long) &av7110->ir; av7110_ir_init() 381 tasklet_init(&av7110->ir.ir_tasklet, av7110_emit_key, (unsigned long) &av7110->ir); av7110_ir_init() 382 av7110->ir.ir_handler = ir_handler; av7110_ir_init() 388 void av7110_ir_exit(struct av7110 *av7110) av7110_ir_exit() argument 395 del_timer_sync(&av7110->ir.keyup_timer); av7110_ir_exit() 396 av7110->ir.ir_handler = NULL; av7110_ir_exit() 397 tasklet_kill(&av7110->ir.ir_tasklet); av7110_ir_exit() 400 if (av_list[i] == av7110) { av7110_ir_exit() 409 input_unregister_device(av7110->ir.input_dev); av7110_ir_exit()
|
H A D | av7110.h | 76 struct av7110; 85 void (*ir_handler)(struct av7110 *av7110, u32 ircom); 98 struct av7110 { struct 277 void (*recover)(struct av7110* av7110); 300 extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, 303 extern int av7110_check_ir_config(struct av7110 *av7110, int force); 304 extern int av7110_ir_init(struct av7110 *av7110); 305 extern void av7110_ir_exit(struct av7110 *av7110); 313 extern int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val); 314 extern u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg); 315 extern int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val); 318 extern int av7110_init_analog_module(struct av7110 *av7110); 319 extern int av7110_init_v4l(struct av7110 *av7110); 320 extern int av7110_exit_v4l(struct av7110 *av7110);
|
H A D | Makefile | 6 dvb-ttpci-objs := av7110_hw.o av7110_v4l.o av7110_av.o av7110_ca.o av7110.o av7110_ipack.o
|
H A D | budget-patch.c | 33 #include "av7110.h"
|
/linux-4.4.14/drivers/media/dvb-core/ |
H A D | dvb_ringbuffer.c | 8 * based on code originally found in av7110.c & dvb_ci.c:
|
H A D | dvb_ringbuffer.h | 8 * based on code originally found in av7110.c & dvb_ci.c:
|
H A D | demux.h | 590 * private: Only used at av7110, to read some data from firmware.
|
/linux-4.4.14/firmware/ |
H A D | Makefile | 64 fw-shipped-$(CONFIG_DVB_AV7110) += av7110/bootcode.bin
|
/linux-4.4.14/Documentation/dvb/ |
H A D | get_dvb_firmware | 25 "tda10046lifeview", "av7110", "dec2000t", "dec2540t", 153 sub av7110 { subroutine
|