mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
milan-avb: stream: wire Milan Section 5.4.5 stream counters, TX heartbeat, and MAX_TRANSIT_TIME plumbing
This commit is contained in:
parent
16d793db38
commit
9c0007173b
11 changed files with 487 additions and 46 deletions
|
|
@ -25,6 +25,8 @@
|
|||
#include "aecp-aem-cmds-resps/cmd-get-set-stream-info.h"
|
||||
#include "aecp-aem-cmds-resps/cmd-start-stop-streaming.h"
|
||||
#include "aecp-aem-cmds-resps/cmd-get-counters.h"
|
||||
#include "aecp-aem-cmds-resps/cmd-get-as-path.h"
|
||||
#include "aecp-aem-cmds-resps/cmd-get-set-max-transit-time.h"
|
||||
|
||||
|
||||
/* ACQUIRE_ENTITY */
|
||||
|
|
@ -175,7 +177,10 @@ static int handle_get_avb_info_common(struct aecp *aecp, int64_t now,
|
|||
i->gptp_grandmaster_id = avb_interface->clock_identity;
|
||||
i->propagation_delay = htonl(0);
|
||||
i->gptp_domain_number = avb_interface->domain_number;
|
||||
i->flags = 0;
|
||||
/* IEEE 1722.1-2021 Section 7.4.40: GPTP_ENABLED / GPTP_GRANDMASTER_SUPPORTED
|
||||
* stay 0 until the gPTP interface lands. SRP_ENABLED is on because
|
||||
* MSRP is running on every AVB interface this module manages. */
|
||||
i->flags = AVB_AEM_AVB_INFO_FLAG_SRP_ENABLED;
|
||||
i->msrp_mappings_count = htons(0);
|
||||
|
||||
return avb_server_send_packet(server, h->src, AVB_TSN_ETH, buf, size);
|
||||
|
|
@ -234,7 +239,35 @@ static const char * const cmd_names[] = {
|
|||
[AVB_AECP_AEM_CMD_GET_VIDEO_MAP] = "get-video-map",
|
||||
[AVB_AECP_AEM_CMD_ADD_VIDEO_MAPPINGS] = "add-video-mappings",
|
||||
[AVB_AECP_AEM_CMD_REMOVE_VIDEO_MAPPINGS] = "remove-video-mappings",
|
||||
[AVB_AECP_AEM_CMD_GET_SENSOR_MAP] = "get-sensor-map"
|
||||
[AVB_AECP_AEM_CMD_GET_SENSOR_MAP] = "get-sensor-map",
|
||||
[AVB_AECP_AEM_CMD_ADD_SENSOR_MAPPINGS] = "add-sensor-mappings",
|
||||
[AVB_AECP_AEM_CMD_REMOVE_SENSOR_MAPPINGS] = "remove-sensor-mappings",
|
||||
[AVB_AECP_AEM_CMD_START_OPERATION] = "start-operation",
|
||||
[AVB_AECP_AEM_CMD_ABORT_OPERATION] = "abort-operation",
|
||||
[AVB_AECP_AEM_CMD_OPERATION_STATUS] = "operation-status",
|
||||
[AVB_AECP_AEM_CMD_AUTH_ADD_KEY] = "auth-add-key",
|
||||
[AVB_AECP_AEM_CMD_AUTH_DELETE_KEY] = "auth-delete-key",
|
||||
[AVB_AECP_AEM_CMD_AUTH_GET_KEY_LIST] = "auth-get-key-list",
|
||||
[AVB_AECP_AEM_CMD_AUTH_GET_KEY] = "auth-get-key",
|
||||
[AVB_AECP_AEM_CMD_AUTH_ADD_KEY_TO_CHAIN] = "auth-add-key-to-chain",
|
||||
[AVB_AECP_AEM_CMD_AUTH_DELETE_KEY_FROM_CHAIN] = "auth-delete-key-from-chain",
|
||||
[AVB_AECP_AEM_CMD_AUTH_GET_KEYCHAIN_LIST] = "auth-get-keychain-list",
|
||||
[AVB_AECP_AEM_CMD_AUTH_GET_IDENTITY] = "auth-get-identity",
|
||||
[AVB_AECP_AEM_CMD_AUTH_ADD_TOKEN] = "auth-add-token",
|
||||
[AVB_AECP_AEM_CMD_AUTH_DELETE_TOKEN] = "auth-delete-token",
|
||||
[AVB_AECP_AEM_CMD_AUTHENTICATE] = "authenticate",
|
||||
[AVB_AECP_AEM_CMD_DEAUTHENTICATE] = "deauthenticate",
|
||||
[AVB_AECP_AEM_CMD_ENABLE_TRANSPORT_SECURITY] = "enable-transport-security",
|
||||
[AVB_AECP_AEM_CMD_DISABLE_TRANSPORT_SECURITY] = "disable-transport-security",
|
||||
[AVB_AECP_AEM_CMD_ENABLE_STREAM_ENCRYPTION] = "enable-stream-encryption",
|
||||
[AVB_AECP_AEM_CMD_DISABLE_STREAM_ENCRYPTION] = "disable-stream-encryption",
|
||||
[AVB_AECP_AEM_CMD_SET_MEMORY_OBJECT_LENGTH] = "set-memory-object-length",
|
||||
[AVB_AECP_AEM_CMD_GET_MEMORY_OBJECT_LENGTH] = "get-memory-object-length",
|
||||
[AVB_AECP_AEM_CMD_SET_STREAM_BACKUP] = "set-stream-backup",
|
||||
[AVB_AECP_AEM_CMD_GET_STREAM_BACKUP] = "get-stream-backup",
|
||||
[AVB_AECP_AEM_CMD_GET_DYNAMIC_INFO] = "get-dynamic-info",
|
||||
[AVB_AECP_AEM_CMD_SET_MAX_TRANSIT_TIME] = "set-max-transit-time",
|
||||
[AVB_AECP_AEM_CMD_GET_MAX_TRANSIT_TIME] = "get-max-transit-time",
|
||||
};
|
||||
|
||||
/* AEM_COMMAND */
|
||||
|
|
@ -387,6 +420,21 @@ static const struct cmd_info cmd_info_milan_v12[] = {
|
|||
/* Milan v1.2 Section 5.4.2.25 */
|
||||
AECP_AEM_HANDLE_CMD(AVB_AECP_AEM_CMD_GET_COUNTERS, true,
|
||||
handle_cmd_get_counters_milan_v12),
|
||||
|
||||
/* IEEE 1722.1-2021 Section 7.4.41. Returns NOT_IMPLEMENTED until gPTP lands;
|
||||
* dispatched here so the response payload size matches what the
|
||||
* controller computed (4-byte command echo). */
|
||||
AECP_AEM_HANDLE_CMD(AVB_AECP_AEM_CMD_GET_AS_PATH, true,
|
||||
handle_cmd_get_as_path_milan_v12),
|
||||
|
||||
/* SET_MAX_TRANSIT_TIME = 0x004C, GET_MAX_TRANSIT_TIME = 0x004D
|
||||
* (relocated from IEEE 1722.1-2021 originals 0x004B/0x004C because
|
||||
* 0x004B is GET_DYNAMIC_INFO in this stack). GET reflects the MSRP
|
||||
* accumulated_latency floor; SET rejects values below it. */
|
||||
AECP_AEM_HANDLE_CMD(AVB_AECP_AEM_CMD_SET_MAX_TRANSIT_TIME, false,
|
||||
handle_cmd_set_max_transit_time_milan_v12),
|
||||
AECP_AEM_HANDLE_CMD(AVB_AECP_AEM_CMD_GET_MAX_TRANSIT_TIME, true,
|
||||
handle_cmd_get_max_transit_time_milan_v12),
|
||||
};
|
||||
|
||||
static const struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue