I2s-out overlay to enable i2s0

Here is an overlay to enable i2s out.

https://github.com/eragefe/Rockpi-S/raw/master/i2s-out.dtbo

https://raw.githubusercontent.com/eragefe/Rockpi-S/master/i2s-out.dts

Copy i2s-out.dtbo to /boot/dtbs…/rockchip/overlay
edit /boot/uEnv.txt “overlays=rk3308-uart0 i2s-out”
save reboot

2 Likes

@eragefe Bit tangential but on the topic of I2S is it possible to have I2S in but retain the 2 channel Dac out?

When you load the overlay you get both playback and capture devices mapped.
So I guess without testing that it is possible.

Is it possible to skip the multicodecs-card and the rk3308-codec and directly use a different codec?

For reference, I was trying something along these lines:

@eragefe Dunno last time I mangled the DTB I2S was enabled but for both I2S_0 in/out that seemed to disconnect the DAC in preference for a DAC on the I2S.

I will give you overlay a try but expecting prob the same.

Have you compiled the pcm5102a codec? It is not precompiled in the official image as far as can see.
What image are you trying to apply your overlay to ? Radxa ? Armbian?

On what image will this work? Armbian? Radxa?

I have only tested that with Radxa image.

This was with the Ambian 5.x image – I had the pcm5102a codec compiled, but couldn’t get it linked up.

The reason I ask about using a different codec is I don’t think I ported all the I2S stuff from the 4.4 kernel - (the multicodecs-card for example) over to the 5.x kernel, so was playing around directly with the pcm5102a codec using the simple-audio-card (my last attempt). I also now notice that a lot of my testing commits also ended up in the patch list so should probably clean that up… :sweat_smile:

You seem to understand the audio pipeline better than me, do you think its possible to use a different code directly?

PS: Not sure, but you could also try with snd-soc-dummy as it should require no additional modules?

The multicodecs-card will not work with the Armbian 5.x kernel builds – unless some other board has a patch for it in Armbians’s build toolchain.

ok
Then try this one you can change the spdif codec with your pcm5102 but it is really no need for that.
They are almost the same.
https://raw.githubusercontent.com/eragefe/Rockpi-S/master/simple_card.dts
tested with radxa image

After loading the overlay you will get
**** List of PLAYBACK Hardware Devices ****
card 0: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 0: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: DAC [DAC], device 0: ff300000.i2s-dit-hifi dit-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0