aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx18/cx18-fileops.c')
-rw-r--r--drivers/media/video/cx18/cx18-fileops.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c
index 0b3141db174b..1e537fe04a23 100644
--- a/drivers/media/video/cx18/cx18-fileops.c
+++ b/drivers/media/video/cx18/cx18-fileops.c
@@ -318,7 +318,7 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf,
318 size_t tot_written = 0; 318 size_t tot_written = 0;
319 int single_frame = 0; 319 int single_frame = 0;
320 320
321 if (atomic_read(&cx->capturing) == 0 && s->id == -1) { 321 if (atomic_read(&cx->ana_capturing) == 0 && s->id == -1) {
322 /* shouldn't happen */ 322 /* shouldn't happen */
323 CX18_DEBUG_WARN("Stream %s not initialized before read\n", 323 CX18_DEBUG_WARN("Stream %s not initialized before read\n",
324 s->name); 324 s->name);
@@ -361,7 +361,8 @@ static ssize_t cx18_read(struct cx18_stream *s, char __user *ubuf,
361 cx18_enqueue(s, buf, &s->q_free); 361 cx18_enqueue(s, buf, &s->q_free);
362 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5, 362 cx18_vapi(cx, CX18_CPU_DE_SET_MDL, 5,
363 s->handle, 363 s->handle,
364 (void *)&cx->scb->cpu_mdl[buf->id] - cx->enc_mem, 364 (void __iomem *)&cx->scb->cpu_mdl[buf->id] -
365 cx->enc_mem,
365 1, buf->id, s->buf_size); 366 1, buf->id, s->buf_size);
366 } else 367 } else
367 cx18_enqueue(s, buf, &s->q_io); 368 cx18_enqueue(s, buf, &s->q_io);
@@ -581,7 +582,7 @@ int cx18_v4l2_close(struct inode *inode, struct file *filp)
581 cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); 582 cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std);
582 /* Select correct audio input (i.e. TV tuner or Line in) */ 583 /* Select correct audio input (i.e. TV tuner or Line in) */
583 cx18_audio_set_io(cx); 584 cx18_audio_set_io(cx);
584 if (atomic_read(&cx->capturing) > 0) { 585 if (atomic_read(&cx->ana_capturing) > 0) {
585 /* Undo video mute */ 586 /* Undo video mute */
586 cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, 587 cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle,
587 cx->params.video_mute | 588 cx->params.video_mute |
@@ -627,7 +628,7 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp)
627 } 628 }
628 629
629 if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { 630 if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) {
630 if (atomic_read(&cx->capturing) > 0) { 631 if (atomic_read(&cx->ana_capturing) > 0) {
631 /* switching to radio while capture is 632 /* switching to radio while capture is
632 in progress is not polite */ 633 in progress is not polite */
633 cx18_release_stream(s); 634 cx18_release_stream(s);
@@ -694,7 +695,7 @@ int cx18_v4l2_open(struct inode *inode, struct file *filp)
694 695
695void cx18_mute(struct cx18 *cx) 696void cx18_mute(struct cx18 *cx)
696{ 697{
697 if (atomic_read(&cx->capturing)) 698 if (atomic_read(&cx->ana_capturing))
698 cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, 699 cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2,
699 cx18_find_handle(cx), 1); 700 cx18_find_handle(cx), 1);
700 CX18_DEBUG_INFO("Mute\n"); 701 CX18_DEBUG_INFO("Mute\n");
@@ -702,7 +703,7 @@ void cx18_mute(struct cx18 *cx)
702 703
703void cx18_unmute(struct cx18 *cx) 704void cx18_unmute(struct cx18 *cx)
704{ 705{
705 if (atomic_read(&cx->capturing)) { 706 if (atomic_read(&cx->ana_capturing)) {
706 cx18_msleep_timeout(100, 0); 707 cx18_msleep_timeout(100, 0);
707 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, 708 cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2,
708 cx18_find_handle(cx), 12); 709 cx18_find_handle(cx), 12);