CVSROOT: /cvs Module name: src Changes by: k...@cvs.openbsd.org 2022/10/28 09:09:46
Modified files: sys/arch/arm64/dev: aplaudio.c aplmca.c sys/arch/luna88k/cbus: nec86.c nec86hw.c nec86hwvar.h sys/dev/fdt : graphaudio.c rkiis.c simpleaudio.c sys/dev/ic : arcofi.c sys/dev/pci : maestro.c Log message: Replace audio(9) get_props() with duplex check in open() in non-duplex drivers Make drivers which do *not* adverise AUDIO_PROP_FULLDPLEX return ENXIO in their open() if full-duplex mode was requested. This way, sys/dev/audio.c:audio_open() will fail immediately rather than later through the to-be-removed get_props() check. These are all drivers which simply don't support full-duplex mode. In device-tree based drivers like simpleaudio(4)/rkiis(4) and newer Apple ones like aplaudio(4)/aplmca(4), this adds a new open() stub to the low-level drivers which merely does the duplex check. My Pinebook Pro keeps playing audio and recording silence with this diff just like before (rkiis(4) is currently play-only): simpleaudio0 at mainbus0 simpleaudio1 at mainbus0 audio0 at simpleaudio1 $ aucat -i song69.wav -o rec.wav OK ratchov miod