ASoC: SOF/Intel: remove __func__ from dev_dbg()
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Cleanups suggested by Greg KH during SoundWire reviews, since the __func__ information can be added with the dyndbg kernel parameter [1]. The first two patches change the error level in cases where the use of dev_dbg() was inconsistent with an aborted programming sequence. [1] https://lore.kernel.org/alsa-devel/20220610023537.27223-2-yung-chuan.liao@linux.intel.com/
This commit is contained in:
commit
bdb94f002e
|
@ -62,8 +62,8 @@ int hda_dsp_hdmi_build_controls(struct snd_soc_card *card,
|
|||
hpcm->pcm = spcm;
|
||||
hpcm->device = spcm->device;
|
||||
dev_dbg(card->dev,
|
||||
"%s: mapping HDMI converter %d to PCM %d (%p)\n",
|
||||
__func__, i, hpcm->device, spcm);
|
||||
"mapping HDMI converter %d to PCM %d (%p)\n",
|
||||
i, hpcm->device, spcm);
|
||||
} else {
|
||||
hpcm->pcm = NULL;
|
||||
hpcm->device = SNDRV_PCM_INVALID_DEVICE;
|
||||
|
|
|
@ -75,7 +75,7 @@ skl_hda_add_dai_link(struct snd_soc_card *card, struct snd_soc_dai_link *link)
|
|||
struct skl_hda_private *ctx = snd_soc_card_get_drvdata(card);
|
||||
int ret = 0;
|
||||
|
||||
dev_dbg(card->dev, "%s: dai link name - %s\n", __func__, link->name);
|
||||
dev_dbg(card->dev, "dai link name - %s\n", link->name);
|
||||
link->platforms->name = ctx->platform_name;
|
||||
link->nonatomic = 1;
|
||||
|
||||
|
@ -203,7 +203,7 @@ static int skl_hda_audio_probe(struct platform_device *pdev)
|
|||
struct skl_hda_private *ctx;
|
||||
int ret;
|
||||
|
||||
dev_dbg(&pdev->dev, "%s: entry\n", __func__);
|
||||
dev_dbg(&pdev->dev, "entry\n");
|
||||
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
|
|
|
@ -1447,7 +1447,7 @@ static int mc_probe(struct platform_device *pdev)
|
|||
int amp_num = 0, i;
|
||||
int ret;
|
||||
|
||||
dev_dbg(&pdev->dev, "Entry %s\n", __func__);
|
||||
dev_dbg(&pdev->dev, "Entry\n");
|
||||
|
||||
ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
|
|
|
@ -393,7 +393,7 @@ static int hda_dai_prepare(struct snd_pcm_substream *substream, struct snd_soc_d
|
|||
if (hext_stream && hext_stream->link_prepared)
|
||||
return 0;
|
||||
|
||||
dev_dbg(sdev->dev, "%s: prepare stream dir %d\n", __func__, substream->stream);
|
||||
dev_dbg(sdev->dev, "prepare stream dir %d\n", substream->stream);
|
||||
|
||||
ret = hda_link_dma_prepare(substream);
|
||||
if (ret < 0)
|
||||
|
@ -419,7 +419,7 @@ static int ipc3_hda_dai_trigger(struct snd_pcm_substream *substream,
|
|||
struct snd_soc_dapm_widget *w;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dai->dev, "%s: cmd=%d dai %s direction %d\n", __func__, cmd,
|
||||
dev_dbg(dai->dev, "cmd=%d dai %s direction %d\n", cmd,
|
||||
dai->name, substream->stream);
|
||||
|
||||
ret = hda_link_dma_trigger(substream, cmd);
|
||||
|
@ -468,7 +468,7 @@ static int ipc4_hda_dai_trigger(struct snd_pcm_substream *substream,
|
|||
struct snd_soc_dai *cpu_dai;
|
||||
int ret;
|
||||
|
||||
dev_dbg(dai->dev, "%s: cmd=%d dai %s direction %d\n", __func__, cmd,
|
||||
dev_dbg(dai->dev, "cmd=%d dai %s direction %d\n", cmd,
|
||||
dai->name, substream->stream);
|
||||
|
||||
hstream = substream->runtime->private_data;
|
||||
|
|
|
@ -743,7 +743,7 @@ int hda_dsp_resume(struct snd_sof_dev *sdev)
|
|||
if (hlink->ref_count) {
|
||||
ret = snd_hdac_ext_bus_link_power_up(hlink);
|
||||
if (ret < 0) {
|
||||
dev_dbg(sdev->dev,
|
||||
dev_err(sdev->dev,
|
||||
"error %d in %s: failed to power up links",
|
||||
ret, __func__);
|
||||
return ret;
|
||||
|
@ -871,7 +871,7 @@ int hda_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state)
|
|||
/* no link can be powered in s0ix state */
|
||||
ret = snd_hdac_ext_bus_link_power_down_all(bus);
|
||||
if (ret < 0) {
|
||||
dev_dbg(sdev->dev,
|
||||
dev_err(sdev->dev,
|
||||
"error %d in %s: failed to power down links",
|
||||
ret, __func__);
|
||||
return ret;
|
||||
|
|
|
@ -116,13 +116,13 @@ int hda_dsp_stream_setup_bdl(struct snd_sof_dev *sdev,
|
|||
int remain, ioc;
|
||||
|
||||
period_bytes = hstream->period_bytes;
|
||||
dev_dbg(sdev->dev, "%s: period_bytes:0x%x\n", __func__, period_bytes);
|
||||
dev_dbg(sdev->dev, "period_bytes:0x%x\n", period_bytes);
|
||||
if (!period_bytes)
|
||||
period_bytes = hstream->bufsize;
|
||||
|
||||
periods = hstream->bufsize / period_bytes;
|
||||
|
||||
dev_dbg(sdev->dev, "%s: periods:%d\n", __func__, periods);
|
||||
dev_dbg(sdev->dev, "periods:%d\n", periods);
|
||||
|
||||
remain = hstream->bufsize % period_bytes;
|
||||
if (remain)
|
||||
|
@ -271,7 +271,7 @@ int hda_dsp_stream_put(struct snd_sof_dev *sdev, int direction, int stream_tag)
|
|||
HDA_VS_INTEL_EM2_L1SEN, HDA_VS_INTEL_EM2_L1SEN);
|
||||
|
||||
if (!found) {
|
||||
dev_dbg(sdev->dev, "%s: stream_tag %d not opened!\n",
|
||||
dev_err(sdev->dev, "%s: stream_tag %d not opened!\n",
|
||||
__func__, stream_tag);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -540,8 +540,7 @@ static irqreturn_t mtl_ipc_irq_thread(int irq, void *context)
|
|||
|
||||
if (!ipc_irq) {
|
||||
/* This interrupt is not shared so no need to return IRQ_NONE. */
|
||||
dev_dbg_ratelimited(sdev->dev, "%s nothing to do in IPC IRQ thread\n",
|
||||
__func__);
|
||||
dev_dbg_ratelimited(sdev->dev, "nothing to do in IPC IRQ thread\n");
|
||||
}
|
||||
|
||||
return IRQ_HANDLED;
|
||||
|
|
|
@ -470,7 +470,7 @@ static int ipc3_dtrace_enable(struct snd_sof_dev *sdev)
|
|||
dev_err(sdev->dev, "Host dtrace init failed: %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
dev_dbg(sdev->dev, "%s: stream_tag: %d\n", __func__, params.stream_tag);
|
||||
dev_dbg(sdev->dev, "stream_tag: %d\n", params.stream_tag);
|
||||
|
||||
/* send IPC to the DSP */
|
||||
priv->dtrace_state = SOF_DTRACE_INITIALIZING;
|
||||
|
@ -544,8 +544,7 @@ static int ipc3_dtrace_init(struct snd_sof_dev *sdev)
|
|||
goto table_err;
|
||||
|
||||
priv->dma_trace_pages = ret;
|
||||
dev_dbg(sdev->dev, "%s: dma_trace_pages: %d\n", __func__,
|
||||
priv->dma_trace_pages);
|
||||
dev_dbg(sdev->dev, "dma_trace_pages: %d\n", priv->dma_trace_pages);
|
||||
|
||||
if (sdev->first_boot) {
|
||||
ret = debugfs_create_dtrace(sdev);
|
||||
|
|
|
@ -75,13 +75,12 @@ static int ipc3_fw_ext_man_get_config_data(struct snd_sof_dev *sdev,
|
|||
elems_size = config->hdr.size - sizeof(struct sof_ext_man_elem_header);
|
||||
elems_counter = elems_size / sizeof(struct sof_config_elem);
|
||||
|
||||
dev_dbg(sdev->dev, "%s can hold up to %d config elements\n",
|
||||
__func__, elems_counter);
|
||||
dev_dbg(sdev->dev, "manifest can hold up to %d config elements\n", elems_counter);
|
||||
|
||||
for (i = 0; i < elems_counter; ++i) {
|
||||
elem = &config->elems[i];
|
||||
dev_dbg(sdev->dev, "%s get index %d token %d val %d\n",
|
||||
__func__, i, elem->token, elem->value);
|
||||
dev_dbg(sdev->dev, "get index %d token %d val %d\n",
|
||||
i, elem->token, elem->value);
|
||||
switch (elem->token) {
|
||||
case SOF_EXT_MAN_CONFIG_EMPTY:
|
||||
/* unused memory space is zero filled - mapped to EMPTY elements */
|
||||
|
@ -323,10 +322,10 @@ static int sof_ipc3_load_fw_to_dsp(struct snd_sof_dev *sdev)
|
|||
header = (struct snd_sof_fw_header *)(fw->data + plat_data->fw_offset);
|
||||
load_module = sof_ops(sdev)->load_module;
|
||||
if (!load_module) {
|
||||
dev_dbg(sdev->dev, "%s: Using generic module loading\n", __func__);
|
||||
dev_dbg(sdev->dev, "Using generic module loading\n");
|
||||
load_module = sof_ipc3_parse_module_memcpy;
|
||||
} else {
|
||||
dev_dbg(sdev->dev, "%s: Using custom module loading\n", __func__);
|
||||
dev_dbg(sdev->dev, "Using custom module loading\n");
|
||||
}
|
||||
|
||||
/* parse each module */
|
||||
|
|
|
@ -1452,8 +1452,8 @@ static int sof_ipc3_widget_setup_comp_dai(struct snd_sof_widget *swidget)
|
|||
if (ret < 0)
|
||||
goto free;
|
||||
|
||||
dev_dbg(scomp->dev, "%s dai %s: type %d index %d\n",
|
||||
__func__, swidget->widget->name, comp_dai->type, comp_dai->dai_index);
|
||||
dev_dbg(scomp->dev, "dai %s: type %d index %d\n",
|
||||
swidget->widget->name, comp_dai->type, comp_dai->dai_index);
|
||||
sof_dbg_comp_config(scomp, &comp_dai->config);
|
||||
|
||||
/* now update DAI config */
|
||||
|
|
|
@ -804,8 +804,8 @@ static int sof_ipc4_init_audio_fmt(struct snd_sof_dev *sdev,
|
|||
valid_bits = SOF_IPC4_AUDIO_FORMAT_CFG_V_BIT_DEPTH(fmt->fmt_cfg);
|
||||
if (params_rate(params) == rate && params_channels(params) == channels &&
|
||||
sample_valid_bits == valid_bits) {
|
||||
dev_dbg(sdev->dev, "%s: matching audio format index for %uHz, %ubit, %u channels: %d\n",
|
||||
__func__, rate, valid_bits, channels, i);
|
||||
dev_dbg(sdev->dev, "matching audio format index for %uHz, %ubit, %u channels: %d\n",
|
||||
rate, valid_bits, channels, i);
|
||||
|
||||
/* copy ibs/obs and input format */
|
||||
memcpy(base_config, &available_fmt->base_config[i],
|
||||
|
@ -919,8 +919,8 @@ static int snd_sof_get_hw_config_params(struct snd_sof_dev *sdev, struct snd_sof
|
|||
*channel_count = le32_to_cpu(hw_config->tdm_slots);
|
||||
*sample_rate = le32_to_cpu(hw_config->fsync_rate);
|
||||
|
||||
dev_dbg(sdev->dev, "%s: sample rate: %d sample width: %d channels: %d\n",
|
||||
__func__, *sample_rate, *bit_depth, *channel_count);
|
||||
dev_dbg(sdev->dev, "sample rate: %d sample width: %d channels: %d\n",
|
||||
*sample_rate, *bit_depth, *channel_count);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -954,8 +954,8 @@ static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_s
|
|||
return 0;
|
||||
}
|
||||
|
||||
dev_dbg(sdev->dev, "%s: dai index %d nhlt type %d direction %d\n",
|
||||
__func__, dai_index, nhlt_type, dir);
|
||||
dev_dbg(sdev->dev, "dai index %d nhlt type %d direction %d\n",
|
||||
dai_index, nhlt_type, dir);
|
||||
|
||||
/* find NHLT blob with matching params */
|
||||
cfg = intel_nhlt_get_endpoint_blob(sdev->dev, ipc4_data->nhlt, dai_index, nhlt_type,
|
||||
|
@ -1005,7 +1005,7 @@ sof_ipc4_prepare_copier_module(struct snd_sof_widget *swidget,
|
|||
u32 **data;
|
||||
int ipc_size, ret;
|
||||
|
||||
dev_dbg(sdev->dev, "%s: copier %s, type %d", __func__, swidget->widget->name, swidget->id);
|
||||
dev_dbg(sdev->dev, "copier %s, type %d", swidget->widget->name, swidget->id);
|
||||
|
||||
switch (swidget->id) {
|
||||
case snd_soc_dapm_aif_in:
|
||||
|
@ -1446,7 +1446,7 @@ static int sof_ipc4_route_setup(struct snd_sof_dev *sdev, struct snd_sof_route *
|
|||
int dst_queue = 0;
|
||||
int ret;
|
||||
|
||||
dev_dbg(sdev->dev, "%s: bind %s -> %s\n", __func__,
|
||||
dev_dbg(sdev->dev, "bind %s -> %s\n",
|
||||
src_widget->widget->name, sink_widget->widget->name);
|
||||
|
||||
header = src_fw_module->man4_module_entry.id;
|
||||
|
@ -1483,7 +1483,7 @@ static int sof_ipc4_route_free(struct snd_sof_dev *sdev, struct snd_sof_route *s
|
|||
int dst_queue = 0;
|
||||
int ret;
|
||||
|
||||
dev_dbg(sdev->dev, "%s: unbind modules %s -> %s\n", __func__,
|
||||
dev_dbg(sdev->dev, "unbind modules %s -> %s\n",
|
||||
src_widget->widget->name, sink_widget->widget->name);
|
||||
|
||||
header = src_fw_module->man4_module_entry.id;
|
||||
|
|
|
@ -574,7 +574,7 @@ static void sof_ipc4_rx_msg(struct snd_sof_dev *sdev)
|
|||
data_size = sizeof(struct sof_ipc4_notify_resource_data);
|
||||
break;
|
||||
default:
|
||||
dev_dbg(sdev->dev, "%s: Unhandled DSP message: %#x|%#x\n", __func__,
|
||||
dev_dbg(sdev->dev, "Unhandled DSP message: %#x|%#x\n",
|
||||
ipc4_msg->primary, ipc4_msg->extension);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -383,8 +383,8 @@ void sof_client_ipc_rx_dispatcher(struct snd_sof_dev *sdev, void *msg_buf)
|
|||
|
||||
msg_type = SOF_IPC4_NOTIFICATION_TYPE_GET(msg->primary);
|
||||
} else {
|
||||
dev_dbg_once(sdev->dev, "%s: Not supported IPC version: %d\n",
|
||||
__func__, sdev->pdata->ipc_type);
|
||||
dev_dbg_once(sdev->dev, "Not supported IPC version: %d\n",
|
||||
sdev->pdata->ipc_type);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue