Age | Commit message (Collapse) | Author |
|
|
|
The initial alternate device number was set to 1 (instead of -1),
causing device number 1 to be skipped the first time sndiod is used.
|
|
|
|
mutually exclusive values. It's the same as SIOCTL_LIST except that
exactly one list element may be selected.
|
|
Save the current alternate device index and skip it in
dev_reopen(). Handling alternate device indices this way will ease
future development as well.
|
|
Fixes crashes when USB devices are disconnected, caused by an attempt
to close the already closed device: it was closed once when its ref
counter drops to zero (after the last client is disconnected) and once
with an explicit call to dev_close() on the error code-path.
|
|
ok deraadt
|
|
|
|
As the master output level control is not in software any longer the
device needs to opened for adjustments to work.
|
|
Fixes possible crashes if the contol device fails, while the audio
device continues to work.
|
|
With this change, there's a single outputs.level control: either the
hardware one or software one. Consequently, there can't be control
name clashes and there's no need to move hardware's top-level controls
into the "hw/" group.
|
|
|
|
In the dev_reopen() case the controls of the old device are removed,
but if the new device has no controls, we still need to call
dev_ctlsync() so that clients are notified about the removal of the
old controls.
|
|
|
|
|
|
|
|
This sends twice the "control changed" messages because a second
message will be sent upon the notification from the hardware.
|
|
This is needed because when devices are swapped, clients need to know
when to rebuild their user interface.
|
|
The API exposes controls of modern audio hardware and sndiod software
volume knobs in a uniform way. Hardware knobs are exposed through
sndiod. Multiple programs may use the controls at the same time
without the need to continuously scan the controls.
For now sndiod exposes only its own controls and the master output and
input volumes of the underlying hardware (if any), i.e. those
typically exposed by acpi volume keys.
ok deraadt
|
|
|
|
worker process instead of the helper process. It is simpler this way
and allows the worker to properly log which device is being used.
|
|
The MIDI protocol requires the status byte to be resent after common
messages, including system exclusive messages. But, some MIDI clients
forget to resend it; we workaround this restoring the status byte
after sysex messages.
|
|
Fix from Peter Piwowarski <peterjpiwowarski at gmail.com> with few
tweaks from me. Thanks.
|
|
Fixes a possible crash when a new file structure is added in the
time-out processing code-path.
|
|
|
|
|
|
Then new default block size is supported by virtually all devices
which allows switching between devices without further configuration.
The buffer size remains the same, so this change won't affect audio
stability.
ok mpi@
|
|
The new -F option allows alternate device to be specified. If the
device is disconnected, the one given with the last -f or -F options
will be used instead. Similarly, the new -Q option allows an alternate
MIDI port to be specified.
ok mpi@
|
|
If the (hardware) device has fewer channels than the exposed
sub-device, then join/expand only to channels that exist on the
device.
|
|
No behabior change.
|
|
This makes the code more readable and the routine available for other
uses. No behavior change.
|
|
The first part disconnects clients, the other closes the device
and frees audio buffers. No behavior change.
|
|
The first part resets audio parameters to the prefered ones, the
second part opens the device and allocates the audio buffers. No
behavior change.
|
|
|
|
|
|
This makes the routine reusable, no behavior change.
|
|
This makes the routine reusable, no behavior change.
|
|
|
|
crank the maximum channels number to 64.
|
|
Currently, if there are two instances of the same program, sndiod will
allocate one volume control to each. If both programs disconnect and
reconnect, the information of which control is assigned to which
program is lost. This makes difficult to run two instances of a player
and crossfade between each other with a MIDI controller.
To address this, the program chooses a 32-bit "id" (for now the
process pid) and sends it to the server. The server records the id in
the client's slot structure. When the server accepts a new
connection, it uses the id to identify the slot the client used during
the previous connection; if it was not recycled yet, it's assigned to
the program.
|
|
|
|
Makes the code simpler at virtually no cost since we need 8 entries
only. No behavior change.
|
|
No behavior change.
|
|
|
|
|
|
|
|
ok deraadt
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
As MTC requires new position to be transmitted with one frame
precision and then to advance in quarter-frame steps, its not
necessary to pollute out mtc position pointer with a frame cents
information, care about rounding errors and so on.
|
|
|