On 05/09/2024 09:48, Tomi Valkeinen 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. 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.
Looking at patch 12, there's something wrong with the approach here. Are
you perhaps trying to define the CSI-2 VC with the streams?
If you have a camera with a single image stream coming from an internal
pad, you should have one hardcoded route, 1/0->0/0. The
.get_frame_desc() should return the CSI-2 VC (most likely always 0) and
DT (based on the format) for that stream.
If you also have embedded data, then you'd have another internal pad
(pad number 2), and the routing would be:
1/0->0/0
2/0->0/1
And here .get_frame_desc() would also handle the second stream, and most
likely for that stream the VC would also be 0.
The stream ID in the routing table is a software level concept, not
related to the VC.
Also, the internal pad should use the sensor's native format, not
UYVY8_1X16.
Tomi