• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/media/video/

Lines Matching refs:vcs

1433 static void vino_update_line_size(struct vino_channel_settings *vcs)
1435 unsigned int w = vcs->clipping.right - vcs->clipping.left;
1436 unsigned int d = vcs->decimation;
1437 unsigned int bpp = vino_data_formats[vcs->data_format].bpp;
1441 "line_size = %d\n", w, d, vcs->line_size);
1447 vcs->clipping.right = vcs->clipping.left + w;
1448 vcs->line_size = lsize;
1451 "line_size = %d\n", w, d, vcs->line_size);
1455 static void vino_set_clipping(struct vino_channel_settings *vcs,
1462 maxwidth = vino_data_norms[vcs->data_norm].width;
1463 maxheight = vino_data_norms[vcs->data_norm].height;
1464 d = vcs->decimation;
1492 vcs->clipping.left = x;
1493 vcs->clipping.top = y;
1494 vcs->clipping.right = x + w;
1495 vcs->clipping.bottom = y + h;
1497 vino_update_line_size(vcs);
1500 vcs->clipping.left, vcs->clipping.top, vcs->clipping.right,
1501 vcs->clipping.bottom, vcs->decimation, vcs->line_size);
1505 static inline void vino_set_default_clipping(struct vino_channel_settings *vcs)
1507 vino_set_clipping(vcs, 0, 0, vino_data_norms[vcs->data_norm].width,
1508 vino_data_norms[vcs->data_norm].height);
1512 static void vino_set_scaling(struct vino_channel_settings *vcs,
1517 x = vcs->clipping.left;
1518 y = vcs->clipping.top;
1519 curw = vcs->clipping.right - vcs->clipping.left;
1520 curh = vcs->clipping.bottom - vcs->clipping.top;
1533 vcs->decimation = d;
1534 vino_set_clipping(vcs, x, y, w * d, h * d);
1536 dprintk("scaling %d, %d, %d, %d / %d - %d\n", vcs->clipping.left,
1537 vcs->clipping.top, vcs->clipping.right, vcs->clipping.bottom,
1538 vcs->decimation, vcs->line_size);
1542 static inline void vino_set_default_scaling(struct vino_channel_settings *vcs)
1544 vino_set_scaling(vcs, vcs->clipping.right - vcs->clipping.left,
1545 vcs->clipping.bottom - vcs->clipping.top);
1549 static void vino_set_framerate(struct vino_channel_settings *vcs,
1554 switch (vcs->data_norm) {
1559 if (fps < vino_data_norms[vcs->data_norm].fps_min)
1560 fps = vino_data_norms[vcs->data_norm].fps_min;
1561 if (fps > vino_data_norms[vcs->data_norm].fps_max)
1562 fps = vino_data_norms[vcs->data_norm].fps_max;
1583 vcs->framert_reg = VINO_FRAMERT_RT(mask);
1589 if (fps < vino_data_norms[vcs->data_norm].fps_min)
1590 fps = vino_data_norms[vcs->data_norm].fps_min;
1591 if (fps > vino_data_norms[vcs->data_norm].fps_max)
1592 fps = vino_data_norms[vcs->data_norm].fps_max;
1613 vcs->framert_reg = VINO_FRAMERT_RT(mask) | VINO_FRAMERT_PAL;
1617 vcs->fps = fps;
1622 vino_channel_settings *vcs)
1624 vino_set_framerate(vcs, vino_data_norms[vcs->data_norm].fps_max);
1631 static int vino_dma_setup(struct vino_channel_settings *vcs,
1640 vcs->field = 0;
1643 ch = (vcs->channel == VINO_CHANNEL_A) ? &vino->a : &vino->b;
1644 norm = &vino_data_norms[vcs->data_norm];
1650 ch->line_size = vcs->line_size - 8;
1664 ch->alpha = vcs->alpha;
1667 ch->clip_start = VINO_CLIP_ODD(norm->odd.top + vcs->clipping.top / 2) |
1669 vcs->clipping.top / 2) |
1670 VINO_CLIP_X(vcs->clipping.left);
1672 vcs->clipping.bottom / 2 - 1) |
1674 vcs->clipping.bottom / 2 - 1) |
1675 VINO_CLIP_X(vcs->clipping.right);
1678 fb->data_size = ((vcs->clipping.right - vcs->clipping.left) /
1679 vcs->decimation) *
1680 ((vcs->clipping.bottom - vcs->clipping.top) /
1681 vcs->decimation) *
1682 vino_data_formats[vcs->data_format].bpp;
1684 ch->frame_rate = vcs->framert_reg;
1689 if (vcs->channel == VINO_CHANNEL_A) {
1703 if (vcs->decimation < 2)
1708 ctrl |= (vcs->decimation - 1) <<
1713 if (vcs->input == VINO_INPUT_D1)
1728 if (vcs->decimation < 2)
1733 ctrl |= (vcs->decimation - 1) <<
1737 if (vcs->input == VINO_INPUT_D1)
1747 fb->data_format = vcs->data_format;
1749 switch (vcs->data_format) {
1751 ctrl |= (vcs->channel == VINO_CHANNEL_A) ?
1755 ctrl |= (vcs->channel == VINO_CHANNEL_A) ?
1762 ctrl |= (vcs->channel == VINO_CHANNEL_A) ?
1775 static inline void vino_dma_start(struct vino_channel_settings *vcs)
1780 ctrl |= (vcs->channel == VINO_CHANNEL_A) ?
1786 static inline void vino_dma_stop(struct vino_channel_settings *vcs)
1790 ctrl &= (vcs->channel == VINO_CHANNEL_A) ?
1792 ctrl &= (vcs->channel == VINO_CHANNEL_A) ?
1802 static void vino_clear_interrupt(struct vino_channel_settings *vcs)
1806 ch = (vcs->channel == VINO_CHANNEL_A) ? &vino->a : &vino->b;
1816 (vcs->channel == VINO_CHANNEL_A) ? 'A':'B');
1819 static int vino_capture(struct vino_channel_settings *vcs,
1839 vino_dma_setup(vcs, fb);
1840 vino_dma_start(vcs);
1850 vino_channel_settings *vcs,
1858 spin_lock_irqsave(&vcs->capture_lock, flags);
1860 fb = vino_queue_add(&vcs->fb_queue, index);
1867 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1872 static int vino_capture_next(struct vino_channel_settings *vcs, int start)
1881 spin_lock_irqsave(&vcs->capture_lock, flags);
1885 if (vcs->capturing) {
1886 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1893 if (!vcs->capturing) {
1894 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1899 err = vino_queue_get_incoming(&vcs->fb_queue, &incoming);
1911 fb = vino_queue_peek(&vcs->fb_queue, &id);
1919 vcs->capturing = 1;
1922 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1924 err = vino_capture(vcs, fb);
1929 vcs->capturing = 0;
1930 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1935 static inline int vino_is_capturing(struct vino_channel_settings *vcs)
1940 spin_lock_irqsave(&vcs->capture_lock, flags);
1942 ret = vcs->capturing;
1944 spin_unlock_irqrestore(&vcs->capture_lock, flags);
1950 static int vino_wait_for_frame(struct vino_channel_settings *vcs)
1959 add_wait_queue(&vcs->fb_queue.frame_wait_queue, &wait);
1970 remove_wait_queue(&vcs->fb_queue.frame_wait_queue, &wait);
1999 static int vino_check_buffer(struct vino_channel_settings *vcs,
2030 vino_dma_stop(vcs);
2031 vino_clear_interrupt(vcs);
2039 static void vino_capture_stop(struct vino_channel_settings *vcs)
2046 spin_lock_irqsave(&vcs->capture_lock, flags);
2049 vcs->capturing = 0;
2053 vino_dma_stop(vcs);
2054 vino_clear_interrupt(vcs);
2059 if (vino_queue_get_incoming(&vcs->fb_queue, &incoming)) {
2065 vino_queue_transfer(&vcs->fb_queue);
2067 if (vino_queue_get_incoming(&vcs->fb_queue, &incoming)) {
2074 if (vino_queue_get_outgoing(&vcs->fb_queue, &outgoing)) {
2080 vino_queue_remove(&vcs->fb_queue, &id);
2082 if (vino_queue_get_outgoing(&vcs->fb_queue, &outgoing)) {
2090 spin_unlock_irqrestore(&vcs->capture_lock, flags);
2094 static void vino_skip_frame(struct vino_channel_settings *vcs)
2100 spin_lock_irqsave(&vcs->capture_lock, flags);
2101 fb = vino_queue_peek(&vcs->fb_queue, &id);
2103 spin_unlock_irqrestore(&vcs->capture_lock, flags);
2107 spin_unlock_irqrestore(&vcs->capture_lock, flags);
2113 vino_capture_next(vcs, 0);
2116 static void vino_frame_done(struct vino_channel_settings *vcs)
2121 spin_lock_irqsave(&vcs->capture_lock, flags);
2122 fb = vino_queue_transfer(&vcs->fb_queue);
2124 spin_unlock_irqrestore(&vcs->capture_lock, flags);
2128 spin_unlock_irqrestore(&vcs->capture_lock, flags);
2130 fb->frame_counter = vcs->int_data.frame_counter;
2131 memcpy(&fb->timestamp, &vcs->int_data.timestamp,
2139 wake_up(&vcs->fb_queue.frame_wait_queue);
2141 vino_capture_next(vcs, 0);
2145 struct vino_channel_settings *vcs;
2147 vcs = (channel == VINO_CHANNEL_A)
2150 if (vcs->int_data.skip)
2151 vcs->int_data.skip_count++;
2153 if (vcs->int_data.skip && (vcs->int_data.skip_count
2155 vino_skip_frame(vcs);
2157 vcs->int_data.skip_count = 0;
2158 vino_frame_done(vcs);
2404 static int vino_is_input_owner(struct vino_channel_settings *vcs)
2406 switch(vcs->input) {
2409 return (vino_drvdata->decoder.owner == vcs->channel);
2411 return (vino_drvdata->camera.owner == vcs->channel);
2417 static int vino_acquire_input(struct vino_channel_settings *vcs)
2434 vino_drvdata->camera.owner = vcs->channel;
2435 vcs->input = VINO_INPUT_D1;
2436 vcs->data_norm = VINO_DATA_NORM_D1;
2477 vino_drvdata->decoder.owner = vcs->channel;
2479 vcs->input = input;
2480 vcs->data_norm = data_norm;
2482 vcs->input = (vcs->channel == VINO_CHANNEL_A) ?
2484 vcs->data_norm = (vcs->channel == VINO_CHANNEL_A) ?
2488 if (vcs->input == VINO_INPUT_NONE) {
2493 vino_set_default_clipping(vcs);
2494 vino_set_default_scaling(vcs);
2495 vino_set_default_framerate(vcs);
2497 dprintk("vino_acquire_input(): %s\n", vino_inputs[vcs->input].name);
2505 static int vino_set_input(struct vino_channel_settings *vcs, int input)
2507 struct vino_channel_settings *vcs2 = (vcs->channel == VINO_CHANNEL_A) ?
2516 if (vcs->input == input)
2532 vino_drvdata->decoder.owner = vcs->channel;
2535 if (vino_drvdata->decoder.owner == vcs->channel) {
2569 vcs->input = input;
2570 vcs->data_norm = data_norm;
2577 vcs->input = input;
2578 vcs->data_norm = vcs2->data_norm;
2581 if (vino_drvdata->camera.owner == vcs->channel) {
2603 vino_drvdata->camera.owner = vcs->channel;
2606 if (vino_drvdata->decoder.owner == vcs->channel) {
2618 vcs->input = input;
2619 vcs->data_norm = VINO_DATA_NORM_D1;
2626 vino_set_default_clipping(vcs);
2627 vino_set_default_scaling(vcs);
2628 vino_set_default_framerate(vcs);
2630 dprintk("vino_set_input(): %s\n", vino_inputs[vcs->input].name);
2638 static void vino_release_input(struct vino_channel_settings *vcs)
2640 struct vino_channel_settings *vcs2 = (vcs->channel == VINO_CHANNEL_A) ?
2651 if (vino_drvdata->camera.owner == vcs->channel) {
2658 } else if (vino_drvdata->decoder.owner == vcs->channel) {
2667 vcs->input = VINO_INPUT_NONE;
2673 static int vino_set_data_norm(struct vino_channel_settings *vcs,
2679 if (data_norm == vcs->data_norm)
2682 switch (vcs->input) {
2711 vcs->data_norm = data_norm;
2713 vino_set_default_clipping(vcs);
2714 vino_set_default_scaling(vcs);
2715 vino_set_default_framerate(vcs);
2740 static int vino_enum_data_norm(struct vino_channel_settings *vcs, __u32 index)
2746 switch(vcs->input) {
2768 static int vino_enum_input(struct vino_channel_settings *vcs, __u32 index)
2808 static __u32 vino_find_input_index(struct vino_channel_settings *vcs)
2813 switch (vcs->input) {
2825 switch (vcs->input) {
2834 switch (vcs->input) {
2860 static int vino_v4l2_enuminput(struct vino_channel_settings *vcs,
2867 input = vino_enum_input(vcs, index);
2889 static int vino_v4l2_g_input(struct vino_channel_settings *vcs,
2897 input = vcs->input;
2898 index = vino_find_input_index(vcs);
2912 static int vino_v4l2_s_input(struct vino_channel_settings *vcs,
2918 input = vino_enum_input(vcs, *i);
2922 return vino_set_input(vcs, input);
2925 static int vino_v4l2_enumstd(struct vino_channel_settings *vcs,
2931 data_norm = vino_enum_data_norm(vcs, index);
2955 static int vino_v4l2_querystd(struct vino_channel_settings *vcs,
2963 switch (vcs->input) {
2965 *std = vino_inputs[vcs->input].std;
2980 *std = vino_inputs[vcs->input].std;
2993 static int vino_v4l2_g_std(struct vino_channel_settings *vcs,
3000 *std = vino_data_norms[vcs->data_norm].std;
3001 dprintk("current standard = %d\n", vcs->data_norm);
3008 static int vino_v4l2_s_std(struct vino_channel_settings *vcs,
3016 if (!vino_is_input_owner(vcs)) {
3022 if ((*std) & vino_inputs[vcs->input].std) {
3028 if (vcs->input == VINO_INPUT_D1)
3034 ret = vino_set_data_norm(vcs, VINO_DATA_NORM_AUTO_EXT,
3037 ret = vino_set_data_norm(vcs, VINO_DATA_NORM_PAL,
3040 ret = vino_set_data_norm(vcs, VINO_DATA_NORM_NTSC,
3043 ret = vino_set_data_norm(vcs, VINO_DATA_NORM_SECAM,
3062 static int vino_v4l2_enum_fmt(struct vino_channel_settings *vcs,
3091 static int vino_v4l2_try_fmt(struct vino_channel_settings *vcs,
3105 memcpy(&tempvcs, vcs, sizeof(struct vino_channel_settings));
3146 static int vino_v4l2_g_fmt(struct vino_channel_settings *vcs,
3157 pf->width = (vcs->clipping.right - vcs->clipping.left) /
3158 vcs->decimation;
3159 pf->height = (vcs->clipping.bottom - vcs->clipping.top) /
3160 vcs->decimation;
3162 vino_data_formats[vcs->data_format].pixelformat;
3165 pf->bytesperline = vcs->line_size;
3166 pf->sizeimage = vcs->line_size *
3167 (vcs->clipping.bottom - vcs->clipping.top) /
3168 vcs->decimation;
3170 vino_data_formats[vcs->data_format].colorspace;
3185 static int vino_v4l2_s_fmt(struct vino_channel_settings *vcs,
3200 vcs->data_format = VINO_DATA_FMT_GREY;
3202 vino_data_formats[vcs->data_format].
3205 vcs->data_format = data_format;
3209 vino_set_scaling(vcs, pf->width, pf->height);
3212 vino_data_formats[vcs->data_format].description);
3214 pf->width = vcs->clipping.right - vcs->clipping.left;
3215 pf->height = vcs->clipping.bottom - vcs->clipping.top;
3218 pf->bytesperline = vcs->line_size;
3219 pf->sizeimage = vcs->line_size *
3220 (vcs->clipping.bottom - vcs->clipping.top) /
3221 vcs->decimation;
3223 vino_data_formats[vcs->data_format].colorspace;
3238 static int vino_v4l2_cropcap(struct vino_channel_settings *vcs,
3248 norm = &vino_data_norms[vcs->data_norm];
3270 static int vino_v4l2_g_crop(struct vino_channel_settings *vcs,
3279 c->c.left = vcs->clipping.left;
3280 c->c.top = vcs->clipping.top;
3281 c->c.width = vcs->clipping.right - vcs->clipping.left;
3282 c->c.height = vcs->clipping.bottom - vcs->clipping.top;
3294 static int vino_v4l2_s_crop(struct vino_channel_settings *vcs,
3303 vino_set_clipping(vcs, c->c.left, c->c.top,
3316 static int vino_v4l2_g_parm(struct vino_channel_settings *vcs,
3331 cp->timeperframe.denominator = vcs->fps;
3345 static int vino_v4l2_s_parm(struct vino_channel_settings *vcs,
3359 vino_set_default_framerate(vcs);
3361 vino_set_framerate(vcs, cp->timeperframe.denominator /
3378 static int vino_v4l2_reqbufs(struct vino_channel_settings *vcs,
3381 if (vcs->reading)
3394 if (vino_is_capturing(vcs)) {
3399 if (vino_queue_has_mapped_buffers(&vcs->fb_queue)) {
3403 vcs->streaming = 0;
3404 vino_queue_free(&vcs->fb_queue);
3405 vino_queue_init(&vcs->fb_queue, &rb->count);
3408 vcs->streaming = 0;
3409 vino_capture_stop(vcs);
3410 vino_queue_free(&vcs->fb_queue);
3422 static void vino_v4l2_get_buffer_status(struct vino_channel_settings *vcs,
3426 if (vino_queue_outgoing_contains(&vcs->fb_queue,
3430 } else if (vino_queue_incoming_contains(&vcs->fb_queue,
3445 b->memory = (vcs->fb_queue.type == VINO_MEMORY_MMAP) ?
3460 static int vino_v4l2_querybuf(struct vino_channel_settings *vcs,
3463 if (vcs->reading)
3471 if (b->index >= vino_queue_get_length(&vcs->fb_queue)) {
3477 fb = vino_queue_get_buffer(&vcs->fb_queue,
3484 vino_v4l2_get_buffer_status(vcs, fb, b);
3495 static int vino_v4l2_qbuf(struct vino_channel_settings *vcs,
3498 if (vcs->reading)
3512 fb = vino_capture_enqueue(vcs, b->index);
3516 vino_v4l2_get_buffer_status(vcs, fb, b);
3518 if (vcs->streaming) {
3519 ret = vino_capture_next(vcs, 1);
3533 static int vino_v4l2_dqbuf(struct vino_channel_settings *vcs,
3537 if (vcs->reading)
3548 err = vino_queue_get_incoming(&vcs->fb_queue, &incoming);
3553 err = vino_queue_get_outgoing(&vcs->fb_queue, &outgoing);
3572 err = vino_wait_for_frame(vcs);
3574 err = vino_wait_for_frame(vcs);
3579 // vino_capture_failed(vcs);
3585 fb = vino_queue_remove(&vcs->fb_queue, &b->index);
3591 err = vino_check_buffer(vcs, fb);
3593 vino_v4l2_get_buffer_status(vcs, fb, b);
3608 static int vino_v4l2_streamon(struct vino_channel_settings *vcs)
3612 if (vcs->reading)
3615 if (vcs->streaming)
3620 if (vino_queue_get_length(&vcs->fb_queue) < 1) {
3625 ret = vino_queue_get_incoming(&vcs->fb_queue, &incoming);
3631 vcs->streaming = 1;
3634 ret = vino_capture_next(vcs, 1);
3636 vcs->streaming = 0;
3646 static int vino_v4l2_streamoff(struct vino_channel_settings *vcs)
3648 if (vcs->reading)
3651 if (!vcs->streaming)
3654 vcs->streaming = 0;
3655 vino_capture_stop(vcs);
3660 static int vino_v4l2_queryctrl(struct vino_channel_settings *vcs,
3669 switch (vcs->input) {
3709 static int vino_v4l2_g_ctrl(struct vino_channel_settings *vcs,
3718 switch (vcs->input) {
3782 static int vino_v4l2_s_ctrl(struct vino_channel_settings *vcs,
3791 if (!vino_is_input_owner(vcs)) {
3796 switch (vcs->input) {
3876 struct vino_channel_settings *vcs = video_get_drvdata(dev);
3879 (vcs->channel == VINO_CHANNEL_A) ? 'A' : 'B');
3881 mutex_lock(&vcs->mutex);
3883 if (vcs->users) {
3889 ret = vino_acquire_input(vcs);
3895 vcs->users++;
3898 mutex_unlock(&vcs->mutex);
3908 struct vino_channel_settings *vcs = video_get_drvdata(dev);
3911 mutex_lock(&vcs->mutex);
3913 vcs->users--;
3915 if (!vcs->users) {
3916 vino_release_input(vcs);
3919 vino_capture_stop(vcs);
3920 vino_queue_free(&vcs->fb_queue);
3923 mutex_unlock(&vcs->mutex);
3952 struct vino_channel_settings *vcs = video_get_drvdata(dev);
3966 if (mutex_lock_interruptible(&vcs->mutex))
3969 if (vcs->reading) {
3988 length = vino_queue_get_length(&vcs->fb_queue);
3996 fb = vino_queue_get_buffer(&vcs->fb_queue, i);
4050 mutex_unlock(&vcs->mutex);
4058 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4067 if (vino_queue_get_outgoing(&vcs->fb_queue, &outgoing)) {
4075 poll_wait(file, &vcs->fb_queue.frame_wait_queue, pt);
4077 if (vino_queue_get_outgoing(&vcs->fb_queue, &outgoing)) {
4099 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4122 return vino_v4l2_enuminput(vcs, arg);
4125 return vino_v4l2_g_input(vcs, arg);
4128 return vino_v4l2_s_input(vcs, arg);
4131 return vino_v4l2_enumstd(vcs, arg);
4134 return vino_v4l2_querystd(vcs, arg);
4137 return vino_v4l2_g_std(vcs, arg);
4140 return vino_v4l2_s_std(vcs, arg);
4143 return vino_v4l2_enum_fmt(vcs, arg);
4146 return vino_v4l2_try_fmt(vcs, arg);
4149 return vino_v4l2_g_fmt(vcs, arg);
4152 return vino_v4l2_s_fmt(vcs, arg);
4155 return vino_v4l2_cropcap(vcs, arg);
4158 return vino_v4l2_g_crop(vcs, arg);
4161 return vino_v4l2_s_crop(vcs, arg);
4164 return vino_v4l2_g_parm(vcs, arg);
4167 return vino_v4l2_s_parm(vcs, arg);
4170 return vino_v4l2_reqbufs(vcs, arg);
4173 return vino_v4l2_querybuf(vcs, arg);
4176 return vino_v4l2_qbuf(vcs, arg);
4179 return vino_v4l2_dqbuf(vcs, arg, file->f_flags & O_NONBLOCK);
4182 return vino_v4l2_streamon(vcs);
4185 return vino_v4l2_streamoff(vcs);
4188 return vino_v4l2_queryctrl(vcs, arg);
4191 return vino_v4l2_g_ctrl(vcs, arg);
4194 return vino_v4l2_s_ctrl(vcs, arg);
4207 struct vino_channel_settings *vcs = video_get_drvdata(dev);
4210 if (mutex_lock_interruptible(&vcs->mutex))
4215 mutex_unlock(&vcs->mutex);
4384 static int vino_init_channel_settings(struct vino_channel_settings *vcs,
4387 vcs->channel = channel;
4388 vcs->input = VINO_INPUT_NONE;
4389 vcs->alpha = 0;
4390 vcs->users = 0;
4391 vcs->data_format = VINO_DATA_FMT_GREY;
4392 vcs->data_norm = VINO_DATA_NORM_NTSC;
4393 vcs->decimation = 1;
4394 vino_set_default_clipping(vcs);
4395 vino_set_default_framerate(vcs);
4397 vcs->capturing = 0;
4399 mutex_init(&vcs->mutex);
4400 spin_lock_init(&vcs->capture_lock);
4402 mutex_init(&vcs->fb_queue.queue_mutex);
4403 spin_lock_init(&vcs->fb_queue.queue_lock);
4404 init_waitqueue_head(&vcs->fb_queue.frame_wait_queue);
4406 vcs->v4l_device = video_device_alloc();
4407 if (!vcs->v4l_device) {
4413 memcpy(vcs->v4l_device, &v4l_device_template,
4415 strcpy(vcs->v4l_device->name, name);
4416 vcs->v4l_device->release = video_device_release;
4418 video_set_drvdata(vcs->v4l_device, vcs);