* [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt
@ 2014-01-02 2:48 Xiubo Li
2014-01-06 5:41 ` Li.Xiubo
2014-01-07 17:05 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Xiubo Li @ 2014-01-02 2:48 UTC (permalink / raw)
To: broonie, lgirdwood; +Cc: perex, tiwai, alsa-devel, linux-kernel, Xiubo Li
This patch adds snd_soc_of_parse_master_clkdir() and supports below
style on dt:
master-clkdir-out;
If this property is absent 0 will be returned, 1 otherwise.
0 : SND_SOC_CLOCK_IN
1 : SND_SOC_CLOCK_OUT
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
include/sound/soc.h | 1 +
sound/soc/soc-core.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 5a049d9..690f4f6 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1170,6 +1170,7 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
const char *propname);
int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
const char *propname);
+unsigned int snd_soc_of_parse_master_clkdir(struct device_node *np);
unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
const char *prefix);
int snd_soc_of_get_dai_name(struct device_node *of_node,
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index be88df5..f155207 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4472,6 +4472,17 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_routing);
+unsigned int snd_soc_of_parse_master_clkdir(struct device_node *np)
+{
+ /*
+ * check "master-clkdir-out"
+ * false means SND_SOC_CLOCK_IN
+ * true means SND_SOC_CLOCK_OUT
+ */
+ return !!of_property_read_bool(np, "master-clkdir-out");
+}
+EXPORT_SYMBOL_GPL(snd_soc_of_parse_master_clkdir);
+
unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
const char *prefix)
{
--
1.8.4
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt
2014-01-02 2:48 [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt Xiubo Li
@ 2014-01-06 5:41 ` Li.Xiubo
2014-01-06 16:17 ` Mark Brown
2014-01-07 17:05 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Li.Xiubo @ 2014-01-06 5:41 UTC (permalink / raw)
To: broonie, lgirdwood; +Cc: perex, tiwai, alsa-devel, linux-kernel, Li.Xiubo
Hi
I would like to know the current status of this patch, and there are some
other patches that for simple-card are depended on this one.
Thanks,
--
> This patch adds snd_soc_of_parse_master_clkdir() and supports below
> style on dt:
>
> master-clkdir-out;
>
> If this property is absent 0 will be returned, 1 otherwise.
> 0 : SND_SOC_CLOCK_IN
> 1 : SND_SOC_CLOCK_OUT
>
> Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
> ---
> include/sound/soc.h | 1 +
> sound/soc/soc-core.c | 11 +++++++++++
> 2 files changed, 12 insertions(+)
>
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index 5a049d9..690f4f6 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -1170,6 +1170,7 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
> const char *propname);
> int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
> const char *propname);
> +unsigned int snd_soc_of_parse_master_clkdir(struct device_node *np);
> unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
> const char *prefix);
> int snd_soc_of_get_dai_name(struct device_node *of_node,
> diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
> index be88df5..f155207 100644
> --- a/sound/soc/soc-core.c
> +++ b/sound/soc/soc-core.c
> @@ -4472,6 +4472,17 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card
> *card,
> }
> EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_routing);
>
> +unsigned int snd_soc_of_parse_master_clkdir(struct device_node *np)
> +{
> + /*
> + * check "master-clkdir-out"
> + * false means SND_SOC_CLOCK_IN
> + * true means SND_SOC_CLOCK_OUT
> + */
> + return !!of_property_read_bool(np, "master-clkdir-out");
> +}
> +EXPORT_SYMBOL_GPL(snd_soc_of_parse_master_clkdir);
> +
> unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
> const char *prefix)
> {
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt
2014-01-06 5:41 ` Li.Xiubo
@ 2014-01-06 16:17 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-01-06 16:17 UTC (permalink / raw)
To: Li.Xiubo; +Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
On Mon, Jan 06, 2014 at 05:41:59AM +0000, Li.Xiubo@freescale.com wrote:
> I would like to know the current status of this patch, and there are some
> other patches that for simple-card are depended on this one.
You only sent this patch on Thursday during the middle of the holiday
period, please allow a reasonable time for review - at least a week even
without holidays.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt
2014-01-02 2:48 [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt Xiubo Li
2014-01-06 5:41 ` Li.Xiubo
@ 2014-01-07 17:05 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-01-07 17:05 UTC (permalink / raw)
To: Xiubo Li; +Cc: lgirdwood, perex, tiwai, alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]
On Thu, Jan 02, 2014 at 10:48:25AM +0800, Xiubo Li wrote:
> This patch adds snd_soc_of_parse_master_clkdir() and supports below
> style on dt:
>
> master-clkdir-out;
>
> If this property is absent 0 will be returned, 1 otherwise.
> 0 : SND_SOC_CLOCK_IN
> 1 : SND_SOC_CLOCK_OUT
This is mostly OK code wise, though it would be good to use those
constants in the code. However I'm still not sure about it being a good
idea - it's similar issues to those with clock IDs but less strong. Do
you have a user in mind?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-01-07 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-02 2:48 [PATCH v2] ASoC: soc-core: add snd_soc_of_parse_master_clkdir() for dt Xiubo Li
2014-01-06 5:41 ` Li.Xiubo
2014-01-06 16:17 ` Mark Brown
2014-01-07 17:05 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®