From: Haojian Zhuang <haojian.zhuang@linaro.org>
To: Axel Lin <axel.lin@ingics.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation
Date: Mon, 29 Jun 2015 10:49:10 +0800 [thread overview]
Message-ID: <1435546150.1744.2.camel@linaro.org> (raw)
In-Reply-To: <CAFRkauDr1p3eeMzMzUJBqHuxgndiHs8kW3uWP9NwtVBd3xZR7A@mail.gmail.com>
On Mon, 2015-06-29 at 10:27 +0800, Axel Lin wrote:
> 2015-06-29 10:02 GMT+08:00 Haojian Zhuang <haojian.zhuang@linaro.org>:
> > On Sun, 2015-06-28 at 23:00 +0800, Axel Lin wrote:
> >> Hi Haojian,
> >> In sound/soc/codecs/88pm860x-codec.c (pm860x_set_dai_sysclk):
> >> When dir != PM860X_CLK_DIR_OUT, current code set
> >> pm860x->dir = PM860X_CLK_DIR_IN; and then return -EINVAL.
> >> This looks confusion.
> >> Since there is no comment for that, I'm wondering if the
> >> return -EINVAL is intentional or not.
> >>
> >> Regards,
> >> Axel
> >>
> >
> > Hi Axel,
> >
> > Since we didn't support slave mode in our solution, I just return
> > -EINVAL for PM860X_CLK_DIR_IN. I'm sorry to add the confused code.
> > Could you help to format a patch to add the comments?
>
> The main confusion part is current code actually *changes* pm860x->dir setting
> when return -EINVAL in pm860x_set_dai_sysclk.
> (And the pm860x->dir is used in pm860x_pcm_set_dai_fmt.)
> so I'm wondering if it make sense to just return -EINVAL without setting
> pm860x->dir = PM860X_CLK_DIR_IN; in pm860x_set_dai_sysclk.
It's fine to return -EINVAL directly without setting pm680x->dir.
Regards
Haojian
prev parent reply other threads:[~2015-06-29 2:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-28 15:00 ASoC: 88pm860x: Question about pm860x_set_dai_sysclk implementation Axel Lin
2015-06-29 2:02 ` Haojian Zhuang
2015-06-29 2:27 ` Axel Lin
2015-06-29 2:49 ` Haojian Zhuang [this message]
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=1435546150.1744.2.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 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.