Audio Support Rock Pi S

Just thought sod it and connected a analogue mic module without dc blocking caps.

3.3 -> Module VCC, GND -> Module GND
Out -> Mic-P, GND -> Mic-N

Works fine the mems is a bit quiet and the electret with the MAX9814 is mighty as it usually is.

There was DC buzz but far less than my lazy approach expected as thought it would be horrendous but ok just to test.
I will get some .1uf ceramics on Mic-N & Mic-P and see how its goes.

Also while I am at it a 4.7uF DC blockers on the stereo out is prob worth a try also, so will come back on that.

[edit]

I would say these are definitely the best to go for as even though electret rather than mems the Max9814 gives far more amplification.

There is a level of dc buzz that I think is endemic to the Soc board as on high gain with the codec you just amplify this base buzz with you signal.
So the higher the input signal the less you need to amplify.

Yeah blocking caps help a little but going to play with values a little bit more as its guess work to the impedance of the mic module.
Also because I had one I put an audio cap 12000uF across 5v & gnd which did clean the line a little but minimal.
Prob smaller :slight_smile: might help and not lessen the effect but debatable if worth the hassle or space.

The mems analogue modules due to the large codec gain needed produce quite a lot of noise. Its still completely fine for recognition but for voice recording you wouldnā€™t be happy.
In fact even the max9814 you probably wouldnā€™t be happy but in comparison to the mems the low level of background noise is only a problem if you where thinking of creating a wifi mic or something and expecting studio quality.

My application of a voiceAI then more than happy with the sensitivity of the max9814 you need to put 3.3v on the gain pin as the top gain by leaving it floating as usual with these modules is noisy.
Dunno why they are that way as the top gain is pure over optimism whilst -10db makes a world of difference.
The low gain by applying gnd to the gain pin doesnā€™t seem to be much different but the lower signal it produces means more codec amplification and the board noise starts to creep in.

You can listen here to the electret with a codec gain of 13.5db with a single mic

https://drive.google.com/file/d/1f4IUcTLdSJDCfdRAsQuA4JSWxw39670t/view?usp=sharing

Also my computer is pretty noisy so here is a recording where through the recording it goes to sleep and you can hear in a much quieter room a truer reflection of quality.

https://drive.google.com/file/d/1goGPNXlUE8P-R2T3tHrhjXFQwtWENz0h/view?usp=sharing

1 Like

Hi
I am using a DAC that needs master clock AK4495 and when I am following your instructions here I am not getting any output on the master clock pin. It should be on pin 7 (GPIO2_A4) right?
SCLK, LRCLK, and SDO working fine.
My question is do you know if something is wrong in the dts file or is it the driver?

Plus I2S0_8CH_LRCK_TX & Output.

Seemed to of got it working via those instructions I did mic in on the RX setup

MAX98357A dont need a master clock to work as far as I know. If you just follow the instructions here modifying the dtb file it should work.
It works well on my NOS DAC TDA1387 that one do not oversample and dont need a master clock.

I presume your using an adafruit amp?

Its has a clock input, LR clock and use 3.3v & gnd so prob better to supply them.

If you do a LS of dir containing the dtdb you will find the actual dtb is called rk3308-rock-pi-s.dtb or something and not just as Baronets says.
Just adjust the file names so they are correct and reboot.

@jack @Stephen

Any chance we could have an I2S_0 Overlay so that it makes things a little easier :slight_smile:

Try the above as didnā€™t check about I2S and if it works I will leave you to work out if its 5V compat also.

Try this

https://forum.radxa.com/t/i2s-out-overlay-to-enable-i2s0/4222/2

1 Like

Have you solved your issue? Did you get your Mic to work? I struggle with the same issue. I cant find a working setup.

Hi @Stephen Can we do something similar with the Zero ?
Iā€™ve started a thread so the community can benefit from the solution

Hi, @baronets, just wanna know if I wanna use multi-channel TDM recording, how I could setup the DTS ? do I need to modify the code in audio driver ?

thanks

Power Pan

Thanks @DIYprojectz for the instructions! Sound plays nicely :slight_smile:
I am still having a problem with setting volume - changing the volume in alsa-mixer has no affect.
All settings are on 0, yet sound still has volume when played!

$ uname -a
Linux rockpis 4.4.143-69-rockchip-g8ccef796d27d #1 SMP PREEMPT Tue Jun 14 12:32:20 UTC 2022 aarch64 GNU/Linux

Any help how to control the volume via the command-line/alsa is most appreciated!

(also posted here: Rock PI S audio volume settings)

1 Like

Can you try installing PulseAudio and use pactl to control the volume:

pactl set-sink-volume @DEFAULT_SINK@ +1000

We are also looking to release a new system image for ROCK S soon. It will be based on the upstream Linux 6.1 kernel.

It was fixed some time ago, then break and fixed again. Someone reported working - with Armbian:


Current images donā€™t work yet (only automated daily builds) - has to be build from sources.

@igorp, Thanks for the info!
Unfortunately, building Armbian from source is beyond my capability :frowning:

If you donā€™t plan to change anything, it should be on end user level - similar to installing a Linux to the PC. I encourage you to try (instructions needs some update but in general this is it)

Also, at the bottom of the page https://www.armbian.com/rockpi-s/ there are auto generated images. Which should work. The only issue is, they are not officially support, can have unknown issues, but its worth trying. If this works, just wait for a release. Scheduled by the end of the month.

Im so thankfull for you helping out on this part of the board. Thank you.

I found your post by searching for a audio/file server for my HiFi setup:

Then I saw the RS308-D4 has i2S and I thought to myself. WOW! my dac also have this! but its HDMI formfactor.

is the Raxda modules output on the ETHERNET or the pins on the board, if the pins on the board. Possible to get a board/adapter so it will be possible to connect i2s/hdmi out?

@radxa, any news with the release of new system image for ROCK S?

Still need to work out NAND boot issue.

Is it safe to use latest build, e.g. Rock Pi S - 20230501-0032 if Iā€™m not using NAND?

The changes have not been pushed into the pipeline.

Hi
Is it possible configure left ch to SDO0 and right ch to SDO1 for i2s0 8ch?
Where can i find info how channels mapped between SDOx for i2s, pcm and tdm?
Thanks