Lines Matching refs:core
74 printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
298 int cx88_video_mux(struct cx88_core *core, unsigned int input) in cx88_video_mux() argument
306 core->input = input; in cx88_video_mux()
334 if (core->sd_wm8775) { in cx88_video_mux()
335 call_all(core, audio, s_routing, in cx88_video_mux()
344 core->tvaudio = WW_I2SADC; in cx88_video_mux()
345 cx88_set_tvaudio(core); in cx88_video_mux()
363 struct cx88_core *core = dev->core; in start_video_dma() local
366 cx88_sram_channel_setup(core, &cx88_sram_channels[SRAM_CH21], in start_video_dma()
368 cx88_set_scale(core, core->width, core->height, core->field); in start_video_dma()
376 cx_set(MO_PCI_INTMSK, core->pci_irqmask | PCI_INT_VIDINT); in start_video_dma()
400 struct cx88_core *core = dev->core; in stop_video_dma() local
418 struct cx88_core *core = dev->core; in restart_video_queue() local
439 struct cx88_core *core = dev->core; in queue_setup() local
442 sizes[0] = (dev->fmt->depth * core->width * core->height) >> 3; in queue_setup()
450 struct cx88_core *core = dev->core; in buffer_prepare() local
454 buf->bpl = core->width * dev->fmt->depth >> 3; in buffer_prepare()
456 if (vb2_plane_size(vb, 0) < core->height * buf->bpl) in buffer_prepare()
458 vb2_set_plane_payload(vb, 0, core->height * buf->bpl); in buffer_prepare()
460 switch (core->field) { in buffer_prepare()
464 buf->bpl, 0, core->height); in buffer_prepare()
469 buf->bpl, 0, core->height); in buffer_prepare()
474 0, buf->bpl * (core->height >> 1), in buffer_prepare()
476 core->height >> 1); in buffer_prepare()
481 buf->bpl * (core->height >> 1), 0, in buffer_prepare()
483 core->height >> 1); in buffer_prepare()
490 core->height >> 1); in buffer_prepare()
495 core->width, core->height, dev->fmt->depth, dev->fmt->name, in buffer_prepare()
516 struct cx88_core *core = dev->core; in buffer_queue() local
555 struct cx88_core *core = dev->core; in stop_streaming() local
588 struct cx88_core *core = dev->core; in radio_open() local
594 cx_write(MO_GP3_IO, core->board.radio.gpio3); in radio_open()
595 cx_write(MO_GP0_IO, core->board.radio.gpio0); in radio_open()
596 cx_write(MO_GP1_IO, core->board.radio.gpio1); in radio_open()
597 cx_write(MO_GP2_IO, core->board.radio.gpio2); in radio_open()
598 if (core->board.radio.audioroute) { in radio_open()
599 if (core->sd_wm8775) { in radio_open()
600 call_all(core, audio, s_routing, in radio_open()
601 core->board.radio.audioroute, 0, 0); in radio_open()
604 core->tvaudio = WW_I2SADC; in radio_open()
605 cx88_set_tvaudio(core); in radio_open()
608 core->tvaudio = WW_FM; in radio_open()
609 cx88_set_tvaudio(core); in radio_open()
610 cx88_set_stereo(core, V4L2_TUNER_MODE_STEREO, 1); in radio_open()
612 call_all(core, tuner, s_radio); in radio_open()
621 struct cx88_core *core = in cx8800_s_vid_ctrl() local
633 if (core->tvnorm & V4L2_STD_SECAM) { in cx8800_s_vid_ctrl()
667 struct cx88_core *core = in cx8800_s_aud_ctrl() local
673 if (core->sd_wm8775) { in cx8800_s_aud_ctrl()
676 wm8775_s_ctrl(core, ctrl->id, ctrl->val); in cx8800_s_aud_ctrl()
679 wm8775_s_ctrl(core, ctrl->id, (ctrl->val) ? in cx8800_s_aud_ctrl()
683 wm8775_s_ctrl(core, ctrl->id, ctrl->val << 9); in cx8800_s_aud_ctrl()
719 struct cx88_core *core = dev->core; in vidioc_g_fmt_vid_cap() local
721 f->fmt.pix.width = core->width; in vidioc_g_fmt_vid_cap()
722 f->fmt.pix.height = core->height; in vidioc_g_fmt_vid_cap()
723 f->fmt.pix.field = core->field; in vidioc_g_fmt_vid_cap()
737 struct cx88_core *core = dev->core; in vidioc_try_fmt_vid_cap() local
746 maxw = norm_maxw(core->tvnorm); in vidioc_try_fmt_vid_cap()
747 maxh = norm_maxh(core->tvnorm); in vidioc_try_fmt_vid_cap()
782 struct cx88_core *core = dev->core; in vidioc_s_fmt_vid_cap() local
789 if (core->dvbdev && vb2_is_busy(&core->dvbdev->vb2_mpegq)) in vidioc_s_fmt_vid_cap()
792 core->width = f->fmt.pix.width; in vidioc_s_fmt_vid_cap()
793 core->height = f->fmt.pix.height; in vidioc_s_fmt_vid_cap()
794 core->field = f->fmt.pix.field; in vidioc_s_fmt_vid_cap()
798 void cx88_querycap(struct file *file, struct cx88_core *core, in cx88_querycap() argument
803 strlcpy(cap->card, core->board.name, sizeof(cap->card)); in cx88_querycap()
805 if (UNSET != core->board.tuner_type) in cx88_querycap()
820 if (core->board.radio.type == CX88_RADIO) in cx88_querycap()
829 struct cx88_core *core = dev->core; in vidioc_querycap() local
833 cx88_querycap(file, core, cap); in vidioc_querycap()
852 struct cx88_core *core = dev->core; in vidioc_g_std() local
854 *tvnorm = core->tvnorm; in vidioc_g_std()
861 struct cx88_core *core = dev->core; in vidioc_s_std() local
863 return cx88_set_tvnorm(core, tvnorms); in vidioc_s_std()
867 int cx88_enum_input (struct cx88_core *core,struct v4l2_input *i) in cx88_enum_input() argument
901 struct cx88_core *core = dev->core; in vidioc_enum_input() local
902 return cx88_enum_input (core,i); in vidioc_enum_input()
908 struct cx88_core *core = dev->core; in vidioc_g_input() local
910 *i = core->input; in vidioc_g_input()
917 struct cx88_core *core = dev->core; in vidioc_s_input() local
924 cx88_newstation(core); in vidioc_s_input()
925 cx88_video_mux(core,i); in vidioc_s_input()
933 struct cx88_core *core = dev->core; in vidioc_g_tuner() local
936 if (unlikely(UNSET == core->board.tuner_type)) in vidioc_g_tuner()
944 call_all(core, tuner, g_tuner, t); in vidioc_g_tuner()
946 cx88_get_stereo(core ,t); in vidioc_g_tuner()
956 struct cx88_core *core = dev->core; in vidioc_s_tuner() local
958 if (UNSET == core->board.tuner_type) in vidioc_s_tuner()
963 cx88_set_stereo(core, t->audmode, 1); in vidioc_s_tuner()
971 struct cx88_core *core = dev->core; in vidioc_g_frequency() local
973 if (unlikely(UNSET == core->board.tuner_type)) in vidioc_g_frequency()
978 f->frequency = core->freq; in vidioc_g_frequency()
980 call_all(core, tuner, g_frequency, f); in vidioc_g_frequency()
985 int cx88_set_freq (struct cx88_core *core, in cx88_set_freq() argument
990 if (unlikely(UNSET == core->board.tuner_type)) in cx88_set_freq()
995 cx88_newstation(core); in cx88_set_freq()
996 call_all(core, tuner, s_frequency, f); in cx88_set_freq()
997 call_all(core, tuner, g_frequency, &new_freq); in cx88_set_freq()
998 core->freq = new_freq.frequency; in cx88_set_freq()
1002 cx88_set_tvaudio(core); in cx88_set_freq()
1012 struct cx88_core *core = dev->core; in vidioc_s_frequency() local
1014 return cx88_set_freq(core, f); in vidioc_s_frequency()
1022 struct cx88_core *core = dev->core; in vidioc_g_register() local
1034 struct cx88_core *core = dev->core; in vidioc_s_register() local
1049 struct cx88_core *core = dev->core; in radio_g_tuner() local
1056 call_all(core, tuner, g_tuner, t); in radio_g_tuner()
1064 struct cx88_core *core = dev->core; in radio_s_tuner() local
1069 call_all(core, tuner, s_tuner, t); in radio_s_tuner()
1085 struct cx88_core *core = dev->core; in cx8800_vid_irq() local
1094 cx88_print_irqbits(core->name, "irq vid", in cx8800_vid_irq()
1100 printk(KERN_WARNING "%s/0: video risc op code error\n",core->name); in cx8800_vid_irq()
1103 cx88_sram_channel_dump(core, &cx88_sram_channels[SRAM_CH21]); in cx8800_vid_irq()
1110 cx88_wakeup(core, &dev->vidq, count); in cx8800_vid_irq()
1118 cx88_wakeup(core, &dev->vbiq, count); in cx8800_vid_irq()
1126 struct cx88_core *core = dev->core; in cx8800_irq() local
1132 (core->pci_irqmask | PCI_INT_VIDINT); in cx8800_irq()
1138 if (status & core->pci_irqmask) in cx8800_irq()
1139 cx88_core_irq(core,status); in cx8800_irq()
1145 core->name); in cx8800_irq()
1286 struct cx88_core *core; in cx8800_initdev() local
1301 core = cx88_core_get(dev->pci); in cx8800_initdev()
1302 if (NULL == core) { in cx8800_initdev()
1306 dev->core = core; in cx8800_initdev()
1312 "latency: %d, mmio: 0x%llx\n", core->name, in cx8800_initdev()
1318 printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name); in cx8800_initdev()
1340 IRQF_SHARED, core->name, dev); in cx8800_initdev()
1343 core->name,pci_dev->irq); in cx8800_initdev()
1346 cx_set(MO_PCI_INTMSK, core->pci_irqmask); in cx8800_initdev()
1352 vc = v4l2_ctrl_new_std(&core->audio_hdl, &cx8800_ctrl_aud_ops, in cx8800_initdev()
1355 err = core->audio_hdl.error; in cx8800_initdev()
1365 vc = v4l2_ctrl_new_std(&core->video_hdl, &cx8800_ctrl_vid_ops, in cx8800_initdev()
1368 err = core->video_hdl.error; in cx8800_initdev()
1373 core->chroma_agc = vc; in cx8800_initdev()
1375 v4l2_ctrl_add_handler(&core->video_hdl, &core->audio_hdl, NULL); in cx8800_initdev()
1379 if (core->board.audio_chip == CX88_AUDIO_WM8775) { in cx8800_initdev()
1383 .platform_data = &core->wm8775_data, in cx8800_initdev()
1387 if (core->boardnr == CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1) in cx8800_initdev()
1388 core->wm8775_data.is_nova_s = true; in cx8800_initdev()
1390 core->wm8775_data.is_nova_s = false; in cx8800_initdev()
1392 sd = v4l2_i2c_new_subdev_board(&core->v4l2_dev, &core->i2c_adap, in cx8800_initdev()
1395 core->sd_wm8775 = sd; in cx8800_initdev()
1400 if (core->board.audio_chip == CX88_AUDIO_TVAUDIO) { in cx8800_initdev()
1403 v4l2_i2c_new_subdev(&core->v4l2_dev, &core->i2c_adap, in cx8800_initdev()
1407 switch (core->boardnr) { in cx8800_initdev()
1415 core->i2c_rtc = i2c_new_device(&core->i2c_adap, &rtc_info); in cx8800_initdev()
1428 core->v4ldev = dev; in cx8800_initdev()
1431 mutex_lock(&core->lock); in cx8800_initdev()
1432 cx88_set_tvnorm(core, core->tvnorm); in cx8800_initdev()
1433 v4l2_ctrl_handler_setup(&core->video_hdl); in cx8800_initdev()
1434 v4l2_ctrl_handler_setup(&core->audio_hdl); in cx8800_initdev()
1435 cx88_video_mux(core, 0); in cx8800_initdev()
1447 q->lock = &core->lock; in cx8800_initdev()
1463 q->lock = &core->lock; in cx8800_initdev()
1470 cx88_vdev_init(core, dev->pci, &dev->video_dev, in cx8800_initdev()
1473 dev->video_dev.ctrl_handler = &core->video_hdl; in cx8800_initdev()
1476 video_nr[core->nr]); in cx8800_initdev()
1479 core->name); in cx8800_initdev()
1483 core->name, video_device_node_name(&dev->video_dev)); in cx8800_initdev()
1485 cx88_vdev_init(core, dev->pci, &dev->vbi_dev, in cx8800_initdev()
1490 vbi_nr[core->nr]); in cx8800_initdev()
1493 core->name); in cx8800_initdev()
1497 core->name, video_device_node_name(&dev->vbi_dev)); in cx8800_initdev()
1499 if (core->board.radio.type == CX88_RADIO) { in cx8800_initdev()
1500 cx88_vdev_init(core, dev->pci, &dev->radio_dev, in cx8800_initdev()
1503 dev->radio_dev.ctrl_handler = &core->audio_hdl; in cx8800_initdev()
1505 radio_nr[core->nr]); in cx8800_initdev()
1508 core->name); in cx8800_initdev()
1512 core->name, video_device_node_name(&dev->radio_dev)); in cx8800_initdev()
1516 if (core->board.tuner_type != UNSET) { in cx8800_initdev()
1517 core->kthread = kthread_run(cx88_audio_thread, core, "cx88 tvaudio"); in cx8800_initdev()
1518 if (IS_ERR(core->kthread)) { in cx8800_initdev()
1519 err = PTR_ERR(core->kthread); in cx8800_initdev()
1521 core->name, err); in cx8800_initdev()
1524 mutex_unlock(&core->lock); in cx8800_initdev()
1531 mutex_unlock(&core->lock); in cx8800_initdev()
1534 core->v4ldev = NULL; in cx8800_initdev()
1535 cx88_core_put(core,dev->pci); in cx8800_initdev()
1544 struct cx88_core *core = dev->core; in cx8800_finidev() local
1547 if (core->kthread) { in cx8800_finidev()
1548 kthread_stop(core->kthread); in cx8800_finidev()
1549 core->kthread = NULL; in cx8800_finidev()
1552 if (core->ir) in cx8800_finidev()
1553 cx88_ir_stop(core); in cx8800_finidev()
1555 cx88_shutdown(core); /* FIXME */ in cx8800_finidev()
1563 core->v4ldev = NULL; in cx8800_finidev()
1566 cx88_core_put(core,dev->pci); in cx8800_finidev()
1575 struct cx88_core *core = dev->core; in cx8800_suspend() local
1581 printk("%s/0: suspend video\n", core->name); in cx8800_suspend()
1585 printk("%s/0: suspend vbi\n", core->name); in cx8800_suspend()
1590 if (core->ir) in cx8800_suspend()
1591 cx88_ir_stop(core); in cx8800_suspend()
1593 cx88_shutdown(core); in cx8800_suspend()
1606 struct cx88_core *core = dev->core; in cx8800_resume() local
1614 core->name); in cx8800_resume()
1622 printk(KERN_ERR "%s/0: can't set power state\n", core->name); in cx8800_resume()
1631 cx88_reset(core); in cx8800_resume()
1632 if (core->ir) in cx8800_resume()
1633 cx88_ir_start(core); in cx8800_resume()
1635 cx_set(MO_PCI_INTMSK, core->pci_irqmask); in cx8800_resume()
1640 printk("%s/0: resume video\n", core->name); in cx8800_resume()
1644 printk("%s/0: resume vbi\n", core->name); in cx8800_resume()