History log of /openbsd/lib/libsndio/sio_sun.c (Results 1 – 25 of 30)
Revision Date Author Comments
# 2c53affb 27-Dec-2022 jmc <jmc@openbsd.org>

spelling fixes; from paul tagliamonte
any changes not taken noted on tech, but chiefly here i did not take the
cancelation - cancellation changes;


# ec8a3410 29-Apr-2022 ratchov <ratchov@openbsd.org>

Add sio_flush(3) function to stop playback immediately

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 discar

Add sio_flush(3) function to stop playback immediately

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.

show more ...


# df69c215 28-Jun-2019 deraadt <deraadt@openbsd.org>

When system calls indicate an error they return -1, not some arbitrary
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if

When system calls indicate an error they return -1, not some arbitrary
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.

show more ...


# 58aaf78f 19-Sep-2018 miko <miko@openbsd.org>

sys/stat.h not needed here; ok ratchov@


# 7fa7c74c 07-Apr-2016 ratchov <ratchov@openbsd.org>

Use the "new" audio(4) api and delete all the useless code to deal
with artificial complications caused by the old api. No behaviour
change.

ok armani, semarie


# e8cc0bfd 09-Jan-2016 ratchov <ratchov@openbsd.org>

Make code fit in 80 columns, remove trailing spaces & tabs.


# bde5d162 20-Dec-2015 ratchov <ratchov@openbsd.org>

Expose internal functions necessary to open audio devices and midi
ports using existing file descriptors.


# d9aa90fd 22-Nov-2015 ratchov <ratchov@openbsd.org>

remove unneeded prototypes


# 163486f8 22-Nov-2015 ratchov <ratchov@openbsd.org>

Don't remove the type component from the device string before passing
it to the *_open() functions. It's more flexible this way. No behaviour
change.


# 413b52fd 18-Nov-2015 ratchov <ratchov@openbsd.org>

Split function to initialize the raw device in two parts, one to open
the device node, the other to do the initialization. This will allow
with minimal changes, work to be done in two process sharing

Split function to initialize the raw device in two parts, one to open
the device node, the other to do the initialization. This will allow
with minimal changes, work to be done in two process sharing the fd.
No behaviour change.

show more ...


# 33569700 17-Nov-2015 ratchov <ratchov@openbsd.org>

don't call AUDIO_SETFD ioctl as it's a no-op


# b44cb2ca 02-Oct-2015 ratchov <ratchov@openbsd.org>

Validate that midi and audio device numbers are integers.


# 28996f62 02-Oct-2015 ratchov <ratchov@openbsd.org>

As device path is known, use its size instead of PATH_MAX


# 130e1f1b 02-Oct-2015 ratchov <ratchov@openbsd.org>

Use macros for audio and midi device paths rather than hardcoded
strings. No object change.


# 9d7d964f 28-Jul-2015 ratchov <ratchov@openbsd.org>

Use new AUDIO_GETPOS ioctl instead of AUDIO_GETxOFFS and
AUDIO_xERROR. It returns a snapshot of the counters we need
and avoids inconsistencies.


# 1664e8c8 24-Jul-2015 ratchov <ratchov@openbsd.org>

Fix arithmetic mistake causing errors when there are more xruns on the
record side than on the play side. This almost never happens are record
buffer are much larger than play buffers.


# 524a444f 16-Feb-2015 ratchov <ratchov@openbsd.org>

Remove backward compat bits to support for ':' character in sndio
device names. Remove wrong comments.


# 17645762 21-Nov-2014 ratchov <ratchov@openbsd.org>

Initialize the xrun attribute to SIO_IGNORE in sio_sun_getpar(). Found
by stu@, thanks!


# 0205f8e6 15-Aug-2014 guenther <guenther@openbsd.org>

Use O_CLOEXEC wherever we open a file and then call fcntl(F_SETFD, FD_CLOEXEC)
on it, simplifying error checking, reducing system calls, and improving
thread-safety for libraries.

ok miod@


# e6877796 05-Mar-2014 ratchov <ratchov@openbsd.org>

- use relative read/write positions to keep track of buffer
usage as seen by the caller
- refresh current position before reading/writing data, to keep the
current position always consistent with

- use relative read/write positions to keep track of buffer
usage as seen by the caller
- refresh current position before reading/writing data, to keep the
current position always consistent with read & write pointers
- fix confusion between processed samples by the hardware (as reported
by GET{I,O}OFFS) and samples played as reported by GETINFO(). Fixes
incorrect delta propagated after xruns in play-only and rec-only
modes
- don't wait for POLLIN or POLLOUT to be set to refresh ring pointers,
as they may not be set in certain cases. Fixes sndiod crash after
few days of continuous playback.
- save current parameters instead of calling getpar() too often

show more ...


# e791f9ef 20-Dec-2013 ratchov <ratchov@openbsd.org>

Be less verbose when SNDIO_DEBUG=1 is set.


# d418f94b 13-Nov-2013 ratchov <ratchov@openbsd.org>

Prefix by '_' symbols that are not part of the API.

ok deraadt, guenther


# ea382012 24-Aug-2013 ratchov <ratchov@openbsd.org>

Move underrun/overrun recovery code from the sun-api back-end to
the the generic code, so it can be used by other back-ends as well.
No behavior change (hopefully).


# e7d2a37c 14-Sep-2012 ratchov <ratchov@openbsd.org>

Don't read the xrun counter before the offset in the audio ring,
otherwise we'd open a tiny time window during which a xrun may occur
in turn making the sio_onmove() clock wrong during one tick.


# 7207b069 11-Apr-2012 ratchov <ratchov@openbsd.org>

Use "unsigned int" rather than "unsigned". No object change.
suggested by deraadt@


12