From: Greg Kroah-Hartman Date: Sun, 11 Nov 2018 16:24:16 +0000 (-0800) Subject: 3.18-stable patches X-Git-Tag: v4.19.2~41 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e122d00baca8d33e693211e8bc276a1a6a69ad2f;p=thirdparty%2Fkernel%2Fstable-queue.git 3.18-stable patches added patches: media-em28xx-fix-input-name-for-terratec-av-350.patch media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch media-em28xx-use-a-default-format-if-try_fmt-fails.patch --- diff --git a/queue-3.18/media-em28xx-fix-input-name-for-terratec-av-350.patch b/queue-3.18/media-em28xx-fix-input-name-for-terratec-av-350.patch new file mode 100644 index 00000000000..39967f769cb --- /dev/null +++ b/queue-3.18/media-em28xx-fix-input-name-for-terratec-av-350.patch @@ -0,0 +1,39 @@ +From 15644bfa195bd166d0a5ed76ae2d587f719c3dac Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Fri, 14 Sep 2018 00:20:21 -0400 +Subject: media: em28xx: fix input name for Terratec AV 350 + +From: Mauro Carvalho Chehab + +commit 15644bfa195bd166d0a5ed76ae2d587f719c3dac upstream. + +Instead of using a register value, use an AMUX name, as otherwise +VIDIOC_G_AUDIO would fail. + +Cc: stable@vger.kernel.org +Fixes: 766ed64de554 ("V4L/DVB (11827): Add support for Terratec Grabster AV350") +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/em28xx/em28xx-cards.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/media/usb/em28xx/em28xx-cards.c ++++ b/drivers/media/usb/em28xx/em28xx-cards.c +@@ -2001,13 +2001,13 @@ struct em28xx_board em28xx_boards[] = { + .input = { { + .type = EM28XX_VMUX_COMPOSITE1, + .vmux = TVP5150_COMPOSITE1, +- .amux = EM28XX_AUDIO_SRC_LINE, ++ .amux = EM28XX_AMUX_LINE_IN, + .gpio = terratec_av350_unmute_gpio, + + }, { + .type = EM28XX_VMUX_SVIDEO, + .vmux = TVP5150_SVIDEO, +- .amux = EM28XX_AUDIO_SRC_LINE, ++ .amux = EM28XX_AMUX_LINE_IN, + .gpio = terratec_av350_unmute_gpio, + } }, + }, diff --git a/queue-3.18/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch b/queue-3.18/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch new file mode 100644 index 00000000000..f9ee130b6ab --- /dev/null +++ b/queue-3.18/media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch @@ -0,0 +1,41 @@ +From afeaade90db4c5dab93f326d9582be1d5954a198 Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 13 Sep 2018 22:46:29 -0400 +Subject: media: em28xx: make v4l2-compliance happier by starting sequence on zero + +From: Mauro Carvalho Chehab + +commit afeaade90db4c5dab93f326d9582be1d5954a198 upstream. + +The v4l2-compliance tool complains if a video doesn't start +with a zero sequence number. + +While this shouldn't cause any real problem for apps, let's +make it happier, in order to better check the v4l2-compliance +differences before and after patchsets. + +This is actually an old issue. It is there since at least its +videobuf2 conversion, e. g. changeset 3829fadc461 ("[media] +em28xx: convert to videobuf2"), if VB1 wouldn't suffer from +the same issue. + +Cc: stable@vger.kernel.org +Fixes: d3829fadc461 ("[media] em28xx: convert to videobuf2") +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/em28xx/em28xx-video.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/media/usb/em28xx/em28xx-video.c ++++ b/drivers/media/usb/em28xx/em28xx-video.c +@@ -1141,6 +1141,8 @@ static void em28xx_ctrl_notify(struct v4 + { + struct em28xx *dev = priv; + ++ dev->v4l2->field_count = 0; ++ + /* + * In the case of non-AC97 volume controls, we still need + * to do some setups at em28xx, in order to mute/unmute diff --git a/queue-3.18/media-em28xx-use-a-default-format-if-try_fmt-fails.patch b/queue-3.18/media-em28xx-use-a-default-format-if-try_fmt-fails.patch new file mode 100644 index 00000000000..b2d5cc2cb85 --- /dev/null +++ b/queue-3.18/media-em28xx-use-a-default-format-if-try_fmt-fails.patch @@ -0,0 +1,40 @@ +From f823ce2a1202d47110a7ef86b65839f0be8adc38 Mon Sep 17 00:00:00 2001 +From: Mauro Carvalho Chehab +Date: Thu, 13 Sep 2018 23:22:40 -0400 +Subject: media: em28xx: use a default format if TRY_FMT fails + +From: Mauro Carvalho Chehab + +commit f823ce2a1202d47110a7ef86b65839f0be8adc38 upstream. + +Follow the V4L2 spec, as warned by v4l2-compliance: + + warn: v4l2-test-formats.cpp(732): TRY_FMT cannot handle an invalid pixelformat. + warn: v4l2-test-formats.cpp(733): This may or may not be a problem. For more information see: + +warn: v4l2-test-formats.cpp(734): http://www.mail-archive.com/linux-media@vger.kernel.org/msg56550.html + +Cc: stable@vger.kernel.org +Fixes: bddcf63313c6 ("V4L/DVB (9927): em28xx: use a more standard way to specify video formats") +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/usb/em28xx/em28xx-video.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/media/usb/em28xx/em28xx-video.c ++++ b/drivers/media/usb/em28xx/em28xx-video.c +@@ -1280,9 +1280,9 @@ static int vidioc_try_fmt_vid_cap(struct + + fmt = format_by_fourcc(f->fmt.pix.pixelformat); + if (!fmt) { +- em28xx_videodbg("Fourcc format (%08x) invalid.\n", +- f->fmt.pix.pixelformat); +- return -EINVAL; ++ fmt = &format[0]; ++ em28xx_videodbg("Fourcc format (%08x) invalid. Using default (%08x).\n", ++ f->fmt.pix.pixelformat, fmt->fourcc); + } + + if (dev->board.is_em2800) { diff --git a/queue-3.18/series b/queue-3.18/series index 62d48f99fff..9a3605057bf 100644 --- a/queue-3.18/series +++ b/queue-3.18/series @@ -50,3 +50,6 @@ dm-ioctl-harden-copy_params-s-copy_from_user-from-malicious-users.patch mips-octeon-fix-out-of-bounds-array-access-on-cn68xx.patch tc-set-dma-masks-for-devices.patch kgdboc-passing-ekgdboc-to-command-line-causes-panic.patch +media-em28xx-use-a-default-format-if-try_fmt-fails.patch +media-em28xx-fix-input-name-for-terratec-av-350.patch +media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch