Rock64 No Audio - Solved
#1
I had posted a thread recently requesting assistance to get ayufan Linux configured to support analog (sound) audio from the internal 3.5 mm A/V (headphone) jack. There were apparently a number of Rock64 users interested in this discussion, but there were no respondents offering any suggestions.  

Since then, I came across an excellent document detailing alsa configuration that lead me to implement the following solution in that I can now obtain audio from the Rock64's 3.5 mm headphone jack.

sudo nano /etc/asound.conf

defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0


(Control-X to save file)

Note that this configuration has only been tested on stretch-minimal-rock64-0.6.15-175-arm64 but should work on all current ayufan images.  It does not add a volume control to alsamixer, so you'll have to do additional configuration if your application requires a volume control.

Bill, WA8WG
  Reply
#2
Thanks for writing this down, I did a similar config back when I got my first prototype board and testing the DAC audio board as well. I think librelec also has a more advanced config with soft volume controls etc...
Come have a chat in the Pine A64 IRC channel >>
  Reply
#3
Hi,

Thanks for posting this. I am struggling to get sound out of the cinch outputs on the DAC addon board.
Could one of you post a config, that is supposed to give me sound out of the cinch outputs?

I am currently using this image: 




rock64@rock64:~$ uname -a
Linux rock64 4.4.103-rockchip-ayufan-164 #1 SMP Sat Jan 6 11:15:18 UTC 2018 aarch64 GNU/Linux
rock64@rock64:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDMI], device 0: ff000000.i2s-i2s-hifi i2s-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: I2S [I2S], device 0: ff010000.i2s-rk3328-hifi rk3328-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: I2S [I2S], device 1: ff010000.i2s-snd-soc-dummy-dai snd-soc-dummy-dai-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: SPDIF [SPDIF], device 0: ff030000.spdif-dit-hifi dit-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
rock64@rock64:~$
  Reply
#4
Google Translate :
I tried that way with "xenial-minimal-rock64-0.6.22-188-armhf" and "xenial-minimal-rock64-0.6.22-188-arm64", but I did not hear any sound. why?


その方法を"xenial-minimal-rock64-0.6.22-188-armhf"と"xenial-minimal-rock64-0.6.22-188-arm64"で試しましたが、音が出ませんでした。何故?
  Reply
#5
(02-28-2018, 03:54 AM)pine3228 Wrote: Google Translate :
I tried that way with "xenial-minimal-rock64-0.6.22-188-armhf" and "xenial-minimal-rock64-0.6.22-188-arm64", but I did not hear any sound. why?


その方法を"xenial-minimal-rock64-0.6.22-188-armhf"と"xenial-minimal-rock64-0.6.22-188-arm64"で試しましたが、音が出ませんでした。何故?

I've good results following wbecks's solution (debian stretch mate 9.3, 4.4.112-rockchip-ayufan-189).
Here is my list of packages relating to alsa (I don't know which or if any is necessary)
alsa-utils
libao-common
libao4
libasound2
libasound2-data
libasound2-dev
libasound2-plugins
libmatemixer0
libmatemixer-common
libopenal1
pulseaudio

I use VLC 2.2.7.1 to play sound files, setting Audio/audio device to I2S Analog stereo
The output is strong enough to drive a true Sennheiser headset (4 - 400 ohms)
Hope that helps...
  Reply
#6
(03-02-2018, 11:24 AM)pytheas Wrote:
(02-28-2018, 03:54 AM)pine3228 Wrote: Google Translate :
I tried that way with "xenial-minimal-rock64-0.6.22-188-armhf" and "xenial-minimal-rock64-0.6.22-188-arm64", but I did not hear any sound. why?


その方法を"xenial-minimal-rock64-0.6.22-188-armhf"と"xenial-minimal-rock64-0.6.22-188-arm64"で試しましたが、音が出ませんでした。何故?

I've good results following wbecks's solution (debian stretch mate 9.3, 4.4.112-rockchip-ayufan-189).
Here is my list of packages relating to alsa (I don't know which or if any is necessary)
alsa-utils
libao-common
libao4
libasound2
libasound2-data
libasound2-dev
libasound2-plugins
libmatemixer0
libmatemixer-common
libopenal1
pulseaudio

I use VLC 2.2.7.1 to play sound files, setting Audio/audio device to I2S Analog stereo
The output is strong enough to drive a true Sennheiser headset (4 - 400 ohms)
Hope that helps...


I installed them, but I did not hear any sound.
  Reply
#7
Have you tried several headphones ? There are different types of plugs depending on whether there is a microphone or not ...
  Reply
#8
(03-05-2018, 08:37 AM)ピュテアスは Wrote: Have you tried several headphones ? There are different types of plugs depending on whether there is a microphone  or not ...


My headphones are of a standard 3.5 mm jack. Mike is not attached.
speaker-test
Even when I executed the command, I did not hear any sound.
Sorry for my weird English.
  Reply
#9
but how to adjust the volume?
  Reply
#10
I found this on the Change Log for Mainline Kernel 5.5
Quote:And finally rk3328 audio support, sdmmc detection fix and enabled
    of the gpu on rk3399-puma.
Quote:arm64: dts: rockchip: Add RK3328 audio pipelines
Code:
The audio pipelines for HDMI and the analog codec are internal to the
SoC, so it makes sense to describe them at that level such that boards
need only enable the respective nodes for outputs they implement.

Signed-off-by: Robin Murphy
---
arch/arm64/boot/dts/rockchip/rk3328.dtsi | 32 ++++++++++++++++++++++++
1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328.dtsi b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
index 31cc1541f1f5..91306ebed4da 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
@@ -142,6 +142,22 @@
};
};

+ analog_sound: analog-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <256>;
+ simple-audio-card,name = "Analog";
+ status = "disabled";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s1>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+
arm-pmu {
compatible = "arm,cortex-a53-pmu";
interrupts = <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
@@ -156,6 +172,22 @@
ports = <&vop_out>;
};

+ hdmi_sound: hdmi-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,mclk-fs = <128>;
+ simple-audio-card,name = "HDMI";
+ status = "disabled";
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s0>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&hdmi>;
+ };
+ };
+
psci {
compatible = "arm,psci-1.0", "arm,psci-0.2";
method = "smc";
--
2.17.1
How can this rk3328.dtsi file be used to fix Audio on the Rock64 ?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Rock64 as a router (OpenWRT,etc) bob-anon 1 171 11-26-2020, 05:13 PM
Last Post: Rocklobster
  Safest way to send shutdown signal to headless Rock64 SMB server? bmurphr1 2 98 11-23-2020, 03:17 AM
Last Post: KC9UDX
  rock64, compile problems "illegal instruction", "memory fault" -> ddr_333Mhz? hunderteins 10 2,552 11-17-2020, 08:00 AM
Last Post: Johannes
  Rock64 enable 1-wire to read DS18B20 or Dallas temperature sensor Perry 0 269 11-09-2020, 07:38 PM
Last Post: Perry
  Libreelec Rock64 - 4GB no boot spiker15 3 333 11-02-2020, 12:36 AM
Last Post: wilsonYan
  noob with non booting rock64 4g john72carter 6 754 10-14-2020, 07:35 PM
Last Post: Rocklobster
  Python GPIO Library for the Rock64 (R64.GPIO) Leapo 34 24,621 10-13-2020, 02:35 PM
Last Post: hellonwood40
  Rock64 - boot helpmerock 2 463 10-08-2020, 01:29 PM
Last Post: helpmerock
Big Grin Rock64 as a retro-gaming console: early impressions Luke 54 41,099 10-07-2020, 11:21 AM
Last Post: jakejm79
  what is the rock64 good for? munocat 5 1,957 10-04-2020, 10:32 PM
Last Post: tomarm

Forum Jump:


Users browsing this thread: 2 Guest(s)