From patchwork Wed Apr 24 12:22:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 792204 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D34115B123 for ; Wed, 24 Apr 2024 12:23:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713961386; cv=none; b=OrUmYZKfj7x23n6eAxgl/bnQtlvFabdHP7+LM9goowHnNEtHKawcs9F3RXLjqqHyM4/6QkGjcPUlfm3B7TWi++be4KdKflgBqXtMEUv9ptx6tj/5GqVaJlTmsHDXOfmxsIQKp/m4aN3hhcSYrIux8NdOz4WwzaMNl/nmpWLVd74= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713961386; c=relaxed/simple; bh=pRwJscMya3JPhxp+8sB/bjfUVAHf9JO4ZKhVJdYI7Co=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KDO3UZtwHts6GUw4rzSmluTGcOafjodBJB5HvPm+sCwFFz7WnO2AghOLF0nC/6HxS1oQFKuLMpvQlXdwp5Ra/7tu8hhOBtGl4MEt/oW4wMcV0G6TJYkO1p2zmeLAhqX6c7P03uj7GGf+YCvioEUGQxtM5BB9qmwuQZEuqW9hV2I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MGNKTT9q; arc=none smtp.client-ip=192.198.163.14 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MGNKTT9q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1713961385; x=1745497385; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pRwJscMya3JPhxp+8sB/bjfUVAHf9JO4ZKhVJdYI7Co=; b=MGNKTT9q2du7Q1f5ocw5t7lJXohbhnvwyijS4uN6Q0WYIWLnW8NvpVUL QxH0gwTULJIUaKVIR2186htmf51EVjkiocF/SrLVs5YKsf4n+oTOVZ1v6 7FMiRo6IIqFKcJGkc7F6JxB1N5z/qAnctJj0IaLfxgxMzLa1o5nJtOG/J S+F85brYHvvjs46Pr7fMM2Jo+Ojw1u6HjrOboIpzgE8omT21OwlSKHw3+ eruY3AnL7lwxaJGqWKd/RaYKUOGPyOvl90teumk5w0OCDBT+8eqj9GIp5 10tU4dnKaMnL/6c2SkVwXFnllEbi0zntwwyM4H0CAlCdjDqYtL98q0gCM A==; X-CSE-ConnectionGUID: UV1nQl4jQRWEx29eZPk96A== X-CSE-MsgGUID: 24ky8SFEQyOyUToQXfDPRQ== X-IronPort-AV: E=McAfee;i="6600,9927,11053"; a="9809665" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9809665" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 05:22:59 -0700 X-CSE-ConnectionGUID: oHgF5nSKRGytMroEyH1+vw== X-CSE-MsgGUID: 3DC0xuCPT9CsdCbBcrcX2A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="29512838" Received: from turnipsi.fi.intel.com (HELO kekkonen.fi.intel.com) ([10.237.72.44]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 05:22:57 -0700 Received: from svinhufvud.ger.corp.intel.com (localhost [IPv6:::1]) by kekkonen.fi.intel.com (Postfix) with ESMTP id A648311FA8A; Wed, 24 Apr 2024 15:22:53 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Laurent Pinchart , tomi.valkeinen@ideasonboard.com, bingbu.cao@intel.com, hongju.wang@intel.com, hverkuil@xs4all.nl, Andrey Konovalov , Jacopo Mondi , Dmitry Perchanov , "Ng, Khai Wen" , Alain Volmat Subject: [PATCH 09/14] media: Documentation: Document S_ROUTING behaviour Date: Wed, 24 Apr 2024 15:22:32 +0300 Message-Id: <20240424122237.875000-10-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240424122237.875000-1-sakari.ailus@linux.intel.com> References: <20240424122237.875000-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Document S_ROUTING behaviour for different devices. Generally in devices that produce streams the streams are static and some can be enabled and disabled, whereas in devices that just transport them or write them to memory, more configurability is allowed. Document this. Signed-off-by: Sakari Ailus Reviewed-by: Julien Massot --- .../userspace-api/media/v4l/dev-subdev.rst | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/dev-subdev.rst b/Documentation/userspace-api/media/v4l/dev-subdev.rst index b76e02e54512..0f9eda3187f3 100644 --- a/Documentation/userspace-api/media/v4l/dev-subdev.rst +++ b/Documentation/userspace-api/media/v4l/dev-subdev.rst @@ -572,6 +572,29 @@ Any configurations of a stream within a pad, such as format or selections, are independent of similar configurations on other streams. This is subject to change in the future. +Device types and routing setup +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Different kinds of sub-devices have differing behaviour for route activation, +depending on the hardware. In all cases, however, only routes that have the +``V4L2_SUBDEV_STREAM_FL_ACTIVE`` flag set are active. + +Devices generating the streams may allow enabling and disabling some of the +routes or have a fixed routing configuration. If the routes can be disabled, not +declaring the routes (or declaring them without +``VIDIOC_SUBDEV_STREAM_FL_ACTIVE`` flag set) in ``VIDIOC_SUBDEV_S_ROUTING`` will +disable the routes. ``VIDIOC_SUBDEV_S_ROUTING`` will still return such routes +back to the user in the routes array, with the ``V4L2_SUBDEV_STREAM_FL_ACTIVE`` +flag unset. + +Devices transporting the streams almost always have more configurability with +respect to routing. Typically any route between the sub-device's sink and source +pads is possible, and multiple routes (usually up to certain limited number) may +be active simultaneously. For such devices, no routes are created by the driver +and user-created routes are fully replaced when ``VIDIOC_SUBDEV_S_ROUTING`` is +called on the sub-device. Such newly created routes have the device's default +configuration for format and selection rectangles. + Configuring streams ^^^^^^^^^^^^^^^^^^^