summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/lpass-platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/qcom/lpass-platform.c')
-rw-r--r--sound/soc/qcom/lpass-platform.c106
1 files changed, 52 insertions, 54 deletions
diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index dd5bdd0da730..7aabf08de3d4 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -89,8 +89,7 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)
LPAIF_DMACTL_REG(v, dma_ch, dir), 0);
if (ret) {
dev_err(soc_runtime->dev,
- "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ "error writing to rdmactl reg: %d\n", ret);
return ret;
}
@@ -103,8 +102,8 @@ static int lpass_platform_pcmops_open(struct snd_pcm_substream *substream)
ret = snd_pcm_hw_constraint_integer(runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
if (ret < 0) {
- dev_err(soc_runtime->dev, "%s() setting constraints failed: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "setting constraints failed: %d\n",
+ ret);
return -EINVAL;
}
@@ -151,8 +150,8 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream,
bitwidth = snd_pcm_format_width(format);
if (bitwidth < 0) {
- dev_err(soc_runtime->dev, "%s() invalid bit width given: %d\n",
- __func__, bitwidth);
+ dev_err(soc_runtime->dev, "invalid bit width given: %d\n",
+ bitwidth);
return bitwidth;
}
@@ -177,8 +176,9 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream,
regval |= LPAIF_DMACTL_WPSCNT_FOUR;
break;
default:
- dev_err(soc_runtime->dev, "%s() invalid PCM config given: bw=%d, ch=%u\n",
- __func__, bitwidth, channels);
+ dev_err(soc_runtime->dev,
+ "invalid PCM config given: bw=%d, ch=%u\n",
+ bitwidth, channels);
return -EINVAL;
}
break;
@@ -201,22 +201,23 @@ static int lpass_platform_pcmops_hw_params(struct snd_pcm_substream *substream,
regval |= LPAIF_DMACTL_WPSCNT_EIGHT;
break;
default:
- dev_err(soc_runtime->dev, "%s() invalid PCM config given: bw=%d, ch=%u\n",
- __func__, bitwidth, channels);
+ dev_err(soc_runtime->dev,
+ "invalid PCM config given: bw=%d, ch=%u\n",
+ bitwidth, channels);
return -EINVAL;
}
break;
default:
- dev_err(soc_runtime->dev, "%s() invalid PCM config given: bw=%d, ch=%u\n",
- __func__, bitwidth, channels);
+ dev_err(soc_runtime->dev, "invalid PCM config given: bw=%d, ch=%u\n",
+ bitwidth, channels);
return -EINVAL;
}
ret = regmap_write(drvdata->lpaif_map,
LPAIF_DMACTL_REG(v, ch, dir), regval);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmactl reg: %d\n",
+ ret);
return ret;
}
@@ -237,8 +238,8 @@ static int lpass_platform_pcmops_hw_free(struct snd_pcm_substream *substream)
reg = LPAIF_DMACTL_REG(v, pcm_data->dma_ch, substream->stream);
ret = regmap_write(drvdata->lpaif_map, reg, 0);
if (ret)
- dev_err(soc_runtime->dev, "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmactl reg: %d\n",
+ ret);
return ret;
}
@@ -260,8 +261,8 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream)
LPAIF_DMABASE_REG(v, ch, dir),
runtime->dma_addr);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmabase reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmabase reg: %d\n",
+ ret);
return ret;
}
@@ -269,8 +270,8 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream)
LPAIF_DMABUFF_REG(v, ch, dir),
(snd_pcm_lib_buffer_bytes(substream) >> 2) - 1);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmabuff reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmabuff reg: %d\n",
+ ret);
return ret;
}
@@ -278,8 +279,8 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream)
LPAIF_DMAPER_REG(v, ch, dir),
(snd_pcm_lib_period_bytes(substream) >> 2) - 1);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmaper reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmaper reg: %d\n",
+ ret);
return ret;
}
@@ -287,8 +288,8 @@ static int lpass_platform_pcmops_prepare(struct snd_pcm_substream *substream)
LPAIF_DMACTL_REG(v, ch, dir),
LPAIF_DMACTL_ENABLE_MASK, LPAIF_DMACTL_ENABLE_ON);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev, "error writing to rdmactl reg: %d\n",
+ ret);
return ret;
}
@@ -317,8 +318,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream,
LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST),
LPAIF_IRQ_ALL(ch));
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to irqclear reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error writing to irqclear reg: %d\n", ret);
return ret;
}
@@ -327,8 +328,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream,
LPAIF_IRQ_ALL(ch),
LPAIF_IRQ_ALL(ch));
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to irqen reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error writing to irqen reg: %d\n", ret);
return ret;
}
@@ -337,8 +338,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream,
LPAIF_DMACTL_ENABLE_MASK,
LPAIF_DMACTL_ENABLE_ON);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error writing to rdmactl reg: %d\n", ret);
return ret;
}
break;
@@ -350,8 +351,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream,
LPAIF_DMACTL_ENABLE_MASK,
LPAIF_DMACTL_ENABLE_OFF);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to rdmactl reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error writing to rdmactl reg: %d\n", ret);
return ret;
}
@@ -359,8 +360,8 @@ static int lpass_platform_pcmops_trigger(struct snd_pcm_substream *substream,
LPAIF_IRQEN_REG(v, LPAIF_IRQ_PORT_HOST),
LPAIF_IRQ_ALL(ch), 0);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error writing to irqen reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error writing to irqen reg: %d\n", ret);
return ret;
}
break;
@@ -386,16 +387,16 @@ static snd_pcm_uframes_t lpass_platform_pcmops_pointer(
ret = regmap_read(drvdata->lpaif_map,
LPAIF_DMABASE_REG(v, ch, dir), &base_addr);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error reading from rdmabase reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error reading from rdmabase reg: %d\n", ret);
return ret;
}
ret = regmap_read(drvdata->lpaif_map,
LPAIF_DMACURR_REG(v, ch, dir), &curr_addr);
if (ret) {
- dev_err(soc_runtime->dev, "%s() error reading from rdmacurr reg: %d\n",
- __func__, ret);
+ dev_err(soc_runtime->dev,
+ "error reading from rdmacurr reg: %d\n", ret);
return ret;
}
@@ -439,8 +440,8 @@ static irqreturn_t lpass_dma_interrupt_handler(
LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST),
LPAIF_IRQ_PER(chan));
if (rv) {
- dev_err(soc_runtime->dev, "%s() error writing to irqclear reg: %d\n",
- __func__, rv);
+ dev_err(soc_runtime->dev,
+ "error writing to irqclear reg: %d\n", rv);
return IRQ_NONE;
}
snd_pcm_period_elapsed(substream);
@@ -452,11 +453,11 @@ static irqreturn_t lpass_dma_interrupt_handler(
LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST),
LPAIF_IRQ_XRUN(chan));
if (rv) {
- dev_err(soc_runtime->dev, "%s() error writing to irqclear reg: %d\n",
- __func__, rv);
+ dev_err(soc_runtime->dev,
+ "error writing to irqclear reg: %d\n", rv);
return IRQ_NONE;
}
- dev_warn(soc_runtime->dev, "%s() xrun warning\n", __func__);
+ dev_warn(soc_runtime->dev, "xrun warning\n");
snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN);
ret = IRQ_HANDLED;
}
@@ -466,11 +467,11 @@ static irqreturn_t lpass_dma_interrupt_handler(
LPAIF_IRQCLEAR_REG(v, LPAIF_IRQ_PORT_HOST),
LPAIF_IRQ_ERR(chan));
if (rv) {
- dev_err(soc_runtime->dev, "%s() error writing to irqclear reg: %d\n",
- __func__, rv);
+ dev_err(soc_runtime->dev,
+ "error writing to irqclear reg: %d\n", rv);
return IRQ_NONE;
}
- dev_err(soc_runtime->dev, "%s() bus access error\n", __func__);
+ dev_err(soc_runtime->dev, "bus access error\n");
snd_pcm_stop(substream, SNDRV_PCM_STATE_DISCONNECTED);
ret = IRQ_HANDLED;
}
@@ -488,8 +489,7 @@ static irqreturn_t lpass_platform_lpaif_irq(int irq, void *data)
rv = regmap_read(drvdata->lpaif_map,
LPAIF_IRQSTAT_REG(v, LPAIF_IRQ_PORT_HOST), &irqs);
if (rv) {
- pr_err("%s() error reading from irqstat reg: %d\n",
- __func__, rv);
+ pr_err("error reading from irqstat reg: %d\n", rv);
return IRQ_NONE;
}
@@ -571,8 +571,8 @@ int asoc_qcom_lpass_platform_register(struct platform_device *pdev)
drvdata->lpaif_irq = platform_get_irq_byname(pdev, "lpass-irq-lpaif");
if (drvdata->lpaif_irq < 0) {
- dev_err(&pdev->dev, "%s() error getting irq handle: %d\n",
- __func__, drvdata->lpaif_irq);
+ dev_err(&pdev->dev, "error getting irq handle: %d\n",
+ drvdata->lpaif_irq);
return -ENODEV;
}
@@ -580,8 +580,7 @@ int asoc_qcom_lpass_platform_register(struct platform_device *pdev)
ret = regmap_write(drvdata->lpaif_map,
LPAIF_IRQEN_REG(v, LPAIF_IRQ_PORT_HOST), 0);
if (ret) {
- dev_err(&pdev->dev, "%s() error writing to irqen reg: %d\n",
- __func__, ret);
+ dev_err(&pdev->dev, "error writing to irqen reg: %d\n", ret);
return ret;
}
@@ -589,8 +588,7 @@ int asoc_qcom_lpass_platform_register(struct platform_device *pdev)
lpass_platform_lpaif_irq, IRQF_TRIGGER_RISING,
"lpass-irq-lpaif", drvdata);
if (ret) {
- dev_err(&pdev->dev, "%s() irq request failed: %d\n",
- __func__, ret);
+ dev_err(&pdev->dev, "irq request failed: %d\n", ret);
return ret;
}