mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-04-29 06:46:38 -04:00
module-avb: milan: es_builder: ensure that the created for the milan differently than for the legacy-avb
This commit is contained in:
parent
c7f4108eff
commit
b2e45b8151
3 changed files with 161 additions and 68 deletions
|
|
@ -2169,7 +2169,6 @@ int handle_probe_tx_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
struct avb_ethernet_header *h_reply = (struct avb_ethernet_header *)buf;
|
||||
struct avb_packet_acmp *reply = SPA_PTROFF(h_reply, sizeof(*h_reply), void);
|
||||
struct descriptor *desc;
|
||||
struct aecp_aem_stream_output_state_milan_v12 *stream_out_m;
|
||||
struct aecp_aem_stream_output_state *stream_out;
|
||||
int status = AVB_ACMP_STATUS_SUCCESS;
|
||||
|
||||
|
|
@ -2186,8 +2185,7 @@ int handle_probe_tx_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
goto done;
|
||||
}
|
||||
|
||||
stream_out_m = desc->ptr;
|
||||
stream_out = &stream_out_m->stream_out_sta;
|
||||
stream_out = desc->ptr;
|
||||
|
||||
if (!stream_output_on_this_iface(server, stream_out)) {
|
||||
status = AVB_ACMP_STATUS_INCOMPATIBLE_REQUEST;
|
||||
|
|
@ -2205,7 +2203,7 @@ int handle_probe_tx_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
}
|
||||
}
|
||||
|
||||
stream_out_m->acmp_sta.last_probe_rx_time = (int64_t)now;
|
||||
stream_out->last_probe_rx_time = (int64_t)now;
|
||||
|
||||
reply->stream_id = stream_out->common.tastream_attr.attr.talker.stream_id;
|
||||
memcpy(reply->stream_dest_mac, stream_out->common.stream.addr,
|
||||
|
|
@ -2230,7 +2228,7 @@ int handle_disconnect_tx_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
struct avb_ethernet_header *h_reply = (struct avb_ethernet_header *)buf;
|
||||
struct avb_packet_acmp *reply = SPA_PTROFF(h_reply, sizeof(*h_reply), void);
|
||||
struct descriptor *desc;
|
||||
struct aecp_aem_stream_output_state_milan_v12 *stream_out_m;
|
||||
struct aecp_aem_stream_output_state *stream_out;
|
||||
int status = AVB_ACMP_STATUS_SUCCESS;
|
||||
|
||||
if (be64toh(p->talker_guid) != server->entity_id)
|
||||
|
|
@ -2246,8 +2244,8 @@ int handle_disconnect_tx_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
goto done;
|
||||
}
|
||||
|
||||
stream_out_m = desc->ptr;
|
||||
if (!stream_output_on_this_iface(server, &stream_out_m->stream_out_sta))
|
||||
stream_out = desc->ptr;
|
||||
if (!stream_output_on_this_iface(server, stream_out))
|
||||
return 0;
|
||||
|
||||
reply->stream_id = 0;
|
||||
|
|
@ -2271,7 +2269,6 @@ int handle_get_tx_state_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
struct avb_ethernet_header *h_reply = (struct avb_ethernet_header *)buf;
|
||||
struct avb_packet_acmp *reply = SPA_PTROFF(h_reply, sizeof(*h_reply), void);
|
||||
struct descriptor *desc;
|
||||
struct aecp_aem_stream_output_state_milan_v12 *stream_out_m;
|
||||
struct aecp_aem_stream_output_state *stream_out;
|
||||
int status = AVB_ACMP_STATUS_SUCCESS;
|
||||
|
||||
|
|
@ -2288,8 +2285,7 @@ int handle_get_tx_state_command_milan_v12(struct acmp *acmp, uint64_t now,
|
|||
goto done;
|
||||
}
|
||||
|
||||
stream_out_m = desc->ptr;
|
||||
stream_out = &stream_out_m->stream_out_sta;
|
||||
stream_out = desc->ptr;
|
||||
|
||||
if (!stream_output_on_this_iface(server, stream_out))
|
||||
return 0;
|
||||
|
|
@ -2334,7 +2330,7 @@ void acmp_periodic_milan_v12(struct acmp *acmp, uint64_t now)
|
|||
* within 15 s and no listener attribute is registered. */
|
||||
for (uint16_t desc_index = 0; desc_index < UINT16_MAX; desc_index++) {
|
||||
struct descriptor *desc;
|
||||
struct aecp_aem_stream_output_state_milan_v12 *stream_out_m;
|
||||
struct aecp_aem_stream_output_state *stream_out;
|
||||
struct stream *stream;
|
||||
|
||||
desc = server_find_descriptor(acmp->server, AVB_AEM_DESC_STREAM_OUTPUT,
|
||||
|
|
@ -2342,19 +2338,18 @@ void acmp_periodic_milan_v12(struct acmp *acmp, uint64_t now)
|
|||
if (desc == NULL)
|
||||
break;
|
||||
|
||||
stream_out_m = desc->ptr;
|
||||
stream = &stream_out_m->stream_out_sta.common.stream;
|
||||
stream_out = desc->ptr;
|
||||
stream = &stream_out->common.stream;
|
||||
|
||||
if (stream_out_m->acmp_sta.last_probe_rx_time == 0)
|
||||
if (stream_out->last_probe_rx_time == 0)
|
||||
continue;
|
||||
if (stream->source == NULL)
|
||||
continue;
|
||||
if (now - (uint64_t)stream_out_m->acmp_sta.last_probe_rx_time
|
||||
> 15 * SPA_NSEC_PER_SEC) {
|
||||
if (now - (uint64_t)stream_out->last_probe_rx_time > 15 * SPA_NSEC_PER_SEC) {
|
||||
pw_log_info("talker stream %u: no probe in 15 s, deactivating SRP",
|
||||
desc_index);
|
||||
stream_deactivate(stream, now);
|
||||
stream_out_m->acmp_sta.last_probe_rx_time = 0;
|
||||
stream_out->last_probe_rx_time = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue