All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	Liam Girdwood <lrg@ti.com>
Cc: alsa-devel@alsa-project.org, Jarkko Nikula <jarkko.nikula@bitmer.com>
Subject: [PATCH v2 2/4] ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port
Date: Wed, 22 Aug 2012 13:11:41 +0300	[thread overview]
Message-ID: <1345630303-26291-3-git-send-email-peter.ujfalusi@ti.com> (raw)
In-Reply-To: <1345630303-26291-1-git-send-email-peter.ujfalusi@ti.com>

When asked to add the ST controls warn only if the st_data is missing.
In this way we do not block the otherwise functional card to probe.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 sound/soc/omap/omap-mcbsp.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
index 84a3132..c964f68 100644
--- a/sound/soc/omap/omap-mcbsp.c
+++ b/sound/soc/omap/omap-mcbsp.c
@@ -719,8 +719,10 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd)
 	struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
 	struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
 
-	if (!mcbsp->st_data)
-		return -ENODEV;
+	if (!mcbsp->st_data) {
+		dev_warn(mcbsp->dev, "No sidetone data for port\n");
+		return 0;
+	}
 
 	switch (mcbsp->id) {
 	case 2: /* McBSP 2 */
-- 
1.7.8.6

  parent reply	other threads:[~2012-08-22 10:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 10:11 [PATCH v2 0/4] ASoC: omap-mcbsp: Sidetone related changes Peter Ujfalusi
2012-08-22 10:11 ` [PATCH v2 1/4] ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls Peter Ujfalusi
2012-08-22 10:11 ` Peter Ujfalusi [this message]
2012-08-24  8:06   ` [PATCH v2 2/4] ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port Jarkko Nikula
2012-08-24 11:23     ` Peter Ujfalusi
2012-08-22 10:11 ` [PATCH v2 3/4] ASoC: omap-mcbsp: Use macro to create the McBSP2/3 ST controls Peter Ujfalusi
2012-08-22 10:11 ` [PATCH v2 4/4] ASoC: omap-mcbsp: Single macro for st channel volume set/get Peter Ujfalusi
2012-08-24  8:02 ` [PATCH v2 0/4] ASoC: omap-mcbsp: Sidetone related changes Jarkko Nikula
2012-08-25 20:29 ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345630303-26291-3-git-send-email-peter.ujfalusi@ti.com \
    --to=peter.ujfalusi@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=jarkko.nikula@bitmer.com \
    --cc=lrg@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.