nv(9)-based audio device enumeration
Links:
D26884 Implement
sndstat nvlist-based enumeration ioctls. URL: https://reviews.freebsd.org/D26884
commit c96151d33509655efb7fb26768cb56a041c176f1 URL:
https://cgit.freebsd.org/src/commit/?id=c96151d33509655efb7fb26768cb56a041c176f1
Contact: Ka Ho Ng <khng@FreeBSD.org>
This work presents a number of ioctl commands on /dev/sndstat using nv(9) to expose all available audio device nodes. nv(9) is used to generate a serialized binary stream representation of the information of audio device nodes presented in the running system. The documented nvlist structure in sndstat(4) manual page is stable for programming use.
For a long time, enumerating the audio device node interface
required parsing content of /dev/sndstat. It is tedious to write such a
parser and handle different hw.snd.verbose
levels
correctly. Using nv(9) eliminates the need to write a text parser
to do audio device nodes enumeration.
This work has been committed and is available in FreeBSD 14-CURRENT.
Sponsor: The FreeBSD Foundation
Last modified on: May 1, 2021 by Daniel Ebdrup Jensen