* [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support
@ 2017-08-24 8:21 Nhan Nguyen
2017-08-28 7:00 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Nhan Nguyen @ 2017-08-24 8:21 UTC (permalink / raw)
To: greg
Cc: toru.oishi.zj, thongsyho, stable, Kuninori Morimoto, Mark Brown,
Nhan Nguyen
From: thongsyho <thong.ho.px@rvc.renesas.com>
commit 7dc20319660d12d2ef642e572e8802c228b6c1cd upstream.
AUDIO-CLKOUTn can asynchronizes with L/R clock.
AUDIO-CLKOUTn synchronizes with L/R clock is now default behavior.
Cc: stable@vger.kernel.org
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
---
Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 2 ++
sound/soc/sh/rcar/adg.c | 16 ++++++++++++++++
2 files changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
index c57cbd6..9934cba 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
@@ -37,6 +37,8 @@ Required properties:
- #clock-cells : it must be 0 if your system has audio_clkout
it must be 1 if your system has audio_clkout0/1/2/3
- clock-frequency : for all audio_clkout0/1/2/3
+- clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn
+ is asynchronizes with lr-clock.
SSI subnode properties:
- interrupts : Should contain SSI interrupt for PIO transfer
diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index b123734..5343c2d 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -33,11 +33,15 @@ struct rsnd_adg {
struct clk *clkout[CLKOUTMAX];
struct clk_onecell_data onecell;
struct rsnd_mod mod;
+ u32 flags;
int rbga_rate_for_441khz; /* RBGA */
int rbgb_rate_for_48khz; /* RBGB */
};
+#define LRCLK_ASYNC (1 << 0)
+#define adg_mode_flags(adg) (adg->flags)
+
#define for_each_rsnd_clk(pos, adg, i) \
for (i = 0; \
(i < CLKMAX) && \
@@ -400,6 +404,14 @@ found_clock:
*/
rsnd_adg_set_ssi_clk(mod, data);
+ if (!(adg_mode_flags(adg) & LRCLK_ASYNC)) {
+ struct rsnd_mod *adg_mod = rsnd_mod_get(adg);
+ u32 ckr = 0;
+ if (0 == (rate % 8000))
+ ckr = 0x80000000;
+ rsnd_mod_bset(adg_mod, SSICKR, 0x80000000, ckr);
+ }
+
dev_dbg(dev, "ADG: %s[%d] selects 0x%x for %d\n",
rsnd_mod_name(mod), rsnd_mod_id(mod),
data, rate);
@@ -578,6 +590,7 @@ int rsnd_adg_probe(struct platform_device *pdev,
{
struct rsnd_adg *adg;
struct device *dev = rsnd_priv_to_dev(priv);
+ struct device_node *np = dev->of_node;
adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL);
if (!adg) {
@@ -596,6 +609,9 @@ int rsnd_adg_probe(struct platform_device *pdev,
rsnd_adg_get_clkin(priv, adg);
rsnd_adg_get_clkout(priv, adg);
+ if (of_get_property(np, "clkout-lr-asynchronous", NULL))
+ adg->flags = LRCLK_ASYNC;
+
priv->adg = adg;
return 0;
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support
2017-08-24 8:21 [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support Nhan Nguyen
@ 2017-08-28 7:00 ` Greg KH
2017-09-01 7:48 ` Nhan Ngoc. Nguyen
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2017-08-28 7:00 UTC (permalink / raw)
To: Nhan Nguyen
Cc: toru.oishi.zj, thongsyho, stable, Kuninori Morimoto, Mark Brown
On Thu, Aug 24, 2017 at 03:21:15PM +0700, Nhan Nguyen wrote:
> From: thongsyho <thong.ho.px@rvc.renesas.com>
>
> commit 7dc20319660d12d2ef642e572e8802c228b6c1cd upstream.
>
> AUDIO-CLKOUTn can asynchronizes with L/R clock.
> AUDIO-CLKOUTn synchronizes with L/R clock is now default behavior.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
> Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
> ---
> Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 2 ++
> sound/soc/sh/rcar/adg.c | 16 ++++++++++++++++
> 2 files changed, 18 insertions(+)
Why is this relevant for a stable kernel patch?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support
2017-08-28 7:00 ` Greg KH
@ 2017-09-01 7:48 ` Nhan Ngoc. Nguyen
2017-09-01 7:51 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Nhan Ngoc. Nguyen @ 2017-09-01 7:48 UTC (permalink / raw)
To: Greg KH; +Cc: toru.oishi.zj, thongsyho, stable, Kuninori Morimoto, Mark Brown
Dear Greg,
Renesas Rcar sound ADG has 2 modes: synchronous (BRGA) and asynchronous (BRGB).
Before this patch, ADG use synchronous mode.
This patch supports asynchronous via device tree ("clkout-lr-asynchronous"). It's optional.
On 8/28/2017 2:00 PM, Greg KH wrote:
> On Thu, Aug 24, 2017 at 03:21:15PM +0700, Nhan Nguyen wrote:
>> From: thongsyho <thong.ho.px@rvc.renesas.com>
>>
>> commit 7dc20319660d12d2ef642e572e8802c228b6c1cd upstream.
>>
>> AUDIO-CLKOUTn can asynchronizes with L/R clock.
>> AUDIO-CLKOUTn synchronizes with L/R clock is now default behavior.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
>> Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
>> ---
>> Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 2 ++
>> sound/soc/sh/rcar/adg.c | 16 ++++++++++++++++
>> 2 files changed, 18 insertions(+)
> Why is this relevant for a stable kernel patch?
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support
2017-09-01 7:48 ` Nhan Ngoc. Nguyen
@ 2017-09-01 7:51 ` Greg KH
2017-09-01 8:00 ` Nhan Ngoc. Nguyen
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2017-09-01 7:51 UTC (permalink / raw)
To: Nhan Ngoc. Nguyen
Cc: toru.oishi.zj, thongsyho, stable, Kuninori Morimoto, Mark Brown
On Fri, Sep 01, 2017 at 02:48:26PM +0700, Nhan Ngoc. Nguyen wrote:
> Dear Greg,
>
> Renesas Rcar sound ADG has 2 modes: synchronous (BRGA) and asynchronous (BRGB).
> Before this patch, ADG use synchronous mode.
> This patch supports asynchronous via device tree ("clkout-lr-asynchronous"). It's optional.
That really seems like new features are being added, please explain how
this meets the stable kernel rules if you wish to have me apply them.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support
2017-09-01 7:51 ` Greg KH
@ 2017-09-01 8:00 ` Nhan Ngoc. Nguyen
0 siblings, 0 replies; 5+ messages in thread
From: Nhan Ngoc. Nguyen @ 2017-09-01 8:00 UTC (permalink / raw)
To: Greg KH; +Cc: toru.oishi.zj, thongsyho, stable, Kuninori Morimoto, Mark Brown
Please ignore my patch! It add new feature.
Thanks!
On 9/1/2017 2:51 PM, Greg KH wrote:
> On Fri, Sep 01, 2017 at 02:48:26PM +0700, Nhan Ngoc. Nguyen wrote:
>> Dear Greg,
>>
>> Renesas Rcar sound ADG has 2 modes: synchronous (BRGA) and asynchronous (BRGB).
>> Before this patch, ADG use synchronous mode.
>> This patch supports asynchronous via device tree ("clkout-lr-asynchronous"). It's optional.
> That really seems like new features are being added, please explain how
> this meets the stable kernel rules if you wish to have me apply them.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-09-01 8:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-24 8:21 [PATCH 4.4.y] ASoC: rsnd: adg :: AUDIO-CLKOUTn asynchronizes support Nhan Nguyen
2017-08-28 7:00 ` Greg KH
2017-09-01 7:48 ` Nhan Ngoc. Nguyen
2017-09-01 7:51 ` Greg KH
2017-09-01 8:00 ` Nhan Ngoc. Nguyen
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.