lkml.org 
[lkml]   [2014]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH Resend 2/8] ASoC: simple-card: fix __asoc_simple_card_dai_init
On Thu, 23 Jan 2014 13:02:44 +0800
Xiubo Li <Li.Xiubo@freescale.com> wrote:

> If the CPU/CODEC DAI set_sysclk() is not support, the -ENOTSUPP will returnd.
> Here do the check like set_fmt().
>
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---
>
>
>
> The VF610 Tower and VF610 LS1 platforms' ESAI and SPDIF will depend on this
> patch too.
>
>
>
>
> sound/soc/generic/simple-card.c | 17 +++++++++++------
> 1 file changed, 11 insertions(+), 6 deletions(-)
>
> diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
> index 6443c87..3b8c9a2 100644
> --- a/sound/soc/generic/simple-card.c
> +++ b/sound/soc/generic/simple-card.c
> @@ -31,16 +31,21 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
>
> daifmt |= set->fmt;
>
> - if (daifmt)
> + if (daifmt) {
> ret = snd_soc_dai_set_fmt(dai, daifmt);
> -
> - if (ret == -ENOTSUPP) {
> - dev_dbg(dai->dev, "ASoC: set_fmt is not supported\n");
> - ret = 0;
> + if (ret && ret != -ENOTSUPP) {
> + dev_err(dai->dev, "simple-card: set_fmt error\n");
> + return ret;
> + }
> }
>
> - if (!ret && set->sysclk)
> + if (set->sysclk) {
> ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0);
> + if (ret && ret != -ENOTSUPP) {
> + dev_err(dai->dev, "simple-card: set_sysclk error\n");
> + return ret;
> + }
> + }
>
> return ret;

Sorry: you must return 0 here

> }

--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-01-23 09:01    [W:0.173 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site