[alsa-devel] [PATCH v2 2/4] ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port

Jarkko Nikula jarkko.nikula at bitmer.com
Fri Aug 24 10:06:02 CEST 2012


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 at 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


More information about the Alsa-devel mailing list