Rock Pi 4B speakers + microphone setup

Hello,

I want to connect speakers and microphone to the Rock Pi 4B.

In the 4B specs, it is written that:

3.5mm jack with mic

So, as I understand there is one direct audio port.

  1. For testing purposes, I tried to fit my phone headphone which has microphone (single 3.5mm jack) but there was no sound coming in and microphone also didn’t work. I also noticed that headphone’s 3.5mm male port didn’t fit to the 3.5mm jack (it didn’t go till the end, male end seems to be longer than Rock Pi4B’s jack). In contrast, the headphone fits/works great with my phone/computer. My phone is iphone 5 and in the specifications it is said that it uses 3.5mm standard audio jack. So, I believe there is something non-standard in the Rock Pi 4B. Any ideas?

  2. What is recommended setup to get both microphone and speaker working? Just want to note that I don’t need headphones but speakers audible for all + microphone.

I found speakers and was able to connect them (they were fitting to the jack). I tested the speakers with NanoPC-T4 and with PC, speakers are operational. When I connect them to Rock Pi4B, they don’t appear in volume control option(in official Debian image). I also tried with Armbian OS, to see if other OS can solve the problem, but nothing happens: no sound, no device visible.

Do I need to install specific drivers for getting audio to work?

When I type aplay -l it shows following devices:
card0: rockchiprk3399 … es8316
card1: hdmisound

The speakers are not listed.

There seems to be a kernel bug breaking audio with newer kernel versions.

With Armbian, you can try to install the older 5.10 kernel, where the 3.5mm jack should work again. In armbian-config, go to System > Other and select the latest 5.10 kernel.

Hi @icecream95 , Thank you for your help.

I was on holiday so sorry for late reply.

I did what you wrote, but it didn’t help:
After following the kernel change instructions, I checked the kernel version in terminal and the version was indeed 5.10. Then, I opened a youtube video, and in the volume control application I had two device options. Tried both of them but none of them gave sound. Then I tried to

apt update/upgrade

But after this step the kernel version changed back to 5.15. I don’t know if it is normal behavior.

So, in summary, there are two audio options appearing in volume control, while in nanopc-t4 I had 3 options and 3rd one was working.

Here is the screenshot describing all the audio devices detected by the system. If I am not mistaken 3rd one should appear here right?

I only have two audio devices appearing, but audio does work for me through the rockchiprk3399 device.

ixn@rockpi-4b:~$ uname -a
Linux rockpi-4b 5.10.63-rockchip64 #21.08.2 SMP PREEMPT Wed Sep 8 10:57:23 UTC 2021 aarch64 GNU/Linux
ixn@rockpi-4b:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: rockchiprk3399 [rockchip,rk3399], device 0: ff880000.i2s-ES8316 HiFi ES8316 HiFi-0 [ff880000.i2s-ES8316 HiFi ES8316 HiFi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: hdmisound [hdmi-sound], device 0: ff8a0000.i2s-i2s-hifi i2s-hifi-0 [ff8a0000.i2s-i2s-hifi i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

If you have checked that you haven’t got anything muted on the PulseAudio (or whatever other sound server you are using) side of things, the problem might be with the ALSA state being messed up. Try:

sudo systemctl stop alsa-restore
sudo rm /var/lib/alsa/asound.state

and then reboot.


After switching to the 5.10 kernel, to prevent apt from switching back to 5.15 run sudo apt-mark hold '*-current-rockchip64', which can be reversed with unhold.

Thank you very much.

I am currently on official debian image and tried the ALSA related commands, but it didn’t help.

Should I try it on Armbian with kernel 5.10 too?

You could try with 5.10.

But it appears that the bug has been fixed since 5.17, so you can also try upgrading to the latest edge kernel with armbian-config to see if that fixes your issue. (edge is a different set of packages to the current branch so using apt-mark hold is not required.)

I’m still using 5.10 to work around some display jitter issues, but they probably don’t affect you so using a newer kernel could work better.

I tried the latest edge kernel, it didn’t work.

I found two strange things, first one is in your

aplay -l

results,
under card 0 and card 1 in your case it is written: Subdevices: 1/1
In my screenshot it is: Subdevices: 0/1

Furthermore, in Applications->Multimedia, I have two PulseAudioVolumeControl icons. Is it normal? Please see the screenshot below.

I tried the latest legacy image with kernel version 4.4 and sound is working now.

Thank you very much for your help.

Instructions:

  1. sudo armbian-config
  2. Select “System
  3. Select “Other
  4. Tick “Yes, I understand
  5. Go bot and select the latest legacy version. In my case:
    linux-image-legacy-rockchip64=22.05.01 4.4.213-rockchip64

Also, wanted to mention that with the newest version of official Debian (released 3 days ago) audio is working out of the box. This is the image:

https://github.com/radxa/debos-radxa/releases/download/20220717-1356/rockpi-4b-debian-buster-xfce4-arm64-20220717-1555-gpt.img.xz

I had a problem with the microphone not working on my rock 4 B+.
Finally, it worked, I report here.

Board: Rock 4 B+
OS: rock-pi-4b-plus_debian_bullseye_kde_b21.img.xz

After installation, simply execute the following commands

sudo apt update
sudo full-upgrade

Then, reboot.
Headsets with 4-pole jacks must be plugged in before start-up