mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
alsa: redirect dict debug to log
This commit is contained in:
parent
3bbccccd05
commit
7c7dea890b
2 changed files with 13 additions and 5 deletions
|
|
@ -53,25 +53,32 @@ static inline void spa_debug_log_log(struct spa_debug_context *ctx, const char *
|
|||
|
||||
#define spa_debug_log_pod(l,lev,indent,info,pod) \
|
||||
({ \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
|
||||
spa_debugc_pod(&c.ctx, indent, info, pod); \
|
||||
})
|
||||
|
||||
#define spa_debug_log_format(l,lev,indent,info,format) \
|
||||
({ \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
|
||||
spa_debugc_format(&c.ctx, indent, info, format); \
|
||||
})
|
||||
|
||||
#define spa_debug_log_mem(l,lev,indent,data,len) \
|
||||
({ \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
|
||||
spa_debugc_mem(&c.ctx, indent, data, len); \
|
||||
})
|
||||
|
||||
#define spa_debug_log_dict(l,lev,indent,dict) \
|
||||
({ \
|
||||
struct spa_debug_log_ctx c = SPA_LOG_DEBUG_INIT(l,lev); \
|
||||
if (SPA_UNLIKELY(spa_log_level_topic_enabled(c.log, c.topic, c.level))) \
|
||||
spa_debugc_dict(&c.ctx, indent, dict); \
|
||||
})
|
||||
|
||||
/**
|
||||
* \}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <spa/support/plugin.h>
|
||||
#include <spa/monitor/device.h>
|
||||
#include <spa/monitor/utils.h>
|
||||
#include <spa/debug/log.h>
|
||||
#include <spa/debug/dict.h>
|
||||
|
||||
#include "alsa.h"
|
||||
|
|
@ -582,7 +583,7 @@ static int emit_added_object_info(struct impl *this, struct card *card)
|
|||
info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
||||
spa_log_debug(this->log, "interface information:");
|
||||
spa_debug_dict(2, info.props);
|
||||
spa_debug_log_dict(this->log, SPA_LOG_LEVEL_DEBUG, 2, info.props);
|
||||
|
||||
spa_device_emit_object_info(&this->hooks, card->pcm_device_id, &info);
|
||||
free(cn);
|
||||
|
|
@ -641,7 +642,7 @@ static int emit_added_object_info(struct impl *this, struct card *card)
|
|||
info.props = &SPA_DICT_INIT(items, n_items);
|
||||
|
||||
spa_log_debug(this->log, "interface information:");
|
||||
spa_debug_dict(2, info.props);
|
||||
spa_debug_log_dict(this->log, SPA_LOG_LEVEL_DEBUG, 2, info.props);
|
||||
|
||||
spa_device_emit_object_info(&this->hooks, card->compress_offload_device_id, &info);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue