LIME2 sun4i-codec not working in bullseye-base image

Started by zeallin, June 18, 2025, 07:01:25 AM

Previous topic - Next topic

zeallin

Hello,

I want to upgrade the A20 system image to latest A20-OLinuXino-bullseye-base-20241121-172551.img, but the sun4i-codec seems not enabled by default.

I used the cool olinuxino-overlay tool to enabled the lime-audio-codec.dtbo then reset, and can see the device from aplay -l:

**** List of PLAYBACK Hardware Devices ****
card 0: sun4icodec [sun4i-codec], device 0: CDC PCM Codec-0 [CDC PCM Codec-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

However when I try to play a wav file it does not have audio output to speaker, and seems never return, need to use ctrl+c to force quit:
olimex@a20-olinuxino:~$ aplay ready.wav
Playing WAVE 'ready.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
^CAborted by signal Interrupt...
aplay: pcm_write:2058: write error: Interrupted system call

The same board with speaker can play audio using old debian8 image.

Is there anything I need to configure to make the analog codec works?

The test board is T2 Rev.L, it is connected to HDMI screen (but we don't want hdmi audio output since the screen does not have speaker)

Love Olimex A20. Thanks you very much my friends!

LubOlimex

What happens if you try the different options in olinuxino-display? E.g. with HDMI output set, with automatic set, with something else selected? Maybe first run olinuxino-reset and reboot to revert any changes configuration you might have done and forgotten about.
Technical support and documentation manager at Olimex

zeallin

#2
Yeah I've tried following scenario (olinuxino-reset is executed):

1.  run olinuxino-overlay to enable sun4icodec then reset  (HDMI plugged) -> same aplay fail
2.  based on step 1, use olinuxino-display switch to LCD 10' no TS (HDMI unplugged)  -> same aplay fail
3.  based on step 1, use olinuxino-display switch to DISABLE, (HDMI unplugged)  -> same aplay fail

I found when I enabled the sun4icodec then the sun4ihdmi is gone. but when called olinuxino-reset the sun4ihdmi is backed is this expected?

LubOlimex

I am not sure if audio is enabled for the LIME2 since the board has no audio jacks, I think it is not enabled on purpose to have more free GPIOs. Are you using LIME2-SHIELD? Try enabling the overlay for LIME2-SHIELD instead. It might be in olinuxino-overlay. Which variant of the LIME2 board? I will test too.
Technical support and documentation manager at Olimex