milan-avb: demote periodic MSRP/gPTP/stream dumps from info to debug

This commit is contained in:
hackerman-kl 2026-06-09 14:16:11 +00:00 committed by Alexandre Malki
parent 2eb7fc4588
commit 8966d62606
3 changed files with 26 additions and 26 deletions

View file

@ -339,7 +339,7 @@ static int send_management_request(struct gptp *gptp, uint16_t management_id,
gptp->req_sequence_id = seq; gptp->req_sequence_id = seq;
gptp->req_management_id = management_id; gptp->req_management_id = management_id;
gptp->req_sent_ns = now_ns; gptp->req_sent_ns = now_ns;
pw_log_info("PTP management request sent: id=%04x seq=%u", pw_log_debug("PTP management request sent: id=%04x seq=%u",
management_id, seq); management_id, seq);
return 0; return 0;
} }
@ -542,7 +542,7 @@ static void on_ptp_mgmt_data(void *data, int fd, uint32_t mask)
return; return;
} }
pw_log_info("PTP management socket has data (mask=%#x)", mask); pw_log_debug("PTP management socket has data (mask=%#x)", mask);
for (;;) { for (;;) {
ret = recv(fd, buf, sizeof(buf), 0); ret = recv(fd, buf, sizeof(buf), 0);
@ -553,7 +553,7 @@ static void on_ptp_mgmt_data(void *data, int fd, uint32_t mask)
pw_log_warn("Failed to receive PTP management response: %m"); pw_log_warn("Failed to receive PTP management response: %m");
return; return;
} }
pw_log_info("PTP management received %zd bytes", ret); pw_log_debug("PTP management received %zd bytes", ret);
if (ret < (ssize_t)sizeof(struct ptp_management_msg)) { if (ret < (ssize_t)sizeof(struct ptp_management_msg)) {
pw_log_warn("Received undersized PTP management response: %zd bytes", pw_log_warn("Received undersized PTP management response: %zd bytes",
ret); ret);

View file

@ -40,19 +40,19 @@ struct msrp {
static void debug_msrp_talker_common(const struct avb_packet_msrp_talker *t) static void debug_msrp_talker_common(const struct avb_packet_msrp_talker *t)
{ {
char buf[128]; char buf[128];
pw_log_info(" stream-id: %s", avb_utils_format_id(buf, sizeof(buf), be64toh(t->stream_id))); pw_log_debug(" stream-id: %s", avb_utils_format_id(buf, sizeof(buf), be64toh(t->stream_id)));
pw_log_info(" dest-addr: %s", avb_utils_format_addr(buf, sizeof(buf), t->dest_addr)); pw_log_debug(" dest-addr: %s", avb_utils_format_addr(buf, sizeof(buf), t->dest_addr));
pw_log_info(" vlan-id: %d", ntohs(t->vlan_id)); pw_log_debug(" vlan-id: %d", ntohs(t->vlan_id));
pw_log_info(" tspec-max-frame-size: %d", ntohs(t->tspec_max_frame_size)); pw_log_debug(" tspec-max-frame-size: %d", ntohs(t->tspec_max_frame_size));
pw_log_info(" tspec-max-interval-frames: %d", ntohs(t->tspec_max_interval_frames)); pw_log_debug(" tspec-max-interval-frames: %d", ntohs(t->tspec_max_interval_frames));
pw_log_info(" priority: %d", t->priority); pw_log_debug(" priority: %d", t->priority);
pw_log_info(" rank: %d", t->rank); pw_log_debug(" rank: %d", t->rank);
pw_log_info(" accumulated-latency: %d", ntohl(t->accumulated_latency)); pw_log_debug(" accumulated-latency: %d", ntohl(t->accumulated_latency));
} }
static void debug_msrp_talker(const struct avb_packet_msrp_talker *t) static void debug_msrp_talker(const struct avb_packet_msrp_talker *t)
{ {
pw_log_info("talker"); pw_log_debug("talker");
debug_msrp_talker_common(t); debug_msrp_talker_common(t);
} }
@ -169,10 +169,10 @@ static int encode_talker(struct msrp *msrp, struct attr *a, void *m, size_t maxs
static void debug_msrp_talker_fail(const struct avb_packet_msrp_talker_fail *t) static void debug_msrp_talker_fail(const struct avb_packet_msrp_talker_fail *t)
{ {
char buf[128]; char buf[128];
pw_log_info("talker fail"); pw_log_debug("talker fail");
debug_msrp_talker_common(&t->talker); debug_msrp_talker_common(&t->talker);
pw_log_info(" bridge-id: %s", avb_utils_format_id(buf, sizeof(buf), be64toh(t->bridge_id))); pw_log_debug(" bridge-id: %s", avb_utils_format_id(buf, sizeof(buf), be64toh(t->bridge_id)));
pw_log_info(" failure-code: %d", t->failure_code); pw_log_debug(" failure-code: %d", t->failure_code);
} }
static int process_talker_fail(struct msrp *msrp, uint64_t now, uint8_t attr_type, static int process_talker_fail(struct msrp *msrp, uint64_t now, uint8_t attr_type,
@ -193,9 +193,9 @@ static int process_talker_fail(struct msrp *msrp, uint64_t now, uint8_t attr_typ
static void debug_msrp_listener(const struct avb_packet_msrp_listener *l, uint8_t param) static void debug_msrp_listener(const struct avb_packet_msrp_listener *l, uint8_t param)
{ {
char buf[128]; char buf[128];
pw_log_info("listener"); pw_log_debug("listener");
pw_log_info(" %s", avb_utils_format_id(buf, sizeof(buf), be64toh(l->stream_id))); pw_log_debug(" %s", avb_utils_format_id(buf, sizeof(buf), be64toh(l->stream_id)));
pw_log_info(" %d", param); pw_log_debug(" %d", param);
} }
static void notify_listener(struct msrp *msrp, uint64_t now, struct attr *attr, uint8_t notify) static void notify_listener(struct msrp *msrp, uint64_t now, struct attr *attr, uint8_t notify)
@ -308,10 +308,10 @@ static int encode_listener(struct msrp *msrp, struct attr *a, void *m, size_t ma
static void debug_msrp_domain(const struct avb_packet_msrp_domain *d) static void debug_msrp_domain(const struct avb_packet_msrp_domain *d)
{ {
pw_log_info("domain"); pw_log_debug("domain");
pw_log_info(" id: %d", d->sr_class_id); pw_log_debug(" id: %d", d->sr_class_id);
pw_log_info(" prio: %d", d->sr_class_priority); pw_log_debug(" prio: %d", d->sr_class_priority);
pw_log_info(" vid: %d", ntohs(d->sr_class_vid)); pw_log_debug(" vid: %d", ntohs(d->sr_class_vid));
} }
static void notify_domain(struct msrp *msrp, uint64_t now, struct attr *attr, uint8_t notify) static void notify_domain(struct msrp *msrp, uint64_t now, struct attr *attr, uint8_t notify)
@ -544,7 +544,7 @@ static void msrp_event(void *data, uint64_t now, uint8_t event)
if (dispatch[a->attr->type].encode == NULL) if (dispatch[a->attr->type].encode == NULL)
continue; continue;
pw_log_info("MSRP encode %s %s", pw_log_debug("MSRP encode %s %s",
dispatch[a->attr->type].name, dispatch[a->attr->type].name,
avb_mrp_send_name(a->attr->mrp->pending_send)); avb_mrp_send_name(a->attr->mrp->pending_send));
@ -563,7 +563,7 @@ static void msrp_event(void *data, uint64_t now, uint8_t event)
f->end_mark = 0; f->end_mark = 0;
if (count > 0) { if (count > 0) {
pw_log_info("MSRP send: %d attribute(s), %zu bytes", count, total); pw_log_debug("MSRP send: %d attribute(s), %zu bytes", count, total);
avb_server_send_packet(msrp->server, msrp_mac, AVB_MSRP_ETH, avb_server_send_packet(msrp->server, msrp_mac, AVB_MSRP_ETH,
buffer, total); buffer, total);
} }

View file

@ -395,7 +395,7 @@ static void on_source_stream_process(void *data)
int64_t dtai = (int64_t)(consume_tai - stream->play_last_consume_tai); int64_t dtai = (int64_t)(consume_tai - stream->play_last_consume_tai);
double local_rate = dtai > 0 double local_rate = dtai > 0
? (double)dticks * 1e9 / (double)dtai : 0.0; ? (double)dticks * 1e9 / (double)dtai : 0.0;
pw_log_info("milan-avb: play measure local_rate=%.4f Hz " pw_log_debug("milan-avb: play measure local_rate=%.4f Hz "
"mc.rate=%.4f corr=%.6f err_ns=%d ticks=%llu | " "mc.rate=%.4f corr=%.6f err_ns=%d ticks=%llu | "
"actuator rate=%.6f play_corr=%.6f target=%d avail=%d", "actuator rate=%.6f play_corr=%.6f target=%d avail=%d",
local_rate, stream->mc.rate, stream->mc.corr, local_rate, stream->mc.rate, stream->mc.corr,
@ -462,7 +462,7 @@ static void on_source_stream_io_changed(void *data, uint32_t id,
default: name = "?"; break; default: name = "?"; break;
} }
/* milan-avb: logs whether the adapter gave us SPA_IO_RateMatch (the actuator knob) on this source. */ /* milan-avb: logs whether the adapter gave us SPA_IO_RateMatch (the actuator knob) on this source. */
pw_log_info("milan-avb: io_changed id=%u (%s) area=%p size=%u", pw_log_debug("milan-avb: io_changed id=%u (%s) area=%p size=%u",
id, name, area, (unsigned)size); id, name, area, (unsigned)size);
} }