* [PATCH] ARM: dts: rockchip: add analog audio support for firefly reload
2016-08-15 20:42 [PATCH] Try to support analog audio codec at firefly reload Randy Li
@ 2016-08-15 20:42 ` Randy Li
2016-08-19 14:16 ` [PATCH] Try to support analog audio codec at " Heiko Stuebner
2016-08-20 18:33 ` John Keeping
2 siblings, 0 replies; 4+ messages in thread
From: Randy Li @ 2016-08-15 20:42 UTC (permalink / raw)
To: linux-arm-kernel
The ES8323 found on firefly reload board is used to output
analog audio to headphone and capture the sound from micphone
on board and the one may attach to headphone. It would be also
used to capture the sound from HDMI IN.
Signed-off-by: Randy Li <ayaka@soulik.info>
---
arch/arm/boot/dts/rk3288-firefly-reload.dts | 36 +++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/arch/arm/boot/dts/rk3288-firefly-reload.dts b/arch/arm/boot/dts/rk3288-firefly-reload.dts
index 0f5a7c1..ae46231 100644
--- a/arch/arm/boot/dts/rk3288-firefly-reload.dts
+++ b/arch/arm/boot/dts/rk3288-firefly-reload.dts
@@ -200,8 +200,34 @@
sound {
compatible = "simple-audio-card";
- simple-audio-card,name = "SPDIF";
- simple-audio-card,dai-link at 1 { /* S/PDIF - S/PDIF */
+ simple-audio-card,name = "rockchip-audio";
+ /*simple-audio-card,hp-det-gpio = <&gpio7 15 GPIO_ACTIVE_HIGH>;*/
+ simple-audio-card,widgets =
+ "Microphone", "Mic Jack",
+ "Headphone", "Headphone Jack";
+ simple-audio-card,routing =
+ "Headphone Jack", "LOUT2",
+ "Headphone Jack", "ROUT2",
+ "LINPUT2", "Mic Jack",
+ "LINPUT1", "Mic Jack",
+ "RINPUT1", "Mic Jack";
+
+ simple-audio-card,dai-link at 0 {
+ format = "i2s";
+ bitclock-master = <&link0_codec>;
+ frame-master = <&link0_codec>;
+
+ cpu {
+ sound-dai = <&i2s>;
+ };
+
+ link0_codec: codec {
+ sound-dai = <&codec>;
+ system-clock-frequency = <11289600>;
+ };
+ };
+
+ simple-audio-card,dai-link at 1 {
cpu { sound-dai = <&spdif>; };
codec { sound-dai = <&spdif_out>; };
};
@@ -236,14 +262,15 @@
AVDD-supply = <&vcca_33>;
PVDD-supply = <&vcca_33>;
HPVDD-supply = <&vcca_33>;
- clocks = <&cru HCLK_I2S0>, <&cru SCLK_I2S0>;
- clock-names = "i2s_hclk", "i2s_clk";
+ clocks = <&cru SCLK_I2S0_OUT>;
reg = <0x10>;
+ #sound-dai-cells = <0>;
};
};
&i2s {
status = "okay";
+ #sound-dai-cells = <0>;
};
&sdmmc {
@@ -256,7 +283,6 @@
pinctrl-names = "default";
pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
vmmc-supply = <&vcc_sd>;
- vqmmc-supply = <&vcc_sd>;
status = "okay";
};
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] Try to support analog audio codec at firefly reload
2016-08-15 20:42 [PATCH] Try to support analog audio codec at firefly reload Randy Li
2016-08-15 20:42 ` [PATCH] ARM: dts: rockchip: add analog audio support for " Randy Li
2016-08-19 14:16 ` [PATCH] Try to support analog audio codec at " Heiko Stuebner
@ 2016-08-20 18:33 ` John Keeping
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2016-08-20 18:33 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Aug 16, 2016 at 04:42:06AM +0800, Randy Li wrote:
> This patch could enabled the es8328 codec at firefly reload board,
> but it doesn't not really work. I disable the mute of channel
> Left mix and Right mix in alsamixer, I could hear the noise from
> my headphone, but it never be a music.
> I just send this patch here to see whether somebody could figure
> out what is wrong, I am really not familiar with sound.
Have you tried adding an mclk-fs setting to the simple-audio-card? You
probably want to set it to 256, which will allow 44.1kHz, 48kHz, 88.2kHz
and 96kHz at the codec. This will give more functionality than pinning
the clock to a specific rate.
For the Rock2 Square, I write a machine driver for the sound because the
headphone GPIO setup cannot be made to work with simple-audio-card; I
found the Firefly Reload schematic and it looks like the configuration
hardware is very similar. It's a bit of a mess but you can find it on
Github [1] if you want to take a look.
[1] https://github.com/johnkeeping/linux/tree/topic/audio
^ permalink raw reply [flat|nested] 4+ messages in thread