From: Haojian Zhuang <haojian.zhuang@linaro.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails
Date: Mon, 29 Jun 2015 13:19:51 +0800 [thread overview]
Message-ID: <1435555191.1744.4.camel@linaro.org> (raw)
In-Reply-To: <1435547723.6397.1.camel@ingics.com>
On Mon, 2015-06-29 at 11:15 +0800, Axel Lin wrote:
> 88pm860x does not support slave mode, so it returns -EINVAL for
> PM860X_CLK_DIR_IN. Current code changes pm860x->dir setting before
> return error, so it has impact on the logic of pm860x_pcm_set_dai_fmt.
>
> This patch adds comment for the reason to return -EINVAL for
> PM860X_CLK_DIR_IN, and avoid changing pm860x->dir setting if
> pm860x_set_dai_sysclk fails.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> sound/soc/codecs/88pm860x-codec.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c
> index 38b3dad..4d91a6a 100644
> --- a/sound/soc/codecs/88pm860x-codec.c
> +++ b/sound/soc/codecs/88pm860x-codec.c
> @@ -1028,10 +1028,8 @@ static int pm860x_set_dai_sysclk(struct snd_soc_dai *codec_dai,
>
> if (dir == PM860X_CLK_DIR_OUT)
> pm860x->dir = PM860X_CLK_DIR_OUT;
> - else {
> - pm860x->dir = PM860X_CLK_DIR_IN;
> + else /* Slave mode is not supported */
> return -EINVAL;
> - }
>
> return 0;
> }
Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Regards
Haojian
next prev parent reply other threads:[~2015-06-29 5:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 3:15 [PATCH] ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails Axel Lin
2015-06-29 5:19 ` Haojian Zhuang [this message]
2015-07-07 13:57 ` Applied "ASoC: 88pm860x: Don't change pm860x->dir setting if pm860x_set_dai_sysclk fails" to the asoc tree 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=1435555191.1744.4.camel@linaro.org \
--to=haojian.zhuang@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.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