Lines Matching refs:core
65 printk(KERN_DEBUG "%s: " fmt, core->name , ## arg); \
333 int cx88_sram_channel_setup(struct cx88_core *core, in cx88_sram_channel_setup() argument
412 void cx88_sram_channel_dump(struct cx88_core *core, in cx88_sram_channel_dump() argument
432 core->name,ch->name); in cx88_sram_channel_dump()
435 core->name,name[i], in cx88_sram_channel_dump()
439 printk("%s: risc%d: ", core->name, i); in cx88_sram_channel_dump()
447 printk("%s: iq %x: ", core->name, i); in cx88_sram_channel_dump()
452 core->name, i+j, risc, j); in cx88_sram_channel_dump()
457 core->name, ch->fifo_start, ch->fifo_start+ch->fifo_size); in cx88_sram_channel_dump()
459 core->name, ch->ctrl_start, ch->ctrl_start+6*16); in cx88_sram_channel_dump()
461 core->name,cx_read(ch->ptr1_reg)); in cx88_sram_channel_dump()
463 core->name,cx_read(ch->ptr2_reg)); in cx88_sram_channel_dump()
465 core->name,cx_read(ch->cnt1_reg)); in cx88_sram_channel_dump()
467 core->name,cx_read(ch->cnt2_reg)); in cx88_sram_channel_dump()
499 int cx88_core_irq(struct cx88_core *core, u32 status) in cx88_core_irq() argument
504 cx88_ir_irq(core); in cx88_core_irq()
508 cx88_print_irqbits(core->name, "irq pci", in cx88_core_irq()
510 status, core->pci_irqmask); in cx88_core_irq()
514 void cx88_wakeup(struct cx88_core *core, in cx88_wakeup() argument
526 void cx88_shutdown(struct cx88_core *core) in cx88_shutdown() argument
550 int cx88_reset(struct cx88_core *core) in cx88_reset() argument
553 cx88_shutdown(core); in cx88_reset()
564 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH21], 720*4, 0); in cx88_reset()
565 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH22], 128, 0); in cx88_reset()
566 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH23], 128, 0); in cx88_reset()
567 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH24], 128, 0); in cx88_reset()
568 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0); in cx88_reset()
569 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0); in cx88_reset()
570 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28], 188*4, 0); in cx88_reset()
571 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH27], 128, 0); in cx88_reset()
657 int cx88_set_scale(struct cx88_core *core, unsigned int width, unsigned int height, in cx88_set_scale() argument
660 unsigned int swidth = norm_swidth(core->tvnorm); in cx88_set_scale()
661 unsigned int sheight = norm_maxh(core->tvnorm); in cx88_set_scale()
667 v4l2_norm_to_name(core->tvnorm)); in cx88_set_scale()
672 value = (width * norm_hdelay(core->tvnorm)) / swidth; in cx88_set_scale()
688 cx_write(MO_VDELAY_EVEN, norm_vdelay(core->tvnorm)); in cx88_set_scale()
689 cx_write(MO_VDELAY_ODD, norm_vdelay(core->tvnorm)); in cx88_set_scale()
690 dprintk(1,"set_scale: vdelay 0x%04x\n", norm_vdelay(core->tvnorm)); in cx88_set_scale()
704 if (core->tvnorm & V4L2_STD_SECAM) { in cx88_set_scale()
708 if (INPUT(core->input).type == CX88_VMUX_SVIDEO) in cx88_set_scale()
728 static int set_pll(struct cx88_core *core, int prescale, u32 ofreq) in set_pll() argument
744 printk("%s/0: pll out of range\n",core->name); in set_pll()
765 int cx88_start_audio_dma(struct cx88_core *core) in cx88_start_audio_dma() argument
777 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], bpl, 0); in cx88_start_audio_dma()
778 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], bpl, 0); in cx88_start_audio_dma()
779 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH27], in cx88_start_audio_dma()
791 int cx88_stop_audio_dma(struct cx88_core *core) in cx88_stop_audio_dma() argument
803 static int set_tvaudio(struct cx88_core *core) in set_tvaudio() argument
805 v4l2_std_id norm = core->tvnorm; in set_tvaudio()
807 if (CX88_VMUX_TELEVISION != INPUT(core->input).type && in set_tvaudio()
808 CX88_VMUX_CABLE != INPUT(core->input).type) in set_tvaudio()
812 core->tvaudio = WW_BG; in set_tvaudio()
815 core->tvaudio = WW_DK; in set_tvaudio()
818 core->tvaudio = WW_I; in set_tvaudio()
821 core->tvaudio = WW_L; in set_tvaudio()
824 core->tvaudio = WW_BG; in set_tvaudio()
827 core->tvaudio = WW_DK; in set_tvaudio()
831 core->tvaudio = WW_BTSC; in set_tvaudio()
834 core->tvaudio = WW_EIAJ; in set_tvaudio()
838 core->name, v4l2_norm_to_name(core->tvnorm)); in set_tvaudio()
839 core->tvaudio = WW_NONE; in set_tvaudio()
844 cx88_set_tvaudio(core); in set_tvaudio()
851 cx88_start_audio_dma(core); in set_tvaudio()
857 int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm) in cx88_set_tvnorm() argument
867 if (norm == core->tvnorm) in cx88_set_tvnorm()
869 if (core->v4ldev && (vb2_is_busy(&core->v4ldev->vb2_vidq) || in cx88_set_tvnorm()
870 vb2_is_busy(&core->v4ldev->vb2_vbiq))) in cx88_set_tvnorm()
872 if (core->dvbdev && vb2_is_busy(&core->dvbdev->vb2_mpegq)) in cx88_set_tvnorm()
874 core->tvnorm = norm; in cx88_set_tvnorm()
914 v4l2_norm_to_name(core->tvnorm), fsc8, adc_clock, vdec_clock, in cx88_set_tvnorm()
916 set_pll(core,2,vdec_clock); in cx88_set_tvnorm()
971 cx88_set_scale(core, 320, 240, V4L2_FIELD_INTERLACED); in cx88_set_tvnorm()
974 set_tvaudio(core); in cx88_set_tvnorm()
977 call_all(core, video, s_std, norm); in cx88_set_tvnorm()
980 v4l2_ctrl_grab(core->chroma_agc, cxiformat == VideoFormatSECAM); in cx88_set_tvnorm()
988 void cx88_vdev_init(struct cx88_core *core, in cx88_vdev_init() argument
1002 vfd->v4l2_dev = &core->v4l2_dev; in cx88_vdev_init()
1005 vfd->lock = &core->lock; in cx88_vdev_init()
1007 core->name, type, core->board.name); in cx88_vdev_init()
1012 struct cx88_core *core; in cx88_core_get() local
1015 list_for_each_entry(core, &cx88_devlist, devlist) { in cx88_core_get()
1016 if (pci->bus->number != core->pci_bus) in cx88_core_get()
1018 if (PCI_SLOT(pci->devfn) != core->pci_slot) in cx88_core_get()
1021 if (0 != cx88_get_resources(core, pci)) { in cx88_core_get()
1025 atomic_inc(&core->refcount); in cx88_core_get()
1027 return core; in cx88_core_get()
1030 core = cx88_core_create(pci, cx88_devcount); in cx88_core_get()
1031 if (NULL != core) { in cx88_core_get()
1033 list_add_tail(&core->devlist, &cx88_devlist); in cx88_core_get()
1037 return core; in cx88_core_get()
1040 void cx88_core_put(struct cx88_core *core, struct pci_dev *pci) in cx88_core_put() argument
1045 if (!atomic_dec_and_test(&core->refcount)) in cx88_core_put()
1049 cx88_ir_fini(core); in cx88_core_put()
1050 if (0 == core->i2c_rc) { in cx88_core_put()
1051 if (core->i2c_rtc) in cx88_core_put()
1052 i2c_unregister_device(core->i2c_rtc); in cx88_core_put()
1053 i2c_del_adapter(&core->i2c_adap); in cx88_core_put()
1055 list_del(&core->devlist); in cx88_core_put()
1056 iounmap(core->lmmio); in cx88_core_put()
1059 v4l2_ctrl_handler_free(&core->video_hdl); in cx88_core_put()
1060 v4l2_ctrl_handler_free(&core->audio_hdl); in cx88_core_put()
1061 v4l2_device_unregister(&core->v4l2_dev); in cx88_core_put()
1062 kfree(core); in cx88_core_put()