No sound card on Olimex A20 SOM EVB with FreeBSD 12.4
- Reply: Emmanuel Vadot : "Re: No sound card on Olimex A20 SOM EVB with FreeBSD 12.4"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Oct 2023 16:19:00 UTC
Hello,
We made custom device based on Olimex A20 SOM EVB board. I'm
migrating our application from FreeBSD 11.2 to FreeBSD 12.4. Our
application requires sound card and I found that if I install fresh OS,
I'm missing sound card device (/dev/dsp).
Sound card supported by the board has source in
src/sys/arm/allwinner/a10_codec.c and code was not changed for ages and
is part of 11.2, 12.x and 13.x branch.
I spend hours by checking why I'm missing sound device and I learn
that during boot is printed:
FreeBSD 11.2:
pcm0: <Allwinner Audio Codec> mem 0x1c22c00-0x1c22c3f irq 35 on simplebus0
pcm0: Mixer "vol":
pcm0: Mixer "line":
pcm0: Mixer "rec":
FreeBSD 12.4:
pcm0: <Allwinner Audio Codec> mem 0x1c22c00-0x1c22c3f irq 46 on simplebus0
pcm0: cannot find codec clock
I searched source code of sound card driver and I found:
if (clk_get_by_ofw_name(dev, 0, "codec", &clk_codec) != 0) {
device_printf(dev, "cannot find codec clock\n");
goto fail;
}
so it tries to find "codec" clock.
I expect it should be found/configured based on dtb file and I expect
that dtb was changed between releases. I hope I'm able to extend dtb for
the board.
The issue is that I don't know which codec clock it searches for. I
analyzed boot -v from 11.2 and 12.4 and I'm not able to identify it.
There are several "codec" word in boot log, but I don't know how the
code decide which one is correct/missing just based on word "codec" from
source code.
I went thru dts sources, but I'm not able to identify "codec" neither.
Can I ask for help to identify which clock shown in 11.2 boot log are
missing in 12.4 boot log?
Best regards,
Jirka Novak