summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2020-01-03 22:44:15 +0100
committerJaroslav Kysela <perex@perex.cz>2020-01-03 23:38:08 +0100
commitd768da27e7f9f56328c61ed5d37c17ce075cbc6e (patch)
tree7937950b8a1f3d5374e6fc22bf6d29030775c7e9
parentae6522e10621839a15f5a439091af7542d84d3e5 (diff)
downloadalsa-lib-d768da27e7f9f56328c61ed5d37c17ce075cbc6e.tar.gz
topology: tplg_dbg() cleanups
- remove newline at the end Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--src/topology/channel.c6
-rw-r--r--src/topology/ctl.c40
-rw-r--r--src/topology/dapm.c32
-rw-r--r--src/topology/data.c48
-rw-r--r--src/topology/ops.c8
-rw-r--r--src/topology/pcm.c36
-rw-r--r--src/topology/text.c6
7 files changed, 91 insertions, 85 deletions
diff --git a/src/topology/channel.c b/src/topology/channel.c
index 390c3f16..47d5ea4c 100644
--- a/src/topology/channel.c
+++ b/src/topology/channel.c
@@ -100,7 +100,7 @@ int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
channel += tplg->channel_idx;
snd_config_get_id(cfg, &id);
- tplg_dbg("\tChannel %s at index %d\n", id, tplg->channel_idx);
+ tplg_dbg("\tChannel %s at index %d", id, tplg->channel_idx);
channel_id = lookup_channel(id);
if (channel_id < 0) {
@@ -110,7 +110,7 @@ int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
channel->id = channel_id;
channel->size = sizeof(*channel);
- tplg_dbg("\tChan %s = %d\n", id, channel->id);
+ tplg_dbg("\tChan %s = %d", id, channel->id);
snd_config_for_each(i, next, cfg) {
@@ -129,7 +129,7 @@ int tplg_parse_channel(snd_tplg_t *tplg, snd_config_t *cfg,
else if (strcmp(id, "shift") == 0)
channel->shift = value;
- tplg_dbg("\t\t%s = %d\n", id, value);
+ tplg_dbg("\t\t%s = %d", id, value);
}
tplg->channel_idx++;
diff --git a/src/topology/ctl.c b/src/topology/ctl.c
index a5a81148..41dc2ddb 100644
--- a/src/topology/ctl.c
+++ b/src/topology/ctl.c
@@ -54,7 +54,7 @@ static int parse_access_values(snd_config_t *cfg,
const char *value = NULL;
unsigned int j;
- tplg_dbg(" Access:\n");
+ tplg_dbg(" Access:");
snd_config_for_each(i, next, cfg) {
n = snd_config_iterator_entry(i);
@@ -67,7 +67,7 @@ static int parse_access_values(snd_config_t *cfg,
for (j = 0; j < ARRAY_SIZE(ctl_access); j++) {
if (strcmp(value, ctl_access[j].name) == 0) {
hdr->access |= ctl_access[j].value;
- tplg_dbg("\t%s\n", value);
+ tplg_dbg("\t%s", value);
break;
}
}
@@ -150,7 +150,7 @@ static int copy_tlv(struct tplg_elem *elem, struct tplg_elem *ref)
struct snd_soc_tplg_mixer_control *mixer_ctrl = elem->mixer_ctrl;
struct snd_soc_tplg_ctl_tlv *tlv = ref->tlv;
- tplg_dbg("TLV '%s' used by '%s\n", ref->id, elem->id);
+ tplg_dbg("TLV '%s' used by '%s", ref->id, elem->id);
/* TLV has a fixed size */
mixer_ctrl->hdr.tlv = *tlv;
@@ -330,7 +330,7 @@ static int tplg_parse_tlv_dbscale(snd_config_t *cfg, struct tplg_elem *elem)
const char *id = NULL;
int val;
- tplg_dbg(" scale: %s\n", elem->id);
+ tplg_dbg(" scale: %s", elem->id);
tplg_tlv->size = sizeof(struct snd_soc_tplg_ctl_tlv);
tplg_tlv->type = SNDRV_CTL_TLVT_DB_SCALE;
@@ -348,7 +348,7 @@ static int tplg_parse_tlv_dbscale(snd_config_t *cfg, struct tplg_elem *elem)
if (tplg_get_integer(n, &val, 0))
continue;
- tplg_dbg("\t%s = %i\n", id, val);
+ tplg_dbg("\t%s = %i", id, val);
/* get TLV data */
if (strcmp(id, "min") == 0)
@@ -450,7 +450,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
snd_strlcpy(be->hdr.name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
be->hdr.type = SND_SOC_TPLG_TYPE_BYTES;
- tplg_dbg(" Control Bytes: %s\n", elem->id);
+ tplg_dbg(" Control Bytes: %s", elem->id);
snd_config_for_each(i, next, cfg) {
n = snd_config_iterator_entry(i);
@@ -468,7 +468,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
return -EINVAL;
be->base = ival;
- tplg_dbg("\t%s: %d\n", id, be->base);
+ tplg_dbg("\t%s: %d", id, be->base);
continue;
}
@@ -477,7 +477,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
return -EINVAL;
be->num_regs = ival;
- tplg_dbg("\t%s: %d\n", id, be->num_regs);
+ tplg_dbg("\t%s: %d", id, be->num_regs);
continue;
}
@@ -486,7 +486,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
return -EINVAL;
be->max = ival;
- tplg_dbg("\t%s: %d\n", id, be->max);
+ tplg_dbg("\t%s: %d", id, be->max);
continue;
}
@@ -495,7 +495,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
return -EINVAL;
be->mask = ival;
- tplg_dbg("\t%s: %d\n", id, be->mask);
+ tplg_dbg("\t%s: %d", id, be->mask);
continue;
}
@@ -515,7 +515,7 @@ int tplg_parse_control_bytes(snd_tplg_t *tplg,
return err;
tlv_set = true;
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -625,7 +625,7 @@ int tplg_parse_control_enum(snd_tplg_t *tplg, snd_config_t *cfg,
ec->channel[j].reg = -1;
}
- tplg_dbg(" Control Enum: %s\n", elem->id);
+ tplg_dbg(" Control Enum: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -644,7 +644,7 @@ int tplg_parse_control_enum(snd_tplg_t *tplg, snd_config_t *cfg,
return -EINVAL;
tplg_ref_add(elem, SND_TPLG_TYPE_TEXT, val);
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -761,7 +761,7 @@ int tplg_parse_control_mixer(snd_tplg_t *tplg,
for (j = 0; j < SND_SOC_TPLG_MAX_CHAN; j++)
mc->channel[j].reg = -1;
- tplg_dbg(" Control Mixer: %s\n", elem->id);
+ tplg_dbg(" Control Mixer: %s", elem->id);
/* giterate trough each mixer elment */
snd_config_for_each(i, next, cfg) {
@@ -795,7 +795,7 @@ int tplg_parse_control_mixer(snd_tplg_t *tplg,
return -EINVAL;
mc->max = ival;
- tplg_dbg("\t%s: %d\n", id, mc->max);
+ tplg_dbg("\t%s: %d", id, mc->max);
continue;
}
@@ -805,7 +805,7 @@ int tplg_parse_control_mixer(snd_tplg_t *tplg,
return -EINVAL;
mc->invert = ival;
- tplg_dbg("\t%s: %d\n", id, mc->invert);
+ tplg_dbg("\t%s: %d", id, mc->invert);
continue;
}
@@ -826,7 +826,7 @@ int tplg_parse_control_mixer(snd_tplg_t *tplg,
return err;
tlv_set = true;
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -981,7 +981,7 @@ int tplg_add_mixer(snd_tplg_t *tplg, struct snd_tplg_mixer_template *mixer,
struct tplg_elem *elem;
int ret, i, num_channels;
- tplg_dbg(" Control Mixer: %s\n", mixer->hdr.name);
+ tplg_dbg(" Control Mixer: %s", mixer->hdr.name);
if (mixer->hdr.type != SND_SOC_TPLG_TYPE_MIXER) {
SNDERR("invalid mixer type %d", mixer->hdr.type);
@@ -1045,7 +1045,7 @@ int tplg_add_enum(snd_tplg_t *tplg, struct snd_tplg_enum_template *enum_ctl,
struct tplg_elem *elem;
int ret, i, num_items, num_channels;
- tplg_dbg(" Control Enum: %s\n", enum_ctl->hdr.name);
+ tplg_dbg(" Control Enum: %s", enum_ctl->hdr.name);
if (enum_ctl->hdr.type != SND_SOC_TPLG_TYPE_ENUM) {
SNDERR("invalid enum type %d", enum_ctl->hdr.type);
@@ -1128,7 +1128,7 @@ int tplg_add_bytes(snd_tplg_t *tplg, struct snd_tplg_bytes_template *bytes_ctl,
struct tplg_elem *elem;
int ret;
- tplg_dbg(" Control Bytes: %s\n", bytes_ctl->hdr.name);
+ tplg_dbg(" Control Bytes: %s", bytes_ctl->hdr.name);
if (bytes_ctl->hdr.type != SND_SOC_TPLG_TYPE_BYTES) {
SNDERR("invalid bytes type %d", bytes_ctl->hdr.type);
diff --git a/src/topology/dapm.c b/src/topology/dapm.c
index 0bf64833..cb85e667 100644
--- a/src/topology/dapm.c
+++ b/src/topology/dapm.c
@@ -76,8 +76,8 @@ static int copy_dapm_control(struct tplg_elem *elem, struct tplg_elem *ref)
{
struct snd_soc_tplg_dapm_widget *widget = elem->widget;
- tplg_dbg("Control '%s' used by '%s'\n", ref->id, elem->id);
- tplg_dbg("\tparent size: %d + %d -> %d, priv size -> %d\n",
+ tplg_dbg("Control '%s' used by '%s'", ref->id, elem->id);
+ tplg_dbg("\tparent size: %d + %d -> %d, priv size -> %d",
elem->size, ref->size, elem->size + ref->size,
widget->priv.size);
@@ -210,8 +210,8 @@ int tplg_build_routes(snd_tplg_t *tplg)
}
route = elem->route;
- tplg_dbg("\nCheck route: sink '%s', control '%s', source '%s'\n",
- route->sink, route->control, route->source);
+ tplg_dbg("Check route: sink '%s', control '%s', source '%s'",
+ route->sink, route->control, route->source);
/* validate sink */
if (strlen(route->sink) <= 0) {
@@ -357,7 +357,7 @@ static int tplg_parse_routes(snd_tplg_t *tplg, snd_config_t *cfg, int index)
if (err < 0)
return err;
- tplg_dbg("route: sink '%s', control '%s', source '%s'\n",
+ tplg_dbg("route: sink '%s', control '%s', source '%s'",
line->sink, line->control, line->source);
}
@@ -520,7 +520,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
if (!elem)
return -ENOMEM;
- tplg_dbg(" Widget: %s\n", elem->id);
+ tplg_dbg(" Widget: %s", elem->id);
widget = elem->widget;
snd_strlcpy(widget->name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
@@ -550,7 +550,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
}
widget->id = widget_type;
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -560,7 +560,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
snd_strlcpy(widget->sname, val,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -571,7 +571,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
widget->reg = ival ? -1 : 0;
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -580,7 +580,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->shift = ival;
- tplg_dbg("\t%s: %d\n", id, widget->shift);
+ tplg_dbg("\t%s: %d", id, widget->shift);
continue;
}
@@ -589,7 +589,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->reg = ival;
- tplg_dbg("\t%s: %d\n", id, widget->reg);
+ tplg_dbg("\t%s: %d", id, widget->reg);
continue;
}
@@ -598,7 +598,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->invert = ival;
- tplg_dbg("\t%s: %d\n", id, widget->invert);
+ tplg_dbg("\t%s: %d", id, widget->invert);
continue;
}
@@ -607,7 +607,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->subseq = ival;
- tplg_dbg("\t%s: %d\n", id, widget->subseq);
+ tplg_dbg("\t%s: %d", id, widget->subseq);
continue;
}
@@ -616,7 +616,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->event_type = ival;
- tplg_dbg("\t%s: %d\n", id, widget->event_type);
+ tplg_dbg("\t%s: %d", id, widget->event_type);
continue;
}
@@ -625,7 +625,7 @@ int tplg_parse_dapm_widget(snd_tplg_t *tplg,
return -EINVAL;
widget->event_flags = ival;
- tplg_dbg("\t%s: %d\n", id, widget->event_flags);
+ tplg_dbg("\t%s: %d", id, widget->event_flags);
continue;
}
@@ -767,7 +767,7 @@ int tplg_add_widget_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
struct tplg_elem *elem;
int i, ret = 0;
- tplg_dbg("Widget: %s\n", wt->name);
+ tplg_dbg("Widget: %s", wt->name);
elem = tplg_elem_new_common(tplg, NULL, wt->name,
SND_TPLG_TYPE_DAPM_WIDGET);
diff --git a/src/topology/data.c b/src/topology/data.c
index 0b513428..37c45919 100644
--- a/src/topology/data.c
+++ b/src/topology/data.c
@@ -87,7 +87,7 @@ int tplg_parse_refs(snd_config_t *cfg, struct tplg_elem *elem,
if (snd_config_get_string(cfg, &val) < 0)
return -EINVAL;
- tplg_dbg("\tref data: %s\n", val);
+ tplg_dbg("\tref data: %s", val);
err = tplg_ref_add(elem, type, val);
if (err < 0)
return err;
@@ -108,7 +108,7 @@ int tplg_parse_refs(snd_config_t *cfg, struct tplg_elem *elem,
if (snd_config_get_string(n, &val) < 0)
continue;
- tplg_dbg("\tref data: %s\n", val);
+ tplg_dbg("\tref data: %s", val);
err = tplg_ref_add(elem, type, val);
if (err < 0)
return err;
@@ -169,7 +169,7 @@ static int tplg_parse_data_file(snd_config_t *cfg, struct tplg_elem *elem)
size_t size, bytes_read;
int ret = 0;
- tplg_dbg("data DataFile: %s\n", elem->id);
+ tplg_dbg("data DataFile: %s", elem->id);
if (snd_config_get_string(cfg, &value) < 0)
return -EINVAL;
@@ -235,19 +235,25 @@ static void dump_priv_data(struct tplg_elem *elem ATTRIBUTE_UNUSED)
#ifdef TPLG_DEBUG
struct snd_soc_tplg_private *priv = elem->data;
unsigned char *p = (unsigned char *)priv->data;
+ char buf[128], buf2[8];
unsigned int i;
- tplg_dbg(" elem size = %d, priv data size = %d\n",
+ tplg_dbg(" elem size = %d, priv data size = %d",
elem->size, priv->size);
+ buf[0] = '\0';
for (i = 0; i < priv->size; i++) {
- if (i > 0 && (i % 16) == 0)
- tplg_dbg("\n");
+ if (i > 0 && (i % 16) == 0) {
+ tplg_dbg("%s", buf);
+ buf[0] = '\0';
+ }
- tplg_dbg(" %02x:", *p++);
+ snprintf(buf2, sizeof(buf2), " %02x", *p++);
+ strcat(buf, buf2);
}
- tplg_dbg("\n\n");
+ if (buf[0])
+ tplg_dbg("%s", buf);
#endif
}
@@ -466,7 +472,7 @@ static int tplg_parse_data_hex(snd_config_t *cfg, struct tplg_elem *elem,
int size, esize, off, num;
int ret;
- tplg_dbg(" data: %s\n", elem->id);
+ tplg_dbg(" data: %s", elem->id);
if (snd_config_get_string(cfg, &value) < 0)
return -EINVAL;
@@ -683,7 +689,7 @@ static int build_tuples(snd_tplg_t *tplg, struct tplg_elem *elem)
if (ref->type != SND_TPLG_TYPE_TUPLE)
continue;
- tplg_dbg("tuples '%s' used by data '%s'\n", ref->id, elem->id);
+ tplg_dbg("tuples '%s' used by data '%s'", ref->id, elem->id);
if (!ref->elem)
ref->elem = tplg_elem_lookup(&tplg->tuple_list,
@@ -799,7 +805,7 @@ static int parse_tuple_set(snd_config_t *cfg,
if (!num_tuples)
return 0;
- tplg_dbg("\t %d %s tuples:\n", num_tuples, id);
+ tplg_dbg("\t %d %s tuples:", num_tuples, id);
set = calloc(1, sizeof(*set) + num_tuples * sizeof(struct tplg_tuple));
if (!set)
return -ENOMEM;
@@ -831,7 +837,7 @@ static int parse_tuple_set(snd_config_t *cfg,
continue;
snd_strlcpy(tuple->string, value,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg("\t\t%s = %s\n", tuple->token, tuple->string);
+ tplg_dbg("\t\t%s = %s", tuple->token, tuple->string);
break;
case SND_SOC_TPLG_TUPLE_TYPE_BOOL:
@@ -839,7 +845,7 @@ static int parse_tuple_set(snd_config_t *cfg,
if (ival < 0)
continue;
tuple->value = ival;
- tplg_dbg("\t\t%s = %d\n", tuple->token, tuple->value);
+ tplg_dbg("\t\t%s = %d", tuple->token, tuple->value);
break;
case SND_SOC_TPLG_TUPLE_TYPE_BYTE:
@@ -862,7 +868,7 @@ static int parse_tuple_set(snd_config_t *cfg,
}
tuple->value = tuple_val;
- tplg_dbg("\t\t%s = 0x%x\n", tuple->token, tuple->value);
+ tplg_dbg("\t\t%s = 0x%x", tuple->token, tuple->value);
break;
default:
@@ -1047,7 +1053,7 @@ int tplg_parse_tokens(snd_tplg_t *tplg, snd_config_t *cfg,
if (!num_tokens)
return 0;
- tplg_dbg(" Vendor tokens: %s, %d tokens\n", elem->id, num_tokens);
+ tplg_dbg(" Vendor tokens: %s, %d tokens", elem->id, num_tokens);
tokens = calloc(1, sizeof(*tokens)
+ num_tokens * sizeof(struct tplg_token));
@@ -1067,7 +1073,7 @@ int tplg_parse_tokens(snd_tplg_t *tplg, snd_config_t *cfg,
snd_strlcpy(tokens->token[tokens->num_tokens].id, id,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
tokens->token[tokens->num_tokens].value = value;
- tplg_dbg("\t\t %s : %d\n", tokens->token[tokens->num_tokens].id,
+ tplg_dbg("\t\t %s : %d", tokens->token[tokens->num_tokens].id,
tokens->token[tokens->num_tokens].value);
tokens->num_tokens++;
}
@@ -1116,7 +1122,7 @@ int tplg_parse_tuples(snd_tplg_t *tplg, snd_config_t *cfg,
if (!elem)
return -ENOMEM;
- tplg_dbg(" Vendor Tuples: %s\n", elem->id);
+ tplg_dbg(" Vendor Tuples: %s", elem->id);
tuples = calloc(1, sizeof(*tuples));
if (!tuples)
@@ -1133,7 +1139,7 @@ int tplg_parse_tuples(snd_tplg_t *tplg, snd_config_t *cfg,
if (snd_config_get_string(n, &value) < 0)
return -EINVAL;
tplg_ref_add(elem, SND_TPLG_TYPE_TOKEN, value);
- tplg_dbg("\t refer to vendor tokens: %s\n", value);
+ tplg_dbg("\t refer to vendor tokens: %s", value);
}
if (strcmp(id, "tuples") == 0) {
@@ -1208,7 +1214,7 @@ int tplg_parse_manifest_data(snd_tplg_t *tplg, snd_config_t *cfg,
manifest = elem->manifest;
manifest->size = elem->size;
- tplg_dbg(" Manifest: %s\n", elem->id);
+ tplg_dbg(" Manifest: %s", elem->id);
snd_config_for_each(i, next, cfg) {
n = snd_config_iterator_entry(i);
@@ -1402,7 +1408,7 @@ int tplg_parse_data(snd_tplg_t *tplg, snd_config_t *cfg,
return -EINVAL;
elem->vendor_type = ival;
- tplg_dbg("\t%s: %d\n", id, elem->index);
+ tplg_dbg("\t%s: %d", id, elem->index);
continue;
}
}
@@ -1506,7 +1512,7 @@ int tplg_copy_data(snd_tplg_t *tplg, struct tplg_elem *elem,
return -EINVAL;
}
- tplg_dbg("Data '%s' used by '%s'\n", ref->id, elem->id);
+ tplg_dbg("Data '%s' used by '%s'", ref->id, elem->id);
/* overlook empty private data */
if (!ref_elem->data || !ref_elem->data->size) {
ref->elem = ref_elem;
diff --git a/src/topology/ops.c b/src/topology/ops.c
index 2885c781..110eef58 100644
--- a/src/topology/ops.c
+++ b/src/topology/ops.c
@@ -69,7 +69,7 @@ int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED, snd_config_t *cfg,
const char *id, *value;
int ival;
- tplg_dbg("\tOps\n");
+ tplg_dbg("\tOps");
hdr->size = sizeof(*hdr);
snd_config_for_each(i, next, cfg) {
@@ -97,7 +97,7 @@ int tplg_parse_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED, snd_config_t *cfg,
else if (strcmp(id, "get") == 0)
hdr->ops.get = ival;
- tplg_dbg("\t\t%s = %d\n", id, ival);
+ tplg_dbg("\t\t%s = %d", id, ival);
}
return 0;
@@ -155,7 +155,7 @@ int tplg_parse_ext_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
const char *id, *value;
int ival;
- tplg_dbg("\tExt Ops\n");
+ tplg_dbg("\tExt Ops");
snd_config_for_each(i, next, cfg) {
@@ -182,7 +182,7 @@ int tplg_parse_ext_ops(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
else if (strcmp(id, "get") == 0)
be->ext_ops.get = ival;
- tplg_dbg("\t\t%s = %s\n", id, value);
+ tplg_dbg("\t\t%s = %s", id, value);
}
return 0;
diff --git a/src/topology/pcm.c b/src/topology/pcm.c
index 918e3e9a..da88783f 100644
--- a/src/topology/pcm.c
+++ b/src/topology/pcm.c
@@ -68,7 +68,7 @@ static void copy_stream_caps(const char *id ATTRIBUTE_UNUSED,
{
struct snd_soc_tplg_stream_caps *ref_caps = ref_elem->stream_caps;
- tplg_dbg("Copy pcm caps (%ld bytes) from '%s' to '%s' \n",
+ tplg_dbg("Copy pcm caps (%ld bytes) from '%s' to '%s'",
sizeof(*caps), ref_elem->id, id);
*caps = *ref_caps;
@@ -388,7 +388,7 @@ static int parse_unsigned(snd_config_t *n, unsigned int *dst)
{
const char *id;
if (snd_config_get_id(n, &id) >= 0)
- tplg_dbg("\t\t%s: %d\n", id, *dst);
+ tplg_dbg("\t\t%s: %d", id, *dst);
}
#endif
return 0;
@@ -415,7 +415,7 @@ int tplg_parse_stream_caps(snd_tplg_t *tplg,
sc->size = elem->size;
snd_strlcpy(sc->name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg(" PCM Capabilities: %s\n", elem->id);
+ tplg_dbg(" PCM Capabilities: %s", elem->id);
snd_config_for_each(i, next, cfg) {
n = snd_config_iterator_entry(i);
@@ -442,7 +442,7 @@ int tplg_parse_stream_caps(snd_tplg_t *tplg,
if (err < 0)
return err;
- tplg_dbg("\t\t%s: %s\n", id, val);
+ tplg_dbg("\t\t%s: %s", id, val);
continue;
}
@@ -460,7 +460,7 @@ int tplg_parse_stream_caps(snd_tplg_t *tplg,
if (err < 0)
return err;
- tplg_dbg("\t\t%s: %s\n", id, val);
+ tplg_dbg("\t\t%s: %s", id, val);
continue;
}
@@ -625,7 +625,7 @@ static int tplg_parse_streams(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
snd_config_get_id(cfg, &id);
- tplg_dbg("\t%s:\n", id);
+ tplg_dbg("\t%s:", id);
switch (elem->type) {
case SND_TPLG_TYPE_PCM:
@@ -672,7 +672,7 @@ static int tplg_parse_streams(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
snd_strlcpy(caps[stream].name, value,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg("\t\t%s\n\t\t\t%s\n", id, value);
+ tplg_dbg("\t\t%s\n\t\t\t%s", id, value);
continue;
}
}
@@ -746,7 +746,7 @@ static int tplg_parse_fe_dai(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
const char *id;
snd_config_get_id(cfg, &id);
- tplg_dbg("\t\tFE DAI %s:\n", id);
+ tplg_dbg("\t\tFE DAI %s:", id);
snd_strlcpy(pcm->dai_name, id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
snd_config_for_each(i, next, cfg) {
@@ -763,7 +763,7 @@ static int tplg_parse_fe_dai(snd_tplg_t *tplg ATTRIBUTE_UNUSED,
return -EINVAL;
}
- tplg_dbg("\t\t\tindex: %d\n", pcm->dai_id);
+ tplg_dbg("\t\t\tindex: %d", pcm->dai_id);
}
}
@@ -847,7 +847,7 @@ int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg,
pcm->size = elem->size;
snd_strlcpy(pcm->pcm_name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg(" PCM: %s\n", elem->id);
+ tplg_dbg(" PCM: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -882,7 +882,7 @@ int tplg_parse_pcm(snd_tplg_t *tplg, snd_config_t *cfg,
pcm->compress = ival;
- tplg_dbg("\t%s: %d\n", id, ival);
+ tplg_dbg("\t%s: %d", id, ival);
continue;
}
@@ -988,7 +988,7 @@ int tplg_parse_dai(snd_tplg_t *tplg, snd_config_t *cfg,
snd_strlcpy(dai->dai_name, elem->id,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg(" DAI: %s\n", elem->id);
+ tplg_dbg(" DAI: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -1142,7 +1142,7 @@ int tplg_parse_link(snd_tplg_t *tplg,
link->size = elem->size;
snd_strlcpy(link->name, elem->id, SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg(" Link: %s\n", elem->id);
+ tplg_dbg(" Link: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -1168,7 +1168,7 @@ int tplg_parse_link(snd_tplg_t *tplg,
snd_strlcpy(link->stream_name, val,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg("\t%s: %s\n", id, val);
+ tplg_dbg("\t%s: %s", id, val);
continue;
}
@@ -1280,7 +1280,7 @@ int tplg_parse_cc(snd_tplg_t *tplg,
link = elem->link;
link->size = elem->size;
- tplg_dbg(" CC: %s\n", elem->id);
+ tplg_dbg(" CC: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -1412,7 +1412,7 @@ int tplg_parse_hw_config(snd_tplg_t *tplg, snd_config_t *cfg,
hw_cfg = elem->hw_cfg;
hw_cfg->size = elem->size;
- tplg_dbg(" Link HW config: %s\n", elem->id);
+ tplg_dbg(" Link HW config: %s", elem->id);
snd_config_for_each(i, next, cfg) {
@@ -1719,7 +1719,7 @@ int tplg_add_pcm_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
struct tplg_elem *elem;
int ret, i;
- tplg_dbg("PCM: %s, DAI %s\n", pcm_tpl->pcm_name, pcm_tpl->dai_name);
+ tplg_dbg("PCM: %s, DAI %s", pcm_tpl->pcm_name, pcm_tpl->dai_name);
if (pcm_tpl->num_streams > SND_SOC_TPLG_STREAM_CONFIG_MAX)
return -EINVAL;
@@ -1881,7 +1881,7 @@ int tplg_add_dai_object(snd_tplg_t *tplg, snd_tplg_obj_template_t *t)
struct tplg_elem *elem;
int ret, i;
- tplg_dbg("DAI %s\n", dai_tpl->dai_name);
+ tplg_dbg("DAI %s", dai_tpl->dai_name);
elem = tplg_elem_new_common(tplg, NULL, dai_tpl->dai_name,
SND_TPLG_TYPE_DAI);
diff --git a/src/topology/text.c b/src/topology/text.c
index 6dbf2230..507c5450 100644
--- a/src/topology/text.c
+++ b/src/topology/text.c
@@ -32,13 +32,13 @@ static int parse_text_values(snd_config_t *cfg, struct tplg_elem *elem)
const char *value = NULL;
int j = 0;
- tplg_dbg(" Text Values: %s\n", elem->id);
+ tplg_dbg(" Text Values: %s", elem->id);
snd_config_for_each(i, next, cfg) {
n = snd_config_iterator_entry(i);
if (j == SND_SOC_TPLG_NUM_TEXTS) {
- tplg_dbg("text string number exceeds %d\n", j);
+ tplg_dbg("text string number exceeds %d", j);
return -ENOMEM;
}
@@ -48,7 +48,7 @@ static int parse_text_values(snd_config_t *cfg, struct tplg_elem *elem)
snd_strlcpy(&texts->items[j][0], value,
SNDRV_CTL_ELEM_ID_NAME_MAXLEN);
- tplg_dbg("\t%s\n", &texts->items[j][0]);
+ tplg_dbg("\t%s", &texts->items[j][0]);
j++;
}