[Bug 287023] audio/virtual_oss command line is overly complex

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 23 May 2025 15:21:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287023

            Bug ID: 287023
           Summary: audio/virtual_oss command line is overly complex
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: christos@freebsd.org
          Reporter: john.david.duncan@gmail.com
          Assignee: christos@freebsd.org
             Flags: maintainer-feedback?(christos@freebsd.org)

virtual_oss requires a structured configuration, which is currently expressed
as a set of command line options.

There are ordering constraints imposed on the options: -b, and -c must be
specified before -s, and then -s must be specified before -m. The -m option can
be supplied several times; each time creates an instance of a data structure in
the configuration. An example in the virtual_oss.8 manual page shows -a, -b,
and -c being reset before each instance of -m.  

The structure is not entirely clear without looking at the source code, and
when the user gets something wrong, the resulting error message is also often
terse and unclear. 

I suspect that the result of this has been to limit the user base of
virtual_oss to  use cases that closely match Hans Petter's original documented
examples. 

Rather than attempting to pack a structured configuration into a command line,
virtual_oss could accept a configuration file, so that the syntax of the
configuration language constrains the configuration and makes it easier to
understand and verify.

This syntax is open to design: it could be a small language with a custom
parser; it could be yaml; it could borrow alsa's configuration language and use
a subset or new section of alsa config. And there are probably other better
options than these.

If the stakeholders on this bug report agree on a design of a config file, I
will volunteer to implement it, and to improve the diagnostic output and error
messages where I can.

-- 
You are receiving this mail because:
You are the assignee for the bug.