summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/max98396.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2022-06-24 13:47:09 +0300
committerMark Brown <broonie@kernel.org>2022-06-27 15:16:10 +0300
commita8c1dc9e8f01811b0c3fee65b9bc4773b2d00d96 (patch)
tree999132988d821386e73faf82af25633c0d68dc09 /sound/soc/codecs/max98396.c
parent703ee0557f8921c96e8c42f832b3bd69b7bfb262 (diff)
downloadlinux-a8c1dc9e8f01811b0c3fee65b9bc4773b2d00d96.tar.xz
ASoC: max98396: Improve some error prints
Let's log what actually failed and log at some more places. Signed-off-by: Daniel Mack <daniel@zonque.org> Link: https://lore.kernel.org/r/20220624104712.1934484-6-daniel@zonque.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/max98396.c')
-rw-r--r--sound/soc/codecs/max98396.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/codecs/max98396.c b/sound/soc/codecs/max98396.c
index 06ac637f2696..faa81b4bb709 100644
--- a/sound/soc/codecs/max98396.c
+++ b/sound/soc/codecs/max98396.c
@@ -372,7 +372,8 @@ static int max98396_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
break;
default:
- dev_err(component->dev, "DAI invert mode unsupported\n");
+ dev_err(component->dev, "DAI invert mode %d unsupported\n",
+ fmt & SND_SOC_DAIFMT_INV_MASK);
return -EINVAL;
}
@@ -391,6 +392,8 @@ static int max98396_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt)
format |= MAX98396_PCM_FORMAT_TDM_MODE0;
break;
default:
+ dev_err(component->dev, "DAI format %d unsupported\n",
+ fmt & SND_SOC_DAIFMT_FORMAT_MASK);
return -EINVAL;
}
@@ -461,8 +464,9 @@ static int max98396_set_clock(struct snd_soc_component *component,
/* BCLK configuration */
value = max98396_get_bclk_sel(blr_clk_ratio);
if (!value) {
- dev_err(component->dev, "format unsupported %d\n",
- params_format(params));
+ dev_err(component->dev,
+ "blr_clk_ratio %d unsupported, format %d\n",
+ blr_clk_ratio, params_format(params));
return -EINVAL;
}
@@ -647,7 +651,7 @@ static int max98396_dai_tdm_slot(struct snd_soc_dai *dai,
chan_sz = MAX98396_PCM_MODE_CFG_CHANSZ_32;
break;
default:
- dev_err(component->dev, "format unsupported %d\n",
+ dev_err(component->dev, "slot width %d unsupported\n",
slot_width);
return -EINVAL;
}