av7110 102 drivers/media/pci/ttpci/av7110.c static void restart_feeds(struct av7110 *av7110); av7110 117 drivers/media/pci/ttpci/av7110.c static void init_av7110_av(struct av7110 *av7110) av7110 120 drivers/media/pci/ttpci/av7110.c struct saa7146_dev *dev = av7110->dev; av7110 123 drivers/media/pci/ttpci/av7110.c av7110->adac_type = DVB_ADAC_TI; av7110 124 drivers/media/pci/ttpci/av7110.c ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); av7110 128 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, av7110 129 drivers/media/pci/ttpci/av7110.c 1, (u16) av7110->display_ar); av7110 132 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, av7110 133 drivers/media/pci/ttpci/av7110.c 1, av7110->display_panscan); av7110 137 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 2, wss_cfg_4_3); av7110 140 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 3, wss_cfg_16_9); av7110 144 drivers/media/pci/ttpci/av7110.c ret = av7710_set_video_mode(av7110, vidmode); av7110 150 drivers/media/pci/ttpci/av7110.c av7110->analog_tuner_flags = 0; av7110 151 drivers/media/pci/ttpci/av7110.c av7110->current_input = 0; av7110 153 drivers/media/pci/ttpci/av7110.c av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 0); // SPDIF on av7110 154 drivers/media/pci/ttpci/av7110.c if (i2c_writereg(av7110, 0x20, 0x00, 0x00) == 1) { av7110 156 drivers/media/pci/ttpci/av7110.c av7110->dvb_adapter.num); av7110 157 drivers/media/pci/ttpci/av7110.c av7110->adac_type = DVB_ADAC_CRYSTAL; av7110 158 drivers/media/pci/ttpci/av7110.c i2c_writereg(av7110, 0x20, 0x01, 0xd2); av7110 159 drivers/media/pci/ttpci/av7110.c i2c_writereg(av7110, 0x20, 0x02, 0x49); av7110 160 drivers/media/pci/ttpci/av7110.c i2c_writereg(av7110, 0x20, 0x03, 0x00); av7110 161 drivers/media/pci/ttpci/av7110.c i2c_writereg(av7110, 0x20, 0x04, 0x00); av7110 166 drivers/media/pci/ttpci/av7110.c } else if (0 == av7110_init_analog_module(av7110)) { av7110 171 drivers/media/pci/ttpci/av7110.c av7110->dvb_adapter.num); av7110 172 drivers/media/pci/ttpci/av7110.c av7110->adac_type = DVB_ADAC_NONE; av7110 175 drivers/media/pci/ttpci/av7110.c av7110->adac_type = adac; av7110 177 drivers/media/pci/ttpci/av7110.c av7110->adac_type, av7110->dvb_adapter.num); av7110 180 drivers/media/pci/ttpci/av7110.c if (av7110->adac_type == DVB_ADAC_NONE || av7110->adac_type == DVB_ADAC_MSP34x0) { av7110 182 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0); av7110 185 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1); av7110 189 drivers/media/pci/ttpci/av7110.c ((av7110->dev->pci->subsystem_vendor == 0x110a) || av7110 190 drivers/media/pci/ttpci/av7110.c (av7110->dev->pci->subsystem_vendor == 0x13c2)) && av7110 191 drivers/media/pci/ttpci/av7110.c (av7110->dev->pci->subsystem_device == 0x0000)) { av7110 198 drivers/media/pci/ttpci/av7110.c av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on av7110 200 drivers/media/pci/ttpci/av7110.c ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); av7110 205 drivers/media/pci/ttpci/av7110.c static void recover_arm(struct av7110 *av7110) av7110 207 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n",av7110); av7110 209 drivers/media/pci/ttpci/av7110.c av7110_bootarm(av7110); av7110 212 drivers/media/pci/ttpci/av7110.c init_av7110_av(av7110); av7110 215 drivers/media/pci/ttpci/av7110.c if (av7110->recover) av7110 216 drivers/media/pci/ttpci/av7110.c av7110->recover(av7110); av7110 218 drivers/media/pci/ttpci/av7110.c restart_feeds(av7110); av7110 221 drivers/media/pci/ttpci/av7110.c av7110_set_ir_config(av7110); av7110 225 drivers/media/pci/ttpci/av7110.c static void av7110_arm_sync(struct av7110 *av7110) av7110 227 drivers/media/pci/ttpci/av7110.c if (av7110->arm_thread) av7110 228 drivers/media/pci/ttpci/av7110.c kthread_stop(av7110->arm_thread); av7110 230 drivers/media/pci/ttpci/av7110.c av7110->arm_thread = NULL; av7110 235 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = data; av7110 239 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n",av7110); av7110 242 drivers/media/pci/ttpci/av7110.c timeout = wait_event_interruptible_timeout(av7110->arm_wait, av7110 250 drivers/media/pci/ttpci/av7110.c if (!av7110->arm_ready) av7110 253 drivers/media/pci/ttpci/av7110.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 255 drivers/media/pci/ttpci/av7110.c newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2); av7110 256 drivers/media/pci/ttpci/av7110.c mutex_unlock(&av7110->dcomlock); av7110 258 drivers/media/pci/ttpci/av7110.c if (newloops == av7110->arm_loops || av7110->arm_errors > 3) { av7110 260 drivers/media/pci/ttpci/av7110.c av7110->dvb_adapter.num); av7110 262 drivers/media/pci/ttpci/av7110.c recover_arm(av7110); av7110 264 drivers/media/pci/ttpci/av7110.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 266 drivers/media/pci/ttpci/av7110.c newloops = rdebi(av7110, DEBINOSWAP, STATUS_LOOPS, 0, 2) - 1; av7110 267 drivers/media/pci/ttpci/av7110.c mutex_unlock(&av7110->dcomlock); av7110 269 drivers/media/pci/ttpci/av7110.c av7110->arm_loops = newloops; av7110 270 drivers/media/pci/ttpci/av7110.c av7110->arm_errors = 0; av7110 284 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110) av7110 321 drivers/media/pci/ttpci/av7110.c &av7110->p2t_filter[dvbdmxfilter->index]); av7110 341 drivers/media/pci/ttpci/av7110.c static inline void start_debi_dma(struct av7110 *av7110, int dir, av7110 345 drivers/media/pci/ttpci/av7110.c if (saa7146_wait_for_debi_done(av7110->dev, 0)) { av7110 350 drivers/media/pci/ttpci/av7110.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19); /* for good measure */ av7110 351 drivers/media/pci/ttpci/av7110.c SAA7146_IER_ENABLE(av7110->dev, MASK_19); av7110 355 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBISWAB, addr, 0, (len + 3) & ~3); av7110 357 drivers/media/pci/ttpci/av7110.c irdebi(av7110, DEBISWAB, addr, 0, len); av7110 362 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = (struct av7110 *)cookie; av7110 363 drivers/media/pci/ttpci/av7110.c int type = av7110->debitype; av7110 372 drivers/media/pci/ttpci/av7110.c jiffies, saa7146_read(av7110->dev, PSR), av7110 373 drivers/media/pci/ttpci/av7110.c saa7146_read(av7110->dev, SSR)); av7110 376 drivers/media/pci/ttpci/av7110.c av7110->debitype = -1; av7110 381 drivers/media/pci/ttpci/av7110.c dvb_dmx_swfilter_packets(&av7110->demux, av7110 382 drivers/media/pci/ttpci/av7110.c (const u8 *) av7110->debi_virt, av7110 383 drivers/media/pci/ttpci/av7110.c av7110->debilen / 188); av7110 388 drivers/media/pci/ttpci/av7110.c if (av7110->demux.recording) av7110 389 drivers/media/pci/ttpci/av7110.c av7110_record_cb(&av7110->p2t[handle], av7110 390 drivers/media/pci/ttpci/av7110.c (u8 *) av7110->debi_virt, av7110 391 drivers/media/pci/ttpci/av7110.c av7110->debilen); av7110 398 drivers/media/pci/ttpci/av7110.c if (av7110->handle2filter[handle]) av7110 399 drivers/media/pci/ttpci/av7110.c DvbDmxFilterCallback((u8 *)av7110->debi_virt, av7110 400 drivers/media/pci/ttpci/av7110.c av7110->debilen, NULL, 0, av7110 401 drivers/media/pci/ttpci/av7110.c av7110->handle2filter[handle], av7110 402 drivers/media/pci/ttpci/av7110.c av7110); av7110 408 drivers/media/pci/ttpci/av7110.c u8 *data = av7110->debi_virt; av7110 416 drivers/media/pci/ttpci/av7110.c av7110->ci_slot[data[0]].flags = flags; av7110 418 drivers/media/pci/ttpci/av7110.c ci_get_data(&av7110->ci_rbuffer, av7110 419 drivers/media/pci/ttpci/av7110.c av7110->debi_virt, av7110 420 drivers/media/pci/ttpci/av7110.c av7110->debilen); av7110 426 drivers/media/pci/ttpci/av7110.c CI_handle(av7110, (u8 *)av7110->debi_virt, av7110->debilen); av7110 431 drivers/media/pci/ttpci/av7110.c ((s8*)av7110->debi_virt)[Reserved_SIZE - 1] = 0; av7110 432 drivers/media/pci/ttpci/av7110.c printk("%s\n", (s8 *) av7110->debi_virt); av7110 452 drivers/media/pci/ttpci/av7110.c spin_lock(&av7110->debilock); av7110 454 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, xfer, 0, 2); av7110 455 drivers/media/pci/ttpci/av7110.c ARM_ClearMailBox(av7110); av7110 456 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 462 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = (struct av7110 *)cookie; av7110 466 drivers/media/pci/ttpci/av7110.c if (av7110->debitype != -1) av7110 469 drivers/media/pci/ttpci/av7110.c jiffies, saa7146_read(av7110->dev, PSR), av7110 470 drivers/media/pci/ttpci/av7110.c saa7146_read(av7110->dev, SSR)); av7110 472 drivers/media/pci/ttpci/av7110.c if (saa7146_wait_for_debi_done(av7110->dev, 0)) { av7110 477 drivers/media/pci/ttpci/av7110.c spin_lock(&av7110->debilock); av7110 478 drivers/media/pci/ttpci/av7110.c ARM_ClearIrq(av7110); av7110 481 drivers/media/pci/ttpci/av7110.c av7110->debitype = irdebi(av7110, DEBINOSWAP, IRQ_STATE, 0, 2); av7110 482 drivers/media/pci/ttpci/av7110.c av7110->debilen = irdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 483 drivers/media/pci/ttpci/av7110.c rxbuf = irdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110 484 drivers/media/pci/ttpci/av7110.c txbuf = irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 485 drivers/media/pci/ttpci/av7110.c len = (av7110->debilen + 3) & ~3; av7110 488 drivers/media/pci/ttpci/av7110.c dprintk(8, "GPIO0 irq 0x%04x %d\n", av7110->debitype, av7110->debilen); av7110 490 drivers/media/pci/ttpci/av7110.c switch (av7110->debitype & 0xff) { av7110 501 drivers/media/pci/ttpci/av7110.c av7110->video_size.w = irdebi(av7110, DEBINOSWAP, STATUS_MPEG_WIDTH, 0, 2); av7110 502 drivers/media/pci/ttpci/av7110.c h_ar = irdebi(av7110, DEBINOSWAP, STATUS_MPEG_HEIGHT_AR, 0, 2); av7110 504 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 505 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110 507 drivers/media/pci/ttpci/av7110.c av7110->video_size.h = h_ar & 0xfff; av7110 510 drivers/media/pci/ttpci/av7110.c event.u.size.w = av7110->video_size.w; av7110 511 drivers/media/pci/ttpci/av7110.c event.u.size.h = av7110->video_size.h; av7110 515 drivers/media/pci/ttpci/av7110.c av7110->video_size.aspect_ratio = VIDEO_FORMAT_16_9; av7110 517 drivers/media/pci/ttpci/av7110.c av7110->videostate.video_format = VIDEO_FORMAT_16_9; av7110 520 drivers/media/pci/ttpci/av7110.c av7110->video_size.aspect_ratio = VIDEO_FORMAT_221_1; av7110 522 drivers/media/pci/ttpci/av7110.c av7110->videostate.video_format = VIDEO_FORMAT_221_1; av7110 525 drivers/media/pci/ttpci/av7110.c av7110->video_size.aspect_ratio = VIDEO_FORMAT_4_3; av7110 527 drivers/media/pci/ttpci/av7110.c av7110->videostate.video_format = VIDEO_FORMAT_4_3; av7110 531 drivers/media/pci/ttpci/av7110.c av7110->video_size.w, av7110->video_size.h, av7110 532 drivers/media/pci/ttpci/av7110.c av7110->video_size.aspect_ratio); av7110 534 drivers/media/pci/ttpci/av7110.c dvb_video_add_event(av7110, &event); av7110 541 drivers/media/pci/ttpci/av7110.c struct dvb_ringbuffer *cibuf = &av7110->ci_wbuffer; av7110 545 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 546 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); av7110 547 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 553 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 554 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); av7110 555 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 560 drivers/media/pci/ttpci/av7110.c dvb_ringbuffer_read(cibuf, av7110->debi_virt, len); av7110 562 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); av7110 563 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); av7110 565 drivers/media/pci/ttpci/av7110.c start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE + txbuf, len); av7110 566 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 572 drivers/media/pci/ttpci/av7110.c if (!av7110->playing) { av7110 573 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 574 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); av7110 575 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 579 drivers/media/pci/ttpci/av7110.c if (av7110->debitype & 0x100) { av7110 580 drivers/media/pci/ttpci/av7110.c spin_lock(&av7110->aout.lock); av7110 581 drivers/media/pci/ttpci/av7110.c len = av7110_pes_play(av7110->debi_virt, &av7110->aout, 2048); av7110 582 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->aout.lock); av7110 584 drivers/media/pci/ttpci/av7110.c if (len <= 0 && (av7110->debitype & 0x200) av7110 585 drivers/media/pci/ttpci/av7110.c &&av7110->videostate.play_state != VIDEO_FREEZED) { av7110 586 drivers/media/pci/ttpci/av7110.c spin_lock(&av7110->avout.lock); av7110 587 drivers/media/pci/ttpci/av7110.c len = av7110_pes_play(av7110->debi_virt, &av7110->avout, 2048); av7110 588 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->avout.lock); av7110 591 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 592 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); av7110 593 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 597 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); av7110 598 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); av7110 600 drivers/media/pci/ttpci/av7110.c start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE + txbuf, len); av7110 601 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 605 drivers/media/pci/ttpci/av7110.c len = av7110->debilen; av7110 608 drivers/media/pci/ttpci/av7110.c av7110->bmp_state = BMP_LOADED; av7110 609 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2); av7110 610 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, 0, 2); av7110 611 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2); av7110 612 drivers/media/pci/ttpci/av7110.c wake_up(&av7110->bmpq); av7110 616 drivers/media/pci/ttpci/av7110.c if (len > av7110->bmplen) av7110 617 drivers/media/pci/ttpci/av7110.c len = av7110->bmplen; av7110 620 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2); av7110 621 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, len, 2); av7110 622 drivers/media/pci/ttpci/av7110.c memcpy(av7110->debi_virt, av7110->bmpbuf+av7110->bmpp, len); av7110 623 drivers/media/pci/ttpci/av7110.c av7110->bmpp += len; av7110 624 drivers/media/pci/ttpci/av7110.c av7110->bmplen -= len; av7110 626 drivers/media/pci/ttpci/av7110.c start_debi_dma(av7110, DEBI_WRITE, DPRAM_BASE+txbuf, len); av7110 627 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 636 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110 644 drivers/media/pci/ttpci/av7110.c start_debi_dma(av7110, DEBI_READ, DPRAM_BASE+rxbuf, len); av7110 645 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 650 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110 653 drivers/media/pci/ttpci/av7110.c start_debi_dma(av7110, DEBI_READ, Reserved, len); av7110 654 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 659 drivers/media/pci/ttpci/av7110.c av7110_ir_handler(av7110, av7110 660 drivers/media/pci/ttpci/av7110.c swahw32(irdebi(av7110, DEBINOSWAP, Reserved, av7110 663 drivers/media/pci/ttpci/av7110.c iwdebi(av7110, DEBINOSWAP, RX_BUFF, 0, 2); av7110 668 drivers/media/pci/ttpci/av7110.c av7110->debitype, av7110->debilen); av7110 671 drivers/media/pci/ttpci/av7110.c av7110->debitype = -1; av7110 672 drivers/media/pci/ttpci/av7110.c ARM_ClearMailBox(av7110); av7110 673 drivers/media/pci/ttpci/av7110.c spin_unlock(&av7110->debilock); av7110 682 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dvbdev->priv; av7110 684 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 687 drivers/media/pci/ttpci/av7110.c return av7110_osd_cmd(av7110, (osd_cmd_t *) parg); av7110 689 drivers/media/pci/ttpci/av7110.c return av7110_osd_capability(av7110, (osd_cap_t *) parg); av7110 713 drivers/media/pci/ttpci/av7110.c static inline int SetPIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, av7110 718 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 723 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_VIDEO] = 0; av7110 724 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_AUDIO] = 0; av7110 725 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_TELETEXT] = 0; av7110 726 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_PCR] = 0; av7110 729 drivers/media/pci/ttpci/av7110.c if (av7110->audiostate.bypass_mode) av7110 732 drivers/media/pci/ttpci/av7110.c return av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, MultiPID, 6, av7110 736 drivers/media/pci/ttpci/av7110.c int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, av7110 740 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 742 drivers/media/pci/ttpci/av7110.c if (mutex_lock_interruptible(&av7110->pid_mutex)) av7110 746 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_VIDEO] = vpid; av7110 748 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_AUDIO] = apid; av7110 750 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_TELETEXT] = ttpid; av7110 752 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_PCR] = pcrpid; av7110 754 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_SUBTITLE] = 0; av7110 756 drivers/media/pci/ttpci/av7110.c if (av7110->fe_synced) { av7110 757 drivers/media/pci/ttpci/av7110.c pcrpid = av7110->pids[DMX_PES_PCR]; av7110 758 drivers/media/pci/ttpci/av7110.c ret = SetPIDs(av7110, vpid, apid, ttpid, subpid, pcrpid); av7110 761 drivers/media/pci/ttpci/av7110.c mutex_unlock(&av7110->pid_mutex); av7110 773 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dvbdmxfeed->demux->priv; av7110 780 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 782 drivers/media/pci/ttpci/av7110.c if (av7110->full_ts) av7110 797 drivers/media/pci/ttpci/av7110.c av7110_p2t_init(&av7110->p2t_filter[dvbdmxfilter->index], dvbdmxfeed); av7110 805 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_request(av7110, buf, 20, &handle, 1); av7110 816 drivers/media/pci/ttpci/av7110.c av7110->handle2filter[handle] = dvbdmxfilter; av7110 824 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dvbdmxfilter->feed->demux->priv; av7110 830 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 832 drivers/media/pci/ttpci/av7110.c if (av7110->full_ts) av7110 842 drivers/media/pci/ttpci/av7110.c av7110->handle2filter[handle] = NULL; av7110 847 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_request(av7110, buf, 3, answ, 2); av7110 862 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dvbdmx->priv; av7110 867 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 874 drivers/media/pci/ttpci/av7110.c ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); av7110 880 drivers/media/pci/ttpci/av7110.c ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); av7110 886 drivers/media/pci/ttpci/av7110.c if (av7110->fe_synced) av7110 888 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); av7110 893 drivers/media/pci/ttpci/av7110.c if ((dvbdmxfeed->ts_type & TS_PACKET) && !av7110->full_ts) { av7110 895 drivers/media/pci/ttpci/av7110.c ret = av7110_av_start_record(av7110, RP_AUDIO, dvbdmxfeed); av7110 897 drivers/media/pci/ttpci/av7110.c ret = av7110_av_start_record(av7110, RP_VIDEO, dvbdmxfeed); av7110 905 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dvbdmx->priv; av7110 911 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 914 drivers/media/pci/ttpci/av7110.c ret = av7110_av_stop(av7110, dvbdmxfeed->pes_type ? RP_VIDEO : RP_AUDIO); av7110 917 drivers/media/pci/ttpci/av7110.c if (!av7110->rec_mode) av7110 919 drivers/media/pci/ttpci/av7110.c if (!av7110->playing) av7110 939 drivers/media/pci/ttpci/av7110.c ret = ChangePIDs(av7110, npids[1], npids[0], npids[2], npids[3], npids[4]); av7110 946 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = demux->priv; av7110 949 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 954 drivers/media/pci/ttpci/av7110.c if (!av7110->full_ts && feed->pid > 0x1fff) av7110 966 drivers/media/pci/ttpci/av7110.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110 967 drivers/media/pci/ttpci/av7110.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); av7110 968 drivers/media/pci/ttpci/av7110.c ret = av7110_av_start_play(av7110,RP_AV); av7110 983 drivers/media/pci/ttpci/av7110.c if (av7110->full_ts) { av7110 1014 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = demux->priv; av7110 1016 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 1035 drivers/media/pci/ttpci/av7110.c if (av7110->full_ts) { av7110 1059 drivers/media/pci/ttpci/av7110.c static void restart_feeds(struct av7110 *av7110) av7110 1061 drivers/media/pci/ttpci/av7110.c struct dvb_demux *dvbdmx = &av7110->demux; av7110 1067 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 1069 drivers/media/pci/ttpci/av7110.c mode = av7110->playing; av7110 1070 drivers/media/pci/ttpci/av7110.c av7110->playing = 0; av7110 1071 drivers/media/pci/ttpci/av7110.c av7110->rec_mode = 0; av7110 1073 drivers/media/pci/ttpci/av7110.c feeding = av7110->feeding1; /* full_ts mod */ av7110 1092 drivers/media/pci/ttpci/av7110.c av7110->feeding1 = feeding; /* full_ts mod */ av7110 1095 drivers/media/pci/ttpci/av7110.c av7110_av_start_play(av7110, mode); av7110 1105 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110; av7110 1111 drivers/media/pci/ttpci/av7110.c av7110 = dvbdemux->priv; av7110 1113 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 1118 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_request(av7110, &tag, 0, fwstc, 4); av7110 1143 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1147 drivers/media/pci/ttpci/av7110.c return Set22K(av7110, 1); av7110 1150 drivers/media/pci/ttpci/av7110.c return Set22K(av7110, 0); av7110 1160 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1162 drivers/media/pci/ttpci/av7110.c return av7110_diseqc_send(av7110, cmd->msg_len, cmd->msg, -1); av7110 1168 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1170 drivers/media/pci/ttpci/av7110.c return av7110_diseqc_send(av7110, 0, NULL, minicmd); av7110 1174 drivers/media/pci/ttpci/av7110.c static int stop_ts_capture(struct av7110 *budget) av7110 1186 drivers/media/pci/ttpci/av7110.c static int start_ts_capture(struct av7110 *budget) av7110 1206 drivers/media/pci/ttpci/av7110.c struct av7110 *budget = demux->priv; av7110 1221 drivers/media/pci/ttpci/av7110.c struct av7110 *budget = demux->priv; av7110 1234 drivers/media/pci/ttpci/av7110.c struct av7110 *budget = (struct av7110 *)cookie; av7110 1271 drivers/media/pci/ttpci/av7110.c static int av7110_register(struct av7110 *av7110) av7110 1274 drivers/media/pci/ttpci/av7110.c struct dvb_demux *dvbdemux = &av7110->demux; av7110 1275 drivers/media/pci/ttpci/av7110.c struct dvb_demux *dvbdemux1 = &av7110->demux1; av7110 1277 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 1279 drivers/media/pci/ttpci/av7110.c if (av7110->registered) av7110 1282 drivers/media/pci/ttpci/av7110.c av7110->registered = 1; av7110 1284 drivers/media/pci/ttpci/av7110.c dvbdemux->priv = (void *) av7110; av7110 1287 drivers/media/pci/ttpci/av7110.c av7110->handle2filter[i] = NULL; av7110 1289 drivers/media/pci/ttpci/av7110.c dvbdemux->filternum = (av7110->full_ts) ? 256 : 32; av7110 1290 drivers/media/pci/ttpci/av7110.c dvbdemux->feednum = (av7110->full_ts) ? 256 : 32; av7110 1297 drivers/media/pci/ttpci/av7110.c dvb_dmx_init(&av7110->demux); av7110 1298 drivers/media/pci/ttpci/av7110.c av7110->demux.dmx.get_stc = dvb_get_stc; av7110 1300 drivers/media/pci/ttpci/av7110.c av7110->dmxdev.filternum = (av7110->full_ts) ? 256 : 32; av7110 1301 drivers/media/pci/ttpci/av7110.c av7110->dmxdev.demux = &dvbdemux->dmx; av7110 1302 drivers/media/pci/ttpci/av7110.c av7110->dmxdev.capabilities = 0; av7110 1304 drivers/media/pci/ttpci/av7110.c dvb_dmxdev_init(&av7110->dmxdev, &av7110->dvb_adapter); av7110 1306 drivers/media/pci/ttpci/av7110.c av7110->hw_frontend.source = DMX_FRONTEND_0; av7110 1308 drivers/media/pci/ttpci/av7110.c ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &av7110->hw_frontend); av7110 1313 drivers/media/pci/ttpci/av7110.c av7110->mem_frontend.source = DMX_MEMORY_FE; av7110 1315 drivers/media/pci/ttpci/av7110.c ret = dvbdemux->dmx.add_frontend(&dvbdemux->dmx, &av7110->mem_frontend); av7110 1321 drivers/media/pci/ttpci/av7110.c &av7110->hw_frontend); av7110 1325 drivers/media/pci/ttpci/av7110.c av7110_av_register(av7110); av7110 1326 drivers/media/pci/ttpci/av7110.c av7110_ca_register(av7110); av7110 1329 drivers/media/pci/ttpci/av7110.c dvb_register_device(&av7110->dvb_adapter, &av7110->osd_dev, av7110 1330 drivers/media/pci/ttpci/av7110.c &dvbdev_osd, av7110, DVB_DEVICE_OSD, 0); av7110 1333 drivers/media/pci/ttpci/av7110.c dvb_net_init(&av7110->dvb_adapter, &av7110->dvb_net, &dvbdemux->dmx); av7110 1339 drivers/media/pci/ttpci/av7110.c dvbdemux1->priv = (void *) av7110; av7110 1350 drivers/media/pci/ttpci/av7110.c dvb_dmx_init(&av7110->demux1); av7110 1352 drivers/media/pci/ttpci/av7110.c av7110->dmxdev1.filternum = 256; av7110 1353 drivers/media/pci/ttpci/av7110.c av7110->dmxdev1.demux = &dvbdemux1->dmx; av7110 1354 drivers/media/pci/ttpci/av7110.c av7110->dmxdev1.capabilities = 0; av7110 1356 drivers/media/pci/ttpci/av7110.c dvb_dmxdev_init(&av7110->dmxdev1, &av7110->dvb_adapter); av7110 1358 drivers/media/pci/ttpci/av7110.c dvb_net_init(&av7110->dvb_adapter, &av7110->dvb_net1, &dvbdemux1->dmx); av7110 1365 drivers/media/pci/ttpci/av7110.c static void dvb_unregister(struct av7110 *av7110) av7110 1367 drivers/media/pci/ttpci/av7110.c struct dvb_demux *dvbdemux = &av7110->demux; av7110 1368 drivers/media/pci/ttpci/av7110.c struct dvb_demux *dvbdemux1 = &av7110->demux1; av7110 1370 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 1372 drivers/media/pci/ttpci/av7110.c if (!av7110->registered) av7110 1376 drivers/media/pci/ttpci/av7110.c dvb_net_release(&av7110->dvb_net1); av7110 1378 drivers/media/pci/ttpci/av7110.c dvb_dmxdev_release(&av7110->dmxdev1); av7110 1379 drivers/media/pci/ttpci/av7110.c dvb_dmx_release(&av7110->demux1); av7110 1382 drivers/media/pci/ttpci/av7110.c dvb_net_release(&av7110->dvb_net); av7110 1385 drivers/media/pci/ttpci/av7110.c dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->hw_frontend); av7110 1386 drivers/media/pci/ttpci/av7110.c dvbdemux->dmx.remove_frontend(&dvbdemux->dmx, &av7110->mem_frontend); av7110 1388 drivers/media/pci/ttpci/av7110.c dvb_dmxdev_release(&av7110->dmxdev); av7110 1389 drivers/media/pci/ttpci/av7110.c dvb_dmx_release(&av7110->demux); av7110 1391 drivers/media/pci/ttpci/av7110.c if (av7110->fe != NULL) { av7110 1392 drivers/media/pci/ttpci/av7110.c dvb_unregister_frontend(av7110->fe); av7110 1393 drivers/media/pci/ttpci/av7110.c dvb_frontend_detach(av7110->fe); av7110 1395 drivers/media/pci/ttpci/av7110.c dvb_unregister_device(av7110->osd_dev); av7110 1396 drivers/media/pci/ttpci/av7110.c av7110_av_unregister(av7110); av7110 1397 drivers/media/pci/ttpci/av7110.c av7110_ca_unregister(av7110); av7110 1405 drivers/media/pci/ttpci/av7110.c int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val) av7110 1414 drivers/media/pci/ttpci/av7110.c return i2c_transfer(&av7110->i2c_adap, &msgs, 1); av7110 1417 drivers/media/pci/ttpci/av7110.c u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg) av7110 1429 drivers/media/pci/ttpci/av7110.c i2c_transfer(&av7110->i2c_adap, msgs, 2); av7110 1439 drivers/media/pci/ttpci/av7110.c static int check_firmware(struct av7110* av7110) av7110 1445 drivers/media/pci/ttpci/av7110.c ptr = av7110->bin_fw; av7110 1466 drivers/media/pci/ttpci/av7110.c av7110->bin_dpram = ptr; av7110 1467 drivers/media/pci/ttpci/av7110.c av7110->size_dpram = len; av7110 1477 drivers/media/pci/ttpci/av7110.c len > ((av7110->bin_fw + av7110->size_fw) - ptr)) { av7110 1485 drivers/media/pci/ttpci/av7110.c av7110->bin_root = ptr; av7110 1486 drivers/media/pci/ttpci/av7110.c av7110->size_root = len; av7110 1490 drivers/media/pci/ttpci/av7110.c static void put_firmware(struct av7110* av7110) av7110 1492 drivers/media/pci/ttpci/av7110.c vfree(av7110->bin_fw); av7110 1495 drivers/media/pci/ttpci/av7110.c static int get_firmware(struct av7110* av7110) av7110 1501 drivers/media/pci/ttpci/av7110.c ret = request_firmware(&fw, "dvb-ttpci-01.fw", &av7110->dev->pci->dev); av7110 1520 drivers/media/pci/ttpci/av7110.c av7110->bin_fw = vmalloc(fw->size); av7110 1521 drivers/media/pci/ttpci/av7110.c if (NULL == av7110->bin_fw) { av7110 1527 drivers/media/pci/ttpci/av7110.c memcpy(av7110->bin_fw, fw->data, fw->size); av7110 1528 drivers/media/pci/ttpci/av7110.c av7110->size_fw = fw->size; av7110 1529 drivers/media/pci/ttpci/av7110.c if ((ret = check_firmware(av7110))) av7110 1530 drivers/media/pci/ttpci/av7110.c vfree(av7110->bin_fw); av7110 1539 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1568 drivers/media/pci/ttpci/av7110.c if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) av7110 1582 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1596 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) av7110 1614 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1627 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) av7110 1641 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1656 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) av7110 1673 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1692 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) av7110 1700 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1702 drivers/media/pci/ttpci/av7110.c return request_firmware(fw, name, &av7110->dev->pci->dev); av7110 1811 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1837 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { av7110 1846 drivers/media/pci/ttpci/av7110.c if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) av7110 1867 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1902 drivers/media/pci/ttpci/av7110.c if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; av7110 1912 drivers/media/pci/ttpci/av7110.c static int av7110_fe_lock_fix(struct av7110 *av7110, enum fe_status status) av7110 1917 drivers/media/pci/ttpci/av7110.c av7110->fe_status = status; av7110 1919 drivers/media/pci/ttpci/av7110.c if (av7110->fe_synced == synced) av7110 1922 drivers/media/pci/ttpci/av7110.c if (av7110->playing) { av7110 1923 drivers/media/pci/ttpci/av7110.c av7110->fe_synced = synced; av7110 1927 drivers/media/pci/ttpci/av7110.c if (mutex_lock_interruptible(&av7110->pid_mutex)) av7110 1931 drivers/media/pci/ttpci/av7110.c ret = SetPIDs(av7110, av7110->pids[DMX_PES_VIDEO], av7110 1932 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_AUDIO], av7110 1933 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_TELETEXT], 0, av7110 1934 drivers/media/pci/ttpci/av7110.c av7110->pids[DMX_PES_PCR]); av7110 1936 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); av7110 1938 drivers/media/pci/ttpci/av7110.c ret = SetPIDs(av7110, 0, 0, 0, 0, 0); av7110 1940 drivers/media/pci/ttpci/av7110.c ret = av7110_fw_cmd(av7110, COMTYPE_PID_FILTER, FlushTSQueue, 0); av7110 1942 drivers/media/pci/ttpci/av7110.c ret = av7110_wait_msgstate(av7110, GPMQBusy); av7110 1947 drivers/media/pci/ttpci/av7110.c av7110->fe_synced = synced; av7110 1949 drivers/media/pci/ttpci/av7110.c mutex_unlock(&av7110->pid_mutex); av7110 1955 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1957 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 1959 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_set_frontend(fe); av7110 1966 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1968 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 1970 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_init(fe); av7110 1977 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1980 drivers/media/pci/ttpci/av7110.c int ret = av7110->fe_read_status(fe, status); av7110 1982 drivers/media/pci/ttpci/av7110.c if (((*status ^ av7110->fe_status) & FE_HAS_LOCK) && (*status & FE_HAS_LOCK)) av7110 1983 drivers/media/pci/ttpci/av7110.c ret = av7110_fe_lock_fix(av7110, *status); av7110 1989 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 1991 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 1993 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_diseqc_reset_overload(fe); av7110 2000 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 2002 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 2004 drivers/media/pci/ttpci/av7110.c av7110->saved_master_cmd = *cmd; av7110 2005 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_diseqc_send_master_cmd(fe, cmd); av7110 2013 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 2015 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 2017 drivers/media/pci/ttpci/av7110.c av7110->saved_minicmd = minicmd; av7110 2018 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_diseqc_send_burst(fe, minicmd); av7110 2026 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 2028 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 2030 drivers/media/pci/ttpci/av7110.c av7110->saved_tone = tone; av7110 2031 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_set_tone(fe, tone); av7110 2039 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 2041 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 2043 drivers/media/pci/ttpci/av7110.c av7110->saved_voltage = voltage; av7110 2044 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_set_voltage(fe, voltage); av7110 2051 drivers/media/pci/ttpci/av7110.c struct av7110* av7110 = fe->dvb->priv; av7110 2053 drivers/media/pci/ttpci/av7110.c int ret = av7110_fe_lock_fix(av7110, 0); av7110 2055 drivers/media/pci/ttpci/av7110.c ret = av7110->fe_dishnetwork_send_legacy_command(fe, cmd); av7110 2059 drivers/media/pci/ttpci/av7110.c static void dvb_s_recover(struct av7110* av7110) av7110 2061 drivers/media/pci/ttpci/av7110.c av7110_fe_init(av7110->fe); av7110 2063 drivers/media/pci/ttpci/av7110.c av7110_fe_set_voltage(av7110->fe, av7110->saved_voltage); av7110 2064 drivers/media/pci/ttpci/av7110.c if (av7110->saved_master_cmd.msg_len) { av7110 2066 drivers/media/pci/ttpci/av7110.c av7110_fe_diseqc_send_master_cmd(av7110->fe, &av7110->saved_master_cmd); av7110 2069 drivers/media/pci/ttpci/av7110.c av7110_fe_diseqc_send_burst(av7110->fe, av7110->saved_minicmd); av7110 2071 drivers/media/pci/ttpci/av7110.c av7110_fe_set_tone(av7110->fe, av7110->saved_tone); av7110 2073 drivers/media/pci/ttpci/av7110.c av7110_fe_set_frontend(av7110->fe); av7110 2076 drivers/media/pci/ttpci/av7110.c static u8 read_pwm(struct av7110* av7110) av7110 2083 drivers/media/pci/ttpci/av7110.c if ((i2c_transfer(&av7110->i2c_adap, msg, 2) != 2) || (pwm == 0xff)) av7110 2089 drivers/media/pci/ttpci/av7110.c static int frontend_init(struct av7110 *av7110) av7110 2093 drivers/media/pci/ttpci/av7110.c if (av7110->dev->pci->subsystem_vendor == 0x110a) { av7110 2094 drivers/media/pci/ttpci/av7110.c switch(av7110->dev->pci->subsystem_device) { av7110 2096 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, av7110 2097 drivers/media/pci/ttpci/av7110.c &av7110->i2c_adap, read_pwm(av7110)); av7110 2098 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2099 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; av7110 2104 drivers/media/pci/ttpci/av7110.c } else if (av7110->dev->pci->subsystem_vendor == 0x13c2) { av7110 2105 drivers/media/pci/ttpci/av7110.c switch(av7110->dev->pci->subsystem_device) { av7110 2111 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); av7110 2112 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2113 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; av7110 2114 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110 2115 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; av7110 2116 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.set_tone = av7110_set_tone; av7110 2117 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2122 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(stv0299_attach, &alps_bsru6_config, &av7110->i2c_adap); av7110 2123 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2124 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params; av7110 2125 drivers/media/pci/ttpci/av7110.c av7110->fe->tuner_priv = &av7110->i2c_adap; av7110 2127 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110 2128 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; av7110 2129 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.set_tone = av7110_set_tone; av7110 2130 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2135 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); av7110 2136 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2137 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; av7110 2138 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110 2139 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; av7110 2140 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.set_tone = av7110_set_tone; av7110 2141 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2146 drivers/media/pci/ttpci/av7110.c switch(av7110->dev->pci->subsystem_device) { av7110 2149 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1820_attach, &philips_cd1516_config, &av7110->i2c_adap, av7110 2150 drivers/media/pci/ttpci/av7110.c read_pwm(av7110)); av7110 2151 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2152 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params; av7110 2157 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, av7110 2158 drivers/media/pci/ttpci/av7110.c read_pwm(av7110)); av7110 2159 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2160 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; av7110 2171 drivers/media/pci/ttpci/av7110.c fe = dvb_attach(sp8870_attach, &alps_tdlb7_config, &av7110->i2c_adap); av7110 2174 drivers/media/pci/ttpci/av7110.c av7110->fe = fe; av7110 2182 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(l64781_attach, &grundig_29504_401_config, &av7110->i2c_adap); av7110 2183 drivers/media/pci/ttpci/av7110.c if (av7110->fe) av7110 2184 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; av7110 2189 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1820_attach, &alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); av7110 2190 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2191 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params; av7110 2197 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(ves1x93_attach, &alps_bsrv2_config, &av7110->i2c_adap); av7110 2198 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2199 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params; av7110 2200 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110 2201 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; av7110 2202 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.set_tone = av7110_set_tone; av7110 2203 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2209 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(tda8083_attach, &grundig_29504_451_config, &av7110->i2c_adap); av7110 2210 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2211 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params; av7110 2212 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; av7110 2213 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst; av7110 2214 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.set_tone = av7110_set_tone; av7110 2215 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2221 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(stv0297_attach, &nexusca_stv0297_config, &av7110->i2c_adap); av7110 2222 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2223 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params; av7110 2226 drivers/media/pci/ttpci/av7110.c saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) av7110 2227 drivers/media/pci/ttpci/av7110.c saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) av7110 2230 drivers/media/pci/ttpci/av7110.c av7110->dev->i2c_bitrate = SAA7146_I2C_BUS_BIT_RATE_240; av7110 2237 drivers/media/pci/ttpci/av7110.c av7110->fe = dvb_attach(stv0299_attach, &alps_bsbe1_config, &av7110->i2c_adap); av7110 2238 drivers/media/pci/ttpci/av7110.c if (av7110->fe) { av7110 2239 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params; av7110 2240 drivers/media/pci/ttpci/av7110.c av7110->fe->tuner_priv = &av7110->i2c_adap; av7110 2242 drivers/media/pci/ttpci/av7110.c if (dvb_attach(lnbp21_attach, av7110->fe, &av7110->i2c_adap, 0, 0) == NULL) { av7110 2244 drivers/media/pci/ttpci/av7110.c if (av7110->fe->ops.release) av7110 2245 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.release(av7110->fe); av7110 2246 drivers/media/pci/ttpci/av7110.c av7110->fe = NULL; av7110 2248 drivers/media/pci/ttpci/av7110.c av7110->fe->ops.dishnetwork_send_legacy_command = NULL; av7110 2249 drivers/media/pci/ttpci/av7110.c av7110->recover = dvb_s_recover; av7110 2256 drivers/media/pci/ttpci/av7110.c if (!av7110->fe) { av7110 2260 drivers/media/pci/ttpci/av7110.c av7110->dev->pci->vendor, av7110 2261 drivers/media/pci/ttpci/av7110.c av7110->dev->pci->device, av7110 2262 drivers/media/pci/ttpci/av7110.c av7110->dev->pci->subsystem_vendor, av7110 2263 drivers/media/pci/ttpci/av7110.c av7110->dev->pci->subsystem_device); av7110 2265 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init); av7110 2266 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status); av7110 2267 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); av7110 2268 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); av7110 2269 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); av7110 2270 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone); av7110 2271 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage); av7110 2272 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); av7110 2273 drivers/media/pci/ttpci/av7110.c FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); av7110 2275 drivers/media/pci/ttpci/av7110.c ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); av7110 2278 drivers/media/pci/ttpci/av7110.c dvb_frontend_detach(av7110->fe); av7110 2279 drivers/media/pci/ttpci/av7110.c av7110->fe = NULL; av7110 2350 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110; av7110 2446 drivers/media/pci/ttpci/av7110.c av7110 = kzalloc(sizeof(struct av7110), GFP_KERNEL); av7110 2447 drivers/media/pci/ttpci/av7110.c if (!av7110) { av7110 2452 drivers/media/pci/ttpci/av7110.c av7110->card_name = (char*) pci_ext->ext_priv; av7110 2453 drivers/media/pci/ttpci/av7110.c av7110->dev = dev; av7110 2454 drivers/media/pci/ttpci/av7110.c dev->ext_priv = av7110; av7110 2456 drivers/media/pci/ttpci/av7110.c ret = get_firmware(av7110); av7110 2460 drivers/media/pci/ttpci/av7110.c ret = dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name, av7110 2469 drivers/media/pci/ttpci/av7110.c strscpy(av7110->i2c_adap.name, pci_ext->ext_priv, av7110 2470 drivers/media/pci/ttpci/av7110.c sizeof(av7110->i2c_adap.name)); av7110 2472 drivers/media/pci/ttpci/av7110.c saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */ av7110 2474 drivers/media/pci/ttpci/av7110.c ret = i2c_add_adapter(&av7110->i2c_adap); av7110 2478 drivers/media/pci/ttpci/av7110.c ttpci_eeprom_parse_mac(&av7110->i2c_adap, av7110 2479 drivers/media/pci/ttpci/av7110.c av7110->dvb_adapter.proposed_mac); av7110 2484 drivers/media/pci/ttpci/av7110.c av7110->full_ts = true; av7110 2487 drivers/media/pci/ttpci/av7110.c if (i2c_readreg(av7110, 0xaa, 0) == 0x4f && i2c_readreg(av7110, 0xaa, 1) == 0x45) { av7110 2488 drivers/media/pci/ttpci/av7110.c u8 flags = i2c_readreg(av7110, 0xaa, 2); av7110 2490 drivers/media/pci/ttpci/av7110.c av7110->full_ts = true; av7110 2493 drivers/media/pci/ttpci/av7110.c if (av7110->full_ts) { av7110 2495 drivers/media/pci/ttpci/av7110.c spin_lock_init(&av7110->feedlock1); av7110 2496 drivers/media/pci/ttpci/av7110.c av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, av7110 2497 drivers/media/pci/ttpci/av7110.c &av7110->pt); av7110 2498 drivers/media/pci/ttpci/av7110.c if (!av7110->grabbing) av7110 2516 drivers/media/pci/ttpci/av7110.c saa7146_write(dev, BASE_PAGE3, av7110->pt.dma | ME1 | 0x90); av7110 2520 drivers/media/pci/ttpci/av7110.c tasklet_init(&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110); av7110 2523 drivers/media/pci/ttpci/av7110.c spin_lock_init(&av7110->feedlock1); av7110 2524 drivers/media/pci/ttpci/av7110.c av7110->grabbing = saa7146_vmalloc_build_pgtable(pdev, length, av7110 2525 drivers/media/pci/ttpci/av7110.c &av7110->pt); av7110 2526 drivers/media/pci/ttpci/av7110.c if (!av7110->grabbing) av7110 2539 drivers/media/pci/ttpci/av7110.c saa7146_write(dev, BASE_PAGE3, av7110->pt.dma | ME1 | 0x90); av7110 2601 drivers/media/pci/ttpci/av7110.c tasklet_init (&av7110->vpe_tasklet, vpeirq, (unsigned long) av7110); av7110 2616 drivers/media/pci/ttpci/av7110.c tasklet_init (&av7110->debi_tasklet, debiirq, (unsigned long) av7110); av7110 2617 drivers/media/pci/ttpci/av7110.c tasklet_init (&av7110->gpio_tasklet, gpioirq, (unsigned long) av7110); av7110 2619 drivers/media/pci/ttpci/av7110.c mutex_init(&av7110->pid_mutex); av7110 2622 drivers/media/pci/ttpci/av7110.c spin_lock_init(&av7110->debilock); av7110 2623 drivers/media/pci/ttpci/av7110.c mutex_init(&av7110->dcomlock); av7110 2624 drivers/media/pci/ttpci/av7110.c av7110->debitype = -1; av7110 2627 drivers/media/pci/ttpci/av7110.c av7110->osdwin = 1; av7110 2628 drivers/media/pci/ttpci/av7110.c mutex_init(&av7110->osd_mutex); av7110 2631 drivers/media/pci/ttpci/av7110.c av7110->vidmode = tv_standard == 1 ? AV7110_VIDEO_MODE_NTSC av7110 2635 drivers/media/pci/ttpci/av7110.c init_waitqueue_head(&av7110->arm_wait); av7110 2636 drivers/media/pci/ttpci/av7110.c av7110->arm_thread = NULL; av7110 2639 drivers/media/pci/ttpci/av7110.c av7110->debi_virt = pci_alloc_consistent(pdev, 8192, &av7110->debi_bus); av7110 2640 drivers/media/pci/ttpci/av7110.c if (!av7110->debi_virt) av7110 2644 drivers/media/pci/ttpci/av7110.c av7110->iobuf = vmalloc(AVOUTLEN+AOUTLEN+BMPLEN+4*IPACKS); av7110 2645 drivers/media/pci/ttpci/av7110.c if (!av7110->iobuf) av7110 2648 drivers/media/pci/ttpci/av7110.c ret = av7110_av_init(av7110); av7110 2653 drivers/media/pci/ttpci/av7110.c av7110->bmpbuf = av7110->iobuf+AVOUTLEN+AOUTLEN; av7110 2654 drivers/media/pci/ttpci/av7110.c init_waitqueue_head(&av7110->bmpq); av7110 2656 drivers/media/pci/ttpci/av7110.c ret = av7110_ca_init(av7110); av7110 2661 drivers/media/pci/ttpci/av7110.c ret = av7110_bootarm(av7110); av7110 2665 drivers/media/pci/ttpci/av7110.c ret = av7110_firmversion(av7110); av7110 2669 drivers/media/pci/ttpci/av7110.c if (FW_VERSION(av7110->arm_app)<0x2501) av7110 2672 drivers/media/pci/ttpci/av7110.c FW_VERSION(av7110->arm_app)); av7110 2674 drivers/media/pci/ttpci/av7110.c thread = kthread_run(arm_thread, (void *) av7110, "arm_mon"); av7110 2679 drivers/media/pci/ttpci/av7110.c av7110->arm_thread = thread; av7110 2682 drivers/media/pci/ttpci/av7110.c av7110->mixer.volume_left = volume; av7110 2683 drivers/media/pci/ttpci/av7110.c av7110->mixer.volume_right = volume; av7110 2685 drivers/media/pci/ttpci/av7110.c ret = av7110_register(av7110); av7110 2689 drivers/media/pci/ttpci/av7110.c init_av7110_av(av7110); av7110 2694 drivers/media/pci/ttpci/av7110.c ret = av7110_init_v4l(av7110); av7110 2698 drivers/media/pci/ttpci/av7110.c av7110->dvb_adapter.priv = av7110; av7110 2699 drivers/media/pci/ttpci/av7110.c ret = frontend_init(av7110); av7110 2703 drivers/media/pci/ttpci/av7110.c mutex_init(&av7110->ioctl_mutex); av7110 2706 drivers/media/pci/ttpci/av7110.c av7110_ir_init(av7110); av7110 2714 drivers/media/pci/ttpci/av7110.c av7110_exit_v4l(av7110); av7110 2716 drivers/media/pci/ttpci/av7110.c dvb_unregister(av7110); av7110 2718 drivers/media/pci/ttpci/av7110.c av7110_arm_sync(av7110); av7110 2722 drivers/media/pci/ttpci/av7110.c av7110_ca_exit(av7110); av7110 2724 drivers/media/pci/ttpci/av7110.c av7110_av_exit(av7110); av7110 2726 drivers/media/pci/ttpci/av7110.c vfree(av7110->iobuf); av7110 2728 drivers/media/pci/ttpci/av7110.c pci_free_consistent(pdev, 8192, av7110->debi_virt, av7110->debi_bus); av7110 2730 drivers/media/pci/ttpci/av7110.c if (av7110->grabbing) av7110 2731 drivers/media/pci/ttpci/av7110.c saa7146_vfree_destroy_pgtable(pdev, av7110->grabbing, &av7110->pt); av7110 2733 drivers/media/pci/ttpci/av7110.c i2c_del_adapter(&av7110->i2c_adap); av7110 2735 drivers/media/pci/ttpci/av7110.c dvb_unregister_adapter(&av7110->dvb_adapter); av7110 2737 drivers/media/pci/ttpci/av7110.c put_firmware(av7110); av7110 2739 drivers/media/pci/ttpci/av7110.c kfree(av7110); av7110 2745 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = saa->ext_priv; av7110 2746 drivers/media/pci/ttpci/av7110.c dprintk(4, "%p\n", av7110); av7110 2749 drivers/media/pci/ttpci/av7110.c av7110_ir_exit(av7110); av7110 2751 drivers/media/pci/ttpci/av7110.c if (budgetpatch || av7110->full_ts) { av7110 2762 drivers/media/pci/ttpci/av7110.c tasklet_kill(&av7110->vpe_tasklet); av7110 2763 drivers/media/pci/ttpci/av7110.c saa7146_vfree_destroy_pgtable(saa->pci, av7110->grabbing, &av7110->pt); av7110 2765 drivers/media/pci/ttpci/av7110.c av7110_exit_v4l(av7110); av7110 2767 drivers/media/pci/ttpci/av7110.c av7110_arm_sync(av7110); av7110 2769 drivers/media/pci/ttpci/av7110.c tasklet_kill(&av7110->debi_tasklet); av7110 2770 drivers/media/pci/ttpci/av7110.c tasklet_kill(&av7110->gpio_tasklet); av7110 2772 drivers/media/pci/ttpci/av7110.c dvb_unregister(av7110); av7110 2777 drivers/media/pci/ttpci/av7110.c av7110_ca_exit(av7110); av7110 2778 drivers/media/pci/ttpci/av7110.c av7110_av_exit(av7110); av7110 2780 drivers/media/pci/ttpci/av7110.c vfree(av7110->iobuf); av7110 2781 drivers/media/pci/ttpci/av7110.c pci_free_consistent(saa->pci, 8192, av7110->debi_virt, av7110 2782 drivers/media/pci/ttpci/av7110.c av7110->debi_bus); av7110 2784 drivers/media/pci/ttpci/av7110.c i2c_del_adapter(&av7110->i2c_adap); av7110 2786 drivers/media/pci/ttpci/av7110.c dvb_unregister_adapter (&av7110->dvb_adapter); av7110 2790 drivers/media/pci/ttpci/av7110.c put_firmware(av7110); av7110 2792 drivers/media/pci/ttpci/av7110.c kfree(av7110); av7110 2802 drivers/media/pci/ttpci/av7110.c struct av7110 *av7110 = dev->ext_priv; av7110 2827 drivers/media/pci/ttpci/av7110.c SAA7146_IER_DISABLE(av7110->dev, MASK_19); av7110 2828 drivers/media/pci/ttpci/av7110.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19); av7110 2829 drivers/media/pci/ttpci/av7110.c tasklet_schedule(&av7110->debi_tasklet); av7110 2834 drivers/media/pci/ttpci/av7110.c tasklet_schedule(&av7110->gpio_tasklet); av7110 2838 drivers/media/pci/ttpci/av7110.c tasklet_schedule(&av7110->vpe_tasklet); av7110 80 drivers/media/pci/ttpci/av7110.h struct av7110; av7110 269 drivers/media/pci/ttpci/av7110.h void (*recover)(struct av7110* av7110); av7110 292 drivers/media/pci/ttpci/av7110.h extern int ChangePIDs(struct av7110 *av7110, u16 vpid, u16 apid, u16 ttpid, av7110 295 drivers/media/pci/ttpci/av7110.h void av7110_ir_handler(struct av7110 *av7110, u32 ircom); av7110 296 drivers/media/pci/ttpci/av7110.h int av7110_set_ir_config(struct av7110 *av7110); av7110 297 drivers/media/pci/ttpci/av7110.h int av7110_ir_init(struct av7110 *av7110); av7110 298 drivers/media/pci/ttpci/av7110.h void av7110_ir_exit(struct av7110 *av7110); av7110 306 drivers/media/pci/ttpci/av7110.h extern int i2c_writereg(struct av7110 *av7110, u8 id, u8 reg, u8 val); av7110 307 drivers/media/pci/ttpci/av7110.h extern u8 i2c_readreg(struct av7110 *av7110, u8 id, u8 reg); av7110 308 drivers/media/pci/ttpci/av7110.h extern int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val); av7110 311 drivers/media/pci/ttpci/av7110.h extern int av7110_init_analog_module(struct av7110 *av7110); av7110 312 drivers/media/pci/ttpci/av7110.h extern int av7110_init_v4l(struct av7110 *av7110); av7110 313 drivers/media/pci/ttpci/av7110.h extern int av7110_exit_v4l(struct av7110 *av7110); av7110 75 drivers/media/pci/ttpci/av7110_av.c static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len); av7110 102 drivers/media/pci/ttpci/av7110_av.c int av7110_av_start_record(struct av7110 *av7110, int av, av7110 108 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, , dvb_demux_feed:%p\n", av7110, dvbdmxfeed); av7110 110 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing || (av7110->rec_mode & av)) av7110 112 drivers/media/pci/ttpci/av7110_av.c av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110 114 drivers/media/pci/ttpci/av7110_av.c av7110->rec_mode |= av; av7110 116 drivers/media/pci/ttpci/av7110_av.c switch (av7110->rec_mode) { av7110 118 drivers/media/pci/ttpci/av7110_av.c dvb_filter_pes2ts_init(&av7110->p2t[0], av7110 122 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0); av7110 126 drivers/media/pci/ttpci/av7110_av.c dvb_filter_pes2ts_init(&av7110->p2t[1], av7110 130 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0); av7110 134 drivers/media/pci/ttpci/av7110_av.c dvb_filter_pes2ts_init(&av7110->p2t[0], av7110 138 drivers/media/pci/ttpci/av7110_av.c dvb_filter_pes2ts_init(&av7110->p2t[1], av7110 142 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AV_PES, 0); av7110 148 drivers/media/pci/ttpci/av7110_av.c int av7110_av_start_play(struct av7110 *av7110, int av) av7110 151 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 153 drivers/media/pci/ttpci/av7110_av.c if (av7110->rec_mode) av7110 155 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing & av) av7110 158 drivers/media/pci/ttpci/av7110_av.c av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110 160 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing == RP_NONE) { av7110 161 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_reset(&av7110->ipack[0]); av7110 162 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_reset(&av7110->ipack[1]); av7110 165 drivers/media/pci/ttpci/av7110_av.c av7110->playing |= av; av7110 166 drivers/media/pci/ttpci/av7110_av.c switch (av7110->playing) { av7110 168 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0); av7110 171 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0); av7110 172 drivers/media/pci/ttpci/av7110_av.c av7110->sinfo = 0; av7110 175 drivers/media/pci/ttpci/av7110_av.c av7110->sinfo = 0; av7110 176 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AV_PES, 0); av7110 182 drivers/media/pci/ttpci/av7110_av.c int av7110_av_stop(struct av7110 *av7110, int av) av7110 185 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 187 drivers/media/pci/ttpci/av7110_av.c if (!(av7110->playing & av) && !(av7110->rec_mode & av)) av7110 189 drivers/media/pci/ttpci/av7110_av.c av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110 190 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing) { av7110 191 drivers/media/pci/ttpci/av7110_av.c av7110->playing &= ~av; av7110 192 drivers/media/pci/ttpci/av7110_av.c switch (av7110->playing) { av7110 194 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, AudioPES, 0); av7110 197 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Play, 2, VideoPES, 0); av7110 200 drivers/media/pci/ttpci/av7110_av.c ret = av7110_set_vidmode(av7110, av7110->vidmode); av7110 204 drivers/media/pci/ttpci/av7110_av.c av7110->rec_mode &= ~av; av7110 205 drivers/media/pci/ttpci/av7110_av.c switch (av7110->rec_mode) { av7110 207 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, AudioPES, 0); av7110 210 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Record, 2, VideoPES, 0); av7110 266 drivers/media/pci/ttpci/av7110_av.c int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, av7110 272 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 274 drivers/media/pci/ttpci/av7110_av.c av7110->mixer.volume_left = volleft; av7110 275 drivers/media/pci/ttpci/av7110_av.c av7110->mixer.volume_right = volright; av7110 277 drivers/media/pci/ttpci/av7110_av.c switch (av7110->adac_type) { av7110 285 drivers/media/pci/ttpci/av7110_av.c if ((err = SendDAC(av7110, 3, 0x80 + volleft))) av7110 287 drivers/media/pci/ttpci/av7110_av.c return SendDAC(av7110, 4, volright); av7110 292 drivers/media/pci/ttpci/av7110_av.c i2c_writereg(av7110, 0x20, 0x03, volleft); av7110 293 drivers/media/pci/ttpci/av7110_av.c i2c_writereg(av7110, 0x20, 0x04, volright); av7110 301 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); av7110 302 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ av7110 303 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0006, val); /* headphonesr */ av7110 311 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0001, balance << 8); av7110 312 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, val); /* loudspeaker */ av7110 319 drivers/media/pci/ttpci/av7110_av.c int av7110_set_vidmode(struct av7110 *av7110, enum av7110_video_mode mode) av7110 322 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 324 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, LoadVidCode, 1, mode); av7110 326 drivers/media/pci/ttpci/av7110_av.c if (!ret && !av7110->playing) { av7110 327 drivers/media/pci/ttpci/av7110_av.c ret = ChangePIDs(av7110, av7110->pids[DMX_PES_VIDEO], av7110 328 drivers/media/pci/ttpci/av7110_av.c av7110->pids[DMX_PES_AUDIO], av7110 329 drivers/media/pci/ttpci/av7110_av.c av7110->pids[DMX_PES_TELETEXT], av7110 330 drivers/media/pci/ttpci/av7110_av.c 0, av7110->pids[DMX_PES_PCR]); av7110 332 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, Scan, 0); av7110 349 drivers/media/pci/ttpci/av7110_av.c static int get_video_format(struct av7110 *av7110, u8 *buf, int count) av7110 357 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 359 drivers/media/pci/ttpci/av7110_av.c if (av7110->sinfo) av7110 369 drivers/media/pci/ttpci/av7110_av.c ret = av7110_set_vidmode(av7110, sw2mode[sw]); av7110 372 drivers/media/pci/ttpci/av7110_av.c av7110->sinfo = 1; av7110 409 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = (struct av7110 *) priv; av7110 410 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 413 drivers/media/pci/ttpci/av7110_av.c get_video_format(av7110, buf, count); av7110 414 drivers/media/pci/ttpci/av7110_av.c aux_ring_buffer_write(&av7110->avout, buf, count); av7110 416 drivers/media/pci/ttpci/av7110_av.c aux_ring_buffer_write(&av7110->aout, buf, count); av7110 421 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = (struct av7110 *) priv; av7110 422 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 424 drivers/media/pci/ttpci/av7110_av.c aux_ring_buffer_write(&av7110->aout, buf, count); av7110 430 drivers/media/pci/ttpci/av7110_av.c static ssize_t ts_play(struct av7110 *av7110, const char __user *buf, av7110 439 drivers/media/pci/ttpci/av7110_av.c rb = (type) ? &av7110->avout : &av7110->aout; av7110 440 drivers/media/pci/ttpci/av7110_av.c kb = av7110->kbuf[type]; av7110 457 drivers/media/pci/ttpci/av7110_av.c write_ts_to_decoder(av7110, type, kb, TS_SIZE); av7110 466 drivers/media/pci/ttpci/av7110_av.c #define FREE_COND (dvb_ringbuffer_free(&av7110->avout) >= 20 * 1024 && \ av7110 467 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024) av7110 469 drivers/media/pci/ttpci/av7110_av.c static ssize_t dvb_play(struct av7110 *av7110, const char __user *buf, av7110 473 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 475 drivers/media/pci/ttpci/av7110_av.c if (!av7110->kbuf[type]) av7110 485 drivers/media/pci/ttpci/av7110_av.c if (wait_event_interruptible(av7110->avout.queue, av7110 492 drivers/media/pci/ttpci/av7110_av.c if (copy_from_user(av7110->kbuf[type], buf, n)) av7110 494 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_instant_repack(av7110->kbuf[type], n, av7110 495 drivers/media/pci/ttpci/av7110_av.c &av7110->ipack[type]); av7110 502 drivers/media/pci/ttpci/av7110_av.c static ssize_t dvb_play_kernel(struct av7110 *av7110, const u8 *buf, av7110 506 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 508 drivers/media/pci/ttpci/av7110_av.c if (!av7110->kbuf[type]) av7110 518 drivers/media/pci/ttpci/av7110_av.c if (wait_event_interruptible(av7110->avout.queue, av7110 525 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_instant_repack(buf, n, &av7110->ipack[type]); av7110 532 drivers/media/pci/ttpci/av7110_av.c static ssize_t dvb_aplay(struct av7110 *av7110, const char __user *buf, av7110 536 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 538 drivers/media/pci/ttpci/av7110_av.c if (!av7110->kbuf[type]) av7110 540 drivers/media/pci/ttpci/av7110_av.c if (nonblock && dvb_ringbuffer_free(&av7110->aout) < 20 * 1024) av7110 544 drivers/media/pci/ttpci/av7110_av.c if (dvb_ringbuffer_free(&av7110->aout) < 20 * 1024) { av7110 547 drivers/media/pci/ttpci/av7110_av.c if (wait_event_interruptible(av7110->aout.queue, av7110 548 drivers/media/pci/ttpci/av7110_av.c (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024))) av7110 554 drivers/media/pci/ttpci/av7110_av.c if (copy_from_user(av7110->kbuf[type], buf, n)) av7110 556 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_instant_repack(av7110->kbuf[type], n, av7110 557 drivers/media/pci/ttpci/av7110_av.c &av7110->ipack[type]); av7110 809 drivers/media/pci/ttpci/av7110_av.c static int write_ts_to_decoder(struct av7110 *av7110, int type, const u8 *buf, size_t len) av7110 811 drivers/media/pci/ttpci/av7110_av.c struct ipack *ipack = &av7110->ipack[type]; av7110 839 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = (struct av7110 *) demux->priv; av7110 841 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 843 drivers/media/pci/ttpci/av7110_av.c if (av7110->full_ts && demux->dmx.frontend->source != DMX_MEMORY_FE) av7110 848 drivers/media/pci/ttpci/av7110_av.c if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) av7110 852 drivers/media/pci/ttpci/av7110_av.c if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) av7110 859 drivers/media/pci/ttpci/av7110_av.c return write_ts_to_decoder(av7110, feed->pes_type, buf, len); av7110 867 drivers/media/pci/ttpci/av7110_av.c void dvb_video_add_event(struct av7110 *av7110, struct video_event *event) av7110 869 drivers/media/pci/ttpci/av7110_av.c struct dvb_video_events *events = &av7110->video_events; av7110 890 drivers/media/pci/ttpci/av7110_av.c static int dvb_video_get_event (struct av7110 *av7110, struct video_event *event, int flags) av7110 892 drivers/media/pci/ttpci/av7110_av.c struct dvb_video_events *events = &av7110->video_events; av7110 928 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 931 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 934 drivers/media/pci/ttpci/av7110_av.c poll_wait(file, &av7110->avout.queue, wait); av7110 936 drivers/media/pci/ttpci/av7110_av.c poll_wait(file, &av7110->video_events.wait_queue, wait); av7110 938 drivers/media/pci/ttpci/av7110_av.c if (av7110->video_events.eventw != av7110->video_events.eventr) av7110 942 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing) { av7110 958 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 961 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 966 drivers/media/pci/ttpci/av7110_av.c if (av7110->videostate.stream_source != VIDEO_SOURCE_MEMORY) av7110 972 drivers/media/pci/ttpci/av7110_av.c return ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); av7110 974 drivers/media/pci/ttpci/av7110_av.c return dvb_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 1); av7110 980 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 983 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 985 drivers/media/pci/ttpci/av7110_av.c poll_wait(file, &av7110->aout.queue, wait); av7110 987 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing) { av7110 988 drivers/media/pci/ttpci/av7110_av.c if (dvb_ringbuffer_free(&av7110->aout) >= 20 * 1024) av7110 1000 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1003 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1005 drivers/media/pci/ttpci/av7110_av.c if (av7110->audiostate.stream_source != AUDIO_SOURCE_MEMORY) { av7110 1013 drivers/media/pci/ttpci/av7110_av.c return ts_play(av7110, buf, count, file->f_flags & O_NONBLOCK, 0); av7110 1015 drivers/media/pci/ttpci/av7110_av.c return dvb_aplay(av7110, buf, count, file->f_flags & O_NONBLOCK, 0); av7110 1022 drivers/media/pci/ttpci/av7110_av.c static int play_iframe(struct av7110 *av7110, char __user *buf, unsigned int len, int nonblock) av7110 1028 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1033 drivers/media/pci/ttpci/av7110_av.c if (!(av7110->playing & RP_VIDEO)) { av7110 1034 drivers/media/pci/ttpci/av7110_av.c if (av7110_av_start_play(av7110, RP_VIDEO) < 0) av7110 1070 drivers/media/pci/ttpci/av7110_av.c dvb_play_kernel(av7110, iframe_header, sizeof(iframe_header), 0, 1); av7110 1073 drivers/media/pci/ttpci/av7110_av.c dvb_play(av7110, buf, len, 0, 1); av7110 1075 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_flush(&av7110->ipack[1]); av7110 1078 drivers/media/pci/ttpci/av7110_av.c return vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1); av7110 1102 drivers/media/pci/ttpci/av7110_av.c static int dvb_compat_video_get_event(struct av7110 *av7110, av7110 1108 drivers/media/pci/ttpci/av7110_av.c ret = dvb_video_get_event(av7110, &ev, flags); av7110 1124 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1128 drivers/media/pci/ttpci/av7110_av.c dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); av7110 1137 drivers/media/pci/ttpci/av7110_av.c if (mutex_lock_interruptible(&av7110->ioctl_mutex)) av7110 1142 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_STOPPED; av7110 1143 drivers/media/pci/ttpci/av7110_av.c if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) av7110 1144 drivers/media/pci/ttpci/av7110_av.c ret = av7110_av_stop(av7110, RP_VIDEO); av7110 1146 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_STOP, av7110 1147 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.video_blank ? 0 : 1); av7110 1149 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_NONE; av7110 1153 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_NONE; av7110 1154 drivers/media/pci/ttpci/av7110_av.c if (av7110->videostate.play_state == VIDEO_FREEZED) { av7110 1155 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_PLAYING; av7110 1156 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); av7110 1160 drivers/media/pci/ttpci/av7110_av.c if (av7110->videostate.stream_source == VIDEO_SOURCE_MEMORY) { av7110 1161 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing == RP_AV) { av7110 1162 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Stop, 0); av7110 1165 drivers/media/pci/ttpci/av7110_av.c av7110->playing &= ~RP_VIDEO; av7110 1167 drivers/media/pci/ttpci/av7110_av.c ret = av7110_av_start_play(av7110, RP_VIDEO); av7110 1170 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); av7110 1172 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_PLAYING; av7110 1176 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_FREEZED; av7110 1177 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing & RP_VIDEO) av7110 1178 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Pause, 0); av7110 1180 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1); av7110 1182 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_FREEZE; av7110 1186 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing & RP_VIDEO) av7110 1187 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Continue, 0); av7110 1189 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); av7110 1191 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_PLAYING; av7110 1192 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_NONE; av7110 1197 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.stream_source = (video_stream_source_t) arg; av7110 1201 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.video_blank = (int) arg; av7110 1205 drivers/media/pci/ttpci/av7110_av.c memcpy(parg, &av7110->videostate, sizeof(struct video_status)); av7110 1210 drivers/media/pci/ttpci/av7110_av.c ret = dvb_compat_video_get_event(av7110, parg, file->f_flags); av7110 1215 drivers/media/pci/ttpci/av7110_av.c ret = dvb_video_get_event(av7110, parg, file->f_flags); av7110 1219 drivers/media/pci/ttpci/av7110_av.c memcpy(parg, &av7110->video_size, sizeof(video_size_t)); av7110 1227 drivers/media/pci/ttpci/av7110_av.c av7110->display_panscan = VID_PAN_SCAN_PREF; av7110 1230 drivers/media/pci/ttpci/av7110_av.c av7110->display_panscan = VID_VC_AND_PS_PREF; av7110 1233 drivers/media/pci/ttpci/av7110_av.c av7110->display_panscan = VID_CENTRE_CUT_PREF; av7110 1240 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.display_format = format; av7110 1241 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetPanScanType, av7110 1242 drivers/media/pci/ttpci/av7110_av.c 1, av7110->display_panscan); av7110 1251 drivers/media/pci/ttpci/av7110_av.c av7110->display_ar = arg; av7110 1252 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetMonitorType, av7110 1261 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; av7110 1262 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110 1263 drivers/media/pci/ttpci/av7110_av.c ret = play_iframe(av7110, compat_ptr(pic->iFrame), av7110 1273 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY; av7110 1274 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110 1275 drivers/media/pci/ttpci/av7110_av.c ret = play_iframe(av7110, pic->iFrame, pic->size, av7110 1282 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing & RP_VIDEO) av7110 1283 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, av7110 1286 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_FFWD, arg); av7110 1288 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_FAST; av7110 1289 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_PLAYING; av7110 1294 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing&RP_VIDEO) { av7110 1295 drivers/media/pci/ttpci/av7110_av.c if (av7110->trickmode != TRICK_SLOW) av7110 1296 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, __Slow, 2, 0, 0); av7110 1298 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); av7110 1300 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_PLAY, 0); av7110 1302 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_STOP, 0); av7110 1304 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); av7110 1307 drivers/media/pci/ttpci/av7110_av.c av7110->trickmode = TRICK_SLOW; av7110 1308 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_PLAYING; av7110 1318 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110 1319 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_reset(&av7110->ipack[1]); av7110 1320 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing == RP_AV) { av7110 1321 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, av7110 1325 drivers/media/pci/ttpci/av7110_av.c if (av7110->trickmode == TRICK_FAST) av7110 1326 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, av7110 1328 drivers/media/pci/ttpci/av7110_av.c if (av7110->trickmode == TRICK_SLOW) { av7110 1329 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, av7110 1332 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_SLOW, arg); av7110 1334 drivers/media/pci/ttpci/av7110_av.c if (av7110->trickmode == TRICK_FREEZE) av7110 1335 drivers/media/pci/ttpci/av7110_av.c ret = vidcom(av7110, AV_VIDEO_CMD_STOP, 1); av7110 1347 drivers/media/pci/ttpci/av7110_av.c mutex_unlock(&av7110->ioctl_mutex); av7110 1355 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1359 drivers/media/pci/ttpci/av7110_av.c dprintk(1, "av7110:%p, cmd=%04x\n", av7110,cmd); av7110 1365 drivers/media/pci/ttpci/av7110_av.c if (mutex_lock_interruptible(&av7110->ioctl_mutex)) av7110 1370 drivers/media/pci/ttpci/av7110_av.c if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) av7110 1371 drivers/media/pci/ttpci/av7110_av.c ret = av7110_av_stop(av7110, RP_AUDIO); av7110 1373 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_MUTE); av7110 1375 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.play_state = AUDIO_STOPPED; av7110 1379 drivers/media/pci/ttpci/av7110_av.c if (av7110->audiostate.stream_source == AUDIO_SOURCE_MEMORY) av7110 1380 drivers/media/pci/ttpci/av7110_av.c ret = av7110_av_start_play(av7110, RP_AUDIO); av7110 1382 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_UNMUTE); av7110 1384 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.play_state = AUDIO_PLAYING; av7110 1388 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_MUTE); av7110 1390 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.play_state = AUDIO_PAUSED; av7110 1394 drivers/media/pci/ttpci/av7110_av.c if (av7110->audiostate.play_state == AUDIO_PAUSED) { av7110 1395 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.play_state = AUDIO_PLAYING; av7110 1396 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_UNMUTE | AUDIO_CMD_PCM16); av7110 1401 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.stream_source = (audio_stream_source_t) arg; av7110 1406 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, arg ? AUDIO_CMD_MUTE : AUDIO_CMD_UNMUTE); av7110 1408 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.mute_state = (int) arg; av7110 1413 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.AV_sync_state = (int) arg; av7110 1414 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, arg ? AUDIO_CMD_SYNC_ON : AUDIO_CMD_SYNC_OFF); av7110 1418 drivers/media/pci/ttpci/av7110_av.c if (FW_VERSION(av7110->arm_app) < 0x2621) av7110 1420 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.bypass_mode = (int)arg; av7110 1424 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.channel_select = (audio_channel_select_t) arg; av7110 1425 drivers/media/pci/ttpci/av7110_av.c switch(av7110->audiostate.channel_select) { av7110 1427 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_STEREO); av7110 1429 drivers/media/pci/ttpci/av7110_av.c if (av7110->adac_type == DVB_ADAC_CRYSTAL) av7110 1430 drivers/media/pci/ttpci/av7110_av.c i2c_writereg(av7110, 0x20, 0x02, 0x49); av7110 1431 drivers/media/pci/ttpci/av7110_av.c else if (av7110->adac_type == DVB_ADAC_MSP34x5) av7110 1432 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); av7110 1436 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_MONO_L); av7110 1438 drivers/media/pci/ttpci/av7110_av.c if (av7110->adac_type == DVB_ADAC_CRYSTAL) av7110 1439 drivers/media/pci/ttpci/av7110_av.c i2c_writereg(av7110, 0x20, 0x02, 0x4a); av7110 1440 drivers/media/pci/ttpci/av7110_av.c else if (av7110->adac_type == DVB_ADAC_MSP34x5) av7110 1441 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0200); av7110 1445 drivers/media/pci/ttpci/av7110_av.c ret = audcom(av7110, AUDIO_CMD_MONO_R); av7110 1447 drivers/media/pci/ttpci/av7110_av.c if (av7110->adac_type == DVB_ADAC_CRYSTAL) av7110 1448 drivers/media/pci/ttpci/av7110_av.c i2c_writereg(av7110, 0x20, 0x02, 0x45); av7110 1449 drivers/media/pci/ttpci/av7110_av.c else if (av7110->adac_type == DVB_ADAC_MSP34x5) av7110 1450 drivers/media/pci/ttpci/av7110_av.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0210); av7110 1460 drivers/media/pci/ttpci/av7110_av.c memcpy(parg, &av7110->audiostate, sizeof(struct audio_status)); av7110 1464 drivers/media/pci/ttpci/av7110_av.c if (FW_VERSION(av7110->arm_app) < 0x2621) av7110 1472 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); av7110 1473 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_reset(&av7110->ipack[0]); av7110 1474 drivers/media/pci/ttpci/av7110_av.c if (av7110->playing == RP_AV) av7110 1475 drivers/media/pci/ttpci/av7110_av.c ret = av7110_fw_cmd(av7110, COMTYPE_REC_PLAY, av7110 1485 drivers/media/pci/ttpci/av7110_av.c ret = av7110_set_volume(av7110, amix->volume_left, amix->volume_right); av7110 1496 drivers/media/pci/ttpci/av7110_av.c mutex_unlock(&av7110->ioctl_mutex); av7110 1504 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1507 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1513 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); av7110 1514 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout); av7110 1515 drivers/media/pci/ttpci/av7110_av.c av7110->video_blank = 1; av7110 1516 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.AV_sync_state = 1; av7110 1517 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; av7110 1520 drivers/media/pci/ttpci/av7110_av.c av7110->video_events.eventr = av7110->video_events.eventw = 0; av7110 1529 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1531 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1534 drivers/media/pci/ttpci/av7110_av.c av7110_av_stop(av7110, RP_VIDEO); av7110 1543 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1546 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1550 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_flush_spinlock_wakeup(&av7110->aout); av7110 1551 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX; av7110 1558 drivers/media/pci/ttpci/av7110_av.c struct av7110 *av7110 = dvbdev->priv; av7110 1560 drivers/media/pci/ttpci/av7110_av.c dprintk(2, "av7110:%p, \n", av7110); av7110 1562 drivers/media/pci/ttpci/av7110_av.c av7110_av_stop(av7110, RP_AUDIO); av7110 1612 drivers/media/pci/ttpci/av7110_av.c int av7110_av_register(struct av7110 *av7110) av7110 1614 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.AV_sync_state = 0; av7110 1615 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.mute_state = 0; av7110 1616 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.play_state = AUDIO_STOPPED; av7110 1617 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.stream_source = AUDIO_SOURCE_DEMUX; av7110 1618 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.channel_select = AUDIO_STEREO; av7110 1619 drivers/media/pci/ttpci/av7110_av.c av7110->audiostate.bypass_mode = 0; av7110 1621 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.video_blank = 0; av7110 1622 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.play_state = VIDEO_STOPPED; av7110 1623 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.stream_source = VIDEO_SOURCE_DEMUX; av7110 1624 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.video_format = VIDEO_FORMAT_4_3; av7110 1625 drivers/media/pci/ttpci/av7110_av.c av7110->videostate.display_format = VIDEO_LETTER_BOX; av7110 1626 drivers/media/pci/ttpci/av7110_av.c av7110->display_ar = VIDEO_FORMAT_4_3; av7110 1627 drivers/media/pci/ttpci/av7110_av.c av7110->display_panscan = VID_VC_AND_PS_PREF; av7110 1629 drivers/media/pci/ttpci/av7110_av.c init_waitqueue_head(&av7110->video_events.wait_queue); av7110 1630 drivers/media/pci/ttpci/av7110_av.c spin_lock_init(&av7110->video_events.lock); av7110 1631 drivers/media/pci/ttpci/av7110_av.c av7110->video_events.eventw = av7110->video_events.eventr = 0; av7110 1632 drivers/media/pci/ttpci/av7110_av.c av7110->video_events.overflow = 0; av7110 1633 drivers/media/pci/ttpci/av7110_av.c memset(&av7110->video_size, 0, sizeof (video_size_t)); av7110 1635 drivers/media/pci/ttpci/av7110_av.c dvb_register_device(&av7110->dvb_adapter, &av7110->video_dev, av7110 1636 drivers/media/pci/ttpci/av7110_av.c &dvbdev_video, av7110, DVB_DEVICE_VIDEO, 0); av7110 1638 drivers/media/pci/ttpci/av7110_av.c dvb_register_device(&av7110->dvb_adapter, &av7110->audio_dev, av7110 1639 drivers/media/pci/ttpci/av7110_av.c &dvbdev_audio, av7110, DVB_DEVICE_AUDIO, 0); av7110 1644 drivers/media/pci/ttpci/av7110_av.c void av7110_av_unregister(struct av7110 *av7110) av7110 1646 drivers/media/pci/ttpci/av7110_av.c dvb_unregister_device(av7110->audio_dev); av7110 1647 drivers/media/pci/ttpci/av7110_av.c dvb_unregister_device(av7110->video_dev); av7110 1650 drivers/media/pci/ttpci/av7110_av.c int av7110_av_init(struct av7110 *av7110) av7110 1656 drivers/media/pci/ttpci/av7110_av.c struct ipack *ipack = av7110->ipack + i; av7110 1664 drivers/media/pci/ttpci/av7110_av.c ipack->data = av7110; av7110 1667 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_init(&av7110->avout, av7110->iobuf, AVOUTLEN); av7110 1668 drivers/media/pci/ttpci/av7110_av.c dvb_ringbuffer_init(&av7110->aout, av7110->iobuf + AVOUTLEN, AOUTLEN); av7110 1670 drivers/media/pci/ttpci/av7110_av.c av7110->kbuf[0] = (u8 *)(av7110->iobuf + AVOUTLEN + AOUTLEN + BMPLEN); av7110 1671 drivers/media/pci/ttpci/av7110_av.c av7110->kbuf[1] = av7110->kbuf[0] + 2 * IPACKS; av7110 1676 drivers/media/pci/ttpci/av7110_av.c void av7110_av_exit(struct av7110 *av7110) av7110 1678 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_free(&av7110->ipack[0]); av7110 1679 drivers/media/pci/ttpci/av7110_av.c av7110_ipack_free(&av7110->ipack[1]); av7110 5 drivers/media/pci/ttpci/av7110_av.h struct av7110; av7110 7 drivers/media/pci/ttpci/av7110_av.h extern int av7110_set_vidmode(struct av7110 *av7110, av7110 14 drivers/media/pci/ttpci/av7110_av.h extern int av7110_set_volume(struct av7110 *av7110, unsigned int volleft, av7110 16 drivers/media/pci/ttpci/av7110_av.h extern int av7110_av_stop(struct av7110 *av7110, int av); av7110 17 drivers/media/pci/ttpci/av7110_av.h extern int av7110_av_start_record(struct av7110 *av7110, int av, av7110 19 drivers/media/pci/ttpci/av7110_av.h extern int av7110_av_start_play(struct av7110 *av7110, int av); av7110 21 drivers/media/pci/ttpci/av7110_av.h extern void dvb_video_add_event(struct av7110 *av7110, struct video_event *event); av7110 26 drivers/media/pci/ttpci/av7110_av.h extern int av7110_av_register(struct av7110 *av7110); av7110 27 drivers/media/pci/ttpci/av7110_av.h extern void av7110_av_unregister(struct av7110 *av7110); av7110 28 drivers/media/pci/ttpci/av7110_av.h extern int av7110_av_init(struct av7110 *av7110); av7110 29 drivers/media/pci/ttpci/av7110_av.h extern void av7110_av_exit(struct av7110 *av7110); av7110 27 drivers/media/pci/ttpci/av7110_ca.c void CI_handle(struct av7110 *av7110, u8 *data, u16 len) av7110 29 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 39 drivers/media/pci/ttpci/av7110_ca.c av7110->ci_slot[data[2] - 1].flags = 0; av7110 42 drivers/media/pci/ttpci/av7110_ca.c av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_PRESENT; av7110 45 drivers/media/pci/ttpci/av7110_ca.c av7110->ci_slot[data[2] - 1].flags |= CA_CI_MODULE_READY; av7110 201 drivers/media/pci/ttpci/av7110_ca.c struct av7110 *av7110 = dvbdev->priv; av7110 204 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 208 drivers/media/pci/ttpci/av7110_ca.c ci_ll_flush(&av7110->ci_rbuffer, &av7110->ci_wbuffer); av7110 215 drivers/media/pci/ttpci/av7110_ca.c struct av7110 *av7110 = dvbdev->priv; av7110 216 drivers/media/pci/ttpci/av7110_ca.c struct dvb_ringbuffer *rbuf = &av7110->ci_rbuffer; av7110 217 drivers/media/pci/ttpci/av7110_ca.c struct dvb_ringbuffer *wbuf = &av7110->ci_wbuffer; av7110 220 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 237 drivers/media/pci/ttpci/av7110_ca.c struct av7110 *av7110 = dvbdev->priv; av7110 241 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 243 drivers/media/pci/ttpci/av7110_ca.c if (mutex_lock_interruptible(&av7110->ioctl_mutex)) av7110 248 drivers/media/pci/ttpci/av7110_ca.c ret = ci_ll_reset(&av7110->ci_wbuffer, file, arg, av7110 249 drivers/media/pci/ttpci/av7110_ca.c &av7110->ci_slot[0]); av7110 256 drivers/media/pci/ttpci/av7110_ca.c cap.slot_type = (FW_CI_LL_SUPPORT(av7110->arm_app) ? av7110 269 drivers/media/pci/ttpci/av7110_ca.c mutex_unlock(&av7110->ioctl_mutex); av7110 272 drivers/media/pci/ttpci/av7110_ca.c av7110->ci_slot[info->num].num = info->num; av7110 273 drivers/media/pci/ttpci/av7110_ca.c av7110->ci_slot[info->num].type = FW_CI_LL_SUPPORT(av7110->arm_app) ? av7110 275 drivers/media/pci/ttpci/av7110_ca.c memcpy(info, &av7110->ci_slot[info->num], sizeof(struct ca_slot_info)); av7110 300 drivers/media/pci/ttpci/av7110_ca.c mutex_unlock(&av7110->ioctl_mutex); av7110 303 drivers/media/pci/ttpci/av7110_ca.c av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetDescr, 5, av7110 317 drivers/media/pci/ttpci/av7110_ca.c mutex_unlock(&av7110->ioctl_mutex); av7110 325 drivers/media/pci/ttpci/av7110_ca.c struct av7110 *av7110 = dvbdev->priv; av7110 327 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 328 drivers/media/pci/ttpci/av7110_ca.c return ci_ll_write(&av7110->ci_wbuffer, file, buf, count, ppos); av7110 335 drivers/media/pci/ttpci/av7110_ca.c struct av7110 *av7110 = dvbdev->priv; av7110 337 drivers/media/pci/ttpci/av7110_ca.c dprintk(8, "av7110:%p\n",av7110); av7110 338 drivers/media/pci/ttpci/av7110_ca.c return ci_ll_read(&av7110->ci_rbuffer, file, buf, count, ppos); av7110 361 drivers/media/pci/ttpci/av7110_ca.c int av7110_ca_register(struct av7110 *av7110) av7110 363 drivers/media/pci/ttpci/av7110_ca.c return dvb_register_device(&av7110->dvb_adapter, &av7110->ca_dev, av7110 364 drivers/media/pci/ttpci/av7110_ca.c &dvbdev_ca, av7110, DVB_DEVICE_CA, 0); av7110 367 drivers/media/pci/ttpci/av7110_ca.c void av7110_ca_unregister(struct av7110 *av7110) av7110 369 drivers/media/pci/ttpci/av7110_ca.c dvb_unregister_device(av7110->ca_dev); av7110 372 drivers/media/pci/ttpci/av7110_ca.c int av7110_ca_init(struct av7110* av7110) av7110 374 drivers/media/pci/ttpci/av7110_ca.c return ci_ll_init(&av7110->ci_rbuffer, &av7110->ci_wbuffer, 8192); av7110 377 drivers/media/pci/ttpci/av7110_ca.c void av7110_ca_exit(struct av7110* av7110) av7110 379 drivers/media/pci/ttpci/av7110_ca.c ci_ll_release(&av7110->ci_rbuffer, &av7110->ci_wbuffer); av7110 5 drivers/media/pci/ttpci/av7110_ca.h struct av7110; av7110 7 drivers/media/pci/ttpci/av7110_ca.h extern void CI_handle(struct av7110 *av7110, u8 *data, u16 len); av7110 10 drivers/media/pci/ttpci/av7110_ca.h extern int av7110_ca_register(struct av7110 *av7110); av7110 11 drivers/media/pci/ttpci/av7110_ca.h extern void av7110_ca_unregister(struct av7110 *av7110); av7110 12 drivers/media/pci/ttpci/av7110_ca.h extern int av7110_ca_init(struct av7110* av7110); av7110 13 drivers/media/pci/ttpci/av7110_ca.h extern void av7110_ca_exit(struct av7110* av7110); av7110 43 drivers/media/pci/ttpci/av7110_hw.c int av7110_debiwrite(struct av7110 *av7110, u32 config, av7110 46 drivers/media/pci/ttpci/av7110_hw.c struct saa7146_dev *dev = av7110->dev; av7110 52 drivers/media/pci/ttpci/av7110_hw.c if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110 60 drivers/media/pci/ttpci/av7110_hw.c saa7146_write(dev, DEBI_AD, av7110->debi_bus); av7110 66 drivers/media/pci/ttpci/av7110_hw.c u32 av7110_debiread(struct av7110 *av7110, u32 config, int addr, unsigned int count) av7110 68 drivers/media/pci/ttpci/av7110_hw.c struct saa7146_dev *dev = av7110->dev; av7110 75 drivers/media/pci/ttpci/av7110_hw.c if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110 79 drivers/media/pci/ttpci/av7110_hw.c saa7146_write(dev, DEBI_AD, av7110->debi_bus); av7110 86 drivers/media/pci/ttpci/av7110_hw.c if (saa7146_wait_for_debi_done(av7110->dev, 0) < 0) { av7110 100 drivers/media/pci/ttpci/av7110_hw.c void av7110_reset_arm(struct av7110 *av7110) av7110 102 drivers/media/pci/ttpci/av7110_hw.c saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTLO); av7110 105 drivers/media/pci/ttpci/av7110_hw.c SAA7146_IER_DISABLE(av7110->dev, MASK_19 | MASK_03); av7110 106 drivers/media/pci/ttpci/av7110_hw.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110 108 drivers/media/pci/ttpci/av7110_hw.c saa7146_setgpio(av7110->dev, RESET_LINE, SAA7146_GPIO_OUTHI); av7110 111 drivers/media/pci/ttpci/av7110_hw.c ARM_ResetMailBox(av7110); av7110 113 drivers/media/pci/ttpci/av7110_hw.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110 114 drivers/media/pci/ttpci/av7110_hw.c SAA7146_IER_ENABLE(av7110->dev, MASK_03); av7110 116 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_ready = 1; av7110 121 drivers/media/pci/ttpci/av7110_hw.c static int waitdebi(struct av7110 *av7110, int adr, int state) av7110 125 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 128 drivers/media/pci/ttpci/av7110_hw.c if (irdebi(av7110, DEBINOSWAP, adr, 0, 2) == state) av7110 135 drivers/media/pci/ttpci/av7110_hw.c static int load_dram(struct av7110 *av7110, u32 *data, int len) av7110 141 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 148 drivers/media/pci/ttpci/av7110_hw.c if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { av7110 153 drivers/media/pci/ttpci/av7110_hw.c mwdebi(av7110, DEBISWAB, bootblock, av7110 156 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); av7110 157 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, AV7110_BOOT_MAX_SIZE, 2); av7110 158 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); av7110 163 drivers/media/pci/ttpci/av7110_hw.c if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { av7110 168 drivers/media/pci/ttpci/av7110_hw.c mwdebi(av7110, DEBISWAB, bootblock, av7110 171 drivers/media/pci/ttpci/av7110_hw.c mwdebi(av7110, DEBISWAB, bootblock, av7110 174 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBISWAB, AV7110_BOOT_BASE, swab32(base), 4); av7110 175 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, rest, 2); av7110 176 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); av7110 178 drivers/media/pci/ttpci/av7110_hw.c if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_EMPTY) < 0) { av7110 182 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_SIZE, 0, 2); av7110 183 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); av7110 184 drivers/media/pci/ttpci/av7110_hw.c if (waitdebi(av7110, AV7110_BOOT_STATE, BOOTSTATE_AV7110_BOOT_COMPLETE) < 0) { av7110 194 drivers/media/pci/ttpci/av7110_hw.c int av7110_bootarm(struct av7110 *av7110) av7110 198 drivers/media/pci/ttpci/av7110_hw.c struct saa7146_dev *dev = av7110->dev; av7110 202 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 204 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_ready = 0; av7110 209 drivers/media/pci/ttpci/av7110_hw.c SAA7146_IER_DISABLE(av7110->dev, MASK_03 | MASK_19); av7110 210 drivers/media/pci/ttpci/av7110_hw.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110 213 drivers/media/pci/ttpci/av7110_hw.c saa7146_write(av7110->dev, MC1, 0x08800880); av7110 214 drivers/media/pci/ttpci/av7110_hw.c saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000); av7110 215 drivers/media/pci/ttpci/av7110_hw.c saa7146_write(av7110->dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); av7110 218 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); av7110 220 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBISWAP, DPRAM_BASE, 0x76543210, 4); av7110 222 drivers/media/pci/ttpci/av7110_hw.c if ((ret=irdebi(av7110, DEBINOSWAP, DPRAM_BASE, 0, 4)) != 0x10325476) { av7110 228 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBISWAP, DPRAM_BASE + i, 0x00, 4); av7110 244 drivers/media/pci/ttpci/av7110_hw.c mwdebi(av7110, DEBISWAB, DPRAM_BASE, fw->data, fw->size); av7110 246 drivers/media/pci/ttpci/av7110_hw.c iwdebi(av7110, DEBINOSWAP, AV7110_BOOT_STATE, BOOTSTATE_BUFFER_FULL, 2); av7110 248 drivers/media/pci/ttpci/av7110_hw.c if (saa7146_wait_for_debi_done(av7110->dev, 1)) { av7110 256 drivers/media/pci/ttpci/av7110_hw.c if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root) < 0) { av7110 265 drivers/media/pci/ttpci/av7110_hw.c mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram); av7110 267 drivers/media/pci/ttpci/av7110_hw.c if (saa7146_wait_for_debi_done(av7110->dev, 1)) { av7110 275 drivers/media/pci/ttpci/av7110_hw.c ARM_ResetMailBox(av7110); av7110 276 drivers/media/pci/ttpci/av7110_hw.c SAA7146_ISR_CLEAR(av7110->dev, MASK_19 | MASK_03); av7110 277 drivers/media/pci/ttpci/av7110_hw.c SAA7146_IER_ENABLE(av7110->dev, MASK_03); av7110 279 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_errors = 0; av7110 280 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_ready = 1; av7110 289 drivers/media/pci/ttpci/av7110_hw.c int av7110_wait_msgstate(struct av7110 *av7110, u16 flags) av7110 295 drivers/media/pci/ttpci/av7110_hw.c if (FW_VERSION(av7110->arm_app) <= 0x261c) { av7110 305 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 307 drivers/media/pci/ttpci/av7110_hw.c stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110 308 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 321 drivers/media/pci/ttpci/av7110_hw.c static int __av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length) av7110 332 drivers/media/pci/ttpci/av7110_hw.c if (!av7110->arm_ready) { av7110 340 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) av7110 344 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_errors++; av7110 350 drivers/media/pci/ttpci/av7110_hw.c if (FW_VERSION(av7110->arm_app) <= 0x261f) av7110 351 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COM_IF_LOCK, 0xffff, 2); av7110 357 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) av7110 382 drivers/media/pci/ttpci/av7110_hw.c if (FW_VERSION(av7110->arm_app) >= 0x261d) { av7110 397 drivers/media/pci/ttpci/av7110_hw.c stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110 408 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_errors++; av7110 416 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COMMAND + 2 * i, (u32) buf[i], 2); av7110 419 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COMMAND + 2, (u32) buf[1], 2); av7110 421 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COMMAND + 2, 0, 2); av7110 423 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COMMAND, (u32) buf[0], 2); av7110 425 drivers/media/pci/ttpci/av7110_hw.c if (FW_VERSION(av7110->arm_app) <= 0x261f) av7110 426 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, COM_IF_LOCK, 0x0000, 2); av7110 432 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) av7110 442 drivers/media/pci/ttpci/av7110_hw.c stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110 456 drivers/media/pci/ttpci/av7110_hw.c static int av7110_send_fw_cmd(struct av7110 *av7110, u16* buf, int length) av7110 462 drivers/media/pci/ttpci/av7110_hw.c if (!av7110->arm_ready) { av7110 466 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 469 drivers/media/pci/ttpci/av7110_hw.c ret = __av7110_send_fw_cmd(av7110, buf, length); av7110 470 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 477 drivers/media/pci/ttpci/av7110_hw.c int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...) av7110 502 drivers/media/pci/ttpci/av7110_hw.c ret = av7110_send_fw_cmd(av7110, buf, num + 2); av7110 509 drivers/media/pci/ttpci/av7110_hw.c int av7110_send_ci_cmd(struct av7110 *av7110, u8 subcom, u8 *buf, u8 len) av7110 515 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 525 drivers/media/pci/ttpci/av7110_hw.c ret = av7110_send_fw_cmd(av7110, cmd, 18); av7110 532 drivers/media/pci/ttpci/av7110_hw.c int av7110_fw_request(struct av7110 *av7110, u16 *request_buf, av7110 542 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 544 drivers/media/pci/ttpci/av7110_hw.c if (!av7110->arm_ready) { av7110 549 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 552 drivers/media/pci/ttpci/av7110_hw.c if ((err = __av7110_send_fw_cmd(av7110, request_buf, request_buf_len)) < 0) { av7110 553 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 561 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, COMMAND, 0, 2) == 0) av7110 565 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 577 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) av7110 581 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 589 drivers/media/pci/ttpci/av7110_hw.c stat = rdebi(av7110, DEBINOSWAP, MSGSTATE, 0, 2); av7110 592 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 597 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 603 drivers/media/pci/ttpci/av7110_hw.c reply_buf[i] = rdebi(av7110, DEBINOSWAP, COM_BUFF + 2 * i, 0, 2); av7110 605 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 609 drivers/media/pci/ttpci/av7110_hw.c static int av7110_fw_query(struct av7110 *av7110, u16 tag, u16* buf, s16 length) av7110 612 drivers/media/pci/ttpci/av7110_hw.c ret = av7110_fw_request(av7110, &tag, 0, buf, length); av7110 624 drivers/media/pci/ttpci/av7110_hw.c int av7110_firmversion(struct av7110 *av7110) av7110 629 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 631 drivers/media/pci/ttpci/av7110_hw.c if (av7110_fw_query(av7110, tag, buf, 16)) { av7110 633 drivers/media/pci/ttpci/av7110_hw.c av7110->dvb_adapter.num); av7110 637 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_fw = (buf[0] << 16) + buf[1]; av7110 638 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_rtsl = (buf[2] << 16) + buf[3]; av7110 639 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_vid = (buf[4] << 16) + buf[5]; av7110 640 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_app = (buf[6] << 16) + buf[7]; av7110 641 drivers/media/pci/ttpci/av7110_hw.c av7110->avtype = (buf[8] << 16) + buf[9]; av7110 644 drivers/media/pci/ttpci/av7110_hw.c av7110->dvb_adapter.num, av7110->arm_fw, av7110 645 drivers/media/pci/ttpci/av7110_hw.c av7110->arm_rtsl, av7110->arm_vid, av7110->arm_app); av7110 648 drivers/media/pci/ttpci/av7110_hw.c if (FW_CI_LL_SUPPORT(av7110->arm_app)) av7110 650 drivers/media/pci/ttpci/av7110_hw.c av7110->dvb_adapter.num); av7110 653 drivers/media/pci/ttpci/av7110_hw.c av7110->dvb_adapter.num); av7110 659 drivers/media/pci/ttpci/av7110_hw.c int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst) av7110 665 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 681 drivers/media/pci/ttpci/av7110_hw.c ret = av7110_send_fw_cmd(av7110, buf, 18); av7110 690 drivers/media/pci/ttpci/av7110_hw.c static inline int SetColorBlend(struct av7110 *av7110, u8 windownr) av7110 692 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, SetCBlend, 1, windownr); av7110 695 drivers/media/pci/ttpci/av7110_hw.c static inline int SetBlend_(struct av7110 *av7110, u8 windownr, av7110 698 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, SetBlend, 4, av7110 702 drivers/media/pci/ttpci/av7110_hw.c static inline int SetColor_(struct av7110 *av7110, u8 windownr, av7110 705 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, SetColor, 5, av7110 709 drivers/media/pci/ttpci/av7110_hw.c static inline int SetFont(struct av7110 *av7110, u8 windownr, u8 fontsize, av7110 712 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Font, 4, av7110 716 drivers/media/pci/ttpci/av7110_hw.c static int FlushText(struct av7110 *av7110) av7110 721 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 726 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2) == 0) av7110 731 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 736 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 740 drivers/media/pci/ttpci/av7110_hw.c static int WriteText(struct av7110 *av7110, u8 win, u16 x, u16 y, char *buf) av7110 747 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->dcomlock)) av7110 753 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, BUFF1_BASE, 0, 2) == 0) av7110 758 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 767 drivers/media/pci/ttpci/av7110_hw.c if (rdebi(av7110, DEBINOSWAP, HANDSHAKE_REG, 0, 2) == 0) av7110 772 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 779 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, av7110 782 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, BUFF1_BASE + i * 2, 0, 2); av7110 783 drivers/media/pci/ttpci/av7110_hw.c ret = __av7110_send_fw_cmd(av7110, cbuf, 5); av7110 784 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->dcomlock); av7110 790 drivers/media/pci/ttpci/av7110_hw.c static inline int DrawLine(struct av7110 *av7110, u8 windownr, av7110 793 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, DLine, 6, av7110 797 drivers/media/pci/ttpci/av7110_hw.c static inline int DrawBlock(struct av7110 *av7110, u8 windownr, av7110 800 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, DBox, 6, av7110 804 drivers/media/pci/ttpci/av7110_hw.c static inline int HideWindow(struct av7110 *av7110, u8 windownr) av7110 806 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, WHide, 1, windownr); av7110 809 drivers/media/pci/ttpci/av7110_hw.c static inline int MoveWindowRel(struct av7110 *av7110, u8 windownr, u16 x, u16 y) av7110 811 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveD, 3, windownr, x, y); av7110 814 drivers/media/pci/ttpci/av7110_hw.c static inline int MoveWindowAbs(struct av7110 *av7110, u8 windownr, u16 x, u16 y) av7110 816 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, WMoveA, 3, windownr, x, y); av7110 819 drivers/media/pci/ttpci/av7110_hw.c static inline int DestroyOSDWindow(struct av7110 *av7110, u8 windownr) av7110 821 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, WDestroy, 1, windownr); av7110 824 drivers/media/pci/ttpci/av7110_hw.c static inline int CreateOSDWindow(struct av7110 *av7110, u8 windownr, av7110 828 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, WCreate, 4, av7110 840 drivers/media/pci/ttpci/av7110_hw.c static inline int WaitUntilBmpLoaded(struct av7110 *av7110) av7110 842 drivers/media/pci/ttpci/av7110_hw.c int ret = wait_event_timeout(av7110->bmpq, av7110 843 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state != BMP_LOADING, 10*HZ); av7110 846 drivers/media/pci/ttpci/av7110_hw.c ret, av7110->bmp_state); av7110 847 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_NONE; av7110 853 drivers/media/pci/ttpci/av7110_hw.c static inline int LoadBitmap(struct av7110 *av7110, av7110 863 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 865 drivers/media/pci/ttpci/av7110_hw.c format = bpp2bit[av7110->osdbpp[av7110->osdwin]]; av7110 867 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_LOADING; av7110 877 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_NONE; av7110 880 drivers/media/pci/ttpci/av7110_hw.c av7110->bmplen = ((dx * dy * bpp + 7) & ~7) / 8; av7110 881 drivers/media/pci/ttpci/av7110_hw.c av7110->bmpp = 0; av7110 882 drivers/media/pci/ttpci/av7110_hw.c if (av7110->bmplen > 32768) { av7110 883 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_NONE; av7110 887 drivers/media/pci/ttpci/av7110_hw.c if (copy_from_user(av7110->bmpbuf + 1024 + i * dx, data + i * inc, dx)) { av7110 888 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_NONE; av7110 894 drivers/media/pci/ttpci/av7110_hw.c c = ((u8 *)av7110->bmpbuf)[1024 + i * delta + delta - 1]; av7110 896 drivers/media/pci/ttpci/av7110_hw.c c |= (((u8 *)av7110->bmpbuf)[1024 + i * delta + d] av7110 898 drivers/media/pci/ttpci/av7110_hw.c ((u8 *)av7110->bmpbuf)[1024 + i] = c; av7110 902 drivers/media/pci/ttpci/av7110_hw.c av7110->bmplen += 1024; av7110 903 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "av7110_fw_cmd: LoadBmp size %d\n", av7110->bmplen); av7110 904 drivers/media/pci/ttpci/av7110_hw.c ret = av7110_fw_cmd(av7110, COMTYPE_OSD, LoadBmp, 3, format, dx, dy); av7110 906 drivers/media/pci/ttpci/av7110_hw.c ret = WaitUntilBmpLoaded(av7110); av7110 910 drivers/media/pci/ttpci/av7110_hw.c static int BlitBitmap(struct av7110 *av7110, u16 x, u16 y) av7110 912 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 914 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, BlitBmp, 4, av7110->osdwin, x, y, 0); av7110 917 drivers/media/pci/ttpci/av7110_hw.c static inline int ReleaseBitmap(struct av7110 *av7110) av7110 919 drivers/media/pci/ttpci/av7110_hw.c dprintk(4, "%p\n", av7110); av7110 921 drivers/media/pci/ttpci/av7110_hw.c if (av7110->bmp_state != BMP_LOADED && FW_VERSION(av7110->arm_app) < 0x261e) av7110 923 drivers/media/pci/ttpci/av7110_hw.c if (av7110->bmp_state == BMP_LOADING) av7110 925 drivers/media/pci/ttpci/av7110_hw.c av7110->bmp_state = BMP_NONE; av7110 926 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, ReleaseBmp, 0); av7110 945 drivers/media/pci/ttpci/av7110_hw.c static int OSDSetColor(struct av7110 *av7110, u8 color, u8 r, u8 g, u8 b, u8 blend) av7110 955 drivers/media/pci/ttpci/av7110_hw.c ret = SetColor_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]], av7110 958 drivers/media/pci/ttpci/av7110_hw.c ret = SetBlend_(av7110, av7110->osdwin, bpp2pal[av7110->osdbpp[av7110->osdwin]], av7110 963 drivers/media/pci/ttpci/av7110_hw.c static int OSDSetPalette(struct av7110 *av7110, u32 __user * colors, u8 first, u8 last) av7110 980 drivers/media/pci/ttpci/av7110_hw.c wdebi(av7110, DEBINOSWAP, DATA_BUFF3_BASE + i * 4, yuv, 4); av7110 982 drivers/media/pci/ttpci/av7110_hw.c return av7110_fw_cmd(av7110, COMTYPE_OSD, Set_Palette, 4, av7110 983 drivers/media/pci/ttpci/av7110_hw.c av7110->osdwin, av7110 984 drivers/media/pci/ttpci/av7110_hw.c bpp2pal[av7110->osdbpp[av7110->osdwin]], av7110 988 drivers/media/pci/ttpci/av7110_hw.c static int OSDSetBlock(struct av7110 *av7110, int x0, int y0, av7110 1001 drivers/media/pci/ttpci/av7110_hw.c bpp = av7110->osdbpp[av7110->osdwin] + 1; av7110 1008 drivers/media/pci/ttpci/av7110_hw.c if (av7110->bmp_state == BMP_LOADING) { av7110 1010 drivers/media/pci/ttpci/av7110_hw.c BUG_ON (FW_VERSION(av7110->arm_app) >= 0x261e); av7110 1011 drivers/media/pci/ttpci/av7110_hw.c rc = WaitUntilBmpLoaded(av7110); av7110 1021 drivers/media/pci/ttpci/av7110_hw.c rc = LoadBitmap(av7110, w, lpb, inc, data); av7110 1024 drivers/media/pci/ttpci/av7110_hw.c rc = BlitBitmap(av7110, x0, y0 + i * lpb); av7110 1030 drivers/media/pci/ttpci/av7110_hw.c rc = LoadBitmap(av7110, w, brest / bpl, inc, data); av7110 1032 drivers/media/pci/ttpci/av7110_hw.c rc = BlitBitmap(av7110, x0, y0 + bnum * lpb); av7110 1034 drivers/media/pci/ttpci/av7110_hw.c release_rc = ReleaseBitmap(av7110); av7110 1042 drivers/media/pci/ttpci/av7110_hw.c int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc) av7110 1046 drivers/media/pci/ttpci/av7110_hw.c if (mutex_lock_interruptible(&av7110->osd_mutex)) av7110 1051 drivers/media/pci/ttpci/av7110_hw.c ret = DestroyOSDWindow(av7110, av7110->osdwin); av7110 1054 drivers/media/pci/ttpci/av7110_hw.c av7110->osdbpp[av7110->osdwin] = (dc->color - 1) & 7; av7110 1055 drivers/media/pci/ttpci/av7110_hw.c ret = CreateOSDWindow(av7110, av7110->osdwin, av7110 1056 drivers/media/pci/ttpci/av7110_hw.c bpp2bit[av7110->osdbpp[av7110->osdwin]], av7110 1061 drivers/media/pci/ttpci/av7110_hw.c ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110 1064 drivers/media/pci/ttpci/av7110_hw.c ret = SetColorBlend(av7110, av7110->osdwin); av7110 1068 drivers/media/pci/ttpci/av7110_hw.c ret = MoveWindowRel(av7110, av7110->osdwin, 0, 0); av7110 1071 drivers/media/pci/ttpci/av7110_hw.c ret = HideWindow(av7110, av7110->osdwin); av7110 1074 drivers/media/pci/ttpci/av7110_hw.c ret = DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, 0); av7110 1077 drivers/media/pci/ttpci/av7110_hw.c ret = DrawBlock(av7110, av7110->osdwin, 0, 0, 720, 576, dc->color); av7110 1080 drivers/media/pci/ttpci/av7110_hw.c ret = OSDSetColor(av7110, dc->color, dc->x0, dc->y0, dc->x1, dc->y1); av7110 1083 drivers/media/pci/ttpci/av7110_hw.c if (FW_VERSION(av7110->arm_app) >= 0x2618) av7110 1084 drivers/media/pci/ttpci/av7110_hw.c ret = OSDSetPalette(av7110, dc->data, dc->color, dc->x0); av7110 1098 drivers/media/pci/ttpci/av7110_hw.c ret = OSDSetColor(av7110, dc->color + i, r, g, b, blend); av7110 1105 drivers/media/pci/ttpci/av7110_hw.c ret = DrawLine(av7110, av7110->osdwin, av7110 1112 drivers/media/pci/ttpci/av7110_hw.c ret = OSDSetBlock(av7110, dc->x0, dc->y0, dc->x1, dc->y1, dc->color, dc->data); av7110 1115 drivers/media/pci/ttpci/av7110_hw.c ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, av7110 1119 drivers/media/pci/ttpci/av7110_hw.c ret = DrawBlock(av7110, av7110->osdwin, dc->x0, dc->y0, av7110 1123 drivers/media/pci/ttpci/av7110_hw.c ret = DrawLine(av7110, av7110->osdwin, av7110 1137 drivers/media/pci/ttpci/av7110_hw.c ret = SetFont(av7110, av7110->osdwin, dc->x1, av7110 1140 drivers/media/pci/ttpci/av7110_hw.c ret = FlushText(av7110); av7110 1142 drivers/media/pci/ttpci/av7110_hw.c ret = WriteText(av7110, av7110->osdwin, dc->x0, dc->y0, textbuf); av7110 1149 drivers/media/pci/ttpci/av7110_hw.c av7110->osdwin = dc->x0; av7110 1154 drivers/media/pci/ttpci/av7110_hw.c ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110 1156 drivers/media/pci/ttpci/av7110_hw.c ret = SetColorBlend(av7110, av7110->osdwin); av7110 1164 drivers/media/pci/ttpci/av7110_hw.c av7110->osdbpp[av7110->osdwin] = (1 << (dc->color & 3)) - 1; av7110 1166 drivers/media/pci/ttpci/av7110_hw.c av7110->osdbpp[av7110->osdwin] = 0; av7110 1167 drivers/media/pci/ttpci/av7110_hw.c ret = CreateOSDWindow(av7110, av7110->osdwin, (osd_raw_window_t)dc->color, av7110 1172 drivers/media/pci/ttpci/av7110_hw.c ret = MoveWindowAbs(av7110, av7110->osdwin, dc->x0, dc->y0); av7110 1174 drivers/media/pci/ttpci/av7110_hw.c ret = SetColorBlend(av7110, av7110->osdwin); av7110 1182 drivers/media/pci/ttpci/av7110_hw.c mutex_unlock(&av7110->osd_mutex); av7110 1191 drivers/media/pci/ttpci/av7110_hw.c int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap) av7110 1195 drivers/media/pci/ttpci/av7110_hw.c if (FW_4M_SDRAM(av7110->arm_app)) av7110 367 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_bootarm(struct av7110 *av7110); av7110 368 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_firmversion(struct av7110 *av7110); av7110 373 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_wait_msgstate(struct av7110 *av7110, u16 flags); av7110 374 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_fw_cmd(struct av7110 *av7110, int type, int com, int num, ...); av7110 375 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_fw_request(struct av7110 *av7110, u16 *request_buf, av7110 380 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_debiwrite(struct av7110 *av7110, u32 config, av7110 382 drivers/media/pci/ttpci/av7110_hw.h extern u32 av7110_debiread(struct av7110 *av7110, u32 config, av7110 388 drivers/media/pci/ttpci/av7110_hw.h static inline void iwdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count) av7110 390 drivers/media/pci/ttpci/av7110_hw.h av7110_debiwrite(av7110, config, addr, val, count); av7110 394 drivers/media/pci/ttpci/av7110_hw.h static inline void mwdebi(struct av7110 *av7110, u32 config, int addr, av7110 397 drivers/media/pci/ttpci/av7110_hw.h memcpy(av7110->debi_virt, val, count); av7110 398 drivers/media/pci/ttpci/av7110_hw.h av7110_debiwrite(av7110, config, addr, 0, count); av7110 401 drivers/media/pci/ttpci/av7110_hw.h static inline u32 irdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count) av7110 405 drivers/media/pci/ttpci/av7110_hw.h res=av7110_debiread(av7110, config, addr, count); av7110 407 drivers/media/pci/ttpci/av7110_hw.h memcpy(av7110->debi_virt, (char *) &res, count); av7110 412 drivers/media/pci/ttpci/av7110_hw.h static inline void wdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count) av7110 416 drivers/media/pci/ttpci/av7110_hw.h spin_lock_irqsave(&av7110->debilock, flags); av7110 417 drivers/media/pci/ttpci/av7110_hw.h av7110_debiwrite(av7110, config, addr, val, count); av7110 418 drivers/media/pci/ttpci/av7110_hw.h spin_unlock_irqrestore(&av7110->debilock, flags); av7110 421 drivers/media/pci/ttpci/av7110_hw.h static inline u32 rdebi(struct av7110 *av7110, u32 config, int addr, u32 val, unsigned int count) av7110 426 drivers/media/pci/ttpci/av7110_hw.h spin_lock_irqsave(&av7110->debilock, flags); av7110 427 drivers/media/pci/ttpci/av7110_hw.h res=av7110_debiread(av7110, config, addr, count); av7110 428 drivers/media/pci/ttpci/av7110_hw.h spin_unlock_irqrestore(&av7110->debilock, flags); av7110 433 drivers/media/pci/ttpci/av7110_hw.h static inline void ARM_ResetMailBox(struct av7110 *av7110) av7110 437 drivers/media/pci/ttpci/av7110_hw.h spin_lock_irqsave(&av7110->debilock, flags); av7110 438 drivers/media/pci/ttpci/av7110_hw.h av7110_debiread(av7110, DEBINOSWAP, IRQ_RX, 2); av7110 439 drivers/media/pci/ttpci/av7110_hw.h av7110_debiwrite(av7110, DEBINOSWAP, IRQ_RX, 0, 2); av7110 440 drivers/media/pci/ttpci/av7110_hw.h spin_unlock_irqrestore(&av7110->debilock, flags); av7110 443 drivers/media/pci/ttpci/av7110_hw.h static inline void ARM_ClearMailBox(struct av7110 *av7110) av7110 445 drivers/media/pci/ttpci/av7110_hw.h iwdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); av7110 448 drivers/media/pci/ttpci/av7110_hw.h static inline void ARM_ClearIrq(struct av7110 *av7110) av7110 450 drivers/media/pci/ttpci/av7110_hw.h irdebi(av7110, DEBINOSWAP, IRQ_RX, 0, 2); av7110 457 drivers/media/pci/ttpci/av7110_hw.h static inline int SendDAC(struct av7110 *av7110, u8 addr, u8 data) av7110 459 drivers/media/pci/ttpci/av7110_hw.h return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, AudioDAC, 2, addr, data); av7110 462 drivers/media/pci/ttpci/av7110_hw.h static inline int av7710_set_video_mode(struct av7110 *av7110, int mode) av7110 464 drivers/media/pci/ttpci/av7110_hw.h return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetVidMode, 1, mode); av7110 467 drivers/media/pci/ttpci/av7110_hw.h static inline int vidcom(struct av7110 *av7110, u32 com, u32 arg) av7110 469 drivers/media/pci/ttpci/av7110_hw.h return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_VIDEO_COMMAND, 4, av7110 474 drivers/media/pci/ttpci/av7110_hw.h static inline int audcom(struct av7110 *av7110, u32 com) av7110 476 drivers/media/pci/ttpci/av7110_hw.h return av7110_fw_cmd(av7110, COMTYPE_MISC, AV7110_FW_AUDIO_COMMAND, 2, av7110 480 drivers/media/pci/ttpci/av7110_hw.h static inline int Set22K(struct av7110 *av7110, int state) av7110 482 drivers/media/pci/ttpci/av7110_hw.h return av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, (state ? ON22K : OFF22K), 0); av7110 486 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_diseqc_send(struct av7110 *av7110, int len, u8 *msg, unsigned long burst); av7110 490 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_osd_cmd(struct av7110 *av7110, osd_cmd_t *dc); av7110 491 drivers/media/pci/ttpci/av7110_hw.h extern int av7110_osd_capability(struct av7110 *av7110, osd_cap_t *cap); av7110 21 drivers/media/pci/ttpci/av7110_ir.c void av7110_ir_handler(struct av7110 *av7110, u32 ircom) av7110 23 drivers/media/pci/ttpci/av7110_ir.c struct rc_dev *rcdev = av7110->ir.rcdev; av7110 31 drivers/media/pci/ttpci/av7110_ir.c switch (av7110->ir.ir_config) { av7110 63 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.ir_config); av7110 71 drivers/media/pci/ttpci/av7110_ir.c int av7110_set_ir_config(struct av7110 *av7110) av7110 73 drivers/media/pci/ttpci/av7110_ir.c dprintk(4, "ir config = %08x\n", av7110->ir.ir_config); av7110 75 drivers/media/pci/ttpci/av7110_ir.c return av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, SetIR, 1, av7110 76 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.ir_config); av7110 81 drivers/media/pci/ttpci/av7110_ir.c struct av7110 *av7110 = rcdev->priv; av7110 88 drivers/media/pci/ttpci/av7110_ir.c if (FW_VERSION(av7110->arm_app) >= 0x2620) av7110 97 drivers/media/pci/ttpci/av7110_ir.c if (ir_config == av7110->ir.ir_config) av7110 100 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.ir_config = ir_config; av7110 102 drivers/media/pci/ttpci/av7110_ir.c return av7110_set_ir_config(av7110); av7110 105 drivers/media/pci/ttpci/av7110_ir.c int av7110_ir_init(struct av7110 *av7110) av7110 115 drivers/media/pci/ttpci/av7110_ir.c pci = av7110->dev->pci; av7110 117 drivers/media/pci/ttpci/av7110_ir.c snprintf(av7110->ir.input_phys, sizeof(av7110->ir.input_phys), av7110 120 drivers/media/pci/ttpci/av7110_ir.c rcdev->device_name = av7110->card_name; av7110 122 drivers/media/pci/ttpci/av7110_ir.c rcdev->input_phys = av7110->ir.input_phys; av7110 137 drivers/media/pci/ttpci/av7110_ir.c rcdev->priv = av7110; av7110 139 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.rcdev = rcdev; av7110 140 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.ir_config = IR_RC5; av7110 141 drivers/media/pci/ttpci/av7110_ir.c av7110_set_ir_config(av7110); av7110 145 drivers/media/pci/ttpci/av7110_ir.c av7110->ir.rcdev = NULL; av7110 152 drivers/media/pci/ttpci/av7110_ir.c void av7110_ir_exit(struct av7110 *av7110) av7110 154 drivers/media/pci/ttpci/av7110_ir.c rc_unregister_device(av7110->ir.rcdev); av7110 27 drivers/media/pci/ttpci/av7110_v4l.c int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val) av7110 32 drivers/media/pci/ttpci/av7110_v4l.c switch (av7110->adac_type) { av7110 43 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) { av7110 45 drivers/media/pci/ttpci/av7110_v4l.c av7110->dvb_adapter.num, reg, val); av7110 51 drivers/media/pci/ttpci/av7110_v4l.c static int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val) av7110 60 drivers/media/pci/ttpci/av7110_v4l.c switch (av7110->adac_type) { av7110 73 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) { av7110 75 drivers/media/pci/ttpci/av7110_v4l.c av7110->dvb_adapter.num, reg); av7110 124 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = dev->ext_priv; av7110 130 drivers/media/pci/ttpci/av7110_v4l.c if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) av7110 137 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = dev->ext_priv; av7110 142 drivers/media/pci/ttpci/av7110_v4l.c if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) av7110 178 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110*)dev->ext_priv; av7110 199 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->fe->ops.i2c_gate_ctrl) av7110 200 drivers/media/pci/ttpci/av7110_v4l.c av7110->fe->ops.i2c_gate_ctrl(av7110->fe, 1); av7110 220 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110*)dev->ext_priv; av7110 224 drivers/media/pci/ttpci/av7110_v4l.c dprintk(4, "%p\n", av7110); av7110 235 drivers/media/pci/ttpci/av7110_v4l.c if (0 != av7110->current_input) { av7110 242 drivers/media/pci/ttpci/av7110_v4l.c switch (av7110->current_input) { av7110 245 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0000); // loudspeaker source av7110 246 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0000); // headphone source av7110 247 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0000); // SCART 1 source av7110 248 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono av7110 249 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); // loudspeaker + headphone av7110 250 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); // SCART 1 volume av7110 252 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110 255 drivers/media/pci/ttpci/av7110_v4l.c } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110 259 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x48, 0x02, 0xd0) != 1) av7110 260 drivers/media/pci/ttpci/av7110_v4l.c dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110 264 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x48, 0x02, 0xd2) != 1) av7110 265 drivers/media/pci/ttpci/av7110_v4l.c dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110 269 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x48, 0x02, 0xd9) != 1) av7110 270 drivers/media/pci/ttpci/av7110_v4l.c dprintk(1, "saa7113 write failed @ card %d", av7110->dvb_adapter.num); av7110 281 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source av7110 282 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source av7110 283 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source av7110 284 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000e, 0x3000); // FM matrix, mono av7110 285 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone av7110 286 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume av7110 288 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110 291 drivers/media/pci/ttpci/av7110_v4l.c } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110 298 drivers/media/pci/ttpci/av7110_v4l.c if (av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, adswitch)) av7110 314 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 320 drivers/media/pci/ttpci/av7110_v4l.c if (!av7110->analog_tuner_flags || t->index != 0) av7110 336 drivers/media/pci/ttpci/av7110_v4l.c msp_readreg(av7110, MSP_RD_DEM, 0x007e, &stereo_det); av7110 338 drivers/media/pci/ttpci/av7110_v4l.c msp_readreg(av7110, MSP_RD_DSP, 0x0018, &stereo_det); av7110 358 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 362 drivers/media/pci/ttpci/av7110_v4l.c if (!av7110->analog_tuner_flags || av7110->current_input != 1) av7110 392 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000e, fm_matrix); av7110 393 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, src); av7110 394 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0009, src); av7110 395 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000a, src); av7110 402 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 406 drivers/media/pci/ttpci/av7110_v4l.c if (!av7110->analog_tuner_flags || av7110->current_input != 1) av7110 411 drivers/media/pci/ttpci/av7110_v4l.c f->frequency = av7110->current_freq; av7110 418 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 422 drivers/media/pci/ttpci/av7110_v4l.c if (!av7110->analog_tuner_flags || av7110->current_input != 1) av7110 428 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0xffe0); /* fast mute */ av7110 429 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0xffe0); av7110 432 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) av7110 434 drivers/media/pci/ttpci/av7110_v4l.c else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) av7110 436 drivers/media/pci/ttpci/av7110_v4l.c av7110->current_freq = f->frequency; av7110 438 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x003f); /* start stereo detection */ av7110 439 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0015, 0x0000); av7110 440 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x4f00); /* loudspeaker + headphone */ av7110 441 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x4f00); /* SCART 1 volume */ av7110 448 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 452 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags) { av7110 468 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 470 drivers/media/pci/ttpci/av7110_v4l.c *input = av7110->current_input; av7110 478 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 482 drivers/media/pci/ttpci/av7110_v4l.c if (!av7110->analog_tuner_flags) av7110 488 drivers/media/pci/ttpci/av7110_v4l.c av7110->current_input = input; av7110 504 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 509 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->current_input >= 2) av7110 518 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 521 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->current_input >= 2) av7110 530 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 535 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) >= 0x2623) { av7110 546 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 549 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) < 0x2623) av7110 552 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->wssMode) { av7110 564 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110 *)dev->ext_priv; av7110 567 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) < 0x2623) av7110 573 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssMode = 0; av7110 574 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssData = 0; av7110 575 drivers/media/pci/ttpci/av7110_v4l.c return av7110_fw_cmd(av7110, COMTYPE_ENCODER, av7110 583 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssMode = 1; av7110 584 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssData = 0; av7110 593 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110*) dev->ext_priv; av7110 596 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssMode = 0; av7110 597 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssData = 0; av7110 598 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) < 0x2623) av7110 601 drivers/media/pci/ttpci/av7110_v4l.c return av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 1, 0); av7110 608 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110*) dev->ext_priv; av7110 613 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) < 0x2623 || !av7110->wssMode || count != sizeof d) av7110 620 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssData = ((d.data[1] << 8) & 0x3f00) | d.data[0]; av7110 622 drivers/media/pci/ttpci/av7110_v4l.c av7110->wssData = 0x8000; av7110 623 drivers/media/pci/ttpci/av7110_v4l.c rc = av7110_fw_cmd(av7110, COMTYPE_ENCODER, SetWSSConfig, 2, 1, av7110->wssData); av7110 693 drivers/media/pci/ttpci/av7110_v4l.c int av7110_init_analog_module(struct av7110 *av7110) av7110 697 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x80, 0x0, 0x80) == 1 && av7110 698 drivers/media/pci/ttpci/av7110_v4l.c i2c_writereg(av7110, 0x80, 0x0, 0) == 1) { av7110 700 drivers/media/pci/ttpci/av7110_v4l.c av7110->dvb_adapter.num); av7110 701 drivers/media/pci/ttpci/av7110_v4l.c av7110->adac_type = DVB_ADAC_MSP34x0; av7110 702 drivers/media/pci/ttpci/av7110_v4l.c } else if (i2c_writereg(av7110, 0x84, 0x0, 0x80) == 1 && av7110 703 drivers/media/pci/ttpci/av7110_v4l.c i2c_writereg(av7110, 0x84, 0x0, 0) == 1) { av7110 705 drivers/media/pci/ttpci/av7110_v4l.c av7110->dvb_adapter.num); av7110 706 drivers/media/pci/ttpci/av7110_v4l.c av7110->adac_type = DVB_ADAC_MSP34x5; av7110 711 drivers/media/pci/ttpci/av7110_v4l.c msp_readreg(av7110, MSP_RD_DSP, 0x001e, &version1); av7110 712 drivers/media/pci/ttpci/av7110_v4l.c msp_readreg(av7110, MSP_RD_DSP, 0x001f, &version2); av7110 714 drivers/media/pci/ttpci/av7110_v4l.c av7110->dvb_adapter.num, version1, version2); av7110 715 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0013, 0x0c00); av7110 716 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0000, 0x7f00); // loudspeaker + headphone av7110 717 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0008, 0x0220); // loudspeaker source av7110 718 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0009, 0x0220); // headphone source av7110 719 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0004, 0x7f00); // loudspeaker volume av7110 720 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000a, 0x0220); // SCART 1 source av7110 721 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x0007, 0x7f00); // SCART 1 volume av7110 722 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DSP, 0x000d, 0x1900); // prescale SCART av7110 724 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x48, 0x01, 0x00)!=1) { av7110 729 drivers/media/pci/ttpci/av7110_v4l.c if ((av7110->dev->pci->subsystem_vendor == 0x110a) && (av7110->dev->pci->subsystem_device == 0x0000)) { av7110 731 drivers/media/pci/ttpci/av7110_v4l.c av7110->analog_tuner_flags |= ANALOG_TUNER_VES1820; av7110 732 drivers/media/pci/ttpci/av7110_v4l.c } else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device == 0x0002)) { av7110 734 drivers/media/pci/ttpci/av7110_v4l.c av7110->analog_tuner_flags |= ANALOG_TUNER_VES1820; av7110 735 drivers/media/pci/ttpci/av7110_v4l.c } else if ((av7110->dev->pci->subsystem_vendor == 0x13c2) && (av7110->dev->pci->subsystem_device == 0x000A)) { av7110 737 drivers/media/pci/ttpci/av7110_v4l.c av7110->analog_tuner_flags |= ANALOG_TUNER_STV0297; av7110 741 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags & ANALOG_TUNER_VES1820) { av7110 742 drivers/media/pci/ttpci/av7110_v4l.c if (ves1820_writereg(av7110->dev, 0x09, 0x0f, 0x20)) av7110 744 drivers/media/pci/ttpci/av7110_v4l.c } else if (av7110->analog_tuner_flags & ANALOG_TUNER_STV0297) { av7110 745 drivers/media/pci/ttpci/av7110_v4l.c saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9819 pin9(STD) av7110 746 drivers/media/pci/ttpci/av7110_v4l.c saa7146_setgpio(av7110->dev, 3, SAA7146_GPIO_OUTLO); // TDA9819 pin30(VIF) av7110 751 drivers/media/pci/ttpci/av7110_v4l.c if (i2c_writereg(av7110, 0x48, i[0], i[1]) != 1) { av7110 752 drivers/media/pci/ttpci/av7110_v4l.c dprintk(1, "saa7113 initialization failed @ card %d", av7110->dvb_adapter.num); av7110 758 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x00bb, 0x02d0); // AD_CV av7110 759 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 3); // FIR1 av7110 760 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 18); // FIR1 av7110 761 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 27); // FIR1 av7110 762 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 48); // FIR1 av7110 763 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 66); // FIR1 av7110 764 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0001, 72); // FIR1 av7110 765 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 4); // FIR2 av7110 766 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 64); // FIR2 av7110 767 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 0); // FIR2 av7110 768 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 3); // FIR2 av7110 769 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 18); // FIR2 av7110 770 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 27); // FIR2 av7110 771 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 48); // FIR2 av7110 772 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 66); // FIR2 av7110 773 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0005, 72); // FIR2 av7110 774 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0083, 0xa000); // MODE_REG av7110 775 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0093, 0x00aa); // DCO1_LO 5.74MHz av7110 776 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x009b, 0x04fc); // DCO1_HI av7110 777 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x00a3, 0x038e); // DCO2_LO 5.5MHz av7110 778 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x00ab, 0x04c6); // DCO2_HI av7110 779 drivers/media/pci/ttpci/av7110_v4l.c msp_writereg(av7110, MSP_WR_DEM, 0x0056, 0); // LOAD_REG 1/2 av7110 784 drivers/media/pci/ttpci/av7110_v4l.c saa7146_write(av7110->dev, DD1_STREAM_B, 0x00000000); av7110 785 drivers/media/pci/ttpci/av7110_v4l.c saa7146_write(av7110->dev, DD1_INIT, 0x03000700); av7110 786 drivers/media/pci/ttpci/av7110_v4l.c saa7146_write(av7110->dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); av7110 791 drivers/media/pci/ttpci/av7110_v4l.c int av7110_init_v4l(struct av7110 *av7110) av7110 793 drivers/media/pci/ttpci/av7110_v4l.c struct saa7146_dev* dev = av7110->dev; av7110 800 drivers/media/pci/ttpci/av7110_v4l.c if (av7110->analog_tuner_flags) av7110 831 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) < 0x2623) av7110 834 drivers/media/pci/ttpci/av7110_v4l.c if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) { av7110 839 drivers/media/pci/ttpci/av7110_v4l.c if (FW_VERSION(av7110->arm_app) >= 0x2623) { av7110 840 drivers/media/pci/ttpci/av7110_v4l.c if (saa7146_register_device(&av7110->vbi_dev, dev, "av7110", VFL_TYPE_VBI)) av7110 846 drivers/media/pci/ttpci/av7110_v4l.c int av7110_exit_v4l(struct av7110 *av7110) av7110 848 drivers/media/pci/ttpci/av7110_v4l.c struct saa7146_dev* dev = av7110->dev; av7110 850 drivers/media/pci/ttpci/av7110_v4l.c saa7146_unregister_device(&av7110->v4l_dev, av7110->dev); av7110 851 drivers/media/pci/ttpci/av7110_v4l.c saa7146_unregister_device(&av7110->vbi_dev, av7110->dev); av7110 906 drivers/media/pci/ttpci/av7110_v4l.c struct av7110 *av7110 = (struct av7110*) dev->ext_priv; av7110 909 drivers/media/pci/ttpci/av7110_v4l.c av7110->vidmode = AV7110_VIDEO_MODE_PAL; av7110 910 drivers/media/pci/ttpci/av7110_v4l.c av7110_set_vidmode(av7110, av7110->vidmode); av7110 913 drivers/media/pci/ttpci/av7110_v4l.c av7110->vidmode = AV7110_VIDEO_MODE_NTSC; av7110 914 drivers/media/pci/ttpci/av7110_v4l.c av7110_set_vidmode(av7110, av7110->vidmode);