* [PATCH v2 0/3] ASoC: rockchip: Parse dai links from dts
@ 2017-08-10 4:54 Jeffy Chen
[not found] ` <1502340898-28403-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-08-10 4:54 ` [PATCH v2 3/3] dt-bindings: ASoC: " Jeffy Chen
0 siblings, 2 replies; 6+ messages in thread
From: Jeffy Chen @ 2017-08-10 4:54 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dgreid-F7+t8E8rja9g9hUCZPvPmw, heiko-4mtYJXux2i+zQB+pC5nmwQ
Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Jaroslav Kysela,
Matthias Kaehlcke, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Will Deacon,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Brown,
Klaus Goger, Takashi Iwai, devicetree-u79uwXL29TY76Z2rM5mHXA,
Liam Girdwood, Rob Herring, Mark Rutland, Caesar Wang,
Catalin Marinas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Currently we are using a fixed list of dai links in the driver.
This serial of patches would let the driver parse dai links from
dts, so that we can disable some of them for future boards in the
dts.
Tested on my chromebook bob(with cros 4.4 kernel), it still works
after disabled rt5514 codec in the dts.
Changes in v2:
Let rockchip,codec-names be a required property, because we plan to
add more supported codecs to the fixed dai link list in the driver.
Let rockchip,codec-names be a required property.
Jeffy Chen (3):
ASoC: rockchip: Parse dai links from dts
arm64: dts: rockchip: Add rockchip,codec-names property
dt-bindings: ASoC: rockchip: Add rockchip,codec-names property
.../bindings/sound/rockchip,rk3399-gru-sound.txt | 2 +
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 +
sound/soc/rockchip/rk3399_gru_sound.c | 125 +++++++++++++--------
3 files changed, 84 insertions(+), 44 deletions(-)
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] arm64: dts: rockchip: Add rockchip,codec-names property
[not found] ` <1502340898-28403-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-08-10 4:54 ` Jeffy Chen
0 siblings, 0 replies; 6+ messages in thread
From: Jeffy Chen @ 2017-08-10 4:54 UTC (permalink / raw)
To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dgreid-F7+t8E8rja9g9hUCZPvPmw, heiko-4mtYJXux2i+zQB+pC5nmwQ
Cc: briannorris-F7+t8E8rja9g9hUCZPvPmw,
dianders-F7+t8E8rja9g9hUCZPvPmw, Jeffy Chen, Matthias Kaehlcke,
devicetree-u79uwXL29TY76Z2rM5mHXA, Klaus Goger,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
Will Deacon, Mark Rutland, Caesar Wang, Catalin Marinas,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add rockchip,codec-names property for codecs.
Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
Changes in v2: None
arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
index d48e98b..c8f7f0c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi
@@ -515,6 +515,7 @@
compatible = "rockchip,rk3399-gru-sound";
rockchip,cpu = <&i2s0 &i2s2>;
rockchip,codec = <&max98357a &headsetcodec &codec>;
+ rockchip,codec-names = "MAX98357A", "RT5514", "DA7219";
};
};
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] dt-bindings: ASoC: rockchip: Add rockchip,codec-names property
2017-08-10 4:54 [PATCH v2 0/3] ASoC: rockchip: Parse dai links from dts Jeffy Chen
[not found] ` <1502340898-28403-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-08-10 4:54 ` Jeffy Chen
2017-08-10 14:56 ` Mark Brown
[not found] ` <1502340898-28403-4-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
1 sibling, 2 replies; 6+ messages in thread
From: Jeffy Chen @ 2017-08-10 4:54 UTC (permalink / raw)
To: linux-kernel, dgreid, heiko
Cc: briannorris, dianders, Jeffy Chen, devicetree, alsa-devel,
Liam Girdwood, Mark Brown, linux-rockchip, Rob Herring,
Mark Rutland, linux-arm-kernel
Add a new rockchip,codec-names property, so that the driver can parse
the codecs by name.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v2:
Let rockchip,codec-names be a required property.
Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
index eac91db..05351df 100644
--- a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
+++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
@@ -5,6 +5,7 @@ Required properties:
- rockchip,cpu: The phandle of the Rockchip I2S controller that's
connected to the codecs
- rockchip,codec: The phandle of the MAX98357A/RT5514/DA7219 codecs
+- rockchip,codec-names: The names of the MAX98357A/RT5514/DA7219 codecs
Optional properties:
- dmic-wakeup-delay-ms : specify delay time (ms) for DMIC ready.
@@ -18,5 +19,6 @@ sound {
compatible = "rockchip,rk3399-gru-sound";
rockchip,cpu = <&i2s0>;
rockchip,codec = <&max98357a &rt5514 &da7219>;
+ rockchip,codec-names = "MAX98357A", "RT5514", "DA7219";
dmic-wakeup-delay-ms = <20>;
};
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: ASoC: rockchip: Add rockchip,codec-names property
2017-08-10 4:54 ` [PATCH v2 3/3] dt-bindings: ASoC: " Jeffy Chen
@ 2017-08-10 14:56 ` Mark Brown
[not found] ` <20170810145607.g663oq7cfxjmaxtf-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
[not found] ` <1502340898-28403-4-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Mark Brown @ 2017-08-10 14:56 UTC (permalink / raw)
To: Jeffy Chen
Cc: linux-kernel, dgreid, heiko, briannorris, dianders, devicetree,
alsa-devel, Liam Girdwood, linux-rockchip, Rob Herring,
Mark Rutland, linux-arm-kernel
[-- Attachment #1: Type: text/plain, Size: 253 bytes --]
On Thu, Aug 10, 2017 at 12:54:58PM +0800, Jeffy Chen wrote:
> Add a new rockchip,codec-names property, so that the driver can parse
> the codecs by name.
Why? You're already referencing the CODECs by phandle and these names
are not part of any ABI...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: ASoC: rockchip: Add rockchip,codec-names property
[not found] ` <20170810145607.g663oq7cfxjmaxtf-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
@ 2017-08-11 1:30 ` jeffy
0 siblings, 0 replies; 6+ messages in thread
From: jeffy @ 2017-08-11 1:30 UTC (permalink / raw)
To: Mark Brown
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dgreid-F7+t8E8rja9g9hUCZPvPmw, heiko-4mtYJXux2i+zQB+pC5nmwQ,
briannorris-F7+t8E8rja9g9hUCZPvPmw,
dianders-F7+t8E8rja9g9hUCZPvPmw,
devicetree-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Liam Girdwood,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring,
Mark Rutland, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi Mark,
On 08/10/2017 10:56 PM, Mark Brown wrote:
> On Thu, Aug 10, 2017 at 12:54:58PM +0800, Jeffy Chen wrote:
>> Add a new rockchip,codec-names property, so that the driver can parse
>> the codecs by name.
>
> Why? You're already referencing the CODECs by phandle and these names
> are not part of any ABI...
>
currently we are binding the phandles to a fixed codec list in the
driver. but we want to make it dynamic, since some exist codecs could be
optional, and some new codecs could be add for new board too.
and the support of this new property in the driver is added in
https://patchwork.kernel.org/patch/9892737
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: ASoC: rockchip: Add rockchip,codec-names property
[not found] ` <1502340898-28403-4-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-08-17 15:10 ` Rob Herring
0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2017-08-17 15:10 UTC (permalink / raw)
To: Jeffy Chen
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dgreid-F7+t8E8rja9g9hUCZPvPmw, heiko-4mtYJXux2i+zQB+pC5nmwQ,
briannorris-F7+t8E8rja9g9hUCZPvPmw,
dianders-F7+t8E8rja9g9hUCZPvPmw,
devicetree-u79uwXL29TY76Z2rM5mHXA,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Liam Girdwood, Mark Brown,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Mark Rutland,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Thu, Aug 10, 2017 at 12:54:58PM +0800, Jeffy Chen wrote:
> Add a new rockchip,codec-names property, so that the driver can parse
> the codecs by name.
>
> Signed-off-by: Jeffy Chen <jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> Changes in v2:
> Let rockchip,codec-names be a required property.
>
> Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> index eac91db..05351df 100644
> --- a/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> +++ b/Documentation/devicetree/bindings/sound/rockchip,rk3399-gru-sound.txt
> @@ -5,6 +5,7 @@ Required properties:
> - rockchip,cpu: The phandle of the Rockchip I2S controller that's
> connected to the codecs
> - rockchip,codec: The phandle of the MAX98357A/RT5514/DA7219 codecs
> +- rockchip,codec-names: The names of the MAX98357A/RT5514/DA7219 codecs
No, just lookup the handle and get the compatible for the codec if you
need a name.
>
> Optional properties:
> - dmic-wakeup-delay-ms : specify delay time (ms) for DMIC ready.
> @@ -18,5 +19,6 @@ sound {
> compatible = "rockchip,rk3399-gru-sound";
> rockchip,cpu = <&i2s0>;
> rockchip,codec = <&max98357a &rt5514 &da7219>;
> + rockchip,codec-names = "MAX98357A", "RT5514", "DA7219";
> dmic-wakeup-delay-ms = <20>;
> };
> --
> 2.1.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-08-17 15:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-10 4:54 [PATCH v2 0/3] ASoC: rockchip: Parse dai links from dts Jeffy Chen
[not found] ` <1502340898-28403-1-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-08-10 4:54 ` [PATCH v2 2/3] arm64: dts: rockchip: Add rockchip,codec-names property Jeffy Chen
2017-08-10 4:54 ` [PATCH v2 3/3] dt-bindings: ASoC: " Jeffy Chen
2017-08-10 14:56 ` Mark Brown
[not found] ` <20170810145607.g663oq7cfxjmaxtf-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2017-08-11 1:30 ` jeffy
[not found] ` <1502340898-28403-4-git-send-email-jeffy.chen-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-08-17 15:10 ` Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).