Skip to content

Commit 7ed4499

Browse files
lyakhlgirdwood
authored andcommitted
audio: remove function names from logging calls (8/8)
Remove verbatim function names for src/audio. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
1 parent 4ec4c77 commit 7ed4499

File tree

8 files changed

+97
-97
lines changed

8 files changed

+97
-97
lines changed

src/audio/base_fw_intel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ __cold static int basefw_mem_state_info(uint32_t *data_offset, char *data)
184184
/* size is also saved as tuple length */
185185
tuple_data = rballoc(SOF_MEM_FLAG_USER, size);
186186
if (!tuple_data) {
187-
LOG_ERR("basefw_mem_state_info(): allocation failed");
187+
LOG_ERR("allocation failed");
188188
return IPC4_ERROR_INVALID_PARAM;
189189
}
190190

src/audio/chain_dma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int chain_host_start(struct comp_dev *dev)
8484
if (err < 0)
8585
return err;
8686

87-
comp_info(dev, "chain_host_start(): dma_start() host chan_index = %u",
87+
comp_info(dev, "dma_start() host chan_index = %u",
8888
cd->chan_host->index);
8989
return 0;
9090
}
@@ -470,7 +470,7 @@ __cold static int chain_init(struct comp_dev *dev, void *addr, size_t length)
470470
channel = cd->host_connector_node_id.f.v_index;
471471
channel = dma_request_channel(cd->dma_host->z_dev, &channel);
472472
if (channel < 0) {
473-
comp_err(dev, "chain_init(): dma_request_channel() failed");
473+
comp_err(dev, "dma_request_channel() failed");
474474
return -EINVAL;
475475
}
476476

src/audio/channel_map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ struct sof_ipc_channel_map *chmap_get(struct sof_ipc_stream_map *smap,
2828
uint32_t byte = 0;
2929

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

3434
return NULL;

src/audio/component.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -115,62 +115,62 @@ int comp_set_state(struct comp_dev *dev, int cmd)
115115
switch (cmd) {
116116
case COMP_TRIGGER_START:
117117
if (dev->state != COMP_STATE_PRE_ACTIVE) {
118-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_START",
118+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_START",
119119
dev->state);
120120
return -EINVAL;
121121
}
122122
break;
123123
case COMP_TRIGGER_RELEASE:
124124
if (dev->state != COMP_STATE_PRE_ACTIVE) {
125-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_RELEASE",
125+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_RELEASE",
126126
dev->state);
127127
return -EINVAL;
128128
}
129129
break;
130130
case COMP_TRIGGER_STOP:
131131
if (dev->state != COMP_STATE_ACTIVE &&
132132
dev->state != COMP_STATE_PAUSED) {
133-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_STOP",
133+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_STOP",
134134
dev->state);
135135
return -EINVAL;
136136
}
137137
break;
138138
case COMP_TRIGGER_PAUSE:
139139
/* only support pausing for running */
140140
if (dev->state != COMP_STATE_ACTIVE) {
141-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_PAUSE",
141+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_PAUSE",
142142
dev->state);
143143
return -EINVAL;
144144
}
145145
break;
146146
case COMP_TRIGGER_RESET:
147147
/* reset always succeeds */
148148
if (dev->state == COMP_STATE_ACTIVE)
149-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_RESET",
149+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_RESET",
150150
dev->state);
151151
else if (dev->state == COMP_STATE_PAUSED)
152-
comp_info(dev, "comp_set_state(): state = %u, COMP_TRIGGER_RESET",
152+
comp_info(dev, "state = %u, COMP_TRIGGER_RESET",
153153
dev->state);
154154
break;
155155
case COMP_TRIGGER_PREPARE:
156156
if (dev->state != COMP_STATE_READY) {
157-
comp_err(dev, "comp_set_state(): wrong state = %u, COMP_TRIGGER_PREPARE",
157+
comp_err(dev, "wrong state = %u, COMP_TRIGGER_PREPARE",
158158
dev->state);
159159
return -EINVAL;
160160
}
161161
break;
162162
case COMP_TRIGGER_PRE_START:
163163
if (dev->state != COMP_STATE_PREPARE) {
164164
comp_err(dev,
165-
"comp_set_state(): wrong state = %u, COMP_TRIGGER_PRE_START",
165+
"wrong state = %u, COMP_TRIGGER_PRE_START",
166166
dev->state);
167167
return -EINVAL;
168168
}
169169
break;
170170
case COMP_TRIGGER_PRE_RELEASE:
171171
if (dev->state != COMP_STATE_PAUSED) {
172172
comp_err(dev,
173-
"comp_set_state(): wrong state = %u, COMP_TRIGGER_PRE_RELEASE",
173+
"wrong state = %u, COMP_TRIGGER_PRE_RELEASE",
174174
dev->state);
175175
return -EINVAL;
176176
}

src/audio/dai-legacy.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int dai_common_new(struct dai_data *dd, struct comp_dev *dev, const struct ipc_c
154154

155155
dd->dai = dai_get(dai->type, dai->dai_index, DAI_CREAT);
156156
if (!dd->dai) {
157-
comp_cl_err(&comp_dai, "dai_common_new(): dai_get() failed to create DAI.");
157+
comp_cl_err(&comp_dai, "dai_get() failed to create DAI.");
158158
return -ENODEV;
159159
}
160160
dd->dai->dd = dd;
@@ -169,7 +169,7 @@ int dai_common_new(struct dai_data *dd, struct comp_dev *dev, const struct ipc_c
169169

170170
dd->dma = dma_get(dir, caps, dma_dev, DMA_ACCESS_SHARED);
171171
if (!dd->dma) {
172-
comp_cl_err(&comp_dai, "dai_common_new(): dma_get() failed to get shared access to DMA.");
172+
comp_cl_err(&comp_dai, "dma_get() failed to get shared access to DMA.");
173173
return -ENODEV;
174174
}
175175

@@ -263,7 +263,7 @@ int dai_common_get_hw_params(struct dai_data *dd, struct comp_dev *dev,
263263
/* fetching hw dai stream params */
264264
ret = dai_get_hw_params(dd->dai, params, dir);
265265
if (ret < 0) {
266-
comp_err(dev, "dai_comp_get_hw_params(): dai_get_hw_params failed ret %d",
266+
comp_err(dev, "dai_get_hw_params failed ret %d",
267267
ret);
268268
return ret;
269269
}
@@ -298,7 +298,7 @@ static int dai_comp_hw_params(struct comp_dev *dev,
298298
/* configure hw dai stream params */
299299
ret = dai_hw_params(dd->dai, params);
300300
if (ret < 0) {
301-
comp_err(dev, "dai_comp_hw_params(): dai_hw_params failed ret %d",
301+
comp_err(dev, "dai_hw_params failed ret %d",
302302
ret);
303303
return ret;
304304
}
@@ -323,13 +323,13 @@ static int dai_verify_params(struct dai_data *dd, struct comp_dev *dev,
323323
* pcm_converter functions.
324324
*/
325325
if (hw_params.rate && hw_params.rate != params->rate) {
326-
comp_err(dev, "dai_verify_params(): pcm rate parameter %d does not match hardware rate %d",
326+
comp_err(dev, "pcm rate parameter %d does not match hardware rate %d",
327327
params->rate, hw_params.rate);
328328
return -EINVAL;
329329
}
330330

331331
if (hw_params.channels && hw_params.channels != params->channels) {
332-
comp_err(dev, "dai_verify_params(): pcm channels parameter %d does not match hardware channels %d",
332+
comp_err(dev, "pcm channels parameter %d does not match hardware channels %d",
333333
params->channels, hw_params.channels);
334334
return -EINVAL;
335335
}
@@ -355,7 +355,7 @@ static int dai_playback_params(struct comp_dev *dev, uint32_t period_bytes,
355355
dd->process = pcm_get_conversion_function(local_fmt, dma_fmt);
356356

357357
if (!dd->process) {
358-
comp_err(dev, "dai_playback_params(): converter function NULL: local fmt %d dma fmt %d\n",
358+
comp_err(dev, "converter function NULL: local fmt %d dma fmt %d\n",
359359
local_fmt, dma_fmt);
360360
return -EINVAL;
361361
}
@@ -388,7 +388,7 @@ static int dai_playback_params(struct comp_dev *dev, uint32_t period_bytes,
388388
(uintptr_t)(audio_stream_get_addr(&dd->dma_buffer->stream)),
389389
fifo);
390390
if (err < 0)
391-
comp_err(dev, "dai_playback_params(): dma_sg_alloc() for period_count %d period_bytes %d failed with err = %d",
391+
comp_err(dev, "dma_sg_alloc() for period_count %d period_bytes %d failed with err = %d",
392392
period_count, period_bytes, err);
393393
}
394394

@@ -409,7 +409,7 @@ static int dai_capture_params(struct comp_dev *dev, uint32_t period_bytes,
409409
dd->process = pcm_get_conversion_function(dma_fmt, local_fmt);
410410

411411
if (!dd->process) {
412-
comp_err(dev, "dai_capture_params(): converter function NULL: local fmt %d dma fmt %d\n",
412+
comp_err(dev, "converter function NULL: local fmt %d dma fmt %d\n",
413413
local_fmt, dma_fmt);
414414
return -EINVAL;
415415
}
@@ -453,7 +453,7 @@ static int dai_capture_params(struct comp_dev *dev, uint32_t period_bytes,
453453
(uintptr_t)(audio_stream_get_addr(&dd->dma_buffer->stream)),
454454
fifo);
455455
if (err < 0)
456-
comp_err(dev, "dai_capture_params(): dma_sg_alloc() for period_count %d period_bytes %d failed with err = %d",
456+
comp_err(dev, "dma_sg_alloc() for period_count %d period_bytes %d failed with err = %d",
457457
period_count, period_bytes, err);
458458
}
459459

@@ -481,14 +481,14 @@ int dai_common_params(struct dai_data *dd, struct comp_dev *dev,
481481

482482
err = dai_verify_params(dd, dev, params);
483483
if (err < 0) {
484-
comp_err(dev, "dai_params(): pcm params verification failed.");
484+
comp_err(dev, "pcm params verification failed.");
485485
return -EINVAL;
486486
}
487487

488488
/* params verification passed, so now configure hw dai stream params */
489489
err = dai_comp_hw_params(dev, params);
490490
if (err < 0) {
491-
comp_err(dev, "dai_params(): dai_comp_hw_params failed err %d", err);
491+
comp_err(dev, "dai_comp_hw_params failed err %d", err);
492492
return err;
493493
}
494494

@@ -505,30 +505,30 @@ int dai_common_params(struct dai_data *dd, struct comp_dev *dev,
505505

506506
/* can set params on only init state */
507507
if (dev->state != COMP_STATE_READY) {
508-
comp_err(dev, "dai_params(): Component is in state %d, expected COMP_STATE_READY.",
508+
comp_err(dev, "Component is in state %d, expected COMP_STATE_READY.",
509509
dev->state);
510510
return -EINVAL;
511511
}
512512

513513
err = dma_get_attribute_legacy(dd->dma, DMA_ATTR_BUFFER_ADDRESS_ALIGNMENT,
514514
&addr_align);
515515
if (err < 0) {
516-
comp_err(dev, "dai_params(): could not get dma buffer address alignment, err = %d",
516+
comp_err(dev, "could not get dma buffer address alignment, err = %d",
517517
err);
518518
return err;
519519
}
520520

521521
err = dma_get_attribute_legacy(dd->dma, DMA_ATTR_BUFFER_ALIGNMENT, &align);
522522
if (err < 0 || !align) {
523-
comp_err(dev, "dai_params(): could not get valid dma buffer alignment, err = %d, align = %u",
523+
comp_err(dev, "could not get valid dma buffer alignment, err = %d, align = %u",
524524
err, align);
525525
return -EINVAL;
526526
}
527527

528528
err = dma_get_attribute_legacy(dd->dma, DMA_ATTR_BUFFER_PERIOD_COUNT,
529529
&period_count);
530530
if (err < 0 || !period_count) {
531-
comp_err(dev, "dai_params(): could not get valid dma buffer period count, err = %d, period_count = %u",
531+
comp_err(dev, "could not get valid dma buffer period count, err = %d, period_count = %u",
532532
err, period_count);
533533
return -EINVAL;
534534
}
@@ -540,7 +540,7 @@ int dai_common_params(struct dai_data *dd, struct comp_dev *dev,
540540
/* calculate period size */
541541
period_bytes = dev->frames * frame_size;
542542
if (!period_bytes) {
543-
comp_err(dev, "dai_params(): invalid period_bytes.");
543+
comp_err(dev, "invalid period_bytes.");
544544
return -EINVAL;
545545
}
546546

@@ -556,15 +556,15 @@ int dai_common_params(struct dai_data *dd, struct comp_dev *dev,
556556
err = buffer_set_size(dd->dma_buffer, buffer_size, addr_align);
557557

558558
if (err < 0) {
559-
comp_err(dev, "dai_params(): buffer_set_size() failed, buffer_size = %u",
559+
comp_err(dev, "buffer_set_size() failed, buffer_size = %u",
560560
buffer_size);
561561
return err;
562562
}
563563
} else {
564564
dd->dma_buffer = buffer_alloc(buffer_size, SOF_MEM_FLAG_USER | SOF_MEM_FLAG_DMA,
565565
addr_align, false);
566566
if (!dd->dma_buffer) {
567-
comp_err(dev, "dai_params(): failed to alloc dma buffer");
567+
comp_err(dev, "failed to alloc dma buffer");
568568
return -ENOMEM;
569569
}
570570

@@ -599,7 +599,7 @@ int dai_common_config_prepare(struct dai_data *dd, struct comp_dev *dev)
599599

600600
/* cannot configure DAI while active */
601601
if (dev->state == COMP_STATE_ACTIVE) {
602-
comp_info(dev, "dai_common_config_prepare(): Component is in active state.");
602+
comp_info(dev, "Component is in active state.");
603603
return 0;
604604
}
605605

@@ -609,7 +609,7 @@ int dai_common_config_prepare(struct dai_data *dd, struct comp_dev *dev)
609609
}
610610

611611
if (dd->chan) {
612-
comp_info(dev, "dai_common_config_prepare(): dma channel index %d already configured",
612+
comp_info(dev, "dma channel index %d already configured",
613613
dd->chan->index);
614614
return 0;
615615
}
@@ -626,14 +626,14 @@ int dai_common_config_prepare(struct dai_data *dd, struct comp_dev *dev)
626626
/* allocate DMA channel */
627627
dd->chan = dma_channel_get_legacy(dd->dma, channel);
628628
if (!dd->chan) {
629-
comp_err(dev, "dai_common_config_prepare(): dma_channel_get() failed");
629+
comp_err(dev, "dma_channel_get() failed");
630630
dd->chan = NULL;
631631
return -EIO;
632632
}
633633

634634
dd->chan->dev_data = dd;
635635

636-
comp_info(dev, "dai_common_config_prepare(): new configured dma channel index %d",
636+
comp_info(dev, "new configured dma channel index %d",
637637
dd->chan->index);
638638

639639
/* setup callback */
@@ -650,13 +650,13 @@ int dai_common_prepare(struct dai_data *dd, struct comp_dev *dev)
650650
dd->total_data_processed = 0;
651651

652652
if (!dd->chan) {
653-
comp_err(dev, "dai_prepare(): Missing dd->chan.");
653+
comp_err(dev, "Missing dd->chan.");
654654
comp_set_state(dev, COMP_TRIGGER_RESET);
655655
return -EINVAL;
656656
}
657657

658658
if (!dd->config.elem_array.elems) {
659-
comp_err(dev, "dai_prepare(): Missing dd->config.elem_array.elems.");
659+
comp_err(dev, "Missing dd->config.elem_array.elems.");
660660
comp_set_state(dev, COMP_TRIGGER_RESET);
661661
return -EINVAL;
662662
}
@@ -902,10 +902,10 @@ static void dai_report_xrun(struct comp_dev *dev, uint32_t bytes)
902902
struct dai_data *dd = comp_get_drvdata(dev);
903903

904904
if (dev->direction == SOF_IPC_STREAM_PLAYBACK) {
905-
comp_err(dev, "dai_report_xrun(): underrun due to no data available");
905+
comp_err(dev, "underrun due to no data available");
906906
comp_underrun(dev, dd->local_buffer, bytes);
907907
} else {
908-
comp_err(dev, "dai_report_xrun(): overrun due to no space available");
908+
comp_err(dev, "overrun due to no space available");
909909
comp_overrun(dev, dd->local_buffer, bytes);
910910
}
911911
}
@@ -958,16 +958,16 @@ int dai_common_copy(struct dai_data *dd, struct comp_dev *dev, pcm_converter_fun
958958
/* Check possibility of glitch occurrence */
959959
if (dev->direction == SOF_IPC_STREAM_PLAYBACK &&
960960
copy_bytes + avail_bytes < dd->period_bytes)
961-
comp_warn(dev, "dai_common_copy(): Copy_bytes %d + avail bytes %d < period bytes %d, possible glitch",
961+
comp_warn(dev, "Copy_bytes %d + avail bytes %d < period bytes %d, possible glitch",
962962
copy_bytes, avail_bytes, dd->period_bytes);
963963
else if (dev->direction == SOF_IPC_STREAM_CAPTURE &&
964964
copy_bytes + free_bytes < dd->period_bytes)
965-
comp_warn(dev, "dai_common_copy(): Copy_bytes %d + free bytes %d < period bytes %d, possible glitch",
965+
comp_warn(dev, "Copy_bytes %d + free bytes %d < period bytes %d, possible glitch",
966966
copy_bytes, free_bytes, dd->period_bytes);
967967

968968
/* return if nothing to copy */
969969
if (!copy_bytes) {
970-
comp_warn(dev, "dai_common_copy(): nothing to copy");
970+
comp_warn(dev, "nothing to copy");
971971
return 0;
972972
}
973973

0 commit comments

Comments
 (0)