/Linux-v4.19/drivers/media/pci/ivtv/ |
D | ivtv-driver.c | 314 void ivtv_clear_irq_mask(struct ivtv *itv, u32 mask) in ivtv_clear_irq_mask() argument 316 itv->irqmask &= ~mask; in ivtv_clear_irq_mask() 317 write_reg_sync(itv->irqmask, IVTV_REG_IRQMASK); in ivtv_clear_irq_mask() 320 void ivtv_set_irq_mask(struct ivtv *itv, u32 mask) in ivtv_set_irq_mask() argument 322 itv->irqmask |= mask; in ivtv_set_irq_mask() 323 write_reg_sync(itv->irqmask, IVTV_REG_IRQMASK); in ivtv_set_irq_mask() 326 int ivtv_set_output_mode(struct ivtv *itv, int mode) in ivtv_set_output_mode() argument 330 spin_lock(&itv->lock); in ivtv_set_output_mode() 331 old_mode = itv->output_mode; in ivtv_set_output_mode() 333 itv->output_mode = old_mode = mode; in ivtv_set_output_mode() [all …]
|
D | ivtv-i2c.c | 175 static int ivtv_i2c_new_ir(struct ivtv *itv, u32 hw, const char *type, u8 addr) in ivtv_i2c_new_ir() argument 178 struct i2c_adapter *adap = &itv->i2c_adap; in ivtv_i2c_new_ir() 179 struct IR_i2c_init_data *init_data = &itv->ir_i2c_init_data; in ivtv_i2c_new_ir() 183 if (itv->hw_flags & IVTV_HW_IR_ANY) in ivtv_i2c_new_ir() 200 init_data->name = itv->card_name; in ivtv_i2c_new_ir() 208 init_data->name = itv->card_name; in ivtv_i2c_new_ir() 212 init_data->name = itv->card_name; in ivtv_i2c_new_ir() 228 struct i2c_client *ivtv_i2c_new_ir_legacy(struct ivtv *itv) in ivtv_i2c_new_ir_legacy() argument 250 return i2c_new_probed_device(&itv->i2c_adap, &info, addr_list, NULL); in ivtv_i2c_new_ir_legacy() 253 int ivtv_i2c_register(struct ivtv *itv, unsigned idx) in ivtv_i2c_register() argument [all …]
|
D | ivtv-streams.c | 161 static void ivtv_stream_init(struct ivtv *itv, int type) in ivtv_stream_init() argument 163 struct ivtv_stream *s = &itv->streams[type]; in ivtv_stream_init() 169 s->itv = itv; in ivtv_stream_init() 178 s->buf_size = itv->stream_buf_size[type]; in ivtv_stream_init() 180 s->buffers = (itv->options.kilobytes[type] * 1024 + s->buf_size - 1) / s->buf_size; in ivtv_stream_init() 191 static int ivtv_prep_dev(struct ivtv *itv, int type) in ivtv_prep_dev() argument 193 struct ivtv_stream *s = &itv->streams[type]; in ivtv_prep_dev() 195 int num = itv->instance + ivtv_first_minor + num_offset; in ivtv_prep_dev() 201 s->itv = itv; in ivtv_prep_dev() 206 if (type == IVTV_ENC_STREAM_TYPE_RAD && !(itv->v4l2_cap & V4L2_CAP_RADIO)) in ivtv_prep_dev() [all …]
|
D | ivtv-firmware.c | 52 static int load_fw_direct(const char *fn, volatile u8 __iomem *mem, struct ivtv *itv, long size) in load_fw_direct() argument 58 if (retries && request_firmware(&fw, fn, &itv->pdev->dev) == 0) { in load_fw_direct() 88 void ivtv_halt_firmware(struct ivtv *itv) in ivtv_halt_firmware() argument 91 if (itv->has_cx23415 && itv->dec_mbox.mbox) in ivtv_halt_firmware() 92 ivtv_vapi(itv, CX2341X_DEC_HALT_FW, 0); in ivtv_halt_firmware() 93 if (itv->enc_mbox.mbox) in ivtv_halt_firmware() 94 ivtv_vapi(itv, CX2341X_ENC_HALT_FW, 0); in ivtv_halt_firmware() 97 itv->enc_mbox.mbox = itv->dec_mbox.mbox = NULL; in ivtv_halt_firmware() 109 if (!itv->has_cx23415) in ivtv_halt_firmware() 128 if (itv->has_cx23415) { in ivtv_halt_firmware() [all …]
|
D | ivtv-ioctl.c | 130 void ivtv_set_osd_alpha(struct ivtv *itv) in ivtv_set_osd_alpha() argument 132 ivtv_vapi(itv, CX2341X_OSD_SET_GLOBAL_ALPHA, 3, in ivtv_set_osd_alpha() 133 itv->osd_global_alpha_state, itv->osd_global_alpha, !itv->osd_local_alpha_state); in ivtv_set_osd_alpha() 134 ivtv_vapi(itv, CX2341X_OSD_SET_CHROMA_KEY, 2, itv->osd_chroma_key_state, itv->osd_chroma_key); in ivtv_set_osd_alpha() 137 int ivtv_set_speed(struct ivtv *itv, int speed) in ivtv_set_speed() argument 146 if (speed == itv->speed && !single_step) in ivtv_set_speed() 149 if (single_step && (speed < 0) == (itv->speed < 0)) { in ivtv_set_speed() 151 ivtv_vapi(itv, CX2341X_DEC_STEP_VIDEO, 1, 0); in ivtv_set_speed() 152 itv->speed = speed; in ivtv_set_speed() 163 data[3] = v4l2_ctrl_g_ctrl(itv->cxhdl.video_b_frames); in ivtv_set_speed() [all …]
|
D | ivtv-fileops.c | 46 struct ivtv *itv = id->itv; in ivtv_claim_stream() local 47 struct ivtv_stream *s = &itv->streams[type]; in ivtv_claim_stream() 73 ivtv_clear_irq_mask(itv, IVTV_IRQ_DEC_VBI_RE_INSERT); in ivtv_claim_stream() 83 itv->vbi.insert_mpeg && !ivtv_raw_vbi(itv)) { in ivtv_claim_stream() 88 s_vbi = &itv->streams[vbi_type]; in ivtv_claim_stream() 93 ivtv_clear_irq_mask(itv, IVTV_IRQ_DEC_VBI_RE_INSERT); in ivtv_claim_stream() 105 struct ivtv *itv = s->itv; in ivtv_release_stream() local 123 ivtv_set_irq_mask(itv, IVTV_IRQ_DEC_VBI_RE_INSERT); in ivtv_release_stream() 129 s_vbi = &itv->streams[IVTV_DEC_STREAM_TYPE_VBI]; in ivtv_release_stream() 131 s_vbi = &itv->streams[IVTV_ENC_STREAM_TYPE_VBI]; in ivtv_release_stream() [all …]
|
D | ivtv-irq.c | 41 static void ivtv_pcm_work_handler(struct ivtv *itv) in ivtv_pcm_work_handler() argument 43 struct ivtv_stream *s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM]; in ivtv_pcm_work_handler() 62 itv->pcm_announce_callback(itv->alsa, in ivtv_pcm_work_handler() 70 static void ivtv_pio_work_handler(struct ivtv *itv) in ivtv_pio_work_handler() argument 72 struct ivtv_stream *s = &itv->streams[itv->cur_pio_stream]; in ivtv_pio_work_handler() 77 if (itv->cur_pio_stream < 0 || itv->cur_pio_stream >= IVTV_MAX_STREAMS || in ivtv_pio_work_handler() 79 itv->cur_pio_stream = -1; in ivtv_pio_work_handler() 90 memcpy_fromio(buf->buf, itv->dec_mem + s->sg_processing[i].src - IVTV_DECODER_OFFSET, size); in ivtv_pio_work_handler() 93 memcpy_fromio(buf->buf, itv->enc_mem + s->sg_processing[i].src, size); in ivtv_pio_work_handler() 104 struct ivtv *itv = container_of(work, struct ivtv, irq_work); in ivtv_irq_work_handler() local [all …]
|
D | ivtv-controls.c | 28 struct ivtv *itv = container_of(cxhdl, struct ivtv, cxhdl); in ivtv_s_stream_vbi_fmt() local 31 if (fmt && itv->vbi.sliced_mpeg_data[0] == NULL) { in ivtv_s_stream_vbi_fmt() 36 itv->vbi.sliced_mpeg_data[i] = kmalloc(2049, GFP_KERNEL); in ivtv_s_stream_vbi_fmt() 37 if (itv->vbi.sliced_mpeg_data[i] == NULL) { in ivtv_s_stream_vbi_fmt() 39 kfree(itv->vbi.sliced_mpeg_data[i]); in ivtv_s_stream_vbi_fmt() 40 itv->vbi.sliced_mpeg_data[i] = NULL; in ivtv_s_stream_vbi_fmt() 47 itv->vbi.insert_mpeg = fmt; in ivtv_s_stream_vbi_fmt() 49 if (itv->vbi.insert_mpeg == 0) { in ivtv_s_stream_vbi_fmt() 53 if (ivtv_get_service_set(itv->vbi.sliced_in) == 0) { in ivtv_s_stream_vbi_fmt() 54 if (itv->is_60hz) in ivtv_s_stream_vbi_fmt() [all …]
|
D | ivtv-vbi.c | 27 static void ivtv_set_vps(struct ivtv *itv, int enabled) in ivtv_set_vps() argument 31 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_set_vps() 36 data.data[2] = itv->vbi.vps_payload.data[0]; in ivtv_set_vps() 37 data.data[8] = itv->vbi.vps_payload.data[1]; in ivtv_set_vps() 38 data.data[9] = itv->vbi.vps_payload.data[2]; in ivtv_set_vps() 39 data.data[10] = itv->vbi.vps_payload.data[3]; in ivtv_set_vps() 40 data.data[11] = itv->vbi.vps_payload.data[4]; in ivtv_set_vps() 41 ivtv_call_hw(itv, IVTV_HW_SAA7127, vbi, s_vbi_data, &data); in ivtv_set_vps() 44 static void ivtv_set_cc(struct ivtv *itv, int mode, const struct vbi_cc *cc) in ivtv_set_cc() argument 48 if (!(itv->v4l2_cap & V4L2_CAP_VIDEO_OUTPUT)) in ivtv_set_cc() [all …]
|
D | ivtv-gpio.c | 106 void ivtv_reset_ir_gpio(struct ivtv *itv) in ivtv_reset_ir_gpio() argument 110 if (itv->card->type != IVTV_CARD_PVR_150) in ivtv_reset_ir_gpio() 131 struct ivtv *itv = algo->data; in ivtv_reset_tuner_gpio() local 138 curout &= ~(1 << itv->card->xceive_pin); in ivtv_reset_tuner_gpio() 142 curout |= 1 << itv->card->xceive_pin; in ivtv_reset_tuner_gpio() 160 struct ivtv *itv = sd_to_ivtv(sd); in subdev_s_clock_freq() local 163 mask = itv->card->gpio_audio_freq.mask; in subdev_s_clock_freq() 166 data = itv->card->gpio_audio_freq.f32000; in subdev_s_clock_freq() 169 data = itv->card->gpio_audio_freq.f44100; in subdev_s_clock_freq() 173 data = itv->card->gpio_audio_freq.f48000; in subdev_s_clock_freq() [all …]
|
D | ivtv-routing.c | 34 void ivtv_audio_set_io(struct ivtv *itv) in ivtv_audio_set_io() argument 40 if (test_bit(IVTV_F_I_RADIO_USER, &itv->i_flags)) in ivtv_audio_set_io() 41 in = &itv->card->radio_input; in ivtv_audio_set_io() 43 in = &itv->card->audio_inputs[itv->audio_input]; in ivtv_audio_set_io() 47 if (itv->card->hw_muxer & IVTV_HW_M52790) in ivtv_audio_set_io() 49 v4l2_subdev_call(itv->sd_muxer, audio, s_routing, in ivtv_audio_set_io() 54 if (itv->card->hw_audio & IVTV_HW_MSP34XX) in ivtv_audio_set_io() 56 ivtv_call_hw(itv, itv->card->hw_audio, audio, s_routing, in ivtv_audio_set_io() 62 void ivtv_video_set_io(struct ivtv *itv) in ivtv_video_set_io() argument 64 int inp = itv->active_input; in ivtv_video_set_io() [all …]
|
D | ivtvfb.c | 124 printk(KERN_INFO "ivtvfb%d " type ": " fmt, itv->instance , ## args); \ 130 #define IVTVFB_ERR(fmt, args...) printk(KERN_ERR "ivtvfb%d: " fmt, itv->instance , ## args) 131 #define IVTVFB_WARN(fmt, args...) printk(KERN_WARNING "ivtvfb%d: " fmt, itv->instance , ## args) 132 #define IVTVFB_INFO(fmt, args...) printk(KERN_INFO "ivtvfb%d: " fmt, itv->instance , ## args) 199 static int ivtvfb_get_framebuffer(struct ivtv *itv, u32 *fbbase, in ivtvfb_get_framebuffer() argument 205 ivtv_firmware_check(itv, "ivtvfb_get_framebuffer"); in ivtvfb_get_framebuffer() 206 rc = ivtv_vapi_result(itv, data, CX2341X_OSD_GET_FRAMEBUFFER, 0); in ivtvfb_get_framebuffer() 212 static int ivtvfb_get_osd_coords(struct ivtv *itv, in ivtvfb_get_osd_coords() argument 215 struct osd_info *oi = itv->osd_info; in ivtvfb_get_osd_coords() 218 ivtv_vapi_result(itv, data, CX2341X_OSD_GET_OSD_COORDS, 0); in ivtvfb_get_osd_coords() [all …]
|
D | ivtv-udma.c | 92 void ivtv_udma_alloc(struct ivtv *itv) in ivtv_udma_alloc() argument 94 if (itv->udma.SG_handle == 0) { in ivtv_udma_alloc() 96 itv->udma.SG_handle = pci_map_single(itv->pdev, itv->udma.SGarray, in ivtv_udma_alloc() 97 sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE); in ivtv_udma_alloc() 98 ivtv_udma_sync_for_cpu(itv); in ivtv_udma_alloc() 102 int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr, in ivtv_udma_setup() argument 106 struct ivtv_user_dma *dma = &itv->udma; in ivtv_udma_setup() 153 dma->SG_length = pci_map_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_udma_setup() 161 ivtv_udma_sync_for_device(itv); in ivtv_udma_setup() 165 void ivtv_udma_unmap(struct ivtv *itv) in ivtv_udma_unmap() argument [all …]
|
D | ivtv-udma.h | 28 int ivtv_udma_setup(struct ivtv *itv, unsigned long ivtv_dest_addr, 30 void ivtv_udma_unmap(struct ivtv *itv); 31 void ivtv_udma_free(struct ivtv *itv); 32 void ivtv_udma_alloc(struct ivtv *itv); 33 void ivtv_udma_prepare(struct ivtv *itv); 34 void ivtv_udma_start(struct ivtv *itv); 36 static inline void ivtv_udma_sync_for_device(struct ivtv *itv) in ivtv_udma_sync_for_device() argument 38 pci_dma_sync_single_for_device(itv->pdev, itv->udma.SG_handle, in ivtv_udma_sync_for_device() 39 sizeof(itv->udma.SGarray), PCI_DMA_TODEVICE); in ivtv_udma_sync_for_device() 42 static inline void ivtv_udma_sync_for_cpu(struct ivtv *itv) in ivtv_udma_sync_for_cpu() argument [all …]
|
D | ivtv-alsa-main.c | 108 struct ivtv *itv = to_ivtv(itvsc->v4l2_dev); in snd_ivtv_card_set_names() local 116 itv->instance); in snd_ivtv_card_set_names() 121 itv->instance, itv->card_name); in snd_ivtv_card_set_names() 128 struct ivtv *itv = to_ivtv(v4l2_dev); in snd_ivtv_init() local 140 idx = index[itv->instance] == -1 ? SNDRV_DEFAULT_IDX1 : index[itv->instance]; in snd_ivtv_init() 141 ret = snd_card_new(&itv->pdev->dev, in snd_ivtv_init() 173 itv->alsa = itvsc; in snd_ivtv_init() 178 itv->alsa = NULL; in snd_ivtv_init() 185 __func__, itv->instance, sc->number); in snd_ivtv_init() 197 static int ivtv_alsa_load(struct ivtv *itv) in ivtv_alsa_load() argument [all …]
|
D | ivtv-yuv.c | 37 static int ivtv_yuv_prep_user_dma(struct ivtv *itv, struct ivtv_user_dma *dma, in ivtv_yuv_prep_user_dma() argument 42 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_prep_user_dma() 133 dma->SG_length = pci_map_sg(itv->pdev, dma->SGlist, dma->page_count, PCI_DMA_TODEVICE); in ivtv_yuv_prep_user_dma() 149 ivtv_udma_sync_for_device(itv); in ivtv_yuv_prep_user_dma() 154 int ivtv_yuv_filter_check(struct ivtv *itv) in ivtv_yuv_filter_check() argument 168 static void ivtv_yuv_filter(struct ivtv *itv, int h_filter, int v_filter_1, int v_filter_2) in ivtv_yuv_filter() argument 228 static void ivtv_yuv_handle_horizontal(struct ivtv *itv, struct yuv_frame_info *f) in ivtv_yuv_handle_horizontal() argument 230 struct yuv_playback_info *yi = &itv->yuv_info; in ivtv_yuv_handle_horizontal() 385 ivtv_yuv_filter(itv, h_filter, -1, -1); in ivtv_yuv_handle_horizontal() 390 static void ivtv_yuv_handle_vertical(struct ivtv *itv, struct yuv_frame_info *f) in ivtv_yuv_handle_vertical() argument [all …]
|
D | ivtv-mailbox.c | 145 static int try_mailbox(struct ivtv *itv, struct ivtv_mailbox_data *mbdata, int mb) in try_mailbox() argument 160 static int get_mailbox(struct ivtv *itv, struct ivtv_mailbox_data *mbdata, int flags) in get_mailbox() argument 175 if (try_mailbox(itv, mbdata, mb)) in get_mailbox() 202 static void clear_all_mailboxes(struct ivtv *itv, struct ivtv_mailbox_data *mbdata) in clear_all_mailboxes() argument 214 static int ivtv_api_call(struct ivtv *itv, int cmd, int args, u32 data[]) in ivtv_api_call() argument 216 struct ivtv_mailbox_data *mbdata = (cmd >= 128) ? &itv->enc_mbox : &itv->dec_mbox; in ivtv_api_call() 247 if (itv->api_cache[cmd].last_jiffies && in ivtv_api_call() 249 itv->api_cache[cmd].last_jiffies + in ivtv_api_call() 251 !memcmp(data, itv->api_cache[cmd].data, sizeof(itv->api_cache[cmd].data))) { in ivtv_api_call() 252 itv->api_cache[cmd].last_jiffies = jiffies; in ivtv_api_call() [all …]
|
D | ivtv-yuv.h | 36 int ivtv_yuv_filter_check(struct ivtv *itv); 37 void ivtv_yuv_setup_stream_frame(struct ivtv *itv); 38 int ivtv_yuv_udma_stream_frame(struct ivtv *itv, void __user *src); 39 void ivtv_yuv_frame_complete(struct ivtv *itv); 40 int ivtv_yuv_prep_frame(struct ivtv *itv, struct ivtv_dma_frame *args); 41 void ivtv_yuv_close(struct ivtv *itv); 42 void ivtv_yuv_work_handler(struct ivtv *itv);
|
D | ivtv-driver.h | 146 v4l2_info(&itv->v4l2_dev, " " type ": " fmt , ##args); \ 162 v4l2_info(&itv->v4l2_dev, " " type ": " fmt , ##args); \ 176 #define IVTV_ERR(fmt, args...) v4l2_err(&itv->v4l2_dev, fmt , ## args) 177 #define IVTV_WARN(fmt, args...) v4l2_warn(&itv->v4l2_dev, fmt , ## args) 178 #define IVTV_INFO(fmt, args...) v4l2_info(&itv->v4l2_dev, fmt , ## args) 333 struct ivtv *itv; /* for ease of use */ member 387 struct ivtv *itv; member 757 void (*ivtvfb_restore)(struct ivtv *itv); /* Used for a warm start */ 774 void ivtv_set_irq_mask(struct ivtv *itv, u32 mask); 775 void ivtv_clear_irq_mask(struct ivtv *itv, u32 mask); [all …]
|
D | ivtv-firmware.h | 25 int ivtv_firmware_init(struct ivtv *itv); 26 void ivtv_firmware_versions(struct ivtv *itv); 27 void ivtv_halt_firmware(struct ivtv *itv); 28 void ivtv_init_mpeg_decoder(struct ivtv *itv); 29 int ivtv_firmware_check(struct ivtv *itv, char *where);
|
D | ivtv-i2c.h | 24 struct i2c_client *ivtv_i2c_new_ir_legacy(struct ivtv *itv); 25 int ivtv_i2c_register(struct ivtv *itv, unsigned idx); 26 struct v4l2_subdev *ivtv_find_hw(struct ivtv *itv, u32 hw); 29 int init_ivtv_i2c(struct ivtv *itv); 30 void exit_ivtv_i2c(struct ivtv *itv);
|
D | ivtv-vbi.h | 24 ivtv_write_vbi_from_user(struct ivtv *itv, 27 void ivtv_process_vbi_data(struct ivtv *itv, struct ivtv_buffer *buf, 29 int ivtv_used_line(struct ivtv *itv, int line, int field); 30 void ivtv_disable_cc(struct ivtv *itv); 32 void ivtv_vbi_work_handler(struct ivtv *itv);
|
D | ivtv-streams.h | 24 int ivtv_streams_setup(struct ivtv *itv); 25 int ivtv_streams_register(struct ivtv *itv); 26 void ivtv_streams_cleanup(struct ivtv *itv); 34 void ivtv_stop_all_captures(struct ivtv *itv); 35 int ivtv_passthrough_mode(struct ivtv *itv, int enable);
|
D | ivtv-queue.h | 37 struct ivtv *itv = s->itv; in ivtv_use_pio() local 40 (SLICED_VBI_PIO && s->type == IVTV_ENC_STREAM_TYPE_VBI && itv->vbi.sliced_in->service_set); in ivtv_use_pio() 56 pci_dma_sync_single_for_cpu(s->itv->pdev, buf->dma_handle, in ivtv_buf_sync_for_cpu() 63 pci_dma_sync_single_for_device(s->itv->pdev, buf->dma_handle, in ivtv_buf_sync_for_device() 85 pci_dma_sync_single_for_cpu(s->itv->pdev, s->sg_handle, in ivtv_stream_sync_for_cpu() 92 pci_dma_sync_single_for_device(s->itv->pdev, s->sg_handle, in ivtv_stream_sync_for_device()
|
D | ivtv-alsa-pcm.c | 147 struct ivtv *itv = to_ivtv(v4l2_dev); in snd_ivtv_pcm_capture_open() local 155 if (ivtv_init_on_first_open(itv)) { in snd_ivtv_pcm_capture_open() 160 s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM]; in snd_ivtv_pcm_capture_open() 163 item.itv = itv; in snd_ivtv_pcm_capture_open() 185 runtime->private_data = itv; in snd_ivtv_pcm_capture_open() 187 itv->pcm_announce_callback = ivtv_alsa_announce_pcm_data; in snd_ivtv_pcm_capture_open() 201 struct ivtv *itv = to_ivtv(v4l2_dev); in snd_ivtv_pcm_capture_close() local 206 s = &itv->streams[IVTV_ENC_STREAM_TYPE_PCM]; in snd_ivtv_pcm_capture_close() 212 itv->pcm_announce_callback = NULL; in snd_ivtv_pcm_capture_close() 333 struct ivtv *itv = to_ivtv(v4l2_dev); in snd_ivtv_pcm_create() local [all …]
|