* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
@ 2014-01-04 15:19 Jean-Francois Moine
2014-01-06 4:10 ` Li.Xiubo
0 siblings, 1 reply; 9+ messages in thread
From: Jean-Francois Moine @ 2014-01-04 15:19 UTC (permalink / raw)
To: Xiubo Li, Mark Brown; +Cc: alsa-devel, Liam Girdwood
Li,
I am trying to have many DAI links in the simple-card, but I get an
error on getting the device clock: only the dma device needs a clock
and the spdif codec has none. What was the purpose of this default
device clock?
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
2014-01-04 15:19 [PATCH] ASoC: simple-card: Add device's module clock selection Jean-Francois Moine
@ 2014-01-06 4:10 ` Li.Xiubo
0 siblings, 0 replies; 9+ messages in thread
From: Li.Xiubo @ 2014-01-06 4:10 UTC (permalink / raw)
To: Jean-Francois Moine, Mark Brown; +Cc: alsa-devel, Liam Girdwood
> Subject: Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
>
> Li,
>
> I am trying to have many DAI links in the simple-card, but I get an
> error on getting the device clock: only the dma device needs a clock
> and the spdif codec has none. What was the purpose of this default
> device clock?
>
Yes, for spdif there is no need to do the CPU/CODEC DAI devices' sysclk setting,
but for many others like SAI,SSI... need.
I will send another patch to fix this.
Thanks,
--
Best Regards,
Xiubo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
2014-01-01 12:11 ` Lars-Peter Clausen
2014-01-01 12:25 ` Mark Brown
@ 2014-01-02 2:34 ` Li.Xiubo
1 sibling, 0 replies; 9+ messages in thread
From: Li.Xiubo @ 2014-01-02 2:34 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Fabio.Estevam, alsa-devel, kuninori.morimoto.gx, tiwai,
linux-kernel, lgirdwood, broonie
> Subject: Re: [alsa-devel] [PATCH] ASoC: simple-card: Add device's module clock
> selection.
>
> On 12/23/2013 08:25 AM, Xiubo Li wrote:
> > diff --git a/a.out b/a.out
> > new file mode 100644
> > index 0000000..e69de29
>
> This patch did add a empty a.out file in the toplevel folder.
>
> - Lars
>
Yes, sorry, my mistake.
Thanks very much
--
Best regards,
Xiubo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
2014-01-01 12:11 ` Lars-Peter Clausen
@ 2014-01-01 12:25 ` Mark Brown
2014-01-02 2:34 ` Li.Xiubo
1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2014-01-01 12:25 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: fabio.estevam, alsa-devel, kuninori.morimoto.gx, tiwai,
linux-kernel, lgirdwood, Xiubo Li
[-- Attachment #1.1: Type: text/plain, Size: 363 bytes --]
On Wed, Jan 01, 2014 at 01:11:09PM +0100, Lars-Peter Clausen wrote:
> On 12/23/2013 08:25 AM, Xiubo Li wrote:
> > diff --git a/a.out b/a.out
> > new file mode 100644
> > index 0000000..e69de29
> This patch did add a empty a.out file in the toplevel folder.
Removed now. This is one of several patches from Xiubo that have done
this - Xiubo, please check this.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
2013-12-23 7:25 ` Xiubo Li
(?)
(?)
@ 2014-01-01 12:11 ` Lars-Peter Clausen
2014-01-01 12:25 ` Mark Brown
2014-01-02 2:34 ` Li.Xiubo
-1 siblings, 2 replies; 9+ messages in thread
From: Lars-Peter Clausen @ 2014-01-01 12:11 UTC (permalink / raw)
To: Xiubo Li
Cc: fabio.estevam, alsa-devel, kuninori.morimoto.gx, tiwai,
linux-kernel, lgirdwood, broonie
On 12/23/2013 08:25 AM, Xiubo Li wrote:
> diff --git a/a.out b/a.out
> new file mode 100644
> index 0000000..e69de29
This patch did add a empty a.out file in the toplevel folder.
- Lars
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
2013-12-23 7:25 ` Xiubo Li
@ 2013-12-31 16:59 ` Mark Brown
-1 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2013-12-31 16:59 UTC (permalink / raw)
To: Xiubo Li
Cc: lgirdwood, perex, tiwai, kuninori.morimoto.gx, fabio.estevam,
alsa-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
On Mon, Dec 23, 2013 at 03:25:38PM +0800, Xiubo Li wrote:
> Try to get the device's module clock if the dt has no clocks and
> system-clock-frequency properties.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] ASoC: simple-card: Add device's module clock selection.
@ 2013-12-31 16:59 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2013-12-31 16:59 UTC (permalink / raw)
To: Xiubo Li
Cc: fabio.estevam, alsa-devel, kuninori.morimoto.gx, tiwai,
linux-kernel, lgirdwood
[-- Attachment #1.1: Type: text/plain, Size: 180 bytes --]
On Mon, Dec 23, 2013 at 03:25:38PM +0800, Xiubo Li wrote:
> Try to get the device's module clock if the dt has no clocks and
> system-clock-frequency properties.
Applied, thanks.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] ASoC: simple-card: Add device's module clock selection.
@ 2013-12-23 7:25 ` Xiubo Li
0 siblings, 0 replies; 9+ messages in thread
From: Xiubo Li @ 2013-12-23 7:25 UTC (permalink / raw)
To: broonie, lgirdwood, perex, tiwai
Cc: kuninori.morimoto.gx, Li.Xiubo, fabio.estevam, alsa-devel, linux-kernel
Try to get the device's module clock if the dt has no clocks and
system-clock-frequency properties.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
a.out | 0
sound/soc/generic/simple-card.c | 21 ++++++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 a.out
diff --git a/a.out b/a.out
new file mode 100644
index 0000000..e69de29
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 6ce9745..c0d92813 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -90,14 +90,29 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
* dai->sysclk come from
* "clocks = <&xxx>" (if system has common clock)
* or "system-clock-frequency = <xxx>"
+ * or device's module clock.
*/
- clk = of_clk_get(np, 0);
- if (IS_ERR(clk))
+ if (of_property_read_bool(np, "clocks")) {
+ clk = of_clk_get(np, 0);
+ if (IS_ERR(clk)) {
+ ret = PTR_ERR(clk);
+ goto parse_error;
+ }
+
+ dai->sysclk = clk_get_rate(clk);
+ } else if (of_property_read_bool(np, "system-clock-frequency")) {
of_property_read_u32(np,
"system-clock-frequency",
&dai->sysclk);
- else
+ } else {
+ clk = of_clk_get(*node, 0);
+ if (IS_ERR(clk)) {
+ ret = PTR_ERR(clk);
+ goto parse_error;
+ }
+
dai->sysclk = clk_get_rate(clk);
+ }
ret = 0;
--
1.8.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH] ASoC: simple-card: Add device's module clock selection.
@ 2013-12-23 7:25 ` Xiubo Li
0 siblings, 0 replies; 9+ messages in thread
From: Xiubo Li @ 2013-12-23 7:25 UTC (permalink / raw)
To: broonie, lgirdwood, perex, tiwai
Cc: kuninori.morimoto.gx, Li.Xiubo, fabio.estevam, alsa-devel, linux-kernel
Try to get the device's module clock if the dt has no clocks and
system-clock-frequency properties.
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
---
a.out | 0
sound/soc/generic/simple-card.c | 21 ++++++++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 a.out
diff --git a/a.out b/a.out
new file mode 100644
index 0000000..e69de29
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 6ce9745..c0d92813 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -90,14 +90,29 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
* dai->sysclk come from
* "clocks = <&xxx>" (if system has common clock)
* or "system-clock-frequency = <xxx>"
+ * or device's module clock.
*/
- clk = of_clk_get(np, 0);
- if (IS_ERR(clk))
+ if (of_property_read_bool(np, "clocks")) {
+ clk = of_clk_get(np, 0);
+ if (IS_ERR(clk)) {
+ ret = PTR_ERR(clk);
+ goto parse_error;
+ }
+
+ dai->sysclk = clk_get_rate(clk);
+ } else if (of_property_read_bool(np, "system-clock-frequency")) {
of_property_read_u32(np,
"system-clock-frequency",
&dai->sysclk);
- else
+ } else {
+ clk = of_clk_get(*node, 0);
+ if (IS_ERR(clk)) {
+ ret = PTR_ERR(clk);
+ goto parse_error;
+ }
+
dai->sysclk = clk_get_rate(clk);
+ }
ret = 0;
--
1.8.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-06 4:10 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-04 15:19 [PATCH] ASoC: simple-card: Add device's module clock selection Jean-Francois Moine
2014-01-06 4:10 ` Li.Xiubo
-- strict thread matches above, loose matches on Subject: below --
2013-12-23 7:25 Xiubo Li
2013-12-23 7:25 ` Xiubo Li
2013-12-31 16:59 ` Mark Brown
2013-12-31 16:59 ` Mark Brown
2014-01-01 12:11 ` Lars-Peter Clausen
2014-01-01 12:25 ` Mark Brown
2014-01-02 2:34 ` Li.Xiubo
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.