Audio Support Rock Pi S

…ok, so, what in this phrase is not clear why Radxa have limit on this device?

Just. Say. What? Your link lead to full 40 pins device. OF COURSE IT HAVE AUDIO you desire. Not shit Sherlock!

@dante: In case I was meant here. Was that meant to be funny or offensive? (I do not laugh)

To put this on a more serious polite discussion level. Yes of course it has limited capacity, but do you really need 40 pins?

page 23: https://drive.google.com/drive/folders/1SW9fmIb_zQP0PB8mXkf7HrwLkAhNuvCw

remove the leds and all the other not needed stuff

I already deleted post, so chill. Also, “not needed” for whom? You? Maybe yes. All other ppl? I wouldn’t be that sure.

@jack: you might want to stick to the pin setup provided on page 23 , MIC-Array Digital (roc-rk308-cc-v1_3.pdf) if somehow possible. This is because, there is already a driver implementation for that. Furthermore nobody wants to use analog mics if you have digital MEMS (MEMS have a lot better quality, higher SNR, allow longer wires, …). Therefore, I would recommend to get rid of analog mic support. Then you also have space to add the lineout R/L.

https://drive.google.com/drive/folders/1SW9fmIb_zQP0PB8mXkf7HrwLkAhNuvCw

hope that helps you somehow.
keep up the good work!

@Dante4: “not needed” because they are connected to ground. Hence you need max. 19 Pinouts.

Best Regards

Matthias

I have loopback devices only even after dist-upgrade. I am using official Debian Stretch image. Kernel reported 4.4.143-23-rockchip-g394d86b2b38b . What exactly needs be done for the board to recognize internal DAC?

Did you use the asound.conf I provided a few postings ago? I also would like to get an answer from @jack why there is only one side of the headphones working right now but you could at least read everything in this post before asking questions that were already answered.

1 Like

I think @Jubian has dual channel sound working with flying wire to a headphone jack. @Jubian please confirm the configuration you use.

I tried test it,dual channal sound output is normal,You can use oscilloscope to try the pin is there have output,maybe your pi is broken.

UPDATE OK, after n attempts this is what finally worked for me, to get the soundcard recognized. However, only left channel works.

sudo su
route add default gw <your.gateway.ip.address> eth0
echo "deb http://apt.radxa.com/stretch-testing/ stretch main" | sudo tee /etc/apt/sources.list.d/apt-radxa-com.list
wget -O -  apt.radxa.com/stretch-testing/public.key | sudo apt-key add -
apt-get update
apt-get upgrade
apt-get install -y rockchip-overlay rockchip-fstab
apt-get install -y linux-4.4-rockpis-latest rockpis-dtbo
apt-get autoremove
chmod a+r /etc/group 

For some reason, apt-get dist-upgrade and apt full-upgrade left me with loopback devices only.

Then I modified /etc/asound.conf as posted by @xfjx earlier, and reboot.

You could at least drop the entitled act and stop assuming somebody asking a question in a thread didn’t read said thread and didn’t follow steps described in the thread before posting a question. With such attitude, why don’t you re-read the topic and wiki instead of pestering @jack with your questions? Also, if I was so low opinion of you as you are of others, I would assume you didn’t check which side of the audio header has GND and wired it wrong, which would explain why you have no sound on second channel.

1 Like

Thanks for your reply,
I direct replacement the kernel and device tree,it can works on dual channal,maybe it has bug at apt way, we will test and fix it.

1 Like

At least I know how to create a asound.conf from scratch and was kind enough to share it.

Oi, that’s so great, and totally justifies your disrespectful behaviour… no, it doesn’t.

1 Like

I did the update via apt… still only right channel is working.

also tried my second rock pi s - same issue. I will now start to build the kernel on my own.

1 Like

I really must have hit a nerve. Actually you are the person being disrespectful but hey, I understand you just can’t do any better. Now just calm down or go troll somewhere else…

Back to topic: would this be the correct place to get the kernel source? https://github.com/radxa/kernel/tree/stable-4.4-rockpis

Yes, that’s the right branch.

We have just tested audio on Rock Pi S. It works.

Update the kernel to version 4.4.143-27-rockchip, and using mplayer to play songs. Both sides of headphone have voice.

Hardware connection is shown below.

Three lines:

Blue — LINEOUT_R
green — LINEOUT_L
black — GND

2 Likes

Thanks for the picture! As there was a problem with one of the channels when I first tried to connect the headphone I forgot to recheck if I was still using the right pins. There was no explanation of the numbers anywhere. So DIYDealz was right at the end and I did connect the wires wrong :crazy_face: :rofl:

I can confirm that both channels are working fine now! Thank you very much.

Congrats Stephen, to make it work! Would be cool to add a detailed wiring pic to the FAQ

@Radxa Team: Any thoughts about the multi-MIC setup?

Best regards

Mat

I am trying to get I2S output working, but need some help with the right device tree overlay.
For now, I enable i2s_8ch_xx for example, but not getting to far with this overlay:

// For ROCK Pi S
/dts-v1/;
/plugin/;

/ {
  model = "Radxa ROCK Pi S";
	compatible = "radxa,rockpis-rk3308", "rockchip,rk3308";

  fragment@0 {
    target = <&i2s_8ch_0>;
    __overlay__ {
      status = "okay";
      };
  };
};

Any pointers?
PS: I know there is no codec loaded, will tackle that at stage 2. :slight_smile:

This is the first of two messages in this thread - this one concerns the L and R Line Out. The second one will concern the Analog Microphone inputs.

My application for the Rock Pi S is audio for music. There is no other compact board with built-in multichannel audio inputs, and it is smaller than all the other boards anyway.

The L and R signals are on pins 26 and 25, the end ones furthest from the LEDs. A scope shows them to have the desired voltages, but no audio signals yet.

I followed the wiki instructions https://wiki.radxa.com/RockpiS/Debian, using the image file rockpis_debian_buster_minimal_arm64_191219_0406-gpt.img.gz :

rockchip-fstab           0.1
rockchip-overlay         2.2
linux-4.4-rockpis-latest 4.4.143-36-rockchip
rockpis-dtbo             4.4

and the xfce stuff. The basic installation already had two ALSA items:

libasound2:arm64   1.1.8-1  arm64   shared library for ALSA applications
libasound2-data    1.1.8-1    all   Configuration files and profiles for ALSA drivers

I installed the package jackd, which brought in jackd2 (there are at least two different implemenations of Jack, and this is the second one) and the GUI control program for it: qjackctl. There was still no aplay program, so I installed the alsa-utils package too.

The command aplay xyz.wav caused it to report playing the file via pulseaudio, but there were no output signals.

qjackctl > Connect shows no input or output ports.

aplay -l finds no soundcards.

aplay -L shows:

null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
pulse
    PulseAudio Sound Server
default
    Playback/recording through the PulseAudio sound server

I also added the /etc/asound.conf file as described above:

pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}

I have no solid understanding of any of this stuff - I am just hoping to get aplay to actually drive the line out pins. Looking around in the machine, using the F3 view function of Midnight Commander to see the contents of some of these items in /proc/asound/ :

Loopback is a symlink to card0/. rockchiprk3308a is a symlink to card1/.

cards:

 0 [Loopback       ]: Loopback - Loopback
                      Loopback 1
 1 [rockchiprk3308a]: rockchip_rk3308 - rockchip,rk3308-acodec
                      rockchip,rk3308-acodec

devices:

  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 24: [ 0- 0]: digital audio capture
 25: [ 0- 1]: digital audio capture
 32: [ 1]   : control
 33:        : timer
 48: [ 1- 0]: digital audio playback
 56: [ 1- 0]: digital audio capture

pcm:

00-00: Loopback PCM : Loopback PCM : playback 8 : capture 8
00-01: Loopback PCM : Loopback PCM : playback 8 : capture 8
01-00: dailink-multicodecs rk3308-hifi-0 :  : playback 1 : capture 1

timers:

G0: system timer : 4000.000us (10000000 ticks)
G3: HR timer : 0.001us (1000000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P0-0-2: PCM playback 0-0-2 : SLAVE
P0-0-3: PCM capture 0-0-3 : SLAVE
P0-0-4: PCM playback 0-0-4 : SLAVE
P0-0-5: PCM capture 0-0-5 : SLAVE
P0-0-6: PCM playback 0-0-6 : SLAVE
P0-0-7: PCM capture 0-0-7 : SLAVE
P0-0-8: PCM playback 0-0-8 : SLAVE
P0-0-9: PCM capture 0-0-9 : SLAVE
P0-0-10: PCM playback 0-0-10 : SLAVE
P0-0-11: PCM capture 0-0-11 : SLAVE
P0-0-12: PCM playback 0-0-12 : SLAVE
P0-0-13: PCM capture 0-0-13 : SLAVE
P0-0-14: PCM playback 0-0-14 : SLAVE
P0-0-15: PCM capture 0-0-15 : SLAVE
P0-1-0: PCM playback 0-1-0 : SLAVE
P0-1-1: PCM capture 0-1-1 : SLAVE
P0-1-2: PCM playback 0-1-2 : SLAVE
P0-1-3: PCM capture 0-1-3 : SLAVE
P0-1-4: PCM playback 0-1-4 : SLAVE
P0-1-5: PCM capture 0-1-5 : SLAVE
P0-1-6: PCM playback 0-1-6 : SLAVE
P0-1-7: PCM capture 0-1-7 : SLAVE
P0-1-8: PCM playback 0-1-8 : SLAVE
P0-1-9: PCM capture 0-1-9 : SLAVE
P0-1-10: PCM playback 0-1-10 : SLAVE
P0-1-11: PCM capture 0-1-11 : SLAVE
P0-1-12: PCM playback 0-1-12 : SLAVE
P0-1-13: PCM capture 0-1-13 : SLAVE
P0-1-14: PCM playback 0-1-14 : SLAVE
P0-1-15: PCM capture 0-1-15 : SLAVE
P1-0-0: PCM playback 1-0-0 : SLAVE
P1-0-1: PCM capture 1-0-1 : SLAVE

version:

Advanced Linux Sound Architecture Driver Version k4.4.143-36-rockchip-g55b1ec35291f.

prc/asound/card1/id:

rockchiprk3308a

/proc/asound/card1/pcm0p/info

card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: dailink-multicodecs rk3308-hifi-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

I won’t list the full names or contents of the /proc/asound/card1/pcm0p/sub0/ and /proc/asound/card1/pcm0p/sub0/ items, but their hw_params, status and sw_params items are all “closed”.

In /dev/snd/ there are 9 items:

controlC0   symlinked from /dev/snd/by-path/platform-snd_aloop.0
controlC1   symlinked from /dev/snd/by-path/platform-acodec-sound
pcmC0D0c    
pcmC0D0p    
pcmC0D1c    
pcmC0D1p    
pcmC1D0c    
pcmC1D0p    
timer 

I can dig up more details if someone points me where to look.

Does anyone have suggestions about how I can get line out working, and ideally have it appear to jack?

1 Like