Skip to content

Commit d096510

Browse files
committed
[do not merge] Audio: Up_down_mixer: Add traces to debug operation in test
Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
1 parent c7e2e07 commit d096510

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/audio/up_down_mixer/up_down_mixer.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ static int set_downmix_coefficients(struct processing_module *mod,
4747
struct comp_dev *dev = mod->dev;
4848
int ret;
4949

50+
comp_info(dev, "set_downmix_coefficients()");
51+
5052
if (cd->downmix_coefficients) {
5153
ret = memcpy_s(&custom_coeffs, sizeof(custom_coeffs), downmix_coefficients,
5254
sizeof(int32_t) * UP_DOWN_MIX_COEFFS_LENGTH);
@@ -110,6 +112,8 @@ static int set_downmix_coefficients(struct processing_module *mod,
110112
static up_down_mixer_routine select_mix_out_stereo(struct comp_dev *dev,
111113
const struct ipc4_audio_format *format)
112114
{
115+
comp_info(dev, "select_mix_out_stereo()");
116+
113117
if (format->depth == IPC4_DEPTH_16BIT) {
114118
switch (format->ch_cfg) {
115119
case IPC4_CHANNEL_CONFIG_MONO:
@@ -175,6 +179,8 @@ static up_down_mixer_routine select_mix_out_stereo(struct comp_dev *dev,
175179
static up_down_mixer_routine select_mix_out_mono(struct comp_dev *dev,
176180
const struct ipc4_audio_format *format)
177181
{
182+
comp_info(dev, "select_mix_out_mono(");
183+
178184
if (format->depth == IPC4_DEPTH_16BIT) {
179185
switch (format->ch_cfg) {
180186
case IPC4_CHANNEL_CONFIG_STEREO:
@@ -226,6 +232,8 @@ static up_down_mixer_routine select_mix_out_mono(struct comp_dev *dev,
226232
static up_down_mixer_routine select_mix_out_5_1(struct comp_dev *dev,
227233
const struct ipc4_audio_format *format)
228234
{
235+
comp_info(dev, "select_mix_out_5_1()");
236+
229237
if (format->depth == IPC4_DEPTH_16BIT) {
230238
switch (format->ch_cfg) {
231239
case IPC4_CHANNEL_CONFIG_MONO:
@@ -265,6 +273,8 @@ static int init_mix(struct processing_module *mod,
265273
struct up_down_mixer_data *cd = module_get_private_data(mod);
266274
struct comp_dev *dev = mod->dev;
267275

276+
comp_info(dev, "init_mix()");
277+
268278
if (!format)
269279
return -EINVAL;
270280

@@ -326,6 +336,8 @@ static int up_down_mixer_free(struct processing_module *mod)
326336
{
327337
struct up_down_mixer_data *cd = module_get_private_data(mod);
328338

339+
comp_info(mod->dev, "up_down_mixer_free()");
340+
329341
rfree(cd->buf_in);
330342
rfree(cd->buf_out);
331343
rfree(cd);
@@ -405,23 +417,31 @@ static int up_down_mixer_init(struct processing_module *mod)
405417
switch (up_down_mixer->coefficients_select) {
406418
case DEFAULT_COEFFICIENTS:
407419
cd->out_channel_map = create_channel_map(up_down_mixer->out_channel_config);
420+
comp_info(dev, "c1 out_channel map = 0x%08x", cd->out_channel_map);
408421
ret = init_mix(mod, &mod->priv.cfg.base_cfg.audio_fmt,
409422
up_down_mixer->out_channel_config, NULL);
423+
comp_info(dev, "c1 init_mix() done");
410424
break;
411425
case CUSTOM_COEFFICIENTS:
412426
cd->out_channel_map = create_channel_map(up_down_mixer->out_channel_config);
427+
comp_info(dev, "c2 out_channel map = 0x%08x", cd->out_channel_map);
413428
ret = init_mix(mod, &mod->priv.cfg.base_cfg.audio_fmt,
414429
up_down_mixer->out_channel_config, up_down_mixer->coefficients);
430+
comp_info(dev, "c2 init_mix() done");
415431
break;
416432
case DEFAULT_COEFFICIENTS_WITH_CHANNEL_MAP:
417433
cd->out_channel_map = up_down_mixer->channel_map;
434+
comp_info(dev, "c3 out_channel map = 0x%08x", cd->out_channel_map);
418435
ret = init_mix(mod, &mod->priv.cfg.base_cfg.audio_fmt,
419436
up_down_mixer->out_channel_config, NULL);
437+
comp_info(dev, "c3 init_mix() done");
420438
break;
421439
case CUSTOM_COEFFICIENTS_WITH_CHANNEL_MAP:
422440
cd->out_channel_map = up_down_mixer->channel_map;
441+
comp_info(dev, "c4 out_channel map = 0x%08x", cd->out_channel_map);
423442
ret = init_mix(mod, &mod->priv.cfg.base_cfg.audio_fmt,
424443
up_down_mixer->out_channel_config, up_down_mixer->coefficients);
444+
comp_info(dev, "c4 init_mix() done");
425445
break;
426446
default:
427447
comp_err(dev, "up_down_mixer_init(): unsupported coefficient type");
@@ -434,9 +454,11 @@ static int up_down_mixer_init(struct processing_module *mod)
434454
goto err;
435455
}
436456

457+
comp_info(dev, "up_down_mixer_init() ready");
437458
return 0;
438459

439460
err:
461+
comp_err(dev, "up_down_mixer_init() error");
440462
up_down_mixer_free(mod);
441463
return ret;
442464
}

0 commit comments

Comments
 (0)