solo_enc 127 drivers/media/pci/solo6x10/solo6x10-enc.c int solo_osd_print(struct solo_enc_dev *solo_enc) solo_enc 129 drivers/media/pci/solo6x10/solo6x10-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 130 drivers/media/pci/solo6x10/solo6x10-enc.c u8 *str = solo_enc->osd_text; solo_enc 131 drivers/media/pci/solo6x10/solo6x10-enc.c u8 *buf = solo_enc->osd_buf; solo_enc 143 drivers/media/pci/solo6x10/solo6x10-enc.c reg &= ~(1 << solo_enc->ch); solo_enc 158 drivers/media/pci/solo6x10/solo6x10-enc.c SOLO_EOSD_EXT_ADDR_CHAN(solo_dev, solo_enc->ch), solo_enc 162 drivers/media/pci/solo6x10/solo6x10-enc.c reg |= (1 << solo_enc->ch); solo_enc 93 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_is_motion_on(struct solo_enc_dev *solo_enc) solo_enc 95 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 97 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return (solo_dev->motion_mask >> solo_enc->ch) & 1; solo_enc 100 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_motion_detected(struct solo_enc_dev *solo_enc) solo_enc 102 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 104 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c u32 ch_mask = 1 << solo_enc->ch; solo_enc 107 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_irqsave(&solo_enc->motion_lock, flags); solo_enc 112 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock_irqrestore(&solo_enc->motion_lock, flags); solo_enc 117 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static void solo_motion_toggle(struct solo_enc_dev *solo_enc, int on) solo_enc 119 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 120 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c u32 mask = 1 << solo_enc->ch; solo_enc 123 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_irqsave(&solo_enc->motion_lock, flags); solo_enc 136 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock_irqrestore(&solo_enc->motion_lock, flags); solo_enc 139 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c void solo_update_mode(struct solo_enc_dev *solo_enc) solo_enc 141 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 145 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->interlaced = (solo_enc->mode & 0x08) ? 1 : 0; solo_enc 146 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->bw_weight = max(solo_dev->fps / solo_enc->interval, 1); solo_enc 148 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->mode == SOLO_ENC_MODE_CIF) { solo_enc 149 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->width = solo_dev->video_hsize >> 1; solo_enc 150 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->height = solo_dev->video_vsize; solo_enc 169 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->width = solo_dev->video_hsize; solo_enc 170 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->height = solo_dev->video_vsize << 1; solo_enc 171 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->bw_weight <<= 2; solo_enc 191 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c memcpy(solo_enc->vop, vop, vop_len); solo_enc 196 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c u16 interval = solo_enc->interval * 1000; solo_enc 198 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop = solo_enc->vop; solo_enc 208 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vop_len = vop_len; solo_enc 211 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop = solo_enc->jpeg_header; solo_enc 212 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop[SOF0_START + 5] = 0xff & (solo_enc->height >> 8); solo_enc 213 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop[SOF0_START + 6] = 0xff & solo_enc->height; solo_enc 214 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop[SOF0_START + 7] = 0xff & (solo_enc->width >> 8); solo_enc 215 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vop[SOF0_START + 8] = 0xff & solo_enc->width; solo_enc 218 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c jpeg_dqt[solo_g_jpeg_qp(solo_dev, solo_enc->ch)], DQT_LEN); solo_enc 221 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_enc_on(struct solo_enc_dev *solo_enc) solo_enc 223 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c u8 ch = solo_enc->ch; solo_enc 224 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 227 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_update_mode(solo_enc); solo_enc 230 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->bw_weight > solo_dev->enc_bw_remain) solo_enc 232 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->sequence = 0; solo_enc 233 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_dev->enc_bw_remain -= solo_enc->bw_weight; solo_enc 235 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->type == SOLO_ENC_TYPE_EXT) solo_enc 243 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->interlaced ? 1 : 0); solo_enc 245 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->interlaced) solo_enc 246 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c interval = solo_enc->interval - 1; solo_enc 248 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c interval = solo_enc->interval; solo_enc 251 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_GOP(ch), solo_enc->gop); solo_enc 252 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_QP(ch), solo_enc->qp); solo_enc 256 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_GOP_E(ch), solo_enc->gop); solo_enc 257 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_QP_E(ch), solo_enc->qp); solo_enc 261 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_CAP_CH_SCALE(ch), solo_enc->mode); solo_enc 266 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static void solo_enc_off(struct solo_enc_dev *solo_enc) solo_enc 268 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 270 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_dev->enc_bw_remain += solo_enc->bw_weight; solo_enc 272 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_CAP_CH_SCALE(solo_enc->ch), 0); solo_enc 273 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_CAP_CH_COMP_ENA_E(solo_enc->ch), 0); solo_enc 308 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_send_desc(struct solo_enc_dev *solo_enc, int skip, solo_enc 312 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 320 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_count = 1; solo_enc 328 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c desc = &solo_enc->desc_items[solo_enc->desc_count++]; solo_enc 364 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_count--; solo_enc 376 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->desc_count >= (solo_enc->desc_nelts - 1)) { solo_enc 377 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c ret = solo_p2m_dma_desc(solo_dev, solo_enc->desc_items, solo_enc 378 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_dma, solo_enc 379 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_count - 1); solo_enc 382 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_count = 1; solo_enc 386 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->desc_count <= 1) solo_enc 389 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_p2m_dma_desc(solo_dev, solo_enc->desc_items, solo_enc 390 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_dma, solo_enc->desc_count - 1); solo_enc 449 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_fill_jpeg(struct solo_enc_dev *solo_enc, solo_enc 453 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 459 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (vb2_plane_size(vb, 0) < vop_jpeg_size(vh) + solo_enc->jpeg_len) solo_enc 462 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c frame_size = ALIGN(vop_jpeg_size(vh) + solo_enc->jpeg_len, DMA_ALIGN); solo_enc 463 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vb2_set_plane_payload(vb, 0, vop_jpeg_size(vh) + solo_enc->jpeg_len); solo_enc 465 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_send_desc(solo_enc, solo_enc->jpeg_len, sgt, solo_enc 471 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_fill_mpeg(struct solo_enc_dev *solo_enc, solo_enc 475 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 487 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c skip = solo_enc->vop_len; solo_enc 490 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vop_len); solo_enc 501 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_send_desc(solo_enc, skip, sgt, frame_off, frame_size, solo_enc 506 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static int solo_enc_fillbuf(struct solo_enc_dev *solo_enc, solo_enc 513 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c switch (solo_enc->fmt) { solo_enc 516 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c ret = solo_fill_mpeg(solo_enc, vb, vh); solo_enc 519 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c ret = solo_fill_jpeg(solo_enc, vb, vh); solo_enc 524 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vbuf->sequence = solo_enc->sequence++; solo_enc 528 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_is_motion_on(solo_enc) && enc_buf->motion) { solo_enc 539 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c v4l2_event_queue(solo_enc->vfd, &ev); solo_enc 548 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static void solo_enc_handle_one(struct solo_enc_dev *solo_enc, solo_enc 554 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c mutex_lock(&solo_enc->lock); solo_enc 555 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->type != enc_buf->type) solo_enc 558 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_irqsave(&solo_enc->av_lock, flags); solo_enc 559 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (list_empty(&solo_enc->vidq_active)) { solo_enc 560 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock_irqrestore(&solo_enc->av_lock, flags); solo_enc 563 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c vb = list_first_entry(&solo_enc->vidq_active, struct solo_vb2_buf, solo_enc 566 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock_irqrestore(&solo_enc->av_lock, flags); solo_enc 568 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc_fillbuf(solo_enc, &vb->vb.vb2_buf, enc_buf); solo_enc 570 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c mutex_unlock(&solo_enc->lock); solo_enc 581 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc; solo_enc 605 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc = solo_dev->v4l2_enc[ch]; solo_enc 606 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc == NULL) { solo_enc 624 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_motion_detected(solo_enc)) solo_enc 629 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc_handle_one(solo_enc, &enc_buf); solo_enc 673 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = vb2_get_drv_priv(vq); solo_enc 677 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock(&solo_enc->av_lock); solo_enc 678 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c list_add_tail(&solo_vb->list, &solo_enc->vidq_active); solo_enc 679 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock(&solo_enc->av_lock); solo_enc 710 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = vb2_get_drv_priv(q); solo_enc 712 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_enc_on(solo_enc); solo_enc 717 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = vb2_get_drv_priv(q); solo_enc 720 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_irqsave(&solo_enc->av_lock, flags); solo_enc 721 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc_off(solo_enc); solo_enc 722 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c while (!list_empty(&solo_enc->vidq_active)) { solo_enc 724 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq_active.next, solo_enc 730 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_unlock_irqrestore(&solo_enc->av_lock, flags); solo_enc 736 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = vb2_get_drv_priv(vb->vb2_queue); solo_enc 739 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c switch (solo_enc->fmt) { solo_enc 744 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vop, solo_enc->vop_len); solo_enc 748 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->jpeg_header, solo_enc->jpeg_len); solo_enc 766 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 767 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 771 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->ch); solo_enc 780 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 781 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 787 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->ch + 1); solo_enc 789 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c input->std = solo_enc->vfd->tvnorms; solo_enc 791 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (!tw28_get_video_status(solo_dev, solo_enc->ch)) solo_enc 817 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 818 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c int dev_type = solo_enc->solo_dev->type; solo_enc 850 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 851 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 889 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 890 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 894 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (vb2_is_busy(&solo_enc->vidq)) solo_enc 902 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->mode = SOLO_ENC_MODE_D1; solo_enc 904 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->mode = SOLO_ENC_MODE_CIF; solo_enc 907 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->fmt = pix->pixelformat; solo_enc 919 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_update_mode(solo_enc); solo_enc 926 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 929 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pix->width = solo_enc->width; solo_enc 930 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pix->height = solo_enc->height; solo_enc 931 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pix->pixelformat = solo_enc->fmt; solo_enc 932 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pix->field = solo_enc->interlaced ? V4L2_FIELD_INTERLACED : solo_enc 942 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 943 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 954 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 956 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_set_video_type(solo_enc->solo_dev, std & V4L2_STD_625_50); solo_enc 962 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 963 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 989 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 990 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 1019 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 1023 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->timeperframe.numerator = solo_enc->interval; solo_enc 1024 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c cp->timeperframe.denominator = solo_enc->solo_dev->fps; solo_enc 1045 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = video_drvdata(file); solo_enc 1047 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c u8 fps = solo_enc->solo_dev->fps; solo_enc 1049 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (vb2_is_streaming(&solo_enc->vidq)) solo_enc 1052 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->interval = calc_interval(fps, t->numerator, t->denominator); solo_enc 1053 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_update_mode(solo_enc); solo_enc 1059 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc = solo_enc 1061 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_dev *solo_dev = solo_enc->solo_dev; solo_enc 1070 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return tw28_set_ctrl_val(solo_dev, ctrl->id, solo_enc->ch, solo_enc 1073 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->gop = ctrl->val; solo_enc 1074 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_GOP(solo_enc->ch), solo_enc->gop); solo_enc 1075 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_GOP_E(solo_enc->ch), solo_enc->gop); solo_enc 1078 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->qp = ctrl->val; solo_enc 1079 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_QP(solo_enc->ch), solo_enc->qp); solo_enc 1080 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_reg_write(solo_dev, SOLO_VE_CH_QP_E(solo_enc->ch), solo_enc->qp); solo_enc 1083 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_thresh = ctrl->val << 8; solo_enc 1084 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (!solo_enc->motion_global || !solo_enc->motion_enabled) solo_enc 1086 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_set_motion_threshold(solo_dev, solo_enc->ch, solo_enc 1087 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_thresh); solo_enc 1089 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_global = ctrl->val == V4L2_DETECT_MD_MODE_GLOBAL; solo_enc 1090 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_enabled = ctrl->val > V4L2_DETECT_MD_MODE_DISABLED; solo_enc 1092 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->motion_global) solo_enc 1093 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c err = solo_set_motion_threshold(solo_dev, solo_enc->ch, solo_enc 1094 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_thresh); solo_enc 1096 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c err = solo_set_motion_block(solo_dev, solo_enc->ch, solo_enc 1097 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->md_thresholds->p_cur.p_u16); solo_enc 1101 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_motion_toggle(solo_enc, ctrl->val); solo_enc 1104 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->motion_enabled && !solo_enc->motion_global) solo_enc 1105 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_set_motion_block(solo_dev, solo_enc->ch, solo_enc 1106 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->md_thresholds->p_new.p_u16); solo_enc 1109 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c strscpy(solo_enc->osd_text, ctrl->p_new.p_char, solo_enc 1110 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c sizeof(solo_enc->osd_text)); solo_enc 1111 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_osd_print(solo_enc); solo_enc 1212 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c struct solo_enc_dev *solo_enc; solo_enc 1216 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc = kzalloc(sizeof(*solo_enc), GFP_KERNEL); solo_enc 1217 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (!solo_enc) solo_enc 1220 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c hdl = &solo_enc->hdl; solo_enc 1245 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->md_thresholds = solo_enc 1252 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->solo_dev = solo_dev; solo_enc 1253 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->ch = ch; solo_enc 1254 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c mutex_init(&solo_enc->lock); solo_enc 1255 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_init(&solo_enc->av_lock); solo_enc 1256 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c INIT_LIST_HEAD(&solo_enc->vidq_active); solo_enc 1257 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->fmt = (solo_dev->type == SOLO_DEV_6010) ? solo_enc 1259 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->type = SOLO_ENC_TYPE_STD; solo_enc 1261 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->qp = SOLO_DEFAULT_QP; solo_enc 1262 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->gop = solo_dev->fps; solo_enc 1263 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->interval = 1; solo_enc 1264 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->mode = SOLO_ENC_MODE_CIF; solo_enc 1265 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_global = true; solo_enc 1266 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->motion_thresh = SOLO_DEF_MOT_THRESH; solo_enc 1267 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; solo_enc 1268 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ; solo_enc 1269 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.ops = &solo_enc_video_qops; solo_enc 1270 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.mem_ops = &vb2_dma_sg_memops; solo_enc 1271 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.drv_priv = solo_enc; solo_enc 1272 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.gfp_flags = __GFP_DMA32 | __GFP_KSWAPD_RECLAIM; solo_enc 1273 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; solo_enc 1274 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.buf_struct_size = sizeof(struct solo_vb2_buf); solo_enc 1275 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.lock = &solo_enc->lock; solo_enc 1276 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vidq.dev = &solo_dev->pdev->dev; solo_enc 1277 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c ret = vb2_queue_init(&solo_enc->vidq); solo_enc 1280 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_update_mode(solo_enc); solo_enc 1282 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c spin_lock_init(&solo_enc->motion_lock); solo_enc 1285 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->jpeg_len = sizeof(jpeg_header); solo_enc 1286 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c memcpy(solo_enc->jpeg_header, jpeg_header, solo_enc->jpeg_len); solo_enc 1288 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_nelts = 32; solo_enc 1289 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_items = pci_alloc_consistent(solo_dev->pdev, solo_enc 1291 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_nelts, solo_enc 1292 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c &solo_enc->desc_dma); solo_enc 1294 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc->desc_items == NULL) solo_enc 1297 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd = video_device_alloc(); solo_enc 1298 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (!solo_enc->vfd) solo_enc 1301 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c *solo_enc->vfd = solo_enc_template; solo_enc 1302 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd->v4l2_dev = &solo_dev->v4l2_dev; solo_enc 1303 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd->ctrl_handler = hdl; solo_enc 1304 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd->queue = &solo_enc->vidq; solo_enc 1305 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd->lock = &solo_enc->lock; solo_enc 1306 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c video_set_drvdata(solo_enc->vfd, solo_enc); solo_enc 1307 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c ret = video_register_device(solo_enc->vfd, VFL_TYPE_GRABBER, nr); solo_enc 1311 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c snprintf(solo_enc->vfd->name, sizeof(solo_enc->vfd->name), solo_enc 1313 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->vfd->num); solo_enc 1315 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c return solo_enc; solo_enc 1318 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c video_device_release(solo_enc->vfd); solo_enc 1320 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pci_free_consistent(solo_enc->solo_dev->pdev, solo_enc 1321 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c sizeof(struct solo_p2m_desc) * solo_enc->desc_nelts, solo_enc 1322 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_items, solo_enc->desc_dma); solo_enc 1325 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c kfree(solo_enc); solo_enc 1329 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c static void solo_enc_free(struct solo_enc_dev *solo_enc) solo_enc 1331 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c if (solo_enc == NULL) solo_enc 1334 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c pci_free_consistent(solo_enc->solo_dev->pdev, solo_enc 1335 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c sizeof(struct solo_p2m_desc) * solo_enc->desc_nelts, solo_enc 1336 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c solo_enc->desc_items, solo_enc->desc_dma); solo_enc 1337 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c video_unregister_device(solo_enc->vfd); solo_enc 1338 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c v4l2_ctrl_handler_free(&solo_enc->hdl); solo_enc 1339 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c kfree(solo_enc); solo_enc 356 drivers/media/pci/solo6x10/solo6x10.h void solo_update_mode(struct solo_enc_dev *solo_enc); solo_enc 365 drivers/media/pci/solo6x10/solo6x10.h int solo_osd_print(struct solo_enc_dev *solo_enc);