Lines Matching defs:core

4  * driver core
40 MODULE_PARM_DESC(core_debug, "enable debug messages [core]");
51 printk(KERN_DEBUG pr_fmt("%s: core:" fmt), \
56 printk(KERN_DEBUG pr_fmt("%s: core:" fmt), \
342 int cx88_sram_channel_setup(struct cx88_core *core,
421 void cx88_sram_channel_dump(struct cx88_core *core,
504 int cx88_core_irq(struct cx88_core *core, u32 status)
509 cx88_ir_irq(core);
515 status, core->pci_irqmask);
520 void cx88_wakeup(struct cx88_core *core,
528 buf->vb.field = core->field;
535 void cx88_shutdown(struct cx88_core *core)
560 int cx88_reset(struct cx88_core *core)
563 cx88_shutdown(core);
574 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH21],
576 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH22], 128, 0);
577 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH23], 128, 0);
578 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH24], 128, 0);
579 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], 128, 0);
580 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], 128, 0);
581 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH28],
583 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH27], 128, 0);
682 int cx88_set_scale(struct cx88_core *core, unsigned int width,
685 unsigned int swidth = norm_swidth(core->tvnorm);
686 unsigned int sheight = norm_maxh(core->tvnorm);
692 v4l2_norm_to_name(core->tvnorm));
697 value = (width * norm_hdelay(core->tvnorm)) / swidth;
713 cx_write(MO_VDELAY_EVEN, norm_vdelay(core->tvnorm));
714 cx_write(MO_VDELAY_ODD, norm_vdelay(core->tvnorm));
715 dprintk(1, "set_scale: vdelay 0x%04x\n", norm_vdelay(core->tvnorm));
729 if (core->tvnorm & V4L2_STD_SECAM) {
733 if (INPUT(core->input).type == CX88_VMUX_SVIDEO)
754 static int set_pll(struct cx88_core *core, int prescale, u32 ofreq)
791 int cx88_start_audio_dma(struct cx88_core *core)
803 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH25], bpl, 0);
804 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH26], bpl, 0);
805 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH27],
817 int cx88_stop_audio_dma(struct cx88_core *core)
829 static int set_tvaudio(struct cx88_core *core)
831 v4l2_std_id norm = core->tvnorm;
833 if (INPUT(core->input).type != CX88_VMUX_TELEVISION &&
834 INPUT(core->input).type != CX88_VMUX_CABLE)
838 core->tvaudio = WW_BG;
841 core->tvaudio = WW_DK;
844 core->tvaudio = WW_I;
847 core->tvaudio = WW_L;
851 core->tvaudio = WW_BG;
854 core->tvaudio = WW_DK;
858 core->tvaudio = WW_BTSC;
861 core->tvaudio = WW_EIAJ;
865 v4l2_norm_to_name(core->tvnorm));
866 core->tvaudio = WW_NONE;
871 cx88_set_tvaudio(core);
878 cx88_start_audio_dma(core);
882 int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm)
892 if (norm == core->tvnorm)
894 if (core->v4ldev && (vb2_is_busy(&core->v4ldev->vb2_vidq) ||
895 vb2_is_busy(&core->v4ldev->vb2_vbiq)))
897 if (core->dvbdev && vb2_is_busy(&core->dvbdev->vb2_mpegq))
899 core->tvnorm = norm;
939 v4l2_norm_to_name(core->tvnorm), fsc8, adc_clock, vdec_clock,
941 set_pll(core, 2, vdec_clock);
1001 cx88_set_scale(core, 320, 240, V4L2_FIELD_INTERLACED);
1004 set_tvaudio(core);
1007 call_all(core, video, s_std, norm);
1013 v4l2_ctrl_grab(core->chroma_agc, cxiformat == VideoFormatSECAM);
1022 void cx88_vdev_init(struct cx88_core *core,
1036 vfd->v4l2_dev = &core->v4l2_dev;
1039 vfd->lock = &core->lock;
1041 core->name, type, core->board.name);
1047 struct cx88_core *core;
1050 list_for_each_entry(core, &cx88_devlist, devlist) {
1051 if (pci->bus->number != core->pci_bus)
1053 if (PCI_SLOT(pci->devfn) != core->pci_slot)
1056 if (cx88_get_resources(core, pci) != 0) {
1060 refcount_inc(&core->refcount);
1062 return core;
1065 core = cx88_core_create(pci, cx88_devcount);
1066 if (core) {
1068 list_add_tail(&core->devlist, &cx88_devlist);
1072 return core;
1076 void cx88_core_put(struct cx88_core *core, struct pci_dev *pci)
1081 if (!refcount_dec_and_test(&core->refcount))
1085 cx88_ir_fini(core);
1086 if (core->i2c_rc == 0) {
1087 i2c_unregister_device(core->i2c_rtc);
1088 i2c_del_adapter(&core->i2c_adap);
1090 list_del(&core->devlist);
1091 iounmap(core->lmmio);
1094 v4l2_ctrl_handler_free(&core->video_hdl);
1095 v4l2_ctrl_handler_free(&core->audio_hdl);
1096 v4l2_device_unregister(&core->v4l2_dev);
1097 kfree(core);