Draft IOCTL commands on sndstat
Ka Ho Ng
khng at freebsdfoundation.org
Mon Oct 26 14:56:49 UTC 2020
Meanwhile, I was thinking if things sound better that we create
another label called `nameunit` to hold
something like pcm0, and prepend /dev/ to existing `devnode` string.
By doing so, callers only need to
directly use the `devnode` string to open the node without the hassle
of snprintf/asprintf.
Here is a piece of code to enumerate audio devices without error
checking with `nameunit` label added:
https://gist.github.com/khng300/b9b3ccc86c24691273dc36c85066e2dd
Ka Ho
On Thu, Oct 22, 2020 at 1:55 AM Ka Ho Ng <khng at freebsdfoundation.org> wrote:
>
> Hi all,
>
> I have proposed a set of IOCTLs on sndstat. The IOCTLs are nvlist-based,
> and the goal of these IOCTLs aims at eliminating text parsing as a
> generic user space API.
> Here is the link to the differential:
> https://reviews.freebsd.org/D26884. A piece of sample code
> is also provided to demonstrate the usage of the IOCTLs.
>
> Regards,
> Ka Ho
More information about the freebsd-arch
mailing list