diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-05-25 10:21:27 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-06-05 05:35:45 -0400 |
commit | 31554ae599a8ff6854bf8ecbedc1946c64854388 (patch) | |
tree | 33169d397f17069e72d72695f6adb59a4a25b210 /drivers/media/video/cx18/cx18-fileops.c | |
parent | be303e16dbd210077c697aaf2f0960413166b53d (diff) |
V4L/DVB (7931): cx18: allow for simultaneous digital and analog capture
The HVR-1600 can do both analog and digital capture at the same time.
Due to a driver bug -EBUSY would be returned when attempting to setup an
analog capture while a digital capture was already in progress.
Separate the two internally.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx18/cx18-fileops.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-fileops.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/cx18/cx18-fileops.c b/drivers/media/video/cx18/cx18-fileops.c index 0b3141db174b..d0d7888f269a 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); |
@@ -581,7 +581,7 @@ int cx18_v4l2_close(struct inode *inode, struct file *filp) | |||
581 | cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); | 581 | cx18_call_i2c_clients(cx, VIDIOC_S_STD, &cx->std); |
582 | /* Select correct audio input (i.e. TV tuner or Line in) */ | 582 | /* Select correct audio input (i.e. TV tuner or Line in) */ |
583 | cx18_audio_set_io(cx); | 583 | cx18_audio_set_io(cx); |
584 | if (atomic_read(&cx->capturing) > 0) { | 584 | if (atomic_read(&cx->ana_capturing) > 0) { |
585 | /* Undo video mute */ | 585 | /* Undo video mute */ |
586 | cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, | 586 | cx18_vapi(cx, CX18_CPU_SET_VIDEO_MUTE, 2, s->handle, |
587 | cx->params.video_mute | | 587 | cx->params.video_mute | |
@@ -627,7 +627,7 @@ static int cx18_serialized_open(struct cx18_stream *s, struct file *filp) | |||
627 | } | 627 | } |
628 | 628 | ||
629 | if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { | 629 | if (!test_bit(CX18_F_I_RADIO_USER, &cx->i_flags)) { |
630 | if (atomic_read(&cx->capturing) > 0) { | 630 | if (atomic_read(&cx->ana_capturing) > 0) { |
631 | /* switching to radio while capture is | 631 | /* switching to radio while capture is |
632 | in progress is not polite */ | 632 | in progress is not polite */ |
633 | cx18_release_stream(s); | 633 | cx18_release_stream(s); |
@@ -694,7 +694,7 @@ int cx18_v4l2_open(struct inode *inode, struct file *filp) | |||
694 | 694 | ||
695 | void cx18_mute(struct cx18 *cx) | 695 | void cx18_mute(struct cx18 *cx) |
696 | { | 696 | { |
697 | if (atomic_read(&cx->capturing)) | 697 | if (atomic_read(&cx->ana_capturing)) |
698 | cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, | 698 | cx18_vapi(cx, CX18_CPU_SET_AUDIO_MUTE, 2, |
699 | cx18_find_handle(cx), 1); | 699 | cx18_find_handle(cx), 1); |
700 | CX18_DEBUG_INFO("Mute\n"); | 700 | CX18_DEBUG_INFO("Mute\n"); |
@@ -702,7 +702,7 @@ void cx18_mute(struct cx18 *cx) | |||
702 | 702 | ||
703 | void cx18_unmute(struct cx18 *cx) | 703 | void cx18_unmute(struct cx18 *cx) |
704 | { | 704 | { |
705 | if (atomic_read(&cx->capturing)) { | 705 | if (atomic_read(&cx->ana_capturing)) { |
706 | cx18_msleep_timeout(100, 0); | 706 | cx18_msleep_timeout(100, 0); |
707 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, | 707 | cx18_vapi(cx, CX18_CPU_SET_MISC_PARAMETERS, 2, |
708 | cx18_find_handle(cx), 12); | 708 | cx18_find_handle(cx), 12); |