media: bcm2835-unicam: Forward input status from subdevice
authorJakub Vaněk <linuxtardis@gmail.com>
Wed, 7 Jul 2021 20:48:20 +0000 (22:48 +0200)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 8 Jul 2021 13:11:53 +0000 (14:11 +0100)
commit64f5ffe846252ea43731ee8959ad4c13c70b9101
treecfbc106eb394f2e964006d8e83b60cef4edd01b1
parent9f728444fd141da9f6cfd8b8f1a577b068870ea3
media: bcm2835-unicam: Forward input status from subdevice

The vidioc_enum_input() v4l2 ioctl is capable of returning
sensor/input status as well. This is used in current
GStreamer HEAD for signal detection [1].

bcm2835-unicam does handle this syscall, but it didn't ask
the subdevice driver about the input status. The input then
appeared as always present.

This commit adds the necessary query. There is a precedent for
this - the R-Car VIN V4L2 driver does a similar call [2].

[1]: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/blob/ce0be27caf69aa9d96b73bc2b50737451b6f6936/sys/v4l2/gstv4l2src.c#L553
[2]: https://github.com/raspberrypi/linux/blob/7fb9d006d3ff3baf2e205e0c85c4e4fd0a64fcd0/drivers/media/platform/rcar-vin/rcar-v4l2.c#L548

Signed-off-by: Jakub Vaněk <linuxtardis@gmail.com>
drivers/media/platform/bcm2835/bcm2835-unicam.c