diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index a937e2ff9b6e..55df4190c28d 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include "ivtv-yuv.h" | 42 | #include "ivtv-yuv.h" |
43 | #include "ivtv-cards.h" | 43 | #include "ivtv-cards.h" |
44 | #include "ivtv-streams.h" | 44 | #include "ivtv-streams.h" |
45 | #include "ivtv-firmware.h" | ||
45 | #include <media/v4l2-event.h> | 46 | #include <media/v4l2-event.h> |
46 | 47 | ||
47 | static const struct v4l2_file_operations ivtv_v4l2_enc_fops = { | 48 | static const struct v4l2_file_operations ivtv_v4l2_enc_fops = { |
@@ -674,12 +675,14 @@ static int ivtv_setup_v4l2_decode_stream(struct ivtv_stream *s) | |||
674 | /* Decoder sometimes dies here, so wait a moment */ | 675 | /* Decoder sometimes dies here, so wait a moment */ |
675 | ivtv_msleep_timeout(10, 0); | 676 | ivtv_msleep_timeout(10, 0); |
676 | 677 | ||
677 | return 0; | 678 | /* Known failure point for firmware, so check */ |
679 | return ivtv_firmware_check(itv, "ivtv_setup_v4l2_decode_stream"); | ||
678 | } | 680 | } |
679 | 681 | ||
680 | int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) | 682 | int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) |
681 | { | 683 | { |
682 | struct ivtv *itv = s->itv; | 684 | struct ivtv *itv = s->itv; |
685 | int rc; | ||
683 | 686 | ||
684 | if (s->vdev == NULL) | 687 | if (s->vdev == NULL) |
685 | return -EINVAL; | 688 | return -EINVAL; |
@@ -689,7 +692,11 @@ int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) | |||
689 | 692 | ||
690 | IVTV_DEBUG_INFO("Starting decode stream %s (gop_offset %d)\n", s->name, gop_offset); | 693 | IVTV_DEBUG_INFO("Starting decode stream %s (gop_offset %d)\n", s->name, gop_offset); |
691 | 694 | ||
692 | ivtv_setup_v4l2_decode_stream(s); | 695 | rc = ivtv_setup_v4l2_decode_stream(s); |
696 | if (rc < 0) { | ||
697 | clear_bit(IVTV_F_S_STREAMING, &s->s_flags); | ||
698 | return rc; | ||
699 | } | ||
693 | 700 | ||
694 | /* set dma size to 65536 bytes */ | 701 | /* set dma size to 65536 bytes */ |
695 | ivtv_vapi(itv, CX2341X_DEC_SET_DMA_BLOCK_SIZE, 1, 65536); | 702 | ivtv_vapi(itv, CX2341X_DEC_SET_DMA_BLOCK_SIZE, 1, 65536); |