Repository navigation
media: bcm2835-unicam: Forward input status from subdevice - #4437
Conversation
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>
d269962 to
5fffd95
Compare
|
Tested on top of 1814148 with this patch applied. When I detach a HDMI source from TC358743, the status returned from kernel now reflects this:
GStreamer 1.18.4 with backported https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/870 also successfully reacts to this: |
|
Looks reasonable. The rcar_vin code traps -ENOIOCTLCMD and -ENODEV so as not to return those errors to userspace. -ENOIOCTLCMD will never happen as you've used Is -ENODEV possible? That would mean |
|
Looks good to me. |
|
Thank you! |
See: raspberrypi/linux#4433 kernel: media: bcm2835-unicam: Forward input status from subdevice See: raspberrypi/linux#4437 kernel: bcm2711_thermal: Don't clamp temperature at zero See: raspberrypi/linux#4438 kernel: vc4/drm: Pick up more upstream patches See: raspberrypi/linux#4441 kernel: Add overlay for Chipdip I2S master DAC See: raspberrypi/linux#4444
See: raspberrypi/linux#4433 kernel: media: bcm2835-unicam: Forward input status from subdevice See: raspberrypi/linux#4437 kernel: bcm2711_thermal: Don't clamp temperature at zero See: raspberrypi/linux#4438 kernel: vc4/drm: Pick up more upstream patches See: raspberrypi/linux#4441 kernel: Add overlay for Chipdip I2S master DAC See: raspberrypi/linux#4444
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.
Signed-off-by: Jakub Vaněk linuxtardis@gmail.com