On Tuesday, May 18, 2021, 10:42:53 AM EDT, Alexandre Ratchov <a...@caoua.org> wrote: >On Tue, May 18, 2021 at 02:19:49PM +0000, Doug Moss wrote: >> Another topic: >> arm64 sndiod cannot be built with 24bit >> >> in /usr/src/usr.bin/sndiod >> make COPTS=-DADATA_BITS=24 >> produces: >> dsp.h:85:2: error "no 24-bit code for this architecture" > >You could just add arm64 to the users of this code (or should we just >enable for all non-i386 archs?). Let us know if this works well on arm64.
arm64 sndiod at 24 bit seems to work - one line of code change in two files - make with COPTS for 24 bit I modified just one line in dsp.h in sndiod/ and aucat/ for architecture arm64 (I can't find any documentation on llvm.org for the clang macros for architectures. >From web searches, I found that __aarch64__ seems to be 'correct' for arm64) in /usr/src/usr.bin/sndiod/dsp.h and /usr/src/usr.bin/aucat/dsp.h change line #elif defined(__amd64__) || defined(__sparc64__) to #elif defined(__amd64__) || defined(__sparc64__) || defined(__aarch64__) # make COPTS=-DADATA_BITS=24 for both sndiod and aucat # ldd sndiod_24bit sndiod_24bit: Start End Type Open Ref GrpRef Name 0000000ed20c0000 0000000ed2310000 exe 1 0 0 sndiod_24bit 0000001301f43000 0000001301f81000 rlib 0 1 0 /usr/lib/libsndio.so.7.1 000000132626f000 0000001326375000 rlib 0 1 0 /usr/lib/libc.so.96.0 00000013cb900000 00000013cb900000 ld.so 0 1 0 /usr/libexec/ld.so # ldd sndiod_16bit sndiod_16bit: Start End Type Open Ref GrpRef Name 0000001addac0000 0000001addc10000 exe 1 0 0 sndiod_16bit 0000001f79ea0000 0000001f79ede000 rlib 0 1 0 /usr/lib/libsndio.so.7.1 0000001f0d022000 0000001f0d128000 rlib 0 1 0 /usr/lib/libc.so.96.0 0000001fc8350000 0000001fc8350000 ld.so 0 1 0 /usr/libexec/ld.so in /etc/rc.conf.local sndiod_flags=-r 96000 # ps -ax | grep sndiod 54898 ?? IpU 0:00.01 sndiod: helper (sndiod_24bit) 72559 ?? I<p 0:10.12 /usr/bin/sndiod -r 96000 (sndiod_24bit) # aucat -d -d -i BachGoldbergVariationsIshizakaNo01.wav BachGoldbergVariationsIshizakaNo01.wav: skipped unknown chunk BachGoldbergVariationsIshizakaNo01.wav,pst=cfg: play, chan 0:1, 96000Hz, s24le3, bytes 138..66508938, vol 8388608 default: 96000Hz, play 0:1, 36 blocks of 960 frames BachGoldbergVariationsIshizakaNo01.wav,pst=cfg: allocated 34560 frame buffer cmap: nch = 2, ostart = 0, onext = 0, istart = 0, inext = 0 dec: s24le3, 2 channels BachGoldbergVariationsIshizakaNo01.wav,pst=ini: chain initialized BachGoldbergVariationsIshizakaNo01.wav,pst=run: started started ^CBachGoldbergVariationsIshizakaNo01.wav,pst=ini: stopped stopped BachGoldbergVariationsIshizakaNo01.wav,pst=ini: closed