Skip to content
Draft
10 changes: 5 additions & 5 deletions src/audio/aria/aria.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ static int aria_init(struct processing_module *mod)
att = aria->attenuation;

if (aria->attenuation > ARIA_MAX_ATT) {
comp_warn(dev, "init_aria(): Attenuation value %d must not be greater than %d",
comp_warn(dev, "Attenuation value %d must not be greater than %d",
att, ARIA_MAX_ATT);
att = ARIA_MAX_ATT;
}
Expand All @@ -149,7 +149,7 @@ static int aria_init(struct processing_module *mod)

if (!buf) {
rfree(cd);
comp_err(dev, "init_aria(): allocation failed for size %d", req_mem);
comp_err(dev, "allocation failed for size %d", req_mem);
return -ENOMEM;
}

Expand Down Expand Up @@ -201,12 +201,12 @@ static int aria_prepare(struct processing_module *mod,

if (audio_stream_get_valid_fmt(&source->stream) != SOF_IPC_FRAME_S24_4LE ||
audio_stream_get_valid_fmt(&sink->stream) != SOF_IPC_FRAME_S24_4LE) {
comp_err(dev, "aria_prepare(): format is not supported");
comp_err(dev, "format is not supported");
return -EINVAL;
}

if (dev->state == COMP_STATE_ACTIVE) {
comp_info(dev, "aria_prepare(): Component is in active state.");
comp_info(dev, "Component is in active state.");
return 0;
}

Expand Down Expand Up @@ -291,7 +291,7 @@ static int aria_set_config(struct processing_module *mod, uint32_t param_id,
memcpy_s(&cd->att, sizeof(uint32_t), fragment, sizeof(uint32_t));
if (cd->att > ARIA_MAX_ATT) {
comp_warn(dev,
"aria_set_config(): Attenuation parameter %d is limited to %d",
"Attenuation parameter %d is limited to %d",
cd->att, ARIA_MAX_ATT);
cd->att = ARIA_MAX_ATT;
}
Expand Down
10 changes: 5 additions & 5 deletions src/audio/asrc/asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,14 +354,14 @@ static int asrc_verify_params(struct processing_module *mod,
if (dev->direction == SOF_IPC_STREAM_PLAYBACK) {
if (asrc_get_source_rate(&cd->ipc_config) &&
params->rate != asrc_get_source_rate(&cd->ipc_config)) {
comp_err(dev, "asrc_verify_params(): runtime stream pcm rate %u does not match rate %u fetched from ipc.",
comp_err(dev, "runtime stream pcm rate %u does not match rate %u fetched from ipc.",
params->rate, asrc_get_source_rate(&cd->ipc_config));
return -EINVAL;
}
} else {
if (asrc_get_sink_rate(&cd->ipc_config) &&
params->rate != asrc_get_sink_rate(&cd->ipc_config)) {
comp_err(dev, "asrc_verify_params(): runtime stream pcm rate %u does not match rate %u fetched from ipc.",
comp_err(dev, "runtime stream pcm rate %u does not match rate %u fetched from ipc.",
params->rate, asrc_get_sink_rate(&cd->ipc_config));
return -EINVAL;
}
Expand All @@ -371,7 +371,7 @@ static int asrc_verify_params(struct processing_module *mod,
*/
ret = comp_verify_params(dev, BUFF_PARAMS_RATE, params);
if (ret < 0) {
comp_err(dev, "asrc_verify_params(): comp_verify_params() failed.");
comp_err(dev, "comp_verify_params() failed.");
return ret;
}

Expand All @@ -393,7 +393,7 @@ static int asrc_params(struct processing_module *mod)

err = asrc_verify_params(mod, pcm_params);
if (err < 0) {
comp_err(dev, "asrc_params(): pcm params verification failed.");
comp_err(dev, "pcm params verification failed.");
return -EINVAL;
}

Expand Down Expand Up @@ -572,7 +572,7 @@ static int asrc_prepare(struct processing_module *mod,

if (audio_stream_get_size(&sinkb->stream) <
dev->ipc_config.periods_sink * sink_period_bytes) {
comp_err(dev, "asrc_prepare(): sink buffer size %d is insufficient < %d * %d",
comp_err(dev, "sink buffer size %d is insufficient < %d * %d",
audio_stream_get_size(&sinkb->stream), dev->ipc_config.periods_sink,
sink_period_bytes);
ret = -ENOMEM;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/asrc/asrc_farrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ enum asrc_error_code asrc_process_pull32(struct comp_dev *dev,
}

if (src_obj->time_value_pull > TIME_VALUE_LIMIT) {
comp_err(dev, "process_pull32(): Time value = %d",
comp_err(dev, "Time value = %d",
src_obj->time_value_pull);
return ASRC_EC_FAILED_PULL_MODE;
}
Expand Down
2 changes: 1 addition & 1 deletion src/audio/base_fw_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ __cold static int basefw_mem_state_info(uint32_t *data_offset, char *data)
/* size is also saved as tuple length */
tuple_data = rballoc(SOF_MEM_FLAG_USER, size);
if (!tuple_data) {
LOG_ERR("basefw_mem_state_info(): allocation failed");
LOG_ERR("allocation failed");
return IPC4_ERROR_INVALID_PARAM;
}

Expand Down
18 changes: 9 additions & 9 deletions src/audio/buffers/comp_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static struct comp_buffer *buffer_alloc_struct(void *stream_addr, size_t size,
buffer = rzalloc(flags, sizeof(*buffer));

if (!buffer) {
tr_err(&buffer_tr, "buffer_alloc_struct(): could not alloc structure");
tr_err(&buffer_tr, "could not alloc structure");
return NULL;
}

Expand Down Expand Up @@ -236,20 +236,20 @@ struct comp_buffer *buffer_alloc(size_t size, uint32_t flags, uint32_t align,

/* validate request */
if (size == 0) {
tr_err(&buffer_tr, "buffer_alloc(): new size = %zu is invalid", size);
tr_err(&buffer_tr, "new size = %zu is invalid", size);
return NULL;
}

stream_addr = rballoc_align(flags, size, align);
if (!stream_addr) {
tr_err(&buffer_tr, "buffer_alloc(): could not alloc size = %zu bytes of flags = 0x%x",
tr_err(&buffer_tr, "could not alloc size = %zu bytes of flags = 0x%x",
size, flags);
return NULL;
}

buffer = buffer_alloc_struct(stream_addr, size, flags, is_shared);
if (!buffer) {
tr_err(&buffer_tr, "buffer_alloc(): could not alloc buffer structure");
tr_err(&buffer_tr, "could not alloc buffer structure");
rfree(stream_addr);
}

Expand All @@ -263,11 +263,11 @@ struct comp_buffer *buffer_alloc_range(size_t preferred_size, size_t minimum_siz
size_t size;
void *stream_addr = NULL;

tr_dbg(&buffer_tr, "buffer_alloc_range(): %zu -- %zu bytes", minimum_size, preferred_size);
tr_dbg(&buffer_tr, "%zu -- %zu bytes", minimum_size, preferred_size);

/* validate request */
if (minimum_size == 0 || preferred_size < minimum_size) {
tr_err(&buffer_tr, "buffer_alloc_range(): new size range %zu -- %zu is invalid",
tr_err(&buffer_tr, "new size range %zu -- %zu is invalid",
minimum_size, preferred_size);
return NULL;
}
Expand All @@ -282,17 +282,17 @@ struct comp_buffer *buffer_alloc_range(size_t preferred_size, size_t minimum_siz
break;
}

tr_dbg(&buffer_tr, "buffer_alloc_range(): allocated %zu bytes", size);
tr_dbg(&buffer_tr, "allocated %zu bytes", size);

if (!stream_addr) {
tr_err(&buffer_tr, "buffer_alloc_range(): could not alloc size = %zu bytes of type = 0x%x",
tr_err(&buffer_tr, "could not alloc size = %zu bytes of type = 0x%x",
minimum_size, flags);
return NULL;
}

buffer = buffer_alloc_struct(stream_addr, size, flags, is_shared);
if (!buffer) {
tr_err(&buffer_tr, "buffer_alloc_range(): could not alloc buffer structure");
tr_err(&buffer_tr, "could not alloc buffer structure");
rfree(stream_addr);
}

Expand Down
4 changes: 2 additions & 2 deletions src/audio/chain_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ static int chain_host_start(struct comp_dev *dev)
if (err < 0)
return err;

comp_info(dev, "chain_host_start(): dma_start() host chan_index = %u",
comp_info(dev, "dma_start() host chan_index = %u",
cd->chan_host->index);
return 0;
}
Expand Down Expand Up @@ -470,7 +470,7 @@ __cold static int chain_init(struct comp_dev *dev, void *addr, size_t length)
channel = cd->host_connector_node_id.f.v_index;
channel = dma_request_channel(cd->dma_host->z_dev, &channel);
if (channel < 0) {
comp_err(dev, "chain_init(): dma_request_channel() failed");
comp_err(dev, "dma_request_channel() failed");
return -EINVAL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/audio/channel_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct sof_ipc_channel_map *chmap_get(struct sof_ipc_stream_map *smap,
uint32_t byte = 0;

if (index >= smap->num_ch_map) {
tr_err(&chmap_tr, "chmap_get(): index %d out of bounds %d",
tr_err(&chmap_tr, "index %d out of bounds %d",
index, smap->num_ch_map);

return NULL;
Expand Down
12 changes: 6 additions & 6 deletions src/audio/codec/dts/dts.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ dts_codec_process(struct processing_module *mod,

/* Proceed only if we have enough data to fill the module buffer completely */
if (input_buffers[0].size < codec->mpd.in_buff_size) {
comp_dbg(dev, "dts_codec_process(): not enough data to process");
comp_dbg(dev, "not enough data to process");
return -ENODATA;
}

Expand Down Expand Up @@ -427,34 +427,34 @@ dts_codec_set_configuration(struct processing_module *mod, uint32_t config_id,
ret = module_set_configuration(mod, config_id, pos, data_offset_size, fragment,
fragment_size, response, response_size);
if (ret < 0) {
comp_err(dev, "dts_codec_set_configuration(): error %x from module_set_configuration()",
comp_err(dev, "error %x from module_set_configuration()",
ret);
return ret;
}

/* return if more fragments are expected */
if (pos != MODULE_CFG_FRAGMENT_LAST && pos != MODULE_CFG_FRAGMENT_SINGLE) {
comp_err(dev, "dts_codec_set_configuration(): pos %d error", pos);
comp_err(dev, "pos %d error", pos);
return 0;
}

#if CONFIG_IPC_MAJOR_3
// return if the module is not prepared
if (md->state < MODULE_INITIALIZED) {
comp_err(dev, "dts_codec_set_configuration(): state %d error", md->state);
comp_err(dev, "state %d error", md->state);
return 0;
}
#endif

/* whole configuration received, apply it now */
ret = dts_codec_apply_config(mod);
if (ret) {
comp_err(dev, "dts_codec_set_configuration(): error %x: runtime config apply failed",
comp_err(dev, "error %x: runtime config apply failed",
ret);
return ret;
}

comp_dbg(dev, "dts_codec_set_configuration(): config applied");
comp_dbg(dev, "config applied");

return 0;
}
Expand Down
18 changes: 9 additions & 9 deletions src/audio/component.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,62 +115,62 @@ int comp_set_state(struct comp_dev *dev, int cmd)
switch (cmd) {
case COMP_TRIGGER_START:
if (dev->state != COMP_STATE_PRE_ACTIVE) {
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_START",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_START",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_RELEASE:
if (dev->state != COMP_STATE_PRE_ACTIVE) {
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_RELEASE",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_RELEASE",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_STOP:
if (dev->state != COMP_STATE_ACTIVE &&
dev->state != COMP_STATE_PAUSED) {
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_STOP",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_STOP",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_PAUSE:
/* only support pausing for running */
if (dev->state != COMP_STATE_ACTIVE) {
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_PAUSE",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_PAUSE",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_RESET:
/* reset always succeeds */
if (dev->state == COMP_STATE_ACTIVE)
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_RESET",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_RESET",
dev->state);
else if (dev->state == COMP_STATE_PAUSED)
comp_info(dev, "comp_set_state(): state = %u, COMP_TRIGGER_RESET",
comp_info(dev, "state = %u, COMP_TRIGGER_RESET",
dev->state);
break;
case COMP_TRIGGER_PREPARE:
if (dev->state != COMP_STATE_READY) {
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_PREPARE",
comp_err(dev, "wrong state = %u, COMP_TRIGGER_PREPARE",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_PRE_START:
if (dev->state != COMP_STATE_PREPARE) {
comp_err(dev,
"comp_set_state(): wrong state = %u, COMP_TRIGGER_PRE_START",
"wrong state = %u, COMP_TRIGGER_PRE_START",
dev->state);
return -EINVAL;
}
break;
case COMP_TRIGGER_PRE_RELEASE:
if (dev->state != COMP_STATE_PAUSED) {
comp_err(dev,
"comp_set_state(): wrong state = %u, COMP_TRIGGER_PRE_RELEASE",
"wrong state = %u, COMP_TRIGGER_PRE_RELEASE",
dev->state);
return -EINVAL;
}
Expand Down
16 changes: 8 additions & 8 deletions src/audio/copier/copier_ipcgtw.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ int copier_ipcgtw_process(const struct ipc4_ipcgtw_cmd *cmd,
if (!dev)
return -ENODEV;

comp_dbg(dev, "copier_ipcgtw_process(): %x %x",
comp_dbg(dev, "%x %x",
cmd->primary.dat, cmd->extension.dat);

buf = get_buffer(dev);
Expand All @@ -113,7 +113,7 @@ int copier_ipcgtw_process(const struct ipc4_ipcgtw_cmd *cmd,
* case do not report error but return 0 bytes available for GET_DATA and
* 0 bytes free for SET_DATA.
*/
comp_warn(dev, "copier_ipcgtw_process(): no buffer found");
comp_warn(dev, "no buffer found");
}

out = (struct ipc4_ipc_gateway_cmd_data_reply *)reply_payload;
Expand Down Expand Up @@ -162,7 +162,7 @@ int copier_ipcgtw_process(const struct ipc4_ipcgtw_cmd *cmd,
break;

default:
comp_err(dev, "copier_ipcgtw_process(): unexpected cmd: %u",
comp_err(dev, "unexpected cmd: %u",
(unsigned int)cmd->primary.r.cmd);
return -EINVAL;
}
Expand All @@ -180,15 +180,15 @@ int copier_ipcgtw_params(struct ipcgtw_data *ipcgtw_data, struct comp_dev *dev,

buf = get_buffer(dev);
if (!buf) {
comp_err(dev, "ipcgtw_params(): no buffer found");
comp_err(dev, "no buffer found");
return -EINVAL;
}

/* resize buffer to size specified in IPC gateway config blob */
err = buffer_set_size(buf, ipcgtw_data->buf_size, 0);

if (err < 0) {
comp_err(dev, "ipcgtw_params(): failed to resize buffer to %u bytes",
comp_err(dev, "failed to resize buffer to %u bytes",
ipcgtw_data->buf_size);
return err;
}
Expand All @@ -203,7 +203,7 @@ void copier_ipcgtw_reset(struct comp_dev *dev)
if (buf) {
audio_stream_reset(&buf->stream);
} else {
comp_warn(dev, "ipcgtw_reset(): no buffer found");
comp_warn(dev, "no buffer found");
}
}

Expand All @@ -221,7 +221,7 @@ __cold int copier_ipcgtw_create(struct comp_dev *dev, struct copier_data *cd,

gtw_cfg = &copier->gtw_cfg;
if (!gtw_cfg->config_length) {
comp_err(dev, "ipcgtw_create(): empty ipc4_gateway_config_data");
comp_err(dev, "empty ipc4_gateway_config_data");
return -EINVAL;
}

Expand All @@ -244,7 +244,7 @@ __cold int copier_ipcgtw_create(struct comp_dev *dev, struct copier_data *cd,
/* The buffer connected to the IPC gateway will be resized later in ipcgtw_params()
* to the size specified in the IPC gateway blob.
*/
comp_dbg(dev, "ipcgtw_create(): buffer_size: %u", blob->buffer_size);
comp_dbg(dev, "buffer_size: %u", blob->buffer_size);
ipcgtw_data->buf_size = blob->buffer_size;

cd->converter[IPC4_COPIER_GATEWAY_PIN] =
Expand Down
Loading