diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-streams.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index a937e2ff9b6e..f0dd011a2ccc 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,17 @@ 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 | ||
678 | /* Known failure point for firmware, so check */ | ||
679 | if (ivtv_firmware_check(itv, "ivtv_setup_v4l2_decode_stream") < 0) | ||
680 | return -EIO; | ||
681 | |||
677 | return 0; | 682 | return 0; |
678 | } | 683 | } |
679 | 684 | ||
680 | int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) | 685 | int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) |
681 | { | 686 | { |
682 | struct ivtv *itv = s->itv; | 687 | struct ivtv *itv = s->itv; |
688 | int rc; | ||
683 | 689 | ||
684 | if (s->vdev == NULL) | 690 | if (s->vdev == NULL) |
685 | return -EINVAL; | 691 | return -EINVAL; |
@@ -689,7 +695,11 @@ int ivtv_start_v4l2_decode_stream(struct ivtv_stream *s, int gop_offset) | |||
689 | 695 | ||
690 | IVTV_DEBUG_INFO("Starting decode stream %s (gop_offset %d)\n", s->name, gop_offset); | 696 | IVTV_DEBUG_INFO("Starting decode stream %s (gop_offset %d)\n", s->name, gop_offset); |
691 | 697 | ||
692 | ivtv_setup_v4l2_decode_stream(s); | 698 | rc = ivtv_setup_v4l2_decode_stream(s); |
699 | if (rc < 0) { | ||
700 | clear_bit(IVTV_F_S_STREAMING, &s->s_flags); | ||
701 | return rc; | ||
702 | } | ||
693 | 703 | ||
694 | /* set dma size to 65536 bytes */ | 704 | /* set dma size to 65536 bytes */ |
695 | ivtv_vapi(itv, CX2341X_DEC_SET_DMA_BLOCK_SIZE, 1, 65536); | 705 | ivtv_vapi(itv, CX2341X_DEC_SET_DMA_BLOCK_SIZE, 1, 65536); |