From: Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Jyri Sarha <jsarha-l0cyMroinI0@public.gmane.org>
Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
mark.rutland-5wv7dgnIgG8@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org,
pawel.moll-5wv7dgnIgG8@public.gmane.org,
ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org,
linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org,
galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
moinejf-GANU6spQydw@public.gmane.org
Subject: Re: [alsa-devel] [PATCH v2] ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt
Date: Wed, 12 Mar 2014 17:33:54 +0800 [thread overview]
Message-ID: <20140312093353.GH1177@MrMyself> (raw)
In-Reply-To: <5320280C.6080004-l0cyMroinI0@public.gmane.org>
On Wed, Mar 12, 2014 at 11:25:32AM +0200, Jyri Sarha wrote:
> On 03/12/2014 05:02 AM, Nicolin Chen wrote:
> >The current simple-card driver separates the daimft for cpu_dai and codec_dai.
> >So we might get different values for them (0x4003 and 0x1003 for example):
> >
> >asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 132000000
> >asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000
> >asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok
> >
> >This is not allowed at all as we need to keep the DAIFMT settings identical
> >for both the ends of the link.
> >
> >Thus this patch fixes it by overwriting the cpu_dai->fmt with codec_dai->fmt
> >since we defined the DAIFMT_MASTER basing on CODEC at the first place while
> >the other bits are same.
> >
> >Signed-off-by: Nicolin Chen <Guangyu.Chen-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
> >---
> Hi Nicolin,
> This patch is an improvement, but in my opinion the binding is still
> a bit confusing.
>
> How about changing 'frame-master' and 'bitclock-master' to
> 'codec-frame-master' and 'codec-bitclock-master'. We could possibly
> keep the old names as aliases until all the .dts files out there
> have been fixed.
>
> At the same go we could add SND_SOC_DAIFMT_MASTER_MASK here:
>
> > /* get CPU/CODEC common format via simple-audio-card,format */
> > priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
> > (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
>
> or leave the masking out all together. Can't see why
> SND_SOC_DAIFMT_CONT/GATED could not be defined at dai-link level
> too.
>
> This way the norm would be defining the daifmt at link level. We
> could still keep the possibility to overwrite the setting at dai
> level if there is need for that.
Hi Jyri,
After looking at Morimoto-san's mail, I think there might be a better
solution for this issue as he suggested: We may move the fmt from
struct asoc_simple_dai to a common place for both CPU and CODEC.
I'm not sure if there's any defect from this idea, but as long as we
keep DAIFMT settings identical for both dai-link ends, it'll be a
neater way.
So I'd like to pend this patch and wait for further solution from that
topic.
Thank you,
Nicolin Chen
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-03-12 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-12 3:02 [PATCH v2] ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt Nicolin Chen
2014-03-12 9:25 ` Jyri Sarha
[not found] ` <5320280C.6080004-l0cyMroinI0@public.gmane.org>
2014-03-12 9:33 ` Nicolin Chen [this message]
2014-03-13 21:20 ` [alsa-devel] " Mark Brown
2014-03-18 20:18 ` 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=20140312093353.GH1177@MrMyself \
--to=guangyu.chen-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=Li.Xiubo-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
--cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
--cc=jsarha-l0cyMroinI0@public.gmane.org \
--cc=kuninori.morimoto.gx-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=moinejf-GANU6spQydw@public.gmane.org \
--cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
--cc=rob-VoJi6FS/r0vR7s880joybQ@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/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).