[alsa-devel] [PATCH 0/8] ARM: at91: sama5d3: enable sound support
This patch add sound support on sama5d3xek board.
This patch series based on the following patch set: clk: at91: better support for the PCKs http://comments.gmane.org/gmane.linux.kernel/1664477
Bo Shen (5): ARM: at91: sama5d3: add DMA property for SSC devices ARM: at91: sama5d3: disable sound by default ARM: at91: sama5d3: correct the sound compatible string ARM: at91: sama5d3: add the missing property ARM: at91: sama5d3: clock for ssc from rk pin
Boris BREZILLON (3): ASoC: atmel: support CCF based clks ASoC: atmel: document clock properties of the wm8904 driver ARM: at91/dt: add clock properties to the wm8904 codec node
.../devicetree/bindings/sound/atmel-wm8904.txt | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 6 ++++++ arch/arm/boot/dts/sama5d3xmb.dtsi | 11 +++++++++- sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++----------- 4 files changed, 31 insertions(+), 13 deletions(-)
From: Boris BREZILLON b.brezillon@overkiz.com
Provide dev to clk_get function if we're using CCF based clks. CCF based prog clks support automatic parent selection when asking for a specific rate: remove the clk32k clk retrieval if we're using these clks.
Signed-off-by: Boris BREZILLON b.brezillon@overkiz.com [voice.shen@atmel.com: switch to devm manage function] Signed-off-by: Bo Shen voice.shen@atmel.com
Signed-off-by: Bo Shen voice.shen@atmel.com ---
sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b4e3690..a797d33 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -170,25 +170,26 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; }
- mclk = clk_get(NULL, "pck0"); + mclk = devm_clk_get(&pdev->dev, "pck0"); if (IS_ERR(mclk)) { dev_err(&pdev->dev, "failed to get pck0\n"); ret = PTR_ERR(mclk); goto err_set_audio; }
- clk_src = clk_get(NULL, "clk32k"); - if (IS_ERR(clk_src)) { - dev_err(&pdev->dev, "failed to get clk32k\n"); - ret = PTR_ERR(clk_src); - goto err_set_audio; - } + if (!IS_ENABLED(CONFIG_COMMON_CLK)) { + clk_src = devm_clk_get(&pdev->dev, "clk32k"); + if (IS_ERR(clk_src)) { + dev_err(&pdev->dev, "failed to get clk32k\n"); + ret = PTR_ERR(clk_src); + goto err_set_audio; + }
- ret = clk_set_parent(mclk, clk_src); - clk_put(clk_src); - if (ret != 0) { - dev_err(&pdev->dev, "failed to set MCLK parent\n"); - goto err_set_audio; + ret = clk_set_parent(mclk, clk_src); + if (ret != 0) { + dev_err(&pdev->dev, "failed to set MCLK parent\n"); + goto err_set_audio; + } }
dev_info(&pdev->dev, "setting pck0 to %dHz\n", MCLK_RATE);
On 03/17/2014 05:45 PM, Bo Shen wrote:
From: Boris BREZILLON b.brezillon@overkiz.com
Provide dev to clk_get function if we're using CCF based clks. CCF based prog clks support automatic parent selection when asking for a specific rate: remove the clk32k clk retrieval if we're using these clks.
Signed-off-by: Boris BREZILLON b.brezillon@overkiz.com [voice.shen@atmel.com: switch to devm manage function] Signed-off-by: Bo Shen voice.shen@atmel.com
Signed-off-by: Bo Shen voice.shen@atmel.com
Oh, sorry for multi SOBs. Please remove it when apply.
sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b4e3690..a797d33 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -170,25 +170,26 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; }
- mclk = clk_get(NULL, "pck0");
- mclk = devm_clk_get(&pdev->dev, "pck0"); if (IS_ERR(mclk)) { dev_err(&pdev->dev, "failed to get pck0\n"); ret = PTR_ERR(mclk); goto err_set_audio; }
- clk_src = clk_get(NULL, "clk32k");
- if (IS_ERR(clk_src)) {
dev_err(&pdev->dev, "failed to get clk32k\n");
ret = PTR_ERR(clk_src);
goto err_set_audio;
- }
- if (!IS_ENABLED(CONFIG_COMMON_CLK)) {
clk_src = devm_clk_get(&pdev->dev, "clk32k");
if (IS_ERR(clk_src)) {
dev_err(&pdev->dev, "failed to get clk32k\n");
ret = PTR_ERR(clk_src);
goto err_set_audio;
}
- ret = clk_set_parent(mclk, clk_src);
- clk_put(clk_src);
- if (ret != 0) {
dev_err(&pdev->dev, "failed to set MCLK parent\n");
goto err_set_audio;
ret = clk_set_parent(mclk, clk_src);
if (ret != 0) {
dev_err(&pdev->dev, "failed to set MCLK parent\n");
goto err_set_audio;
}
}
dev_info(&pdev->dev, "setting pck0 to %dHz\n", MCLK_RATE);
Best Regards, Bo Shen
Le 17/03/2014 10:45, Bo Shen a écrit :
From: Boris BREZILLON b.brezillon@overkiz.com
Provide dev to clk_get function if we're using CCF based clks. CCF based prog clks support automatic parent selection when asking for a specific rate: remove the clk32k clk retrieval if we're using these clks.
I would have split this patch: 1) make use of devm in the existing code 2) add CCF support
Signed-off-by: Boris BREZILLON b.brezillon@overkiz.com [voice.shen@atmel.com: switch to devm manage function] Signed-off-by: Bo Shen voice.shen@atmel.com
Signed-off-by: Bo Shen voice.shen@atmel.com
sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/sound/soc/atmel/atmel_wm8904.c b/sound/soc/atmel/atmel_wm8904.c index b4e3690..a797d33 100644 --- a/sound/soc/atmel/atmel_wm8904.c +++ b/sound/soc/atmel/atmel_wm8904.c @@ -170,25 +170,26 @@ static int atmel_asoc_wm8904_probe(struct platform_device *pdev) return ret; }
- mclk = clk_get(NULL, "pck0");
- mclk = devm_clk_get(&pdev->dev, "pck0");
I wonder if we shouldn't change the requested clk name when using CCF. After all this is a board decision to choose which programmable clk should be used. The "pck0" implies that you're always connecting programmable clk 0 to the wm8904 chip.
What about "pck" instead of "pck0" ?
Best Regards,
Boris
if (IS_ERR(mclk)) { dev_err(&pdev->dev, "failed to get pck0\n"); ret = PTR_ERR(mclk); goto err_set_audio; }
- clk_src = clk_get(NULL, "clk32k");
- if (IS_ERR(clk_src)) {
dev_err(&pdev->dev, "failed to get clk32k\n");
ret = PTR_ERR(clk_src);
goto err_set_audio;
- }
- if (!IS_ENABLED(CONFIG_COMMON_CLK)) {
clk_src = devm_clk_get(&pdev->dev, "clk32k");
if (IS_ERR(clk_src)) {
dev_err(&pdev->dev, "failed to get clk32k\n");
ret = PTR_ERR(clk_src);
goto err_set_audio;
}
- ret = clk_set_parent(mclk, clk_src);
- clk_put(clk_src);
- if (ret != 0) {
dev_err(&pdev->dev, "failed to set MCLK parent\n");
goto err_set_audio;
ret = clk_set_parent(mclk, clk_src);
if (ret != 0) {
dev_err(&pdev->dev, "failed to set MCLK parent\n");
goto err_set_audio;
}
}
dev_info(&pdev->dev, "setting pck0 to %dHz\n", MCLK_RATE);
On 17/03/2014 10:45, Bo Shen :
This patch add sound support on sama5d3xek board.
This patch series based on the following patch set: clk: at91: better support for the PCKs http://comments.gmane.org/gmane.linux.kernel/1664477
Bo Shen (5): ARM: at91: sama5d3: add DMA property for SSC devices ARM: at91: sama5d3: disable sound by default ARM: at91: sama5d3: correct the sound compatible string ARM: at91: sama5d3: add the missing property ARM: at91: sama5d3: clock for ssc from rk pin
Boris BREZILLON (3): ASoC: atmel: support CCF based clks ASoC: atmel: document clock properties of the wm8904 driver ARM: at91/dt: add clock properties to the wm8904 codec node
Hi Voice and Boris,
For this series I am a little bit puzzled: should I take the ASoC part of it? I see no acknowledgement from Mark and I also read some messages still discussing about CCF and wm8904 afterwards.
So, I take the 5 patches by Voice Shen and tell me what is the proper sequence with this wm8904 work.
I will be happy to stack more patches about this topic during the 3.16 development phase.
Otherwise, the 5 patches by Voice go into at91-3.16-dt branch.
Thanks, bye.
.../devicetree/bindings/sound/atmel-wm8904.txt | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 6 ++++++ arch/arm/boot/dts/sama5d3xmb.dtsi | 11 +++++++++- sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++----------- 4 files changed, 31 insertions(+), 13 deletions(-)
On Fri, Apr 18, 2014 at 10:35:02PM +0200, Nicolas Ferre wrote:
For this series I am a little bit puzzled: should I take the ASoC part of it? I see no acknowledgement from Mark and I also read some messages still discussing about CCF and wm8904 afterwards.
I've not seen these patches, judging by where this message went they weren't sent to the address in MAINTAINERS (broonie@kernel.org) but to my work address instead.
On 18/04/2014 22:35, Nicolas Ferre wrote:
On 17/03/2014 10:45, Bo Shen :
This patch add sound support on sama5d3xek board.
This patch series based on the following patch set: clk: at91: better support for the PCKs http://comments.gmane.org/gmane.linux.kernel/1664477
Bo Shen (5): ARM: at91: sama5d3: add DMA property for SSC devices ARM: at91: sama5d3: disable sound by default ARM: at91: sama5d3: correct the sound compatible string ARM: at91: sama5d3: add the missing property ARM: at91: sama5d3: clock for ssc from rk pin
Boris BREZILLON (3): ASoC: atmel: support CCF based clks ASoC: atmel: document clock properties of the wm8904 driver ARM: at91/dt: add clock properties to the wm8904 codec node
Hi Voice and Boris,
For this series I am a little bit puzzled: should I take the ASoC part of it? I see no acknowledgement from Mark and I also read some messages still discussing about CCF and wm8904 afterwards.
So, I take the 5 patches by Voice Shen and tell me what is the proper sequence with this wm8904 work.
Bo was waiting for the "move sam9n12 SoC to the CCF" (which has been submitted earlier this week) series before sending a new version of his "wm8904: add CCF support" series.
Best Regards,
Boris
I will be happy to stack more patches about this topic during the 3.16 development phase.
Otherwise, the 5 patches by Voice go into at91-3.16-dt branch.
Thanks, bye.
.../devicetree/bindings/sound/atmel-wm8904.txt | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 6 ++++++ arch/arm/boot/dts/sama5d3xmb.dtsi | 11 +++++++++- sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++----------- 4 files changed, 31 insertions(+), 13 deletions(-)
On 19/04/2014 00:06, Boris BREZILLON :
On 18/04/2014 22:35, Nicolas Ferre wrote:
On 17/03/2014 10:45, Bo Shen :
This patch add sound support on sama5d3xek board.
This patch series based on the following patch set: clk: at91: better support for the PCKs http://comments.gmane.org/gmane.linux.kernel/1664477
Bo Shen (5): ARM: at91: sama5d3: add DMA property for SSC devices ARM: at91: sama5d3: disable sound by default ARM: at91: sama5d3: correct the sound compatible string ARM: at91: sama5d3: add the missing property ARM: at91: sama5d3: clock for ssc from rk pin
Boris BREZILLON (3): ASoC: atmel: support CCF based clks ASoC: atmel: document clock properties of the wm8904 driver ARM: at91/dt: add clock properties to the wm8904 codec node
Hi Voice and Boris,
For this series I am a little bit puzzled: should I take the ASoC part of it? I see no acknowledgement from Mark and I also read some messages still discussing about CCF and wm8904 afterwards.
So, I take the 5 patches by Voice Shen and tell me what is the proper sequence with this wm8904 work.
Bo was waiting for the "move sam9n12 SoC to the CCF" (which has been submitted earlier this week) series before sending a new version of his "wm8904: add CCF support" series.
Ok, that makes perfect sense. So I have the whole dependency graph in mind now: we will have fun stacking everything in the proper order ;-)
Thanks for the clarification, Bye.
I will be happy to stack more patches about this topic during the 3.16 development phase.
Otherwise, the 5 patches by Voice go into at91-3.16-dt branch.
Thanks, bye.
.../devicetree/bindings/sound/atmel-wm8904.txt | 2 ++ arch/arm/boot/dts/sama5d3.dtsi | 6 ++++++ arch/arm/boot/dts/sama5d3xmb.dtsi | 11 +++++++++- sound/soc/atmel/atmel_wm8904.c | 25 +++++++++++----------- 4 files changed, 31 insertions(+), 13 deletions(-)
participants (4)
-
Bo Shen
-
Boris BREZILLON
-
Mark Brown
-
Nicolas Ferre