media: i2c: tvp514x: Reported mbus format should be MEDIA_BUS_FMT_UYVY8_2X8
PATCH 1/1 media: i2c: tvp514x: Reported mbus format should be MEDIA_BUS_FMT_UYVY8_2X8
The advertised V4L2 pixel format and Media Bus code don't match. The current media bud code advertised is MEDIA_BUS_FMT_YUYV8_2X8 which does not reflect what the encoder actually outputs. This encoder generate MEDIA_BUS_FMT_UYVY8_2X8 so advertise as such.
Signed-off-by Benoit Parrot <[email protected]>
--- drivers/media/i2c/tvp514x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/media/i2c/tvp514x.c +3 -3
@@ -894,7 +894,7 @@ static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,if (index !=0 )return -EINVAL ; - code->code =MEDIA_BUS_FMT_YUYV8_2X8 ; + code->code =MEDIA_BUS_FMT_UYVY8_2X8 ;return 0 ; }
@@ -922,7 +922,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,return 0 ; } - format->format.code =MEDIA_BUS_FMT_YUYV8_2X8 ; + format->format.code =MEDIA_BUS_FMT_UYVY8_2X8 ; format->format.width = tvp514x_std_list[decoder->current_std].width; format->format.height = tvp514x_std_list[decoder->current_std].height; format->format.colorspace =V4L2_COLORSPACE_SMPTE170M ;
@@ -946,7 +946,7 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,struct tvp514x_decoder *decoder =to_decoder (sd);if (fmt->format.field !=V4L2_FIELD_INTERLACED || - fmt->format.code !=MEDIA_BUS_FMT_YUYV8_2X8 || + fmt->format.code !=MEDIA_BUS_FMT_UYVY8_2X8 || fmt->format.colorspace !=V4L2_COLORSPACE_SMPTE170M || fmt->format.width != tvp514x_std_list[decoder->current_std].width || fmt->format.height != tvp514x_std_list[decoder->current_std].height)
Signature · 1 line
2.9.0
Gentle ping!
Benoit
Benoit Parrot <[email protected]> wrote on Wed [2016-Sep-14 15:03:13 -0500]:
Quoted 44 lines
The advertised V4L2 pixel format and Media Bus code don't match. The current media bud code advertised is
MEDIA_BUS_FMT_YUYV8_2X8which does not reflect what the encoder actually outputs. This encoder generateMEDIA_BUS_FMT_UYVY8_2X8so advertise as such.Signed-off-by Benoit Parrot <[email protected]>--- drivers/media/i2c/tvp514x.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/media/i2c/tvp514x.c +3
-3@@ -894,7 +894,7 @@ static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,if (index !=0 )return -EINVAL ; - code->code =MEDIA_BUS_FMT_YUYV8_2X8 ; + code->code =MEDIA_BUS_FMT_UYVY8_2X8 ;return 0 ; }@@ -922,7 +922,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,return 0 ; } - format->format.code =MEDIA_BUS_FMT_YUYV8_2X8 ; + format->format.code =MEDIA_BUS_FMT_UYVY8_2X8 ; format->format.width = tvp514x_std_list[decoder->current_std].width; format->format.height = tvp514x_std_list[decoder->current_std].height; format->format.colorspace =V4L2_COLORSPACE_SMPTE170M ;@@ -946,7 +946,7 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,struct tvp514x_decoder *decoder =to_decoder (sd);if (fmt->format.field !=V4L2_FIELD_INTERLACED || - fmt->format.code !=MEDIA_BUS_FMT_YUYV8_2X8 || + fmt->format.code !=MEDIA_BUS_FMT_UYVY8_2X8 || fmt->format.colorspace !=V4L2_COLORSPACE_SMPTE170M || fmt->format.width != tvp514x_std_list[decoder->current_std].width || fmt->format.height != tvp514x_std_list[decoder->current_std].height)Signature · 1 line
2.9.0