usbvision 87 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_request_intra(struct usb_usbvision *usbvision); usbvision 88 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_unrequest_intra(struct usb_usbvision *usbvision); usbvision 89 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_adjust_compression(struct usb_usbvision *usbvision); usbvision 90 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_measure_bandwidth(struct usb_usbvision *usbvision); usbvision 163 drivers/media/usb/usbvision/usbvision-core.c static int scratch_len(struct usb_usbvision *usbvision) /* This returns the amount of data actually in the buffer */ usbvision 165 drivers/media/usb/usbvision/usbvision-core.c int len = usbvision->scratch_write_ptr - usbvision->scratch_read_ptr; usbvision 176 drivers/media/usb/usbvision/usbvision-core.c static int scratch_free(struct usb_usbvision *usbvision) usbvision 178 drivers/media/usb/usbvision/usbvision-core.c int free = usbvision->scratch_read_ptr - usbvision->scratch_write_ptr; usbvision 192 drivers/media/usb/usbvision/usbvision-core.c static int scratch_put(struct usb_usbvision *usbvision, unsigned char *data, usbvision 197 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->scratch_write_ptr + len < scratch_buf_size) { usbvision 198 drivers/media/usb/usbvision/usbvision-core.c memcpy(usbvision->scratch + usbvision->scratch_write_ptr, data, len); usbvision 199 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_write_ptr += len; usbvision 201 drivers/media/usb/usbvision/usbvision-core.c len_part = scratch_buf_size - usbvision->scratch_write_ptr; usbvision 202 drivers/media/usb/usbvision/usbvision-core.c memcpy(usbvision->scratch + usbvision->scratch_write_ptr, data, len_part); usbvision 204 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_write_ptr = 0; /* just set write_ptr to zero */ usbvision 206 drivers/media/usb/usbvision/usbvision-core.c memcpy(usbvision->scratch, data + len_part, len - len_part); usbvision 207 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_write_ptr = len - len_part; usbvision 211 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_SCRATCH, "len=%d, new write_ptr=%d\n", len, usbvision->scratch_write_ptr); usbvision 217 drivers/media/usb/usbvision/usbvision-core.c static void scratch_mark_header(struct usb_usbvision *usbvision) usbvision 219 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_SCRATCH, "header at write_ptr=%d\n", usbvision->scratch_headermarker_write_ptr); usbvision 221 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker[usbvision->scratch_headermarker_write_ptr] = usbvision 222 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_write_ptr; usbvision 223 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_write_ptr += 1; usbvision 224 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_write_ptr %= USBVISION_NUM_HEADERMARKER; usbvision 228 drivers/media/usb/usbvision/usbvision-core.c static int scratch_get_extra(struct usb_usbvision *usbvision, usbvision 234 drivers/media/usb/usbvision/usbvision-core.c memcpy(data, usbvision->scratch + *ptr, len); usbvision 238 drivers/media/usb/usbvision/usbvision-core.c memcpy(data, usbvision->scratch + *ptr, len_part); usbvision 242 drivers/media/usb/usbvision/usbvision-core.c memcpy(data + len_part, usbvision->scratch, len - len_part); usbvision 254 drivers/media/usb/usbvision/usbvision-core.c static void scratch_set_extra_ptr(struct usb_usbvision *usbvision, int *ptr, usbvision 257 drivers/media/usb/usbvision/usbvision-core.c *ptr = (usbvision->scratch_read_ptr + len) % scratch_buf_size; usbvision 273 drivers/media/usb/usbvision/usbvision-core.c static int scratch_get(struct usb_usbvision *usbvision, unsigned char *data, usbvision 278 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->scratch_read_ptr + len < scratch_buf_size) { usbvision 279 drivers/media/usb/usbvision/usbvision-core.c memcpy(data, usbvision->scratch + usbvision->scratch_read_ptr, len); usbvision 280 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr += len; usbvision 282 drivers/media/usb/usbvision/usbvision-core.c len_part = scratch_buf_size - usbvision->scratch_read_ptr; usbvision 283 drivers/media/usb/usbvision/usbvision-core.c memcpy(data, usbvision->scratch + usbvision->scratch_read_ptr, len_part); usbvision 285 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr = 0; /* just set the read_ptr to zero */ usbvision 287 drivers/media/usb/usbvision/usbvision-core.c memcpy(data + len_part, usbvision->scratch, len - len_part); usbvision 288 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr = len - len_part; usbvision 292 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_SCRATCH, "len=%d, new read_ptr=%d\n", len, usbvision->scratch_read_ptr); usbvision 299 drivers/media/usb/usbvision/usbvision-core.c static int scratch_get_header(struct usb_usbvision *usbvision, usbvision 304 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_SCRATCH, "from read_ptr=%d", usbvision->scratch_headermarker_read_ptr); usbvision 306 drivers/media/usb/usbvision/usbvision-core.c while (usbvision->scratch_headermarker_write_ptr - usbvision 307 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_read_ptr != 0) { usbvision 308 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr = usbvision 309 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker[usbvision->scratch_headermarker_read_ptr]; usbvision 310 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_read_ptr += 1; usbvision 311 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_read_ptr %= USBVISION_NUM_HEADERMARKER; usbvision 312 drivers/media/usb/usbvision/usbvision-core.c scratch_get(usbvision, (unsigned char *)header, USBVISION_HEADER_LENGTH); usbvision 328 drivers/media/usb/usbvision/usbvision-core.c static void scratch_rm_old(struct usb_usbvision *usbvision, int len) usbvision 330 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr += len; usbvision 331 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr %= scratch_buf_size; usbvision 332 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_SCRATCH, "read_ptr is now %d\n", usbvision->scratch_read_ptr); usbvision 337 drivers/media/usb/usbvision/usbvision-core.c static void scratch_reset(struct usb_usbvision *usbvision) usbvision 341 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_read_ptr = 0; usbvision 342 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_write_ptr = 0; usbvision 343 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_read_ptr = 0; usbvision 344 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_headermarker_write_ptr = 0; usbvision 345 drivers/media/usb/usbvision/usbvision-core.c usbvision->isocstate = isoc_state_no_frame; usbvision 348 drivers/media/usb/usbvision/usbvision-core.c int usbvision_scratch_alloc(struct usb_usbvision *usbvision) usbvision 350 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch = vmalloc_32(scratch_buf_size); usbvision 351 drivers/media/usb/usbvision/usbvision-core.c scratch_reset(usbvision); usbvision 352 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->scratch == NULL) { usbvision 353 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 361 drivers/media/usb/usbvision/usbvision-core.c void usbvision_scratch_free(struct usb_usbvision *usbvision) usbvision 363 drivers/media/usb/usbvision/usbvision-core.c vfree(usbvision->scratch); usbvision 364 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch = NULL; usbvision 372 drivers/media/usb/usbvision/usbvision-core.c int usbvision_decompress_alloc(struct usb_usbvision *usbvision) usbvision 376 drivers/media/usb/usbvision/usbvision-core.c usbvision->intra_frame_buffer = vmalloc_32(IFB_size); usbvision 377 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->intra_frame_buffer == NULL) { usbvision 378 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 391 drivers/media/usb/usbvision/usbvision-core.c void usbvision_decompress_free(struct usb_usbvision *usbvision) usbvision 393 drivers/media/usb/usbvision/usbvision-core.c vfree(usbvision->intra_frame_buffer); usbvision 394 drivers/media/usb/usbvision/usbvision-core.c usbvision->intra_frame_buffer = NULL; usbvision 406 drivers/media/usb/usbvision/usbvision-core.c static enum parse_state usbvision_find_header(struct usb_usbvision *usbvision) usbvision 411 drivers/media/usb/usbvision/usbvision-core.c frame = usbvision->cur_frame; usbvision 413 drivers/media/usb/usbvision/usbvision-core.c while (scratch_get_header(usbvision, &frame->isoc_header) == USBVISION_HEADER_LENGTH) { usbvision 427 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->request_intra) { usbvision 430 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_isoc_frame_num = -1; /* do not check for lost frames this time */ usbvision 431 drivers/media/usb/usbvision/usbvision-core.c usbvision_unrequest_intra(usbvision); usbvision 441 drivers/media/usb/usbvision/usbvision-core.c frame->frmwidth = frame->isoc_header.frame_width * usbvision->stretch_width; usbvision 442 drivers/media/usb/usbvision/usbvision-core.c frame->frmheight = frame->isoc_header.frame_height * usbvision->stretch_height; usbvision 446 drivers/media/usb/usbvision/usbvision-core.c scratch_reset(usbvision); usbvision 453 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->last_isoc_frame_num >= 0) { usbvision 454 drivers/media/usb/usbvision/usbvision-core.c if (((usbvision->last_isoc_frame_num + 1) % 32) != frame->isoc_header.frame_num) { usbvision 457 drivers/media/usb/usbvision/usbvision-core.c usbvision_request_intra(usbvision); usbvision 461 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_isoc_frame_num = frame->isoc_header.frame_num; usbvision 463 drivers/media/usb/usbvision/usbvision-core.c usbvision->header_count++; usbvision 470 drivers/media/usb/usbvision/usbvision-core.c static enum parse_state usbvision_parse_lines_422(struct usb_usbvision *usbvision, usbvision 482 drivers/media/usb/usbvision/usbvision-core.c frame = usbvision->cur_frame; usbvision 487 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision) < len) { usbvision 496 drivers/media/usb/usbvision/usbvision-core.c stretch_bytes = (usbvision->stretch_width - 1) * bytes_per_pixel; usbvision 498 drivers/media/usb/usbvision/usbvision-core.c clipmask_add = usbvision->stretch_width; usbvision 500 drivers/media/usb/usbvision/usbvision-core.c for (i = 0; i < frame->frmwidth; i += (2 * usbvision->stretch_width)) { usbvision 501 drivers/media/usb/usbvision/usbvision-core.c scratch_get(usbvision, &yuyv[0], 4); usbvision 572 drivers/media/usb/usbvision/usbvision-core.c frame->curline += usbvision->stretch_height; usbvision 573 drivers/media/usb/usbvision/usbvision-core.c *pcopylen += frame->v4l2_linesize * usbvision->stretch_height; usbvision 581 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_decompress(struct usb_usbvision *usbvision, unsigned char *compressed, usbvision 610 drivers/media/usb/usbvision/usbvision-core.c usbvision->compr_block_types[block_type]++; usbvision 673 drivers/media/usb/usbvision/usbvision-core.c static enum parse_state usbvision_parse_compress(struct usb_usbvision *usbvision, usbvision 690 drivers/media/usb/usbvision/usbvision-core.c frame = usbvision->cur_frame; usbvision 711 drivers/media/usb/usbvision/usbvision-core.c usbvision_adjust_compression(usbvision); usbvision 713 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision) < USBVISION_STRIP_HEADER_LEN) usbvision 717 drivers/media/usb/usbvision/usbvision-core.c scratch_set_extra_ptr(usbvision, &strip_ptr, 0); usbvision 718 drivers/media/usb/usbvision/usbvision-core.c scratch_get_extra(usbvision, &strip_header[0], &strip_ptr, usbvision 723 drivers/media/usb/usbvision/usbvision-core.c usbvision->strip_magic_errors++; usbvision 729 drivers/media/usb/usbvision/usbvision-core.c usbvision->strip_line_number_errors++; usbvision 736 drivers/media/usb/usbvision/usbvision-core.c usbvision_request_intra(usbvision); usbvision 739 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision) < strip_len) { usbvision 744 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->intra_frame_buffer) { usbvision 745 drivers/media/usb/usbvision/usbvision-core.c Y = usbvision->intra_frame_buffer + frame->frmwidth * frame->curline; usbvision 746 drivers/media/usb/usbvision/usbvision-core.c U = usbvision->intra_frame_buffer + image_size + (frame->frmwidth / 2) * (frame->curline / 2); usbvision 747 drivers/media/usb/usbvision/usbvision-core.c V = usbvision->intra_frame_buffer + image_size / 4 * 5 + (frame->frmwidth / 2) * (frame->curline / 2); usbvision 754 drivers/media/usb/usbvision/usbvision-core.c scratch_get(usbvision, strip_data, strip_len); usbvision 761 drivers/media/usb/usbvision/usbvision-core.c usbvision->block_pos = block_pos; usbvision 763 drivers/media/usb/usbvision/usbvision-core.c usbvision_decompress(usbvision, strip_data, Y, &block_pos, &block_type_pos, idx_end); usbvision 764 drivers/media/usb/usbvision/usbvision-core.c if (strip_len > usbvision->max_strip_len) usbvision 765 drivers/media/usb/usbvision/usbvision-core.c usbvision->max_strip_len = strip_len; usbvision 768 drivers/media/usb/usbvision/usbvision-core.c usbvision_decompress(usbvision, strip_data, V, &block_pos, &block_type_pos, idx_end / 2); usbvision 770 drivers/media/usb/usbvision/usbvision-core.c usbvision_decompress(usbvision, strip_data, U, &block_pos, &block_type_pos, idx_end / 2); usbvision 772 drivers/media/usb/usbvision/usbvision-core.c if (block_pos > usbvision->comprblock_pos) usbvision 773 drivers/media/usb/usbvision/usbvision-core.c usbvision->comprblock_pos = block_pos; usbvision 775 drivers/media/usb/usbvision/usbvision-core.c usbvision->strip_len_errors++; usbvision 851 drivers/media/usb/usbvision/usbvision-core.c static enum parse_state usbvision_parse_lines_420(struct usb_usbvision *usbvision, usbvision 871 drivers/media/usb/usbvision/usbvision-core.c frame = usbvision->cur_frame; usbvision 873 drivers/media/usb/usbvision/usbvision-core.c f_odd = f_even + frame->v4l2_linesize * usbvision->stretch_height; usbvision 879 drivers/media/usb/usbvision/usbvision-core.c stretch_bytes = (usbvision->stretch_width - 1) * bytes_per_pixel; usbvision 882 drivers/media/usb/usbvision/usbvision-core.c clipmask_add = usbvision->stretch_width; usbvision 885 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision) < (int)pixel_per_line * 3) { usbvision 898 drivers/media/usb/usbvision/usbvision-core.c scratch_set_extra_ptr(usbvision, &y_ptr, y_odd_offset); usbvision 899 drivers/media/usb/usbvision/usbvision-core.c scratch_set_extra_ptr(usbvision, &u_ptr, y_block_size); usbvision 900 drivers/media/usb/usbvision/usbvision-core.c scratch_set_extra_ptr(usbvision, &v_ptr, y_odd_offset usbvision 905 drivers/media/usb/usbvision/usbvision-core.c scratch_get(usbvision, &y[0], 2); usbvision 906 drivers/media/usb/usbvision/usbvision-core.c scratch_get_extra(usbvision, &u, &u_ptr, 1); usbvision 907 drivers/media/usb/usbvision/usbvision-core.c scratch_get_extra(usbvision, &v, &v_ptr, 1); usbvision 1002 drivers/media/usb/usbvision/usbvision-core.c scratch_get_extra(usbvision, &y[0], &y_ptr, 2); usbvision 1091 drivers/media/usb/usbvision/usbvision-core.c scratch_rm_old(usbvision, y_step[block % y_step_size] * sub_block_size); usbvision 1100 drivers/media/usb/usbvision/usbvision-core.c scratch_rm_old(usbvision, pixel_per_line * 3 / 2 usbvision 1103 drivers/media/usb/usbvision/usbvision-core.c frame->curline += 2 * usbvision->stretch_height; usbvision 1104 drivers/media/usb/usbvision/usbvision-core.c *pcopylen += frame->v4l2_linesize * 2 * usbvision->stretch_height; usbvision 1119 drivers/media/usb/usbvision/usbvision-core.c static void usbvision_parse_data(struct usb_usbvision *usbvision) usbvision 1126 drivers/media/usb/usbvision/usbvision-core.c frame = usbvision->cur_frame; usbvision 1128 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_PARSE, "parsing len=%d\n", scratch_len(usbvision)); usbvision 1132 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision)) { usbvision 1134 drivers/media/usb/usbvision/usbvision-core.c newstate = usbvision_find_header(usbvision); usbvision 1136 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isoc_mode == ISOC_MODE_YUV420) usbvision 1137 drivers/media/usb/usbvision/usbvision-core.c newstate = usbvision_parse_lines_420(usbvision, ©len); usbvision 1138 drivers/media/usb/usbvision/usbvision-core.c else if (usbvision->isoc_mode == ISOC_MODE_YUV422) usbvision 1139 drivers/media/usb/usbvision/usbvision-core.c newstate = usbvision_parse_lines_422(usbvision, ©len); usbvision 1140 drivers/media/usb/usbvision/usbvision-core.c else if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) usbvision 1141 drivers/media/usb/usbvision/usbvision-core.c newstate = usbvision_parse_compress(usbvision, ©len); usbvision 1154 drivers/media/usb/usbvision/usbvision-core.c frame->sequence = usbvision->frame_num; usbvision 1156 drivers/media/usb/usbvision/usbvision-core.c spin_lock_irqsave(&usbvision->queue_lock, lock_flags); usbvision 1157 drivers/media/usb/usbvision/usbvision-core.c list_move_tail(&(frame->frame), &usbvision->outqueue); usbvision 1158 drivers/media/usb/usbvision/usbvision-core.c usbvision->cur_frame = NULL; usbvision 1159 drivers/media/usb/usbvision/usbvision-core.c spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags); usbvision 1161 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame_num++; usbvision 1164 drivers/media/usb/usbvision/usbvision-core.c if (waitqueue_active(&usbvision->wait_frame)) { usbvision 1166 drivers/media/usb/usbvision/usbvision-core.c wake_up_interruptible(&usbvision->wait_frame); usbvision 1180 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_compress_isochronous(struct usb_usbvision *usbvision, usbvision 1195 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_err_count++; usbvision 1202 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_skip_count++; usbvision 1206 drivers/media/usb/usbvision/usbvision-core.c usbvision->isocstate = isoc_state_no_frame; usbvision 1207 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_skip_count++; usbvision 1209 drivers/media/usb/usbvision/usbvision-core.c } else if (packet_len > usbvision->isoc_packet_size) { usbvision 1211 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_skip_count++; usbvision 1217 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isocstate == isoc_state_no_frame) { /* new frame begins */ usbvision 1218 drivers/media/usb/usbvision/usbvision-core.c usbvision->isocstate = isoc_state_in_frame; usbvision 1219 drivers/media/usb/usbvision/usbvision-core.c scratch_mark_header(usbvision); usbvision 1220 drivers/media/usb/usbvision/usbvision-core.c usbvision_measure_bandwidth(usbvision); usbvision 1232 drivers/media/usb/usbvision/usbvision-core.c if (scratch_free(usbvision) < packet_len) { usbvision 1233 drivers/media/usb/usbvision/usbvision-core.c usbvision->scratch_ovf_count++; usbvision 1235 drivers/media/usb/usbvision/usbvision-core.c scratch_len(usbvision), packet_len); usbvision 1236 drivers/media/usb/usbvision/usbvision-core.c scratch_rm_old(usbvision, packet_len - scratch_free(usbvision)); usbvision 1240 drivers/media/usb/usbvision/usbvision-core.c scratch_put(usbvision, packet_data, packet_len); usbvision 1242 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_data_count += packet_len; usbvision 1243 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_count++; usbvision 1250 drivers/media/usb/usbvision/usbvision-core.c printk(KERN_DEBUG "+%d.\n", usbvision->scratchlen); usbvision 1263 drivers/media/usb/usbvision/usbvision-core.c struct usb_usbvision *usbvision = urb->context; usbvision 1268 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1275 drivers/media/usb/usbvision/usbvision-core.c f = &usbvision->cur_frame; usbvision 1278 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->streaming == stream_interrupt) { usbvision 1279 drivers/media/usb/usbvision/usbvision-core.c usbvision->streaming = stream_idle; usbvision 1285 drivers/media/usb/usbvision/usbvision-core.c wake_up_interruptible(&usbvision->wait_stream); usbvision 1289 drivers/media/usb/usbvision/usbvision-core.c len = usbvision_compress_isochronous(usbvision, urb); usbvision 1291 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_urb_count++; usbvision 1292 drivers/media/usb/usbvision/usbvision-core.c usbvision->urb_length = len; usbvision 1294 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->streaming == stream_on) { usbvision 1296 drivers/media/usb/usbvision/usbvision-core.c if (scratch_len(usbvision) > USBVISION_HEADER_LENGTH && usbvision 1297 drivers/media/usb/usbvision/usbvision-core.c !list_empty(&(usbvision->inqueue))) { usbvision 1299 drivers/media/usb/usbvision/usbvision-core.c (*f) = list_entry(usbvision->inqueue.next, usbvision 1303 drivers/media/usb/usbvision/usbvision-core.c usbvision_parse_data(usbvision); usbvision 1309 drivers/media/usb/usbvision/usbvision-core.c scratch_reset(usbvision); usbvision 1313 drivers/media/usb/usbvision/usbvision-core.c scratch_reset(usbvision); usbvision 1322 drivers/media/usb/usbvision/usbvision-core.c urb->dev = usbvision->dev; usbvision 1326 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 1345 drivers/media/usb/usbvision/usbvision-core.c int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg) usbvision 1348 drivers/media/usb/usbvision/usbvision-core.c unsigned char *buffer = usbvision->ctrl_urb_buffer; usbvision 1350 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1353 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_control_msg(usbvision->dev, usb_rcvctrlpipe(usbvision->dev, 1), usbvision 1359 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 1374 drivers/media/usb/usbvision/usbvision-core.c int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, usbvision 1379 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1382 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_buffer[0] = value; usbvision 1383 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 1387 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_buffer, 1, HZ); usbvision 1390 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 1399 drivers/media/usb/usbvision/usbvision-core.c struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context; usbvision 1402 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_busy = 0; usbvision 1406 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_write_reg_irq(struct usb_usbvision *usbvision, int address, usbvision 1414 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->ctrl_urb_busy) usbvision 1416 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_busy = 1; usbvision 1418 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_setup.bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT; usbvision 1419 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_setup.bRequest = USBVISION_OP_CODE; usbvision 1420 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_setup.wValue = 0; usbvision 1421 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_setup.wIndex = cpu_to_le16(address); usbvision 1422 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_setup.wLength = cpu_to_le16(len); usbvision 1423 drivers/media/usb/usbvision/usbvision-core.c usb_fill_control_urb(usbvision->ctrl_urb, usbvision->dev, usbvision 1424 drivers/media/usb/usbvision/usbvision-core.c usb_sndctrlpipe(usbvision->dev, 1), usbvision 1425 drivers/media/usb/usbvision/usbvision-core.c (unsigned char *)&usbvision->ctrl_urb_setup, usbvision 1426 drivers/media/usb/usbvision/usbvision-core.c (void *)usbvision->ctrl_urb_buffer, len, usbvision 1428 drivers/media/usb/usbvision/usbvision-core.c (void *)usbvision); usbvision 1430 drivers/media/usb/usbvision/usbvision-core.c memcpy(usbvision->ctrl_urb_buffer, data, len); usbvision 1432 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_submit_urb(usbvision->ctrl_urb, GFP_ATOMIC); usbvision 1435 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctrl_urb_busy = 0; usbvision 1442 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_init_compression(struct usb_usbvision *usbvision) usbvision 1444 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_isoc_frame_num = -1; usbvision 1445 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_data_count = 0; usbvision 1446 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_count = 0; usbvision 1447 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_skip_count = 0; usbvision 1448 drivers/media/usb/usbvision/usbvision-core.c usbvision->compr_level = 50; usbvision 1449 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_compr_level = -1; usbvision 1450 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_urb_count = 0; usbvision 1451 drivers/media/usb/usbvision/usbvision-core.c usbvision->request_intra = 1; usbvision 1452 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_measure_bandwidth_count = 0; usbvision 1461 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_measure_bandwidth(struct usb_usbvision *usbvision) usbvision 1463 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isoc_measure_bandwidth_count < 2) { /* this gives an average bandwidth of 3 frames */ usbvision 1464 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_measure_bandwidth_count++; usbvision 1467 drivers/media/usb/usbvision/usbvision-core.c if ((usbvision->isoc_packet_size > 0) && (usbvision->isoc_packet_count > 0)) { usbvision 1468 drivers/media/usb/usbvision/usbvision-core.c usbvision->used_bandwidth = usbvision->isoc_data_count / usbvision 1469 drivers/media/usb/usbvision/usbvision-core.c (usbvision->isoc_packet_count + usbvision->isoc_skip_count) * usbvision 1470 drivers/media/usb/usbvision/usbvision-core.c 100 / usbvision->isoc_packet_size; usbvision 1472 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_measure_bandwidth_count = 0; usbvision 1473 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_data_count = 0; usbvision 1474 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_count = 0; usbvision 1475 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_skip_count = 0; usbvision 1479 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_adjust_compression(struct usb_usbvision *usbvision) usbvision 1485 drivers/media/usb/usbvision/usbvision-core.c if ((adjust_compression) && (usbvision->used_bandwidth > 0)) { usbvision 1486 drivers/media/usb/usbvision/usbvision-core.c usbvision->compr_level += (usbvision->used_bandwidth - 90) / 2; usbvision 1487 drivers/media/usb/usbvision/usbvision-core.c RESTRICT_TO_RANGE(usbvision->compr_level, 0, 100); usbvision 1488 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->compr_level != usbvision->last_compr_level) { usbvision 1491 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->bridge_type == BRIDGE_NT1004 || usbvision->bridge_type == BRIDGE_NT1005) { usbvision 1492 drivers/media/usb/usbvision/usbvision-core.c buffer[0] = (unsigned char)(4 + 16 * usbvision->compr_level / 100); /* PCM Threshold 1 */ usbvision 1493 drivers/media/usb/usbvision/usbvision-core.c buffer[1] = (unsigned char)(4 + 8 * usbvision->compr_level / 100); /* PCM Threshold 2 */ usbvision 1494 drivers/media/usb/usbvision/usbvision-core.c distortion = 7 + 248 * usbvision->compr_level / 100; usbvision 1497 drivers/media/usb/usbvision/usbvision-core.c distortion = 1 + 42 * usbvision->compr_level / 100; usbvision 1501 drivers/media/usb/usbvision/usbvision-core.c buffer[0] = (unsigned char)(4 + 16 * usbvision->compr_level / 100); /* PCM threshold 1 */ usbvision 1502 drivers/media/usb/usbvision/usbvision-core.c buffer[1] = (unsigned char)(4 + 8 * usbvision->compr_level / 100); /* PCM threshold 2 */ usbvision 1503 drivers/media/usb/usbvision/usbvision-core.c distortion = 2 + 253 * usbvision->compr_level / 100; usbvision 1506 drivers/media/usb/usbvision/usbvision-core.c distortion = 0 + 43 * usbvision->compr_level / 100; usbvision 1510 drivers/media/usb/usbvision/usbvision-core.c err_code = usbvision_write_reg_irq(usbvision, USBVISION_PCM_THR1, buffer, 6); usbvision 1514 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_compr_level = usbvision->compr_level; usbvision 1521 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_request_intra(struct usb_usbvision *usbvision) usbvision 1526 drivers/media/usb/usbvision/usbvision-core.c usbvision->request_intra = 1; usbvision 1528 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1); usbvision 1532 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_unrequest_intra(struct usb_usbvision *usbvision) usbvision 1537 drivers/media/usb/usbvision/usbvision-core.c usbvision->request_intra = 0; usbvision 1539 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg_irq(usbvision, USBVISION_FORCE_INTRA, buffer, 1); usbvision 1547 drivers/media/usb/usbvision/usbvision-core.c int usbvision_power_off(struct usb_usbvision *usbvision) usbvision 1553 drivers/media/usb/usbvision/usbvision-core.c err_code = usbvision_write_reg(usbvision, USBVISION_PWR_REG, USBVISION_SSPND_EN); usbvision 1555 drivers/media/usb/usbvision/usbvision-core.c usbvision->power = 0; usbvision 1561 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_init_webcam(struct usb_usbvision *usbvision) usbvision 1577 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 1580 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].video_norm == V4L2_STD_NTSC) usbvision 1584 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SOFT); usbvision 1586 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usbvision 1587 drivers/media/usb/usbvision/usbvision-core.c usb_sndctrlpipe(usbvision->dev, 1), usbvision 1595 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SIO); usbvision 1597 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_CONT, 3 | 0x10); usbvision 1598 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, 0); usbvision 1599 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SOFT); usbvision 1600 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, USBVISION_IO_2); usbvision 1601 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SOFT | USBVISION_CLK_OUT); usbvision 1602 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SOFT | USBVISION_DAT_IO); usbvision 1603 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_SER_MODE_SOFT | USBVISION_CLK_OUT | USBVISION_DAT_IO); usbvision 1613 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_set_video_format(struct usb_usbvision *usbvision, int format) usbvision 1616 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 1619 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1633 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 1643 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_mode = format; usbvision 1652 drivers/media/usb/usbvision/usbvision-core.c int usbvision_set_output(struct usb_usbvision *usbvision, int width, usbvision 1658 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 1660 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1665 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_width = 2; usbvision 1668 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_width = 1; usbvision 1673 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_height = 2; usbvision 1676 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_height = 1; usbvision 1686 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_width, usbvision->stretch_height); usbvision 1689 drivers/media/usb/usbvision/usbvision-core.c if ((usb_width != usbvision->curwidth) || (usb_height != usbvision->curheight)) { usbvision 1695 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 1701 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 1705 drivers/media/usb/usbvision/usbvision-core.c usbvision->curwidth = usbvision->stretch_width * usb_width; usbvision 1706 drivers/media/usb/usbvision/usbvision-core.c usbvision->curheight = usbvision->stretch_height * usb_height; usbvision 1709 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isoc_mode == ISOC_MODE_YUV422) usbvision 1710 drivers/media/usb/usbvision/usbvision-core.c frame_rate = (usbvision->isoc_packet_size * 1000) / (usb_width * usb_height * 2); usbvision 1711 drivers/media/usb/usbvision/usbvision-core.c else if (usbvision->isoc_mode == ISOC_MODE_YUV420) usbvision 1712 drivers/media/usb/usbvision/usbvision-core.c frame_rate = (usbvision->isoc_packet_size * 1000) / ((usb_width * usb_height * 12) / 8); usbvision 1716 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->tvnorm_id & V4L2_STD_625_50) usbvision 1718 drivers/media/usb/usbvision/usbvision-core.c else if (usbvision->tvnorm_id & V4L2_STD_525_60) usbvision 1727 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].codec == CODEC_WEBCAM) { usbvision 1728 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].video_norm == V4L2_STD_PAL) usbvision 1742 drivers/media/usb/usbvision/usbvision-core.c err_code = usbvision_write_reg(usbvision, USBVISION_FRM_RATE, frame_drop); usbvision 1751 drivers/media/usb/usbvision/usbvision-core.c int usbvision_frames_alloc(struct usb_usbvision *usbvision, int number_of_frames) usbvision 1756 drivers/media/usb/usbvision/usbvision-core.c usbvision->max_frame_size = PAGE_ALIGN(usbvision->curwidth * usbvision 1757 drivers/media/usb/usbvision/usbvision-core.c usbvision->curheight * usbvision 1758 drivers/media/usb/usbvision/usbvision-core.c usbvision->palette.bytes_per_pixel); usbvision 1761 drivers/media/usb/usbvision/usbvision-core.c usbvision->num_frames = number_of_frames; usbvision 1762 drivers/media/usb/usbvision/usbvision-core.c while (usbvision->num_frames > 0) { usbvision 1763 drivers/media/usb/usbvision/usbvision-core.c usbvision->fbuf_size = usbvision->num_frames * usbvision->max_frame_size; usbvision 1764 drivers/media/usb/usbvision/usbvision-core.c usbvision->fbuf = usbvision_rvmalloc(usbvision->fbuf_size); usbvision 1765 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->fbuf) usbvision 1767 drivers/media/usb/usbvision/usbvision-core.c usbvision->num_frames--; usbvision 1771 drivers/media/usb/usbvision/usbvision-core.c for (i = 0; i < usbvision->num_frames; i++) { usbvision 1772 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].index = i; usbvision 1773 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].grabstate = frame_state_unused; usbvision 1774 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].data = usbvision->fbuf + usbvision 1775 drivers/media/usb/usbvision/usbvision-core.c i * usbvision->max_frame_size; usbvision 1779 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_width = 1; usbvision 1780 drivers/media/usb/usbvision/usbvision-core.c usbvision->stretch_height = 1; usbvision 1781 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].width = usbvision->curwidth; usbvision 1782 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].height = usbvision->curheight; usbvision 1783 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].bytes_read = 0; usbvision 1786 drivers/media/usb/usbvision/usbvision-core.c usbvision->num_frames, usbvision->max_frame_size); usbvision 1787 drivers/media/usb/usbvision/usbvision-core.c return usbvision->num_frames; usbvision 1794 drivers/media/usb/usbvision/usbvision-core.c void usbvision_frames_free(struct usb_usbvision *usbvision) usbvision 1797 drivers/media/usb/usbvision/usbvision-core.c PDEBUG(DBG_FUNC, "free %d frames", usbvision->num_frames); usbvision 1799 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->fbuf != NULL) { usbvision 1800 drivers/media/usb/usbvision/usbvision-core.c usbvision_rvfree(usbvision->fbuf, usbvision->fbuf_size); usbvision 1801 drivers/media/usb/usbvision/usbvision-core.c usbvision->fbuf = NULL; usbvision 1803 drivers/media/usb/usbvision/usbvision-core.c usbvision->num_frames = 0; usbvision 1810 drivers/media/usb/usbvision/usbvision-core.c void usbvision_empty_framequeues(struct usb_usbvision *usbvision) usbvision 1814 drivers/media/usb/usbvision/usbvision-core.c INIT_LIST_HEAD(&(usbvision->inqueue)); usbvision 1815 drivers/media/usb/usbvision/usbvision-core.c INIT_LIST_HEAD(&(usbvision->outqueue)); usbvision 1818 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].grabstate = frame_state_unused; usbvision 1819 drivers/media/usb/usbvision/usbvision-core.c usbvision->frame[i].bytes_read = 0; usbvision 1827 drivers/media/usb/usbvision/usbvision-core.c int usbvision_stream_interrupt(struct usb_usbvision *usbvision) usbvision 1833 drivers/media/usb/usbvision/usbvision-core.c usbvision->streaming = stream_interrupt; usbvision 1834 drivers/media/usb/usbvision/usbvision-core.c ret = wait_event_timeout(usbvision->wait_stream, usbvision 1835 drivers/media/usb/usbvision/usbvision-core.c (usbvision->streaming == stream_idle), usbvision 1845 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_set_compress_params(struct usb_usbvision *usbvision) usbvision 1849 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 1864 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1867 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 1879 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->bridge_type == BRIDGE_NT1004) { usbvision 1895 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1898 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 1919 drivers/media/usb/usbvision/usbvision-core.c int usbvision_set_input(struct usb_usbvision *usbvision) usbvision 1923 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 1926 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1930 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].vin_reg1_override) { usbvision 1931 drivers/media/usb/usbvision/usbvision-core.c value[0] = usbvision_device_data[usbvision->dev_model].vin_reg1; usbvision 1932 drivers/media/usb/usbvision/usbvision-core.c } else if (usbvision_device_data[usbvision->dev_model].codec == CODEC_SAA7113) { usbvision 1942 drivers/media/usb/usbvision/usbvision-core.c rc = usbvision_write_reg(usbvision, USBVISION_VIN_REG1, value[0]); usbvision 1950 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->tvnorm_id & V4L2_STD_PAL) { usbvision 1959 drivers/media/usb/usbvision/usbvision-core.c } else if (usbvision->tvnorm_id & V4L2_STD_SECAM) { usbvision 1980 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].codec == CODEC_WEBCAM) { usbvision 1985 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].x_offset >= 0) { usbvision 1986 drivers/media/usb/usbvision/usbvision-core.c value[4] = usbvision_device_data[usbvision->dev_model].x_offset & 0xff; usbvision 1987 drivers/media/usb/usbvision/usbvision-core.c value[5] = (usbvision_device_data[usbvision->dev_model].x_offset & 0x0300) >> 8; usbvision 1995 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].y_offset >= 0) { usbvision 1996 drivers/media/usb/usbvision/usbvision-core.c value[6] = usbvision_device_data[usbvision->dev_model].y_offset & 0xff; usbvision 1997 drivers/media/usb/usbvision/usbvision-core.c value[7] = (usbvision_device_data[usbvision->dev_model].y_offset & 0x0300) >> 8; usbvision 2005 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 2018 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].dvi_yuv_override) { usbvision 2019 drivers/media/usb/usbvision/usbvision-core.c dvi_yuv_value = usbvision_device_data[usbvision->dev_model].dvi_yuv; usbvision 2020 drivers/media/usb/usbvision/usbvision-core.c } else if (usbvision_device_data[usbvision->dev_model].codec == CODEC_SAA7113) { usbvision 2025 drivers/media/usb/usbvision/usbvision-core.c return usbvision_write_reg(usbvision, USBVISION_DVI_YUV, dvi_yuv_value); usbvision 2037 drivers/media/usb/usbvision/usbvision-core.c static int usbvision_set_dram_settings(struct usb_usbvision *usbvision) usbvision 2039 drivers/media/usb/usbvision/usbvision-core.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 2042 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) { usbvision 2077 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 2080 drivers/media/usb/usbvision/usbvision-core.c rc = usb_control_msg(usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), usbvision 2087 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, "%s: ERROR=%d\n", __func__, rc); usbvision 2092 drivers/media/usb/usbvision/usbvision-core.c rc = usbvision_write_reg(usbvision, USBVISION_DRM_CONT, USBVISION_RES_UR | usbvision 2096 drivers/media/usb/usbvision/usbvision-core.c rc = usbvision_write_reg(usbvision, USBVISION_DRM_CONT, 0x00); usbvision 2109 drivers/media/usb/usbvision/usbvision-core.c int usbvision_power_on(struct usb_usbvision *usbvision) usbvision 2115 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_PWR_REG, USBVISION_SSPND_EN); usbvision 2116 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_PWR_REG, usbvision 2119 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].codec == CODEC_WEBCAM) { usbvision 2120 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_VIN_REG1, usbvision 2122 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_VIN_REG2, usbvision 2125 drivers/media/usb/usbvision/usbvision-core.c usbvision_write_reg(usbvision, USBVISION_PWR_REG, usbvision 2128 drivers/media/usb/usbvision/usbvision-core.c err_code = usbvision_write_reg(usbvision, USBVISION_PWR_REG, usbvision 2131 drivers/media/usb/usbvision/usbvision-core.c usbvision->power = 1; usbvision 2142 drivers/media/usb/usbvision/usbvision-core.c int usbvision_begin_streaming(struct usb_usbvision *usbvision) usbvision 2144 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->isoc_mode == ISOC_MODE_COMPRESS) usbvision 2145 drivers/media/usb/usbvision/usbvision-core.c usbvision_init_compression(usbvision); usbvision 2146 drivers/media/usb/usbvision/usbvision-core.c return usbvision_write_reg(usbvision, USBVISION_VIN_REG2, usbvision 2147 drivers/media/usb/usbvision/usbvision-core.c USBVISION_NOHVALID | usbvision->vin_reg2_preset); usbvision 2155 drivers/media/usb/usbvision/usbvision-core.c int usbvision_restart_isoc(struct usb_usbvision *usbvision) usbvision 2159 drivers/media/usb/usbvision/usbvision-core.c ret = usbvision_write_reg(usbvision, USBVISION_PWR_REG, usbvision 2163 drivers/media/usb/usbvision/usbvision-core.c ret = usbvision_write_reg(usbvision, USBVISION_PWR_REG, usbvision 2168 drivers/media/usb/usbvision/usbvision-core.c ret = usbvision_write_reg(usbvision, USBVISION_VIN_REG2, usbvision 2170 drivers/media/usb/usbvision/usbvision-core.c usbvision->vin_reg2_preset); usbvision 2175 drivers/media/usb/usbvision/usbvision-core.c while ((usbvision_read_reg(usbvision, USBVISION_STATUS_REG) & 0x01) != 1) usbvision 2181 drivers/media/usb/usbvision/usbvision-core.c int usbvision_audio_off(struct usb_usbvision *usbvision) usbvision 2183 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, USBVISION_AUDIO_MUTE) < 0) { usbvision 2187 drivers/media/usb/usbvision/usbvision-core.c usbvision->audio_mute = 0; usbvision 2188 drivers/media/usb/usbvision/usbvision-core.c usbvision->audio_channel = USBVISION_AUDIO_MUTE; usbvision 2192 drivers/media/usb/usbvision/usbvision-core.c int usbvision_set_audio(struct usb_usbvision *usbvision, int audio_channel) usbvision 2194 drivers/media/usb/usbvision/usbvision-core.c if (!usbvision->audio_mute) { usbvision 2195 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_write_reg(usbvision, USBVISION_IOPIN_REG, audio_channel) < 0) { usbvision 2200 drivers/media/usb/usbvision/usbvision-core.c usbvision->audio_channel = audio_channel; usbvision 2204 drivers/media/usb/usbvision/usbvision-core.c int usbvision_setup(struct usb_usbvision *usbvision, int format) usbvision 2206 drivers/media/usb/usbvision/usbvision-core.c if (usbvision_device_data[usbvision->dev_model].codec == CODEC_WEBCAM) usbvision 2207 drivers/media/usb/usbvision/usbvision-core.c usbvision_init_webcam(usbvision); usbvision 2208 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_video_format(usbvision, format); usbvision 2209 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_dram_settings(usbvision); usbvision 2210 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_compress_params(usbvision); usbvision 2211 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_input(usbvision); usbvision 2212 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_output(usbvision, MAX_USB_WIDTH, MAX_USB_HEIGHT); usbvision 2213 drivers/media/usb/usbvision/usbvision-core.c usbvision_restart_isoc(usbvision); usbvision 2216 drivers/media/usb/usbvision/usbvision-core.c return USBVISION_IS_OPERATIONAL(usbvision); usbvision 2251 drivers/media/usb/usbvision/usbvision-core.c int usbvision_init_isoc(struct usb_usbvision *usbvision) usbvision 2253 drivers/media/usb/usbvision/usbvision-core.c struct usb_device *dev = usbvision->dev; usbvision 2257 drivers/media/usb/usbvision/usbvision-core.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 2260 drivers/media/usb/usbvision/usbvision-core.c usbvision->cur_frame = NULL; usbvision 2261 drivers/media/usb/usbvision/usbvision-core.c scratch_reset(usbvision); usbvision 2264 drivers/media/usb/usbvision/usbvision-core.c err_code = usbvision_set_alternate(usbvision); usbvision 2266 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_error = err_code; usbvision 2269 drivers/media/usb/usbvision/usbvision-core.c sb_size = USBVISION_URB_FRAMES * usbvision->isoc_packet_size; usbvision 2271 drivers/media/usb/usbvision/usbvision-core.c reg_value = (16 - usbvision_read_reg(usbvision, usbvision 2274 drivers/media/usb/usbvision/usbvision-core.c usbvision->usb_bandwidth = reg_value >> 1; usbvision 2276 drivers/media/usb/usbvision/usbvision-core.c usbvision->usb_bandwidth); usbvision 2289 drivers/media/usb/usbvision/usbvision-core.c usbvision->sbuf[buf_idx].urb = urb; usbvision 2290 drivers/media/usb/usbvision/usbvision-core.c usbvision->sbuf[buf_idx].data = usbvision 2291 drivers/media/usb/usbvision/usbvision-core.c usb_alloc_coherent(usbvision->dev, usbvision 2295 drivers/media/usb/usbvision/usbvision-core.c if (!usbvision->sbuf[buf_idx].data) usbvision 2299 drivers/media/usb/usbvision/usbvision-core.c urb->context = usbvision; usbvision 2300 drivers/media/usb/usbvision/usbvision-core.c urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); usbvision 2303 drivers/media/usb/usbvision/usbvision-core.c urb->transfer_buffer = usbvision->sbuf[buf_idx].data; usbvision 2307 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_size * USBVISION_URB_FRAMES; usbvision 2309 drivers/media/usb/usbvision/usbvision-core.c k += usbvision->isoc_packet_size) { usbvision 2312 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_size; usbvision 2318 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_submit_urb(usbvision->sbuf[buf_idx].urb, usbvision 2321 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 2327 drivers/media/usb/usbvision/usbvision-core.c usbvision->streaming = stream_idle; usbvision 2330 drivers/media/usb/usbvision/usbvision-core.c usbvision->video_endp); usbvision 2341 drivers/media/usb/usbvision/usbvision-core.c void usbvision_stop_isoc(struct usb_usbvision *usbvision) usbvision 2344 drivers/media/usb/usbvision/usbvision-core.c int sb_size = USBVISION_URB_FRAMES * usbvision->isoc_packet_size; usbvision 2346 drivers/media/usb/usbvision/usbvision-core.c if ((usbvision->streaming == stream_off) || (usbvision->dev == NULL)) usbvision 2351 drivers/media/usb/usbvision/usbvision-core.c usb_kill_urb(usbvision->sbuf[buf_idx].urb); usbvision 2352 drivers/media/usb/usbvision/usbvision-core.c if (usbvision->sbuf[buf_idx].data) { usbvision 2353 drivers/media/usb/usbvision/usbvision-core.c usb_free_coherent(usbvision->dev, usbvision 2355 drivers/media/usb/usbvision/usbvision-core.c usbvision->sbuf[buf_idx].data, usbvision 2356 drivers/media/usb/usbvision/usbvision-core.c usbvision->sbuf[buf_idx].urb->transfer_dma); usbvision 2358 drivers/media/usb/usbvision/usbvision-core.c usb_free_urb(usbvision->sbuf[buf_idx].urb); usbvision 2359 drivers/media/usb/usbvision/usbvision-core.c usbvision->sbuf[buf_idx].urb = NULL; usbvision 2363 drivers/media/usb/usbvision/usbvision-core.c usbvision->streaming = stream_off; usbvision 2365 drivers/media/usb/usbvision/usbvision-core.c if (!usbvision->remove_pending) { usbvision 2367 drivers/media/usb/usbvision/usbvision-core.c usbvision->iface_alt = 0; usbvision 2368 drivers/media/usb/usbvision/usbvision-core.c err_code = usb_set_interface(usbvision->dev, usbvision->iface, usbvision 2369 drivers/media/usb/usbvision/usbvision-core.c usbvision->iface_alt); usbvision 2371 drivers/media/usb/usbvision/usbvision-core.c dev_err(&usbvision->dev->dev, usbvision 2374 drivers/media/usb/usbvision/usbvision-core.c usbvision->last_error = err_code; usbvision 2376 drivers/media/usb/usbvision/usbvision-core.c reg_value = (16-usbvision_read_reg(usbvision, USBVISION_ALTER_REG)) & 0x0F; usbvision 2377 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_size = usbvision 2380 drivers/media/usb/usbvision/usbvision-core.c usbvision->isoc_packet_size); usbvision 2382 drivers/media/usb/usbvision/usbvision-core.c usbvision->usb_bandwidth = reg_value >> 1; usbvision 2384 drivers/media/usb/usbvision/usbvision-core.c usbvision->usb_bandwidth); usbvision 2388 drivers/media/usb/usbvision/usbvision-core.c int usbvision_muxsel(struct usb_usbvision *usbvision, int channel) usbvision 2399 drivers/media/usb/usbvision/usbvision-core.c RESTRICT_TO_RANGE(channel, 0, usbvision->video_inputs); usbvision 2400 drivers/media/usb/usbvision/usbvision-core.c usbvision->ctl_input = channel; usbvision 2406 drivers/media/usb/usbvision/usbvision-core.c switch (usbvision_device_data[usbvision->dev_model].codec) { usbvision 2425 drivers/media/usb/usbvision/usbvision-core.c call_all(usbvision, video, s_routing, mode[channel], 0, 0); usbvision 2426 drivers/media/usb/usbvision/usbvision-core.c usbvision_set_audio(usbvision, audio[channel]); usbvision 38 drivers/media/usb/usbvision/usbvision-i2c.c static int usbvision_i2c_write(struct usb_usbvision *usbvision, unsigned char addr, char *buf, usbvision 40 drivers/media/usb/usbvision/usbvision-i2c.c static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char addr, char *buf, usbvision 46 drivers/media/usb/usbvision/usbvision-i2c.c struct usb_usbvision *usbvision; usbvision 50 drivers/media/usb/usbvision/usbvision-i2c.c usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); usbvision 53 drivers/media/usb/usbvision/usbvision-i2c.c ret = (usbvision_i2c_write(usbvision, addr, buf, 1)); usbvision 71 drivers/media/usb/usbvision/usbvision-i2c.c struct usb_usbvision *usbvision; usbvision 75 drivers/media/usb/usbvision/usbvision-i2c.c usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); usbvision 77 drivers/media/usb/usbvision/usbvision-i2c.c ret = (usbvision_i2c_read(usbvision, addr, buf, 1)); usbvision 121 drivers/media/usb/usbvision/usbvision-i2c.c struct usb_usbvision *usbvision; usbvision 125 drivers/media/usb/usbvision/usbvision-i2c.c usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); usbvision 137 drivers/media/usb/usbvision/usbvision-i2c.c ret = (usbvision_i2c_read(usbvision, addr, pmsg->buf, pmsg->len)); usbvision 142 drivers/media/usb/usbvision/usbvision-i2c.c ret = (usbvision_i2c_write(usbvision, addr, pmsg->buf, pmsg->len)); usbvision 169 drivers/media/usb/usbvision/usbvision-i2c.c int usbvision_i2c_register(struct usb_usbvision *usbvision) usbvision 176 drivers/media/usb/usbvision/usbvision-i2c.c if (usbvision->registered_i2c) usbvision 179 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->i2c_adap = i2c_adap_template; usbvision 181 drivers/media/usb/usbvision/usbvision-i2c.c snprintf(usbvision->i2c_adap.name, sizeof(usbvision->i2c_adap.name), usbvision 183 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->dev->bus->busnum, usbvision->dev->devpath); usbvision 184 drivers/media/usb/usbvision/usbvision-i2c.c PDEBUG(DBG_I2C, "Adaptername: %s", usbvision->i2c_adap.name); usbvision 185 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->i2c_adap.dev.parent = &usbvision->dev->dev; usbvision 187 drivers/media/usb/usbvision/usbvision-i2c.c i2c_set_adapdata(&usbvision->i2c_adap, &usbvision->v4l2_dev); usbvision 189 drivers/media/usb/usbvision/usbvision-i2c.c if (usbvision_write_reg(usbvision, USBVISION_SER_MODE, USBVISION_IIC_LRNACK) < 0) { usbvision 199 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->i2c_adap.algo = &usbvision_algo; usbvision 201 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->i2c_adap.timeout = 100; /* default values, should */ usbvision 202 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->i2c_adap.retries = 3; /* be replaced by defines */ usbvision 204 drivers/media/usb/usbvision/usbvision-i2c.c i2c_add_adapter(&usbvision->i2c_adap); usbvision 206 drivers/media/usb/usbvision/usbvision-i2c.c PDEBUG(DBG_I2C, "i2c bus for %s registered", usbvision->i2c_adap.name); usbvision 209 drivers/media/usb/usbvision/usbvision-i2c.c switch (usbvision_device_data[usbvision->dev_model].codec) { usbvision 215 drivers/media/usb/usbvision/usbvision-i2c.c v4l2_i2c_new_subdev(&usbvision->v4l2_dev, usbvision 216 drivers/media/usb/usbvision/usbvision-i2c.c &usbvision->i2c_adap, usbvision 220 drivers/media/usb/usbvision/usbvision-i2c.c if (usbvision_device_data[usbvision->dev_model].tuner == 1) { usbvision 225 drivers/media/usb/usbvision/usbvision-i2c.c sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, usbvision 226 drivers/media/usb/usbvision/usbvision-i2c.c &usbvision->i2c_adap, usbvision 232 drivers/media/usb/usbvision/usbvision-i2c.c sd = v4l2_i2c_new_subdev(&usbvision->v4l2_dev, usbvision 233 drivers/media/usb/usbvision/usbvision-i2c.c &usbvision->i2c_adap, usbvision 238 drivers/media/usb/usbvision/usbvision-i2c.c if (usbvision->tuner_type != -1) { usbvision 240 drivers/media/usb/usbvision/usbvision-i2c.c tun_setup.type = usbvision->tuner_type; usbvision 242 drivers/media/usb/usbvision/usbvision-i2c.c call_all(usbvision, tuner, s_type_addr, &tun_setup); usbvision 245 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->registered_i2c = 1; usbvision 250 drivers/media/usb/usbvision/usbvision-i2c.c int usbvision_i2c_unregister(struct usb_usbvision *usbvision) usbvision 252 drivers/media/usb/usbvision/usbvision-i2c.c if (!usbvision->registered_i2c) usbvision 255 drivers/media/usb/usbvision/usbvision-i2c.c i2c_del_adapter(&(usbvision->i2c_adap)); usbvision 256 drivers/media/usb/usbvision/usbvision-i2c.c usbvision->registered_i2c = 0; usbvision 258 drivers/media/usb/usbvision/usbvision-i2c.c PDEBUG(DBG_I2C, "i2c bus for %s unregistered", usbvision->i2c_adap.name); usbvision 264 drivers/media/usb/usbvision/usbvision-i2c.c usbvision_i2c_read_max4(struct usb_usbvision *usbvision, unsigned char addr, usbvision 270 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_write_reg(usbvision, USBVISION_SER_ADRS, addr); usbvision 277 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_write_reg(usbvision, USBVISION_SER_CONT, usbvision 285 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_read_reg(usbvision, USBVISION_SER_CONT); usbvision 295 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_write_reg(usbvision, USBVISION_SER_CONT, 0x00); usbvision 305 drivers/media/usb/usbvision/usbvision-i2c.c buf[3] = usbvision_read_reg(usbvision, USBVISION_SER_DAT4); usbvision 308 drivers/media/usb/usbvision/usbvision-i2c.c buf[2] = usbvision_read_reg(usbvision, USBVISION_SER_DAT3); usbvision 311 drivers/media/usb/usbvision/usbvision-i2c.c buf[1] = usbvision_read_reg(usbvision, USBVISION_SER_DAT2); usbvision 314 drivers/media/usb/usbvision/usbvision-i2c.c buf[0] = usbvision_read_reg(usbvision, USBVISION_SER_DAT1); usbvision 331 drivers/media/usb/usbvision/usbvision-i2c.c static int usbvision_i2c_write_max4(struct usb_usbvision *usbvision, usbvision 337 drivers/media/usb/usbvision/usbvision-i2c.c unsigned char *value = usbvision->ctrl_urb_buffer; usbvision 348 drivers/media/usb/usbvision/usbvision-i2c.c rc = usb_control_msg(usbvision->dev, usbvision 349 drivers/media/usb/usbvision/usbvision-i2c.c usb_sndctrlpipe(usbvision->dev, 1), usbvision 359 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_write_reg(usbvision, USBVISION_SER_CONT, usbvision 366 drivers/media/usb/usbvision/usbvision-i2c.c rc = usbvision_read_reg(usbvision, USBVISION_SER_CONT); usbvision 375 drivers/media/usb/usbvision/usbvision-i2c.c usbvision_write_reg(usbvision, USBVISION_SER_CONT, 0x00); usbvision 391 drivers/media/usb/usbvision/usbvision-i2c.c static int usbvision_i2c_write(struct usb_usbvision *usbvision, unsigned char addr, char *buf, usbvision 402 drivers/media/usb/usbvision/usbvision-i2c.c retval = usbvision_i2c_write_max4(usbvision, addr, buf_ptr, count); usbvision 413 drivers/media/usb/usbvision/usbvision-i2c.c static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char addr, char *buf, usbvision 423 drivers/media/usb/usbvision/usbvision-i2c.c retval = usbvision_i2c_read_max4(usbvision, addr, temp, count); usbvision 101 drivers/media/usb/usbvision/usbvision-video.c static void usbvision_release(struct usb_usbvision *usbvision); usbvision 162 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 164 drivers/media/usb/usbvision/usbvision-video.c usbvision_device_data[usbvision->dev_model].model_string); usbvision 172 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 173 drivers/media/usb/usbvision/usbvision-video.c s32 val = v4l2_ctrl_g_ctrl(v4l2_ctrl_find(&usbvision->hdl, usbvision 184 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 185 drivers/media/usb/usbvision/usbvision-video.c s32 val = v4l2_ctrl_g_ctrl(v4l2_ctrl_find(&usbvision->hdl, usbvision 196 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 197 drivers/media/usb/usbvision/usbvision-video.c s32 val = v4l2_ctrl_g_ctrl(v4l2_ctrl_find(&usbvision->hdl, usbvision 208 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 209 drivers/media/usb/usbvision/usbvision-video.c s32 val = v4l2_ctrl_g_ctrl(v4l2_ctrl_find(&usbvision->hdl, usbvision 220 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 222 drivers/media/usb/usbvision/usbvision-video.c YES_NO(usbvision->streaming == stream_on ? 1 : 0)); usbvision 230 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 232 drivers/media/usb/usbvision/usbvision-video.c YES_NO(usbvision->isoc_mode == ISOC_MODE_COMPRESS)); usbvision 240 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_get_drvdata(vdev); usbvision 241 drivers/media/usb/usbvision/usbvision-video.c return sprintf(buf, "%d\n", usbvision->bridge_type); usbvision 309 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 314 drivers/media/usb/usbvision/usbvision-video.c if (mutex_lock_interruptible(&usbvision->v4l2_lock)) usbvision 317 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->remove_pending) { usbvision 321 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->user) { usbvision 329 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_scratch_alloc(usbvision); usbvision 333 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_decompress_alloc(usbvision); usbvision 337 drivers/media/usb/usbvision/usbvision-video.c usbvision_scratch_free(usbvision); usbvision 338 drivers/media/usb/usbvision/usbvision-video.c usbvision_decompress_free(usbvision); usbvision 345 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->initialized) { usbvision 347 drivers/media/usb/usbvision/usbvision-video.c setup_ok = usbvision_setup(usbvision, isoc_mode); usbvision 349 drivers/media/usb/usbvision/usbvision-video.c usbvision->initialized = 1; usbvision 355 drivers/media/usb/usbvision/usbvision-video.c usbvision_begin_streaming(usbvision); usbvision 356 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_init_isoc(usbvision); usbvision 358 drivers/media/usb/usbvision/usbvision-video.c usbvision_muxsel(usbvision, 0); usbvision 361 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 362 drivers/media/usb/usbvision/usbvision-video.c usbvision->user++; usbvision 367 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 383 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 388 drivers/media/usb/usbvision/usbvision-video.c mutex_lock(&usbvision->v4l2_lock); usbvision 389 drivers/media/usb/usbvision/usbvision-video.c usbvision_audio_off(usbvision); usbvision 390 drivers/media/usb/usbvision/usbvision-video.c usbvision_restart_isoc(usbvision); usbvision 391 drivers/media/usb/usbvision/usbvision-video.c usbvision_stop_isoc(usbvision); usbvision 393 drivers/media/usb/usbvision/usbvision-video.c usbvision_decompress_free(usbvision); usbvision 394 drivers/media/usb/usbvision/usbvision-video.c usbvision_frames_free(usbvision); usbvision 395 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 396 drivers/media/usb/usbvision/usbvision-video.c usbvision_scratch_free(usbvision); usbvision 398 drivers/media/usb/usbvision/usbvision-video.c usbvision->user--; usbvision 399 drivers/media/usb/usbvision/usbvision-video.c r = usbvision->remove_pending; usbvision 400 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 404 drivers/media/usb/usbvision/usbvision-video.c usbvision_release(usbvision); usbvision 423 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 427 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_read_reg(usbvision, reg->reg&0xff); usbvision 429 drivers/media/usb/usbvision/usbvision-video.c dev_err(&usbvision->vdev.dev, usbvision 442 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 446 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_write_reg(usbvision, reg->reg & 0xff, reg->val); usbvision 448 drivers/media/usb/usbvision/usbvision-video.c dev_err(&usbvision->vdev.dev, usbvision 460 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 462 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->dev) usbvision 467 drivers/media/usb/usbvision/usbvision-video.c usbvision_device_data[usbvision->dev_model].model_string, usbvision 469 drivers/media/usb/usbvision/usbvision-video.c usb_make_path(usbvision->dev, vc->bus_info, sizeof(vc->bus_info)); usbvision 472 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].radio) usbvision 474 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->have_tuner) usbvision 482 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 485 drivers/media/usb/usbvision/usbvision-video.c if (vi->index >= usbvision->video_inputs) usbvision 487 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->have_tuner) usbvision 496 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].video_channels == 4) { usbvision 507 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].video_channels == 4) usbvision 516 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].video_channels == 4) usbvision 533 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 535 drivers/media/usb/usbvision/usbvision-video.c *input = usbvision->ctl_input; usbvision 541 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 543 drivers/media/usb/usbvision/usbvision-video.c if (input >= usbvision->video_inputs) usbvision 546 drivers/media/usb/usbvision/usbvision-video.c usbvision_muxsel(usbvision, input); usbvision 547 drivers/media/usb/usbvision/usbvision-video.c usbvision_set_input(usbvision); usbvision 548 drivers/media/usb/usbvision/usbvision-video.c usbvision_set_output(usbvision, usbvision 549 drivers/media/usb/usbvision/usbvision-video.c usbvision->curwidth, usbvision 550 drivers/media/usb/usbvision/usbvision-video.c usbvision->curheight); usbvision 556 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 558 drivers/media/usb/usbvision/usbvision-video.c usbvision->tvnorm_id = id; usbvision 560 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, video, s_std, usbvision->tvnorm_id); usbvision 562 drivers/media/usb/usbvision/usbvision-video.c usbvision_muxsel(usbvision, usbvision->ctl_input); usbvision 569 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 571 drivers/media/usb/usbvision/usbvision-video.c *id = usbvision->tvnorm_id; usbvision 578 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 588 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, tuner, g_tuner, vt); usbvision 596 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 602 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, tuner, s_tuner, vt); usbvision 610 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 616 drivers/media/usb/usbvision/usbvision-video.c freq->frequency = usbvision->radio_freq; usbvision 618 drivers/media/usb/usbvision/usbvision-video.c freq->frequency = usbvision->tv_freq; usbvision 626 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 633 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, tuner, s_frequency, freq); usbvision 634 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, tuner, g_frequency, &new_freq); usbvision 636 drivers/media/usb/usbvision/usbvision-video.c usbvision->radio_freq = new_freq.frequency; usbvision 638 drivers/media/usb/usbvision/usbvision-video.c usbvision->tv_freq = new_freq.frequency; usbvision 646 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 656 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->streaming == stream_on) { usbvision 657 drivers/media/usb/usbvision/usbvision-video.c ret = usbvision_stream_interrupt(usbvision); usbvision 662 drivers/media/usb/usbvision/usbvision-video.c usbvision_frames_free(usbvision); usbvision 663 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 664 drivers/media/usb/usbvision/usbvision-video.c vr->count = usbvision_frames_alloc(usbvision, vr->count); usbvision 666 drivers/media/usb/usbvision/usbvision-video.c usbvision->cur_frame = NULL; usbvision 674 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 679 drivers/media/usb/usbvision/usbvision-video.c if (vb->index >= usbvision->num_frames) usbvision 683 drivers/media/usb/usbvision/usbvision-video.c frame = &usbvision->frame[vb->index]; usbvision 692 drivers/media/usb/usbvision/usbvision-video.c vb->m.offset = vb->index * PAGE_ALIGN(usbvision->max_frame_size); usbvision 696 drivers/media/usb/usbvision/usbvision-video.c vb->length = usbvision->curwidth * usbvision 697 drivers/media/usb/usbvision/usbvision-video.c usbvision->curheight * usbvision 698 drivers/media/usb/usbvision/usbvision-video.c usbvision->palette.bytes_per_pixel; usbvision 699 drivers/media/usb/usbvision/usbvision-video.c vb->timestamp = ns_to_timeval(usbvision->frame[vb->index].ts); usbvision 700 drivers/media/usb/usbvision/usbvision-video.c vb->sequence = usbvision->frame[vb->index].sequence; usbvision 706 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 711 drivers/media/usb/usbvision/usbvision-video.c if (vb->index >= usbvision->num_frames) usbvision 714 drivers/media/usb/usbvision/usbvision-video.c frame = &usbvision->frame[vb->index]; usbvision 727 drivers/media/usb/usbvision/usbvision-video.c frame->v4l2_format = usbvision->palette; usbvision 729 drivers/media/usb/usbvision/usbvision-video.c spin_lock_irqsave(&usbvision->queue_lock, lock_flags); usbvision 730 drivers/media/usb/usbvision/usbvision-video.c list_add_tail(&usbvision->frame[vb->index].frame, &usbvision->inqueue); usbvision 731 drivers/media/usb/usbvision/usbvision-video.c spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags); usbvision 738 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 743 drivers/media/usb/usbvision/usbvision-video.c if (list_empty(&(usbvision->outqueue))) { usbvision 744 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->streaming == stream_idle) usbvision 747 drivers/media/usb/usbvision/usbvision-video.c (usbvision->wait_frame, usbvision 748 drivers/media/usb/usbvision/usbvision-video.c !list_empty(&(usbvision->outqueue))); usbvision 753 drivers/media/usb/usbvision/usbvision-video.c spin_lock_irqsave(&usbvision->queue_lock, lock_flags); usbvision 754 drivers/media/usb/usbvision/usbvision-video.c f = list_entry(usbvision->outqueue.next, usbvision 756 drivers/media/usb/usbvision/usbvision-video.c list_del(usbvision->outqueue.next); usbvision 757 drivers/media/usb/usbvision/usbvision-video.c spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags); usbvision 777 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 779 drivers/media/usb/usbvision/usbvision-video.c usbvision->streaming = stream_on; usbvision 780 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, video, s_stream, 1); usbvision 788 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 793 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->streaming == stream_on) { usbvision 794 drivers/media/usb/usbvision/usbvision-video.c usbvision_stream_interrupt(usbvision); usbvision 796 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, video, s_stream, 0); usbvision 798 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 815 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 816 drivers/media/usb/usbvision/usbvision-video.c vf->fmt.pix.width = usbvision->curwidth; usbvision 817 drivers/media/usb/usbvision/usbvision-video.c vf->fmt.pix.height = usbvision->curheight; usbvision 818 drivers/media/usb/usbvision/usbvision-video.c vf->fmt.pix.pixelformat = usbvision->palette.format; usbvision 820 drivers/media/usb/usbvision/usbvision-video.c usbvision->curwidth * usbvision->palette.bytes_per_pixel; usbvision 821 drivers/media/usb/usbvision/usbvision-video.c vf->fmt.pix.sizeimage = vf->fmt.pix.bytesperline * usbvision->curheight; usbvision 831 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 838 drivers/media/usb/usbvision/usbvision-video.c usbvision->palette = usbvision_v4l2_format[format_idx]; usbvision 849 drivers/media/usb/usbvision/usbvision-video.c usbvision->palette.bytes_per_pixel; usbvision 860 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 868 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->streaming == stream_on) { usbvision 869 drivers/media/usb/usbvision/usbvision-video.c ret = usbvision_stream_interrupt(usbvision); usbvision 873 drivers/media/usb/usbvision/usbvision-video.c usbvision_frames_free(usbvision); usbvision 874 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 876 drivers/media/usb/usbvision/usbvision-video.c usbvision->cur_frame = NULL; usbvision 879 drivers/media/usb/usbvision/usbvision-video.c usbvision_set_output(usbvision, vf->fmt.pix.width, vf->fmt.pix.height); usbvision 887 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 896 drivers/media/usb/usbvision/usbvision-video.c if (!USBVISION_IS_OPERATIONAL(usbvision) || !buf) usbvision 902 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->num_frames) { usbvision 905 drivers/media/usb/usbvision/usbvision-video.c usbvision_frames_free(usbvision); usbvision 906 drivers/media/usb/usbvision/usbvision-video.c usbvision_empty_framequeues(usbvision); usbvision 907 drivers/media/usb/usbvision/usbvision-video.c usbvision_frames_alloc(usbvision, USBVISION_NUMFRAMES); usbvision 910 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->streaming != stream_on) { usbvision 912 drivers/media/usb/usbvision/usbvision-video.c usbvision->streaming = stream_on; usbvision 913 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, video, s_stream, 1); usbvision 918 drivers/media/usb/usbvision/usbvision-video.c for (i = 0; i < usbvision->num_frames; i++) { usbvision 919 drivers/media/usb/usbvision/usbvision-video.c frame = &usbvision->frame[i]; usbvision 928 drivers/media/usb/usbvision/usbvision-video.c frame->v4l2_format = usbvision->palette; usbvision 930 drivers/media/usb/usbvision/usbvision-video.c spin_lock_irqsave(&usbvision->queue_lock, lock_flags); usbvision 931 drivers/media/usb/usbvision/usbvision-video.c list_add_tail(&frame->frame, &usbvision->inqueue); usbvision 932 drivers/media/usb/usbvision/usbvision-video.c spin_unlock_irqrestore(&usbvision->queue_lock, usbvision 938 drivers/media/usb/usbvision/usbvision-video.c if (list_empty(&(usbvision->outqueue))) { usbvision 943 drivers/media/usb/usbvision/usbvision-video.c (usbvision->wait_frame, usbvision 944 drivers/media/usb/usbvision/usbvision-video.c !list_empty(&(usbvision->outqueue))); usbvision 949 drivers/media/usb/usbvision/usbvision-video.c spin_lock_irqsave(&usbvision->queue_lock, lock_flags); usbvision 950 drivers/media/usb/usbvision/usbvision-video.c frame = list_entry(usbvision->outqueue.next, usbvision 952 drivers/media/usb/usbvision/usbvision-video.c list_del(usbvision->outqueue.next); usbvision 953 drivers/media/usb/usbvision/usbvision-video.c spin_unlock_irqrestore(&usbvision->queue_lock, lock_flags); usbvision 992 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 995 drivers/media/usb/usbvision/usbvision-video.c if (mutex_lock_interruptible(&usbvision->v4l2_lock)) usbvision 998 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 1008 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 1012 drivers/media/usb/usbvision/usbvision-video.c if (!USBVISION_IS_OPERATIONAL(usbvision)) usbvision 1016 drivers/media/usb/usbvision/usbvision-video.c size != PAGE_ALIGN(usbvision->max_frame_size)) { usbvision 1020 drivers/media/usb/usbvision/usbvision-video.c for (i = 0; i < usbvision->num_frames; i++) { usbvision 1021 drivers/media/usb/usbvision/usbvision-video.c if (((PAGE_ALIGN(usbvision->max_frame_size)*i) >> PAGE_SHIFT) == usbvision 1025 drivers/media/usb/usbvision/usbvision-video.c if (i == usbvision->num_frames) { usbvision 1034 drivers/media/usb/usbvision/usbvision-video.c pos = usbvision->frame[i].data; usbvision 1050 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 1053 drivers/media/usb/usbvision/usbvision-video.c if (mutex_lock_interruptible(&usbvision->v4l2_lock)) usbvision 1056 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 1066 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 1071 drivers/media/usb/usbvision/usbvision-video.c if (mutex_lock_interruptible(&usbvision->v4l2_lock)) usbvision 1074 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->remove_pending) { usbvision 1081 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->user) { usbvision 1082 drivers/media/usb/usbvision/usbvision-video.c dev_err(&usbvision->rdev.dev, usbvision 1088 drivers/media/usb/usbvision/usbvision-video.c err_code = usbvision_set_alternate(usbvision); usbvision 1090 drivers/media/usb/usbvision/usbvision-video.c usbvision->last_error = err_code; usbvision 1096 drivers/media/usb/usbvision/usbvision-video.c usbvision->radio = 1; usbvision 1097 drivers/media/usb/usbvision/usbvision-video.c call_all(usbvision, tuner, s_radio); usbvision 1098 drivers/media/usb/usbvision/usbvision-video.c usbvision_set_audio(usbvision, USBVISION_AUDIO_RADIO); usbvision 1099 drivers/media/usb/usbvision/usbvision-video.c usbvision->user++; usbvision 1102 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 1109 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = video_drvdata(file); usbvision 1114 drivers/media/usb/usbvision/usbvision-video.c mutex_lock(&usbvision->v4l2_lock); usbvision 1116 drivers/media/usb/usbvision/usbvision-video.c usbvision->iface_alt = 0; usbvision 1117 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->dev) usbvision 1118 drivers/media/usb/usbvision/usbvision-video.c usb_set_interface(usbvision->dev, usbvision->iface, usbvision 1119 drivers/media/usb/usbvision/usbvision-video.c usbvision->iface_alt); usbvision 1121 drivers/media/usb/usbvision/usbvision-video.c usbvision_audio_off(usbvision); usbvision 1122 drivers/media/usb/usbvision/usbvision-video.c usbvision->radio = 0; usbvision 1123 drivers/media/usb/usbvision/usbvision-video.c usbvision->user--; usbvision 1124 drivers/media/usb/usbvision/usbvision-video.c r = usbvision->remove_pending; usbvision 1125 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 1130 drivers/media/usb/usbvision/usbvision-video.c usbvision_release(usbvision); usbvision 1217 drivers/media/usb/usbvision/usbvision-video.c static void usbvision_vdev_init(struct usb_usbvision *usbvision, usbvision 1222 drivers/media/usb/usbvision/usbvision-video.c struct usb_device *usb_dev = usbvision->dev; usbvision 1225 drivers/media/usb/usbvision/usbvision-video.c dev_err(&usbvision->dev->dev, usbvision 1231 drivers/media/usb/usbvision/usbvision-video.c vdev->lock = &usbvision->v4l2_lock; usbvision 1232 drivers/media/usb/usbvision/usbvision-video.c vdev->v4l2_dev = &usbvision->v4l2_dev; usbvision 1234 drivers/media/usb/usbvision/usbvision-video.c video_set_drvdata(vdev, usbvision); usbvision 1238 drivers/media/usb/usbvision/usbvision-video.c static void usbvision_unregister_video(struct usb_usbvision *usbvision) usbvision 1241 drivers/media/usb/usbvision/usbvision-video.c if (video_is_registered(&usbvision->rdev)) { usbvision 1243 drivers/media/usb/usbvision/usbvision-video.c video_device_node_name(&usbvision->rdev)); usbvision 1244 drivers/media/usb/usbvision/usbvision-video.c video_unregister_device(&usbvision->rdev); usbvision 1248 drivers/media/usb/usbvision/usbvision-video.c if (video_is_registered(&usbvision->vdev)) { usbvision 1250 drivers/media/usb/usbvision/usbvision-video.c video_device_node_name(&usbvision->vdev)); usbvision 1251 drivers/media/usb/usbvision/usbvision-video.c video_unregister_device(&usbvision->vdev); usbvision 1256 drivers/media/usb/usbvision/usbvision-video.c static int usbvision_register_video(struct usb_usbvision *usbvision) usbvision 1261 drivers/media/usb/usbvision/usbvision-video.c usbvision_vdev_init(usbvision, &usbvision->vdev, usbvision 1263 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->have_tuner) { usbvision 1264 drivers/media/usb/usbvision/usbvision-video.c v4l2_disable_ioctl(&usbvision->vdev, VIDIOC_G_FREQUENCY); usbvision 1265 drivers/media/usb/usbvision/usbvision-video.c v4l2_disable_ioctl(&usbvision->vdev, VIDIOC_S_TUNER); usbvision 1266 drivers/media/usb/usbvision/usbvision-video.c v4l2_disable_ioctl(&usbvision->vdev, VIDIOC_G_FREQUENCY); usbvision 1267 drivers/media/usb/usbvision/usbvision-video.c v4l2_disable_ioctl(&usbvision->vdev, VIDIOC_S_TUNER); usbvision 1269 drivers/media/usb/usbvision/usbvision-video.c usbvision->vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | usbvision 1271 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->have_tuner) usbvision 1272 drivers/media/usb/usbvision/usbvision-video.c usbvision->vdev.device_caps |= V4L2_CAP_TUNER; usbvision 1274 drivers/media/usb/usbvision/usbvision-video.c if (video_register_device(&usbvision->vdev, VFL_TYPE_GRABBER, video_nr) < 0) usbvision 1277 drivers/media/usb/usbvision/usbvision-video.c usbvision->nr, video_device_node_name(&usbvision->vdev)); usbvision 1280 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].radio) { usbvision 1282 drivers/media/usb/usbvision/usbvision-video.c usbvision_vdev_init(usbvision, &usbvision->rdev, usbvision 1284 drivers/media/usb/usbvision/usbvision-video.c usbvision->rdev.device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER; usbvision 1285 drivers/media/usb/usbvision/usbvision-video.c if (video_register_device(&usbvision->rdev, VFL_TYPE_RADIO, radio_nr) < 0) usbvision 1288 drivers/media/usb/usbvision/usbvision-video.c usbvision->nr, video_device_node_name(&usbvision->rdev)); usbvision 1294 drivers/media/usb/usbvision/usbvision-video.c dev_err(&usbvision->dev->dev, usbvision 1296 drivers/media/usb/usbvision/usbvision-video.c usbvision->nr); usbvision 1297 drivers/media/usb/usbvision/usbvision-video.c usbvision_unregister_video(usbvision); usbvision 1313 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision; usbvision 1315 drivers/media/usb/usbvision/usbvision-video.c usbvision = kzalloc(sizeof(*usbvision), GFP_KERNEL); usbvision 1316 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision) usbvision 1319 drivers/media/usb/usbvision/usbvision-video.c usbvision->dev = dev; usbvision 1320 drivers/media/usb/usbvision/usbvision-video.c if (v4l2_device_register(&intf->dev, &usbvision->v4l2_dev)) usbvision 1323 drivers/media/usb/usbvision/usbvision-video.c if (v4l2_ctrl_handler_init(&usbvision->hdl, 4)) usbvision 1325 drivers/media/usb/usbvision/usbvision-video.c usbvision->v4l2_dev.ctrl_handler = &usbvision->hdl; usbvision 1326 drivers/media/usb/usbvision/usbvision-video.c mutex_init(&usbvision->v4l2_lock); usbvision 1329 drivers/media/usb/usbvision/usbvision-video.c usbvision->ctrl_urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL); usbvision 1330 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->ctrl_urb) usbvision 1333 drivers/media/usb/usbvision/usbvision-video.c return usbvision; usbvision 1336 drivers/media/usb/usbvision/usbvision-video.c v4l2_ctrl_handler_free(&usbvision->hdl); usbvision 1337 drivers/media/usb/usbvision/usbvision-video.c v4l2_device_unregister(&usbvision->v4l2_dev); usbvision 1339 drivers/media/usb/usbvision/usbvision-video.c kfree(usbvision); usbvision 1350 drivers/media/usb/usbvision/usbvision-video.c static void usbvision_release(struct usb_usbvision *usbvision) usbvision 1354 drivers/media/usb/usbvision/usbvision-video.c usbvision->initialized = 0; usbvision 1356 drivers/media/usb/usbvision/usbvision-video.c usbvision_remove_sysfs(&usbvision->vdev); usbvision 1357 drivers/media/usb/usbvision/usbvision-video.c usbvision_unregister_video(usbvision); usbvision 1358 drivers/media/usb/usbvision/usbvision-video.c kfree(usbvision->alt_max_pkt_size); usbvision 1360 drivers/media/usb/usbvision/usbvision-video.c usb_free_urb(usbvision->ctrl_urb); usbvision 1362 drivers/media/usb/usbvision/usbvision-video.c v4l2_ctrl_handler_free(&usbvision->hdl); usbvision 1363 drivers/media/usb/usbvision/usbvision-video.c v4l2_device_unregister(&usbvision->v4l2_dev); usbvision 1364 drivers/media/usb/usbvision/usbvision-video.c kfree(usbvision); usbvision 1372 drivers/media/usb/usbvision/usbvision-video.c static void usbvision_configure_video(struct usb_usbvision *usbvision) usbvision 1376 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision) usbvision 1379 drivers/media/usb/usbvision/usbvision-video.c model = usbvision->dev_model; usbvision 1380 drivers/media/usb/usbvision/usbvision-video.c usbvision->palette = usbvision_v4l2_format[2]; /* V4L2_PIX_FMT_RGB24; */ usbvision 1382 drivers/media/usb/usbvision/usbvision-video.c if (usbvision_device_data[usbvision->dev_model].vin_reg2_override) { usbvision 1383 drivers/media/usb/usbvision/usbvision-video.c usbvision->vin_reg2_preset = usbvision 1384 drivers/media/usb/usbvision/usbvision-video.c usbvision_device_data[usbvision->dev_model].vin_reg2; usbvision 1386 drivers/media/usb/usbvision/usbvision-video.c usbvision->vin_reg2_preset = 0; usbvision 1389 drivers/media/usb/usbvision/usbvision-video.c usbvision->tvnorm_id = usbvision_device_data[model].video_norm; usbvision 1390 drivers/media/usb/usbvision/usbvision-video.c usbvision->video_inputs = usbvision_device_data[model].video_channels; usbvision 1391 drivers/media/usb/usbvision/usbvision-video.c usbvision->ctl_input = 0; usbvision 1392 drivers/media/usb/usbvision/usbvision-video.c usbvision->radio_freq = 87.5 * 16000; usbvision 1393 drivers/media/usb/usbvision/usbvision-video.c usbvision->tv_freq = 400 * 16; usbvision 1398 drivers/media/usb/usbvision/usbvision-video.c usbvision_audio_off(usbvision); usbvision 1400 drivers/media/usb/usbvision/usbvision-video.c usbvision_power_on(usbvision); usbvision 1401 drivers/media/usb/usbvision/usbvision-video.c usbvision_i2c_register(usbvision); usbvision 1418 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = NULL; usbvision 1469 drivers/media/usb/usbvision/usbvision-video.c usbvision = usbvision_alloc(dev, intf); usbvision 1470 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision) { usbvision 1477 drivers/media/usb/usbvision/usbvision-video.c usbvision->bridge_type = BRIDGE_NT1004; usbvision 1479 drivers/media/usb/usbvision/usbvision-video.c usbvision->bridge_type = BRIDGE_NT1005; usbvision 1481 drivers/media/usb/usbvision/usbvision-video.c usbvision->bridge_type = BRIDGE_NT1003; usbvision 1482 drivers/media/usb/usbvision/usbvision-video.c PDEBUG(DBG_PROBE, "bridge_type %d", usbvision->bridge_type); usbvision 1487 drivers/media/usb/usbvision/usbvision-video.c usbvision->num_alt = uif->num_altsetting; usbvision 1488 drivers/media/usb/usbvision/usbvision-video.c PDEBUG(DBG_PROBE, "Alternate settings: %i", usbvision->num_alt); usbvision 1489 drivers/media/usb/usbvision/usbvision-video.c usbvision->alt_max_pkt_size = kmalloc_array(32, usbvision->num_alt, usbvision 1491 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision->alt_max_pkt_size) { usbvision 1496 drivers/media/usb/usbvision/usbvision-video.c for (i = 0; i < usbvision->num_alt; i++) { usbvision 1506 drivers/media/usb/usbvision/usbvision-video.c usbvision->alt_max_pkt_size[i] = usbvision 1509 drivers/media/usb/usbvision/usbvision-video.c usbvision->alt_max_pkt_size[i]); usbvision 1513 drivers/media/usb/usbvision/usbvision-video.c usbvision->nr = usbvision_nr++; usbvision 1515 drivers/media/usb/usbvision/usbvision-video.c spin_lock_init(&usbvision->queue_lock); usbvision 1516 drivers/media/usb/usbvision/usbvision-video.c init_waitqueue_head(&usbvision->wait_frame); usbvision 1517 drivers/media/usb/usbvision/usbvision-video.c init_waitqueue_head(&usbvision->wait_stream); usbvision 1519 drivers/media/usb/usbvision/usbvision-video.c usbvision->have_tuner = usbvision_device_data[model].tuner; usbvision 1520 drivers/media/usb/usbvision/usbvision-video.c if (usbvision->have_tuner) usbvision 1521 drivers/media/usb/usbvision/usbvision-video.c usbvision->tuner_type = usbvision_device_data[model].tuner_type; usbvision 1523 drivers/media/usb/usbvision/usbvision-video.c usbvision->dev_model = model; usbvision 1524 drivers/media/usb/usbvision/usbvision-video.c usbvision->remove_pending = 0; usbvision 1525 drivers/media/usb/usbvision/usbvision-video.c usbvision->iface = ifnum; usbvision 1526 drivers/media/usb/usbvision/usbvision-video.c usbvision->iface_alt = 0; usbvision 1527 drivers/media/usb/usbvision/usbvision-video.c usbvision->video_endp = endpoint->bEndpointAddress; usbvision 1528 drivers/media/usb/usbvision/usbvision-video.c usbvision->isoc_packet_size = 0; usbvision 1529 drivers/media/usb/usbvision/usbvision-video.c usbvision->usb_bandwidth = 0; usbvision 1530 drivers/media/usb/usbvision/usbvision-video.c usbvision->user = 0; usbvision 1531 drivers/media/usb/usbvision/usbvision-video.c usbvision->streaming = stream_off; usbvision 1532 drivers/media/usb/usbvision/usbvision-video.c usbvision_configure_video(usbvision); usbvision 1533 drivers/media/usb/usbvision/usbvision-video.c usbvision_register_video(usbvision); usbvision 1535 drivers/media/usb/usbvision/usbvision-video.c usbvision_create_sysfs(&usbvision->vdev); usbvision 1541 drivers/media/usb/usbvision/usbvision-video.c usbvision_release(usbvision); usbvision 1558 drivers/media/usb/usbvision/usbvision-video.c struct usb_usbvision *usbvision = to_usbvision(usb_get_intfdata(intf)); usbvision 1563 drivers/media/usb/usbvision/usbvision-video.c if (!usbvision) { usbvision 1568 drivers/media/usb/usbvision/usbvision-video.c mutex_lock(&usbvision->v4l2_lock); usbvision 1571 drivers/media/usb/usbvision/usbvision-video.c usbvision_stop_isoc(usbvision); usbvision 1573 drivers/media/usb/usbvision/usbvision-video.c v4l2_device_disconnect(&usbvision->v4l2_dev); usbvision 1574 drivers/media/usb/usbvision/usbvision-video.c usbvision_i2c_unregister(usbvision); usbvision 1575 drivers/media/usb/usbvision/usbvision-video.c usbvision->remove_pending = 1; /* Now all ISO data will be ignored */ usbvision 1576 drivers/media/usb/usbvision/usbvision-video.c u = usbvision->user; usbvision 1578 drivers/media/usb/usbvision/usbvision-video.c usb_put_dev(usbvision->dev); usbvision 1579 drivers/media/usb/usbvision/usbvision-video.c usbvision->dev = NULL; /* USB device is no more */ usbvision 1581 drivers/media/usb/usbvision/usbvision-video.c mutex_unlock(&usbvision->v4l2_lock); usbvision 1586 drivers/media/usb/usbvision/usbvision-video.c wake_up_interruptible(&usbvision->wait_frame); usbvision 1587 drivers/media/usb/usbvision/usbvision-video.c wake_up_interruptible(&usbvision->wait_stream); usbvision 1589 drivers/media/usb/usbvision/usbvision-video.c usbvision_release(usbvision); usbvision 454 drivers/media/usb/usbvision/usbvision.h #define call_all(usbvision, o, f, args...) \ usbvision 455 drivers/media/usb/usbvision/usbvision.h v4l2_device_call_all(&usbvision->v4l2_dev, 0, o, f, ##args) usbvision 465 drivers/media/usb/usbvision/usbvision.h int usbvision_i2c_register(struct usb_usbvision *usbvision); usbvision 466 drivers/media/usb/usbvision/usbvision.h int usbvision_i2c_unregister(struct usb_usbvision *usbvision); usbvision 469 drivers/media/usb/usbvision/usbvision.h int usbvision_read_reg(struct usb_usbvision *usbvision, unsigned char reg); usbvision 470 drivers/media/usb/usbvision/usbvision.h int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, usbvision 473 drivers/media/usb/usbvision/usbvision.h int usbvision_frames_alloc(struct usb_usbvision *usbvision, int number_of_frames); usbvision 474 drivers/media/usb/usbvision/usbvision.h void usbvision_frames_free(struct usb_usbvision *usbvision); usbvision 475 drivers/media/usb/usbvision/usbvision.h int usbvision_scratch_alloc(struct usb_usbvision *usbvision); usbvision 476 drivers/media/usb/usbvision/usbvision.h void usbvision_scratch_free(struct usb_usbvision *usbvision); usbvision 477 drivers/media/usb/usbvision/usbvision.h int usbvision_decompress_alloc(struct usb_usbvision *usbvision); usbvision 478 drivers/media/usb/usbvision/usbvision.h void usbvision_decompress_free(struct usb_usbvision *usbvision); usbvision 480 drivers/media/usb/usbvision/usbvision.h int usbvision_setup(struct usb_usbvision *usbvision, int format); usbvision 481 drivers/media/usb/usbvision/usbvision.h int usbvision_init_isoc(struct usb_usbvision *usbvision); usbvision 482 drivers/media/usb/usbvision/usbvision.h int usbvision_restart_isoc(struct usb_usbvision *usbvision); usbvision 483 drivers/media/usb/usbvision/usbvision.h void usbvision_stop_isoc(struct usb_usbvision *usbvision); usbvision 486 drivers/media/usb/usbvision/usbvision.h int usbvision_set_audio(struct usb_usbvision *usbvision, int audio_channel); usbvision 487 drivers/media/usb/usbvision/usbvision.h int usbvision_audio_off(struct usb_usbvision *usbvision); usbvision 489 drivers/media/usb/usbvision/usbvision.h int usbvision_begin_streaming(struct usb_usbvision *usbvision); usbvision 493 drivers/media/usb/usbvision/usbvision.h int usbvision_muxsel(struct usb_usbvision *usbvision, int channel); usbvision 494 drivers/media/usb/usbvision/usbvision.h int usbvision_set_input(struct usb_usbvision *usbvision); usbvision 495 drivers/media/usb/usbvision/usbvision.h int usbvision_set_output(struct usb_usbvision *usbvision, int width, int height); usbvision 497 drivers/media/usb/usbvision/usbvision.h int usbvision_power_off(struct usb_usbvision *usbvision); usbvision 498 drivers/media/usb/usbvision/usbvision.h int usbvision_power_on(struct usb_usbvision *usbvision);