Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463161 > unrolled thread

[PATCH] Try to support analog audio codec at firefly reload

Started byRandy Li <ayaka@soulik.info>
First post2016-08-15 22:50 +0200
Last post2016-08-20 20:40 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Try to support analog audio codec at firefly reload Randy Li <ayaka@soulik.info> - 2016-08-15 22:50 +0200
    [PATCH] ARM: dts: rockchip: add analog audio support for firefly reload Randy Li <ayaka@soulik.info> - 2016-08-15 22:50 +0200
    Re: [PATCH] Try to support analog audio codec at firefly reload Heiko Stuebner <heiko@sntech.de> - 2016-08-19 16:20 +0200
    Re: [PATCH] Try to support analog audio codec at firefly reload John Keeping <john@metanate.com> - 2016-08-20 20:40 +0200

#1463161 — [PATCH] Try to support analog audio codec at firefly reload

FromRandy Li <ayaka@soulik.info>
Date2016-08-15 22:50 +0200
Subject[PATCH] Try to support analog audio codec at firefly reload
Message-ID<s6wZz-1Wr-3@gated-at.bofh.it>
Hello:
  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.

Randy Li (1):
  ARM: dts: rockchip: add analog audio support for firefly reload

 arch/arm/boot/dts/rk3288-firefly-reload.dts | 36 +++++++++++++++++++++++++----
 1 file changed, 31 insertions(+), 5 deletions(-)

-- 
2.7.4

[toc] | [next] | [standalone]


#1463164 — [PATCH] ARM: dts: rockchip: add analog audio support for firefly reload

FromRandy Li <ayaka@soulik.info>
Date2016-08-15 22:50 +0200
Subject[PATCH] ARM: dts: rockchip: add analog audio support for firefly reload
Message-ID<s6wZz-1Wr-15@gated-at.bofh.it>
In reply to#1463161
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@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@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@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

[toc] | [prev] | [next] | [standalone]


#1466459

FromHeiko Stuebner <heiko@sntech.de>
Date2016-08-19 16:20 +0200
Message-ID<s7SOm-6FX-11@gated-at.bofh.it>
In reply to#1463161
Am Dienstag, 16. August 2016, 04:42:06 CEST schrieb Randy Li:
> Hello:
>   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.

I can't really help here as I have neither the board nor that much sound 
experience, but it's definitly customary to label patches as rfc when they're 
expected to need more work, so make that

[PATCH RFC] ...

for stuff that requires more work before it can actually be merged.


Heiko

[toc] | [prev] | [next] | [standalone]


#1466853

FromJohn Keeping <john@metanate.com>
Date2016-08-20 20:40 +0200
Message-ID<s8jlv-6y8-17@gated-at.bofh.it>
In reply to#1463161
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web