Re: [RFC PATCH 00/12] media: ov5645: Add support for streams

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomi,

Thanks for the feedback.

On Thu, Sep 5, 2024 at 7:48 AM Tomi Valkeinen
<tomi.valkeinen@xxxxxxxxxxxxxxxx> wrote:
>
> On 05/09/2024 00:07, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@xxxxxxxxxxxxxx>
> >
> > Hi All,
> >
> > This patch series aims to add the below features,
> > - Support subdev active state
> > - Support for streams
> > - Support for virtual channel
> > - Code cleanup
> >
> > Sending this is as an RFC, I've done limited testing and Im seeing issue
> > when route is updated and wanted some feedback on the implementation.
> >
> > When route is updated for the sensor with below command, and when start
> > streaming I get "Dangling sink streams: mask 0x1" error. Should the
> > corresponding bridge also need to support routes to fix this? or is it
> > something missing Ive missed in the current implementation.
> >
> > $ media-ctl -R "'ov5645 0-003c' [1/0->0/1[1]]"
> >
> > Output after route update:
> > - entity 4: ov5645 0-003c (2 pads, 1 link, 1 route)
> >              type V4L2 subdev subtype Sensor flags 0
> >              device node name /dev/v4l-subdev1
> >          routes:
> >                  1/0 -> 0/1 [ACTIVE]
> >          pad0: SOURCE
> >                  [stream:1 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb
> >                   crop:(0,0)/1920x1080]
> >                  -> "csi-10830400.csi2":0 [ENABLED,IMMUTABLE]
> >          pad1: SINK,0x8
> >                  [stream:0 fmt:UYVY8_1X16/2592x1944 field:none colorspace:srgb
> >                   crop:(0,0)/1920x1080]
>
> I think you actually want 1/0->0/0 routing.
PAD1 -> Internal image pad Sink
PAD0 -> Source

The above combination works were pad1/stream0 ---> pad0/stream0

> The error says that the sink
> side device has routing which does not have a stream at stream ID 1, or
> no routing support at all, which implies a single stream at stream ID 0.
>
To support virtual channels I have the below routes,

    struct v4l2_subdev_route routes[OV5645_ROUTES_MAX] = {
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 0,
            .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 1,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 2,
        },
        {
            .sink_pad = OV5645_PAD_IMAGE,
            .sink_stream = 0,
            .source_pad = OV5645_PAD_SOURCE,
            .source_stream = 3,
        },
    };

Where the image pad sink stream0 can connect source stream0/1/2/3

So to switch source stream1 I use the below:
$ media-ctl -R "'ov5645 0-003c' [1/0->0/1[1]]"

With the above I connect sink pad1 stream0 -> source pad0 stream1,
(unless Ive misunderstood the connection graph).

Cheers,
Prabhakar





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux