aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2014-04-28 10:07:25 -0400
committerMark Brown <broonie@linaro.org>2014-05-01 13:54:35 -0400
commit0265e1ae64ebf1bb55a563599d11fb7376478ae1 (patch)
treea16dbf66e59474434bccb87084223e887d82e969 /sound/soc/omap
parent386e81ab3b4d6f50064d0ce0b3d82a4ea9a26296 (diff)
ASoC: omap: rx51: Add some error messages
Add more error messages making it easier to identify problems. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/omap')
-rw-r--r--sound/soc/omap/rx51.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c
index 30cfac023138..110deca7fcbb 100644
--- a/sound/soc/omap/rx51.c
+++ b/sound/soc/omap/rx51.c
@@ -298,20 +298,26 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
298 snd_soc_dapm_nc_pin(dapm, "LINE1R"); 298 snd_soc_dapm_nc_pin(dapm, "LINE1R");
299 299
300 err = tpa6130a2_add_controls(codec); 300 err = tpa6130a2_add_controls(codec);
301 if (err < 0) 301 if (err < 0) {
302 dev_err(card->dev, "Failed to add TPA6130A2 controls\n");
302 return err; 303 return err;
304 }
303 snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42); 305 snd_soc_limit_volume(codec, "TPA6130A2 Headphone Playback Volume", 42);
304 306
305 err = omap_mcbsp_st_add_controls(rtd, 2); 307 err = omap_mcbsp_st_add_controls(rtd, 2);
306 if (err < 0) 308 if (err < 0) {
309 dev_err(card->dev, "Failed to add MCBSP controls\n");
307 return err; 310 return err;
311 }
308 312
309 /* AV jack detection */ 313 /* AV jack detection */
310 err = snd_soc_jack_new(codec, "AV Jack", 314 err = snd_soc_jack_new(codec, "AV Jack",
311 SND_JACK_HEADSET | SND_JACK_VIDEOOUT, 315 SND_JACK_HEADSET | SND_JACK_VIDEOOUT,
312 &rx51_av_jack); 316 &rx51_av_jack);
313 if (err) 317 if (err) {
318 dev_err(card->dev, "Failed to add AV Jack\n");
314 return err; 319 return err;
320 }
315 321
316 /* prepare gpio for snd_soc_jack_add_gpios */ 322 /* prepare gpio for snd_soc_jack_add_gpios */
317 rx51_av_jack_gpios[0].gpio = desc_to_gpio(pdata->jack_detection_gpio); 323 rx51_av_jack_gpios[0].gpio = desc_to_gpio(pdata->jack_detection_gpio);
@@ -320,6 +326,10 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
320 err = snd_soc_jack_add_gpios(&rx51_av_jack, 326 err = snd_soc_jack_add_gpios(&rx51_av_jack,
321 ARRAY_SIZE(rx51_av_jack_gpios), 327 ARRAY_SIZE(rx51_av_jack_gpios),
322 rx51_av_jack_gpios); 328 rx51_av_jack_gpios);
329 if (err) {
330 dev_err(card->dev, "Failed to add GPIOs\n");
331 return err;
332 }
323 333
324 return err; 334 return err;
325} 335}