From: Stephen Warren <swarren@wwwdotorg.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Liam Girdwood <lrg@ti.com>, Simon <horms@verge.net.au>,
Kuninori Morimoto <kuninori.morimoto.gx@gmail.com>
Subject: Re: [RFC][PATCH 1/2] ASoC: add snd_soc_of_parse_daifmt()
Date: Wed, 05 Dec 2012 13:42:05 -0700 [thread overview]
Message-ID: <50BFB19D.40504@wwwdotorg.org> (raw)
In-Reply-To: <87wqwx7x1u.wl%kuninori.morimoto.gx@renesas.com>
On 12/05/2012 12:55 AM, Kuninori Morimoto wrote:
>
> Hi Stephen
> Cc Mark
>
> Thank you for your reply
>
>>> + ret |= __snd_soc_of_parse_daifmt(np, prefix, fmt,
>>> + "i2s", SND_SOC_DAIFMT_I2S);
>>> + ret |= __snd_soc_of_parse_daifmt(np, prefix, fmt,
>>> + "right_j", SND_SOC_DAIFMT_RIGHT_J);
>>> + ret |= __snd_soc_of_parse_daifmt(np, prefix, fmt,
>>> + "left_j", SND_SOC_DAIFMT_LEFT_J);
>>> + ret |= __snd_soc_of_parse_daifmt(np, prefix, fmt,
>>> + "dsp_a", SND_SOC_DAIFMT_DSP_A);
>>> + ret |= __snd_soc_of_parse_daifmt(np, prefix, fmt,
>>> + "dsp_b", SND_SOC_DAIFMT_DSP_B);
>>
>> I'd expect to see something more like:
>>
>> fmt = of_property_read_u32_array(np, "bit-format");
>
> Ahh... I see.
>
>> Well, once a DT binding is created, you can't change the numbers, or you
>> would break the ability for an old DT to work with a newer kernel.
>
> OK. I understand.
>
>>> How about to use string ?
>>>
>>> snd.soc.daifmt.format = "left_j"
>>> snd.soc.daifmt.clock_gate = "cont"
>>> snd.soc.daifmt.inversion = "ib_nf"
>>> snd.soc.daifmt.hw_clock = "cbs_cfm"
>>
>> That's probably the best we can do for now. Using a pre-processor would
>> be best:
>>
>> #define SND_SOC_DAIFMT_LEFT_J 3
>>
>> snd.soc.daifmt.format = <SND_SOC_DAIFMT_LEFT_J>;
>>
>> ... but we can't do that yet...
>
> Thank you.
>
> I tried v2 of snd_soc_of_parse_daifmt() which is using "string" and "array" style
>
> [prefix]snd,soc,daifmt = "i2c", "nb_if", "cbm_cfm";
I assume you mean i2s not i2c there.
That seems to be overloading one property so that it contains a lot of
separate data items. I'd expect separate properties for the format, the
bitclock inversion, the frame inversion, the bitclock master, and the
frame master.
next prev parent reply other threads:[~2012-12-05 20:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-29 4:31 [RFC][PATCH 0/2] ASoC: add DT support on simple-card Kuninori Morimoto
2012-11-29 4:31 ` [RFC][PATCH 1/2] ASoC: add snd_soc_of_parse_daifmt() Kuninori Morimoto
2012-11-29 5:21 ` Stephen Warren
2012-11-29 15:12 ` Mark Brown
2012-11-30 0:35 ` Kuninori Morimoto
2012-12-04 20:18 ` Stephen Warren
2012-12-05 7:55 ` Kuninori Morimoto
2012-12-05 20:42 ` Stephen Warren [this message]
2012-12-06 9:02 ` Kuninori Morimoto
2012-11-29 4:32 ` [RFC][PATCH 2/2] ASoC: simple-card: add DT support Kuninori Morimoto
2012-11-29 5:20 ` Stephen Warren
2012-11-29 6:05 ` Kuninori Morimoto
2012-11-30 10:38 ` Daniel Mack
2012-12-03 0:18 ` Kuninori Morimoto
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=50BFB19D.40504@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@gmail.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lrg@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 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.