[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5179d038-4a8a-610b-f5f4-0190d4c1dbad@gmail.com>
Date: Fri, 23 Dec 2016 20:53:44 +0200
From: Ivaylo Dimitrov <ivo.g.dimitrov.75@...il.com>
To: Pavel Machek <pavel@....cz>
Cc: Sebastian Reichel <sre@...nel.org>,
Sakari Ailus <sakari.ailus@....fi>, pali.rohar@...il.com,
linux-media@...r.kernel.org, galak@...eaurora.org,
mchehab@....samsung.com, linux-kernel@...r.kernel.org
Subject: Re: [RFC/PATCH] media: Add video bus switch
Hi,
On 23.12.2016 13:42, Pavel Machek wrote:
> Hi!
>
>>> [...]
>>>
>>> static int isp_subdev_notifier_bound(struct v4l2_async_notifier *async,
>>> diff --git a/drivers/media/platform/video-bus-switch.c b/drivers/media/platform/video-bus-switch.c
>>> index 1a5d944..3a2d442 100644
>>> --- a/drivers/media/platform/video-bus-switch.c
>>> +++ b/drivers/media/platform/video-bus-switch.c
>>> @@ -247,12 +247,21 @@ static int vbs_s_stream(struct v4l2_subdev *sd, int enable)
>>> {
>>> struct v4l2_subdev *subdev = vbs_get_remote_subdev(sd);
>>>
>>> + /* FIXME: we need to set the GPIO here */
>>> +
>>
>> The gpio is set when the pad is selected, so no need to do it again.
>> The gpio selection actually works with your branch (assuming its
>> based on Ivo's).
>
> Yes. I did not notice... is there actually some interface to select
> the camera from userland?
>
When you construct the pipeline, you enable the port you need in vbs, so
the camera is selected.
I used (similar to)this by the time I played with cameras:
front:
export LD_LIBRARY_PATH=./
./media-ctl -r
./media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]'
./media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]'
./media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]'
./media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]'
./media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]'
./media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]'
./media-ctl -V '"vs6555 pixel array 2-0010":0 [SGRBG10/648x488
(0,0)/648x488 (0,0)/648x488]'
./media-ctl -V '"vs6555 binner 2-0010":1 [SGRBG10/648x488 (0,0)/648x488
(0,0)/648x488]'
./media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 648x488]'
./media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 648x488]'
./media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 648x488]'
./media-ctl -V '"OMAP3 ISP preview":1 [UYVY 648x488]'
./media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 656x488]'
mplayer -tv
driver=v4l2:width=656:height=488:outfmt=uyvy:device=/dev/video6 -vo xv
-vf screenshot tv://
back:
export LD_LIBRARY_PATH=./
./media-ctl -r
./media-ctl -l '"et8ek8 3-003e":0 -> "video-bus-switch":1 [1]'
./media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]'
./media-ctl -l '"OMAP3 ISP CCP2":1 -> "OMAP3 ISP CCDC":0 [1]'
./media-ctl -l '"OMAP3 ISP CCDC":2 -> "OMAP3 ISP preview":0 [1]'
./media-ctl -l '"OMAP3 ISP preview":1 -> "OMAP3 ISP resizer":0 [1]'
./media-ctl -l '"OMAP3 ISP resizer":1 -> "OMAP3 ISP resizer output":0 [1]'
./media-ctl -V '"et8ek8 3-003e":0 [SGRBG10 864x656]'
./media-ctl -V '"OMAP3 ISP CCP2":0 [SGRBG10 864x656]'
./media-ctl -V '"OMAP3 ISP CCP2":1 [SGRBG10 864x656]'
./media-ctl -V '"OMAP3 ISP CCDC":2 [SGRBG10 864x656]'
./media-ctl -V '"OMAP3 ISP preview":1 [UYVY 864x656]'
./media-ctl -V '"OMAP3 ISP resizer":1 [UYVY 800x480]'
mplayer -tv
driver=v4l2:width=800:height=480:outfmt=uyvy:device=/dev/video6 -vo xv
-vf screenshot tv://
or IOW:
./media-ctl -l '"vs6555 binner 2-0010":1 -> "video-bus-switch":2 [1]'
switches GPIO to use front camera
and
./media-ctl -l '"video-bus-switch":0 -> "OMAP3 ISP CCP2":0 [1]'
for back camera
Ivo
Powered by blists - more mailing lists