Lines Matching +full:mini +full:- +full:core
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
15 #include <linux/i2c-algo-bit.h>
20 #include <media/v4l2-device.h>
21 #include <media/v4l2-fh.h>
24 #include <media/videobuf2-dma-sg.h>
25 #include <media/drv-intf/cx2341x.h>
26 #include <media/videobuf2-dvb.h>
27 #include <media/i2c/ir-kbd-i2c.h>
30 #include "cx88-reg.h"
37 #define UNSET (-1U)
44 /* ----------------------------------------------------------- */
62 /* need "shadow" registers for some write-only ones ... */
85 /* ----------------------------------------------------------- */
98 /* ----------------------------------------------------------- */
108 /* ----------------------------------------------------------- */
109 /* SRAM memory management data (see cx88-core.c) */
136 /* ----------------------------------------------------------- */
295 #define INPUT(nr) (core->board.input[nr])
297 /* ----------------------------------------------------------- */
315 /* common v4l buffer stuff -- must be first */
355 /* config info -- analog */
368 /* config info -- dvb */
373 void (*gate_ctrl)(struct cx88_core *core, int open);
401 * cx88-video needs to access cx8802 for hybrid tuner pll access and
405 /* cx88-blackbird needs to access cx8800 for vb2_is_busy() checks */
417 #define call_hw(core, grpid, o, f, args...) \ argument
419 if (!core->i2c_rc) { \
420 if (core->gate_ctrl) \
421 core->gate_ctrl(core, 1); \
422 v4l2_device_call_all(&core->v4l2_dev, \
424 if (core->gate_ctrl) \
425 core->gate_ctrl(core, 0); \
429 #define call_all(core, o, f, args...) call_hw(core, 0, o, f, ##args) argument
433 #define wm8775_s_ctrl(core, id, val) \ argument
436 v4l2_ctrl_find(core->sd_wm8775->ctrl_handler, id);\
437 if (ctrl_ && !core->i2c_rc) { \
438 if (core->gate_ctrl) \
439 core->gate_ctrl(core, 1); \
441 if (core->gate_ctrl) \
442 core->gate_ctrl(core, 0); \
446 #define wm8775_g_ctrl(core, id) \ argument
449 v4l2_ctrl_find(core->sd_wm8775->ctrl_handler, id);\
451 if (ctrl_ && !core->i2c_rc) { \
452 if (core->gate_ctrl) \
453 core->gate_ctrl(core, 1); \
455 if (core->gate_ctrl) \
456 core->gate_ctrl(core, 0); \
461 /* ----------------------------------------------------------- */
469 struct cx88_core *core; member
496 /* ----------------------------------------------------------- */
498 /* =============> moved to cx88-alsa.c <====================== */
500 /* ----------------------------------------------------------- */
508 struct cx88_core *core; member
521 /* Callers to the following functions must hold core->lock */
523 /* MPEG 8802 -> mini driver - Driver probe and configuration */
527 /* MPEG 8802 -> mini driver - Access for hardware control */
531 /* MPEG 8802 <- mini driver - Access for hardware control */
537 struct cx88_core *core; member
576 /* List of attached drivers; must hold core->lock to access */
582 /* ----------------------------------------------------------- */
584 #define cx_read(reg) readl(core->lmmio + ((reg) >> 2))
585 #define cx_write(reg, value) writel((value), core->lmmio + ((reg) >> 2))
586 #define cx_writeb(reg, value) writeb((value), core->bmmio + (reg))
589 writel((readl(core->lmmio + ((reg) >> 2)) & ~(mask)) |\
590 ((value) & (mask)), core->lmmio + ((reg) >> 2))
597 #define cx_sread(sreg) (core->shadow[sreg])
599 (core->shadow[sreg] = value, \
600 writel(core->shadow[sreg], core->lmmio + ((reg) >> 2)))
602 (core->shadow[sreg] = (core->shadow[sreg] & ~(mask)) | \
604 writel(core->shadow[sreg], \
605 core->lmmio + ((reg) >> 2)))
607 /* ----------------------------------------------------------- */
608 /* cx88-core.c */
615 int cx88_core_irq(struct cx88_core *core, u32 status);
616 void cx88_wakeup(struct cx88_core *core,
618 void cx88_shutdown(struct cx88_core *core);
619 int cx88_reset(struct cx88_core *core);
631 void cx88_risc_disasm(struct cx88_core *core,
633 int cx88_sram_channel_setup(struct cx88_core *core,
636 void cx88_sram_channel_dump(struct cx88_core *core,
639 int cx88_set_scale(struct cx88_core *core, unsigned int width,
641 int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm);
643 void cx88_vdev_init(struct cx88_core *core,
649 void cx88_core_put(struct cx88_core *core,
652 int cx88_start_audio_dma(struct cx88_core *core);
653 int cx88_stop_audio_dma(struct cx88_core *core);
655 /* ----------------------------------------------------------- */
656 /* cx88-vbi.c */
667 /* ----------------------------------------------------------- */
668 /* cx88-i2c.c */
670 int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci);
672 /* ----------------------------------------------------------- */
673 /* cx88-cards.c */
676 int cx88_get_resources(const struct cx88_core *core,
679 void cx88_setup_xc3028(struct cx88_core *core, struct xc2028_ctrl *ctl);
681 /* ----------------------------------------------------------- */
682 /* cx88-tvaudio.c */
684 void cx88_set_tvaudio(struct cx88_core *core);
685 void cx88_newstation(struct cx88_core *core);
686 void cx88_get_stereo(struct cx88_core *core, struct v4l2_tuner *t);
687 void cx88_set_stereo(struct cx88_core *core, u32 mode, int manual);
693 /* Caller must hold core->lock */
697 /* ----------------------------------------------------------- */
698 /* cx88-dsp.c */
700 s32 cx88_dsp_detect_stereo_sap(struct cx88_core *core);
702 /* ----------------------------------------------------------- */
703 /* cx88-input.c */
705 int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci);
706 int cx88_ir_fini(struct cx88_core *core);
707 void cx88_ir_irq(struct cx88_core *core);
708 int cx88_ir_start(struct cx88_core *core);
709 void cx88_ir_stop(struct cx88_core *core);
710 void cx88_i2c_init_ir(struct cx88_core *core);
712 /* ----------------------------------------------------------- */
713 /* cx88-mpeg.c */
723 /* ----------------------------------------------------------- */
724 /* cx88-video.c*/
725 int cx88_enum_input(struct cx88_core *core, struct v4l2_input *i);
726 int cx88_set_freq(struct cx88_core *core, const struct v4l2_frequency *f);
727 int cx88_video_mux(struct cx88_core *core, unsigned int input);
728 int cx88_querycap(struct file *file, struct cx88_core *core,