]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: vivid: Add 'Is Connected To' menu controls
authorDorcas Anono Litunya <anonolitunya@gmail.com>
Mon, 24 Jun 2024 09:53:02 +0000 (12:53 +0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 28 Jun 2024 06:00:29 +0000 (08:00 +0200)
commitd7c969f37515d78dc1a026d12b94b90e319a5a61
treea3ae7f1b960d608061dd4533c578ad649525742c
parent3d023ff2ef03960a4072585c0a59e7c45d608487
media: vivid: Add 'Is Connected To' menu controls

The video loopback functionality in vivid is very crude. What we really
want is to be able to emulate connecting an HDMI or S-Video input to
an HDMI or S-Video output, and the input and output can be in different
vivid instances.

Effectively this emulates what happens when you physically connect an
HDMI or S-Video cable between two devices.

In particular, this makes prototyping with vivid much more realistic.

This patch creates a menu control for each HDMI or S-Video input. The
menu control starts with "Test Pattern Generator" and "None" (i.e.
disconnected). After that up to 62 HDMI or S-Video outputs are listed
that you can connect the input to.

If there are more than 62 HDMI or S-Video outputs, then those will not
be included in the menu (currently menucontrols have max 64 entries).

If an input is connected to an output, then all other 'Connected To'
controls are updated to exclude that output to avoid having multiple
inputs connected to the same output.

Signed-off-by: Dorcas Anono Litunya <anonolitunya@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: use u8 in loops in vivid_create_controls() to avoid truncate warning]
drivers/media/test-drivers/vivid/vivid-core.c
drivers/media/test-drivers/vivid/vivid-core.h
drivers/media/test-drivers/vivid/vivid-ctrls.c