I am trying to enable sound with RT5651 audio codec on SoM-RK3399v2. Hardware is integrated on the board (on i2c1 bus, address 0x1a), worked with official FriendlyElec Linux (4.4 kernel IIRC) and tests were run with powered speakers (which work when connected to PC).
mpv reports no errors, but there is no sound. There is a slight pop when mpv starts playing and around 5 seconds after mpv stops playing.
Same as with speakers-test
# mpv sound.wav
(+) Audio --aid=1 (pcm_s16le 2ch 44100Hz)
xcb_connection_has_error() returned true
xcb_connection_has_error() returned true
AO: [alsa] 44100Hz stereo 2ch s16
A: 00:00:41 / 00:10:07 (6%)
Exiting... (Quit)
# speaker-test -c2
speaker-test 1.2.2
Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
xcb_connection_has_error() returned true
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 128 to 131072
Period size range from 64 to 65536
Using max buffer size 131072
Periods = 4
was set period_size = 32768
was set buffer_size = 131072
0 - Front Left
1 - Front Right
Time per period = 2.740121
0 - Front Left
^C 1 - Front Right
Time per period = 1.390964
# dmesg | tail -2
[ 326.479986] rockchip-i2s ff890000.i2s: Fail to set mclk -22
[ 326.480598] rockchip-i2s ff890000.i2s: ASoC: error at snd_soc_dai_set_sysclk on ff890000.i2s: -22
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
jsorocil
I am trying to enable sound with RT5651 audio codec on SoM-RK3399v2. Hardware is integrated on the board (on i2c1 bus, address 0x1a), worked with official FriendlyElec Linux (4.4 kernel IIRC) and tests were run with powered speakers (which work when connected to PC).
I used this patch to patch my current device tree:
https://github.com/armbian/build/blob/master/patch/kernel/rockchip64-dev/board-nanopi-m4v2-dts-add-sound-card.patch
I did not use Kconfig file from the patch as it seems that my kernel have has built that modules.
page 19 of NanoPI M4V2 and page 7 of SoM-RK3399 schematic shows that same audio codec (rt5651 on the same busses (I2S1 and I2C1) is used on both boards):
https://wiki.friendlyarm.com/wiki/images/c/cc/NanoPi-M4V2_1908_Schematic.pdf
https://wiki.friendlyarm.com/wiki/images/d/de/SOM-RK3399_Dev_Kit_1904_Schematic.pdf
After reboot I can see card but it didn't play any sound on the speakers (except random quite noises - which also occures in u-boot)
mpv reports no errors, but there is no sound. There is a slight pop when mpv starts playing and around 5 seconds after mpv stops playing.
Same as with speakers-test
Maybe I have invalid I2S clock?
Tried various amixer set commands and alsactl files from other threads but still no sound.
Any ideas what might be the problem?
Link to comment
Share on other sites
13 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.