From: Jyri Sarha <jsarha@ti.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Cc: alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-omap@vger.kernel.org, liam.r.girdwood@linux.intel.com,
detheridge@ti.com, kuninori.morimoto.gx@renesas.com,
moinejf@free.fr, Li.Xiubo@freescale.com, peter.ujfalusi@ti.com,
broonie@kernel.org, bcousson@baylibre.com
Subject: Re: [alsa-devel] [PATCH RFC 2/2] ASoC: simple-card: Move dai-link level properties away from dai subnodes
Date: Mon, 24 Mar 2014 11:45:11 +0200 [thread overview]
Message-ID: <532FFEA7.9060406@ti.com> (raw)
In-Reply-To: <87lhw08nqk.wl%kuninori.morimoto.gx@gmail.com>
On 03/24/2014 02:05 AM, Kuninori Morimoto wrote:
>
> Hi Jyri
>
>> The properties like format, bitclock-master, frame-master,
>> bitclock-inversion, and frame-inversion should be common to the dais
>> connected with a dai-link. For bitclock-master and frame-master
>> properties to be unambiguous they need to indicate the mastering dai
>> node with a phandle.
>>
>> Signed-off-by: Jyri Sarha <jsarha@ti.com>
>> ---
> (snip)
>> /*
>> - * bitclock-inversion, frame-inversion
>> - * bitclock-master, frame-master
>> - * and specific "format" if it has
>> - */
>> - dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
>> - dai->fmt |= daifmt;
>> -
>> - /*
>> * dai->sysclk come from
>> * "clocks = <&xxx>" (if system has common clock)
>> * or "system-clock-frequency = <xxx>"
>
> [1/2] patch exchanged snd_soc_of_parse_daifmt() parameter,
> but, user code exchanged in [2/2].
> It breaks git-bisect.
>
Fixed that. Thanks!
>> + dai_props->cpu_dai.fmt = daifmt;
>> + switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
>> + case 0x11:
>> + dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
>> + break;
>> + case 0x10:
>> + dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFM;
>> + break;
>> + case 0x01:
>> + dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFS;
>> + break;
>> + default:
>> + dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
>> + break;
>> + }
>
> The user of snd_soc_of_parse_daifmt() is only simple-card (?)
> I think SND_SOC_DAIFMT_CBxx_CFx cared by snd_soc_of_parse_daifmt() somehow
> is very reasonable.
>
Yes, that is what git grep tells me. snd_soc_of_parse_daifmt() can still
take care of SND_SOC_DAIFMT_CB?_CF? parsing in simple cases. I just felt
that adding the full phandle parsing to the function would break its
genericity and make the function parameters hard to understand.
Best regards,
Jyri
prev parent reply other threads:[~2014-03-24 9:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 16:47 [PATCH RFC 0/2] Move dai-link level properties away from dai subnodes Jyri Sarha
2014-03-21 16:47 ` [PATCH RFC 1/2] ASoC: core: Update snd_soc_of_parse_daifmt() interface Jyri Sarha
2014-03-21 16:47 ` [PATCH RFC 2/2] ASoC: simple-card: Move dai-link level properties away from dai subnodes Jyri Sarha
2014-03-23 9:54 ` Jean-Francois Moine
2014-03-24 9:38 ` Jyri Sarha
2014-03-24 0:05 ` [alsa-devel] " Kuninori Morimoto
2014-03-24 9:45 ` Jyri Sarha [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=532FFEA7.9060406@ti.com \
--to=jsarha@ti.com \
--cc=Li.Xiubo@freescale.com \
--cc=alsa-devel@alsa-project.org \
--cc=bcousson@baylibre.com \
--cc=broonie@kernel.org \
--cc=detheridge@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=linux-omap@vger.kernel.org \
--cc=moinejf@free.fr \
--cc=peter.ujfalusi@ti.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;
as well as URLs for NNTP newsgroup(s).