diff options
-rw-r--r-- | drivers/media/video/ivtv/ivtv-streams.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-streams.c b/drivers/media/video/ivtv/ivtv-streams.c index de4288cc1889..5441dc205966 100644 --- a/drivers/media/video/ivtv/ivtv-streams.c +++ b/drivers/media/video/ivtv/ivtv-streams.c | |||
@@ -618,12 +618,17 @@ static int ivtv_setup_v4l2_decode_stream(struct ivtv_stream *s) | |||
618 | struct ivtv *itv = s->itv; | 618 | struct ivtv *itv = s->itv; |
619 | struct cx2341x_mpeg_params *p = &itv->params; | 619 | struct cx2341x_mpeg_params *p = &itv->params; |
620 | int datatype; | 620 | int datatype; |
621 | u16 width; | ||
622 | u16 height; | ||
621 | 623 | ||
622 | if (s->vdev == NULL) | 624 | if (s->vdev == NULL) |
623 | return -EINVAL; | 625 | return -EINVAL; |
624 | 626 | ||
625 | IVTV_DEBUG_INFO("Setting some initial decoder settings\n"); | 627 | IVTV_DEBUG_INFO("Setting some initial decoder settings\n"); |
626 | 628 | ||
629 | width = p->width; | ||
630 | height = p->height; | ||
631 | |||
627 | /* set audio mode to left/stereo for dual/stereo mode. */ | 632 | /* set audio mode to left/stereo for dual/stereo mode. */ |
628 | ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, itv->audio_bilingual_mode, itv->audio_stereo_mode); | 633 | ivtv_vapi(itv, CX2341X_DEC_SET_AUDIO_MODE, 2, itv->audio_bilingual_mode, itv->audio_stereo_mode); |
629 | 634 | ||
@@ -646,7 +651,14 @@ static int ivtv_setup_v4l2_decode_stream(struct ivtv_stream *s) | |||
646 | 2 = yuv_from_host */ | 651 | 2 = yuv_from_host */ |
647 | switch (s->type) { | 652 | switch (s->type) { |
648 | case IVTV_DEC_STREAM_TYPE_YUV: | 653 | case IVTV_DEC_STREAM_TYPE_YUV: |
649 | datatype = itv->output_mode == OUT_PASSTHROUGH ? 1 : 2; | 654 | if (itv->output_mode == OUT_PASSTHROUGH) { |
655 | datatype = 1; | ||
656 | } else { | ||
657 | /* Fake size to avoid switching video standard */ | ||
658 | datatype = 2; | ||
659 | width = 720; | ||
660 | height = itv->is_out_50hz ? 576 : 480; | ||
661 | } | ||
650 | IVTV_DEBUG_INFO("Setup DEC YUV Stream data[0] = %d\n", datatype); | 662 | IVTV_DEBUG_INFO("Setup DEC YUV Stream data[0] = %d\n", datatype); |
651 | break; | 663 | break; |
652 | case IVTV_DEC_STREAM_TYPE_MPG: | 664 | case IVTV_DEC_STREAM_TYPE_MPG: |
@@ -655,7 +667,7 @@ static int ivtv_setup_v4l2_decode_stream(struct ivtv_stream *s) | |||
655 | break; | 667 | break; |
656 | } | 668 | } |
657 | if (ivtv_vapi(itv, CX2341X_DEC_SET_DECODER_SOURCE, 4, datatype, | 669 | if (ivtv_vapi(itv, CX2341X_DEC_SET_DECODER_SOURCE, 4, datatype, |
658 | p->width, p->height, p->audio_properties)) { | 670 | width, height, p->audio_properties)) { |
659 | IVTV_DEBUG_WARN("Couldn't initialize decoder source\n"); | 671 | IVTV_DEBUG_WARN("Couldn't initialize decoder source\n"); |
660 | } | 672 | } |
661 | return 0; | 673 | return 0; |