Age | Commit message (Collapse) | Author |
|
Fixes server.device entries disappearing when usb devices are unplugged
while in use. Found, analysed and tested by Laurie Tratt, thanks!
|
|
with help from edd@ and armani@
|
|
with help from edd@ and armani@
|
|
|
|
If sndiod is using another sndiod instance instead of the bare
hardware, then it must disable the underlying server.device
control to avoid conflicts with its own server.device control.
|
|
|
|
|
|
|
|
|
|
With this commit, SIGHUP makes sndiod discover new devices and if
there is a new device with higher priority (greater -F option number)
than the current one, sndiod switches to it. If the current device is
already the one with the highest priority (i.e. last -F), then SIGHUP
does nothing.
|
|
For now sndiod uses only a subset of the available channel mappings.
It gives the same result as the previous one, but having the same
in both programs makes code review and testing easier.
|
|
|
|
sndiod doesn't use partial blocks as aucat, but having the same
algorithm makes code review and testing easier.
|
|
|
|
|
|
This ensures that the final NULL sioctl_ondesc() call-back
call is not lost.
|
|
|
|
|
|
When -F is used, fixes the difference in behavior between watchdog
timer expiry and other errors.
|
|
Fixes crash when the device is disconnected and the clients are not
migrated to another device.
|
|
ok kn@
|
|
amendments to his diff are noted on tech
|
|
Fixes last few samples not being played when very large buffers
are used.
|
|
The new sio_flush(3) functions works the same way as sio_stop(3),
except that it doesn't wait for play buffer to be drained. Instead,
it discards its contents and returns immediately.
|
|
Found by and ok semarie@
|
|
The default device precision doesn't change (yet), i.e. we still
request the usual 16-bit mode, when available. Hardware supporting
24-bit samples only gets end-to-end 24-bit processing by default.
ok kettenis
|
|
person. Rewrite or use singular they.
ok thfr@ sthen@ daniel@ ian@ job@ kmos@ jcs@ ratchov@ phessler@ and
others I'm likely missing on an earlier version.
feedback tj@, feedback and ok jmc@
|
|
ok kn
|
|
mostly from kn@, tweaks from me
|
|
ok ratchov
|
|
|
|
This a shift towards a new model: clients connect to logical devices
(created with -s option) then the server routes data to/from the
underlying physical device (registered with -f option). The binding
may be changed at run-time with the server.device control exposed by
sndioctl(1).
As audio devices exposed by sndiod(8) are not bound to fixed physical
devices anymore, the physical audio device number component of
sndio(7) descriptors was removed.
fixes, help from and ok denis, edd
|
|
reduced to 480 frames. ok ratchov@
|
|
fails to report the path that the failure occured on. Suggested by
deraadt@ after some tech discussion.
Work done and verified by Ashton Fagg <ashton@fagg.id.au>
ok deraadt@ semarie@ claudio@
|
|
|
|
Now i386 compiler is smart enough to generate a single imul
instruction per fixed-point multiplication. This change also allows
24-bit precision to be used on all archs (if -DADATA_BITS=24 is used).
Tested on arm64 by Doug Moss <dougmoss710 at yahoo.com>, thanks
Suggested and ok naddy@
|
|
This is similar to what we already do when device is opened and its
mode doesn't match requested mode. Besides adding consistency, this
change would allow client's opt structure to be changed dynamically.
|
|
This is necessary to make rec-only devices properly work in
full-duplex. Fixes full-duplex clients stuck on rec-only device.
|
|
Besides being better coding style, this allows a client to be detached
and then attached to a device with different parameters.
|
|
Trying to rename the program level control is not needed anymore.
When a slot is given to another program, the new ctl_{new,del}()
functions can be used to delete the control of the old program and
create a new one for the new program. Cleaner, simpler.
|
|
|
|
This simplifies the logic of the initialization code, makes debug
printfs nicer and could slightly ease futur development.
No behavior change.
|
|
This is better style as since recently dev->master_enabled is used by
the ctlslot_xxx family functions which -- in the future -- could be
called with the device closed.
No behavior change.
|
|
|
|
|
|
No behavior change.
|
|
Moving to a global server-wide controls list is necessary to expose
controls that are not associated to a particular device (ex. a device
selector).
The current hack to use the device-side sioctl_desc->addr variable as
client-side key can't work anymore. So, we use a unique dynamically
allocated ctl->addr key; this is much cleaner. A new "scope" enum
(with two "void *" arguments) is used to determine what the control
does control. This adds flexibility and allows to easily add new
control types that are not associated to devices.
No behavior change.
|
|
Currently sndiod does not allow you to use alternative devices (-F
devices) which support only a subset of the modes of the main (-f)
device.
For example, if you do `sndiod -f rsnd/0 -F rsnd/1` and:
- rsnd/0 is full-duplex (rec + play).
- rsnd/1 is play-only.
Then you will be unable to use rsnd/1 as sndiod deems it incompatible
and refuses to use it (similarly if rsnd/1 is record-only).
This is annoying. It means if you want to use a record-only or play-only
device, you will either have to kill sndiod and restart it specifying
only that device (`sndiod -f rsnd/1` for the above example), or failing
that, downgrade the functionality of the main device (`-m play`).
This diff (a joint effort between ratchov@ and myself) makes mixing
devices with different modes possible. It does this by making both
recording and playing available for all devices, even if the underlying
hardware doesn't support both modes.
For example, if I try to record from a play-only device, then recording
will succeed, but the captured PCM data will be pure silence. Similarly,
if I try to play to a record-only device, then the audio stream will
disappear into the ether.
This is mostly a no-op for sndiod in the default configuration (except
that play-only devices now accept recording clients). If you use
alternative devices (-F), then it's possible for a record-only device to
be found first, which may be confusing if you just want to hear sound.
We can only assume that if you deviate from defaults, then you know what
you are doing.
With guidance from, and OK ratchov@, thanks!
|
|
The previous behavior of automatically decreasing playback volume
when new programs start playing can be achieved with '-w on'.
ok ratchov, patrick
|
|
Fixes crash that can occur when an usb device is unplugged, found by edd@
|