From: Jarkko Nikula <jarkko.nikula@bitmer.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: alsa-devel@alsa-project.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>
Subject: Re: [PATCH v2 2/4] ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port
Date: Fri, 24 Aug 2012 11:06:02 +0300 [thread overview]
Message-ID: <503735EA.5080907@bitmer.com> (raw)
In-Reply-To: <1345630303-26291-3-git-send-email-peter.ujfalusi@ti.com>
On 08/22/2012 01:11 PM, Peter Ujfalusi wrote:
> 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;
> + }
I acked the set but a little note here: I guess this is something what
only developer can hit, by calling omap_mcbsp_st_add_controls for a port
not having the sidetone, so would blocking the probe be better than warning?
--
Jarkko
next prev parent reply other threads:[~2012-08-24 8:06 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 ` [PATCH v2 2/4] ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port Peter Ujfalusi
2012-08-24 8:06 ` Jarkko Nikula [this message]
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=503735EA.5080907@bitmer.com \
--to=jarkko.nikula@bitmer.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=peter.ujfalusi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).