OpenBSD CVS

CVS log for src/lib/libossaudio/ossaudio.c


[BACK] Up to [local] / src / lib / libossaudio

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.21 / (download) - annotate - [select for diffs], Thu Apr 2 19:57:10 2020 UTC (4 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, HEAD
Changes since 1.20: +201 -268 lines
Diff to previous 1.20 (colored)

Makes libossaudio use sndio instead of the kernel mixer(4) interface.

Programs will see the device handled by sndiod (instead of the first
one) and will always get access at least the sndiod master level
control. If present, hardware master input and output volumes are
exposed as well.

feedback from landry and sthen, "do it" deraadt

Revision 1.20 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:42 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.19: +9 -9 lines
Diff to previous 1.19 (colored)

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.

Revision 1.19 / (download) - annotate - [select for diffs], Fri Oct 26 14:46:05 2018 UTC (5 years, 7 months ago) by miko
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.18: +1 -5 lines
Diff to previous 1.18 (colored)

remove a misleading comment; ok ratchov@

Revision 1.18 / (download) - annotate - [select for diffs], Sun Apr 19 08:42:19 2015 UTC (9 years, 1 month ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9, OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.17: +2 -400 lines
Diff to previous 1.17 (colored)

Make SNDCLT_DSP_* ioctls return ENOTTY, and remove the corresponding
code. No ABI change.

ok armani@, guenther@, sthen@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 27 20:28:22 2013 UTC (11 years, 2 months ago) by tedu
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.16: +13 -19 lines
Diff to previous 1.16 (colored)

rename define to reflect current operating system, as in sys/compat
from tim van der molen

Revision 1.16 / (download) - annotate - [select for diffs], Thu Jun 26 05:42:05 2008 UTC (15 years, 11 months ago) by ray
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.15: +1 -8 lines
Diff to previous 1.15 (colored)

First pass at removing clauses 3 and 4 from NetBSD licenses.

Not sure what's more surprising: how long it took for NetBSD to
catch up to the rest of the BSDs (including UCB), or the amount of
code that NetBSD has claimed for itself without attributing to the
actual authors.

OK deraadt@

Revision 1.15 / (download) - annotate - [select for diffs], Fri Apr 4 05:03:19 2008 UTC (16 years, 2 months ago) by jakemsr
Branch: MAIN
Changes since 1.14: +3 -10 lines
Diff to previous 1.14 (colored)

simplify SNDCTL_DSP_SETTRIGGER

- don't mess with the operational mode.  that was primarily to be able to
set record|play mode for full-duplex, which isn't needed any more.

- don't set pause=1.  this ioctl isn't supposed to be used for stopping
streams.

suggestions, ok ratchov

Revision 1.14 / (download) - annotate - [select for diffs], Mon Nov 12 05:43:59 2007 UTC (16 years, 6 months ago) by jakemsr
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.13: +14 -8 lines
Diff to previous 1.13 (colored)


this is the recording source.  rename 'source' to 'recsource' and be
sure to only use 'record.source' instead of possibly 'inputs.source'.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Nov 12 05:11:16 2007 UTC (16 years, 6 months ago) by jakemsr
Branch: MAIN
Changes since 1.12: +6 -1 lines
Diff to previous 1.12 (colored)


implement SNDCTL_DSP_GETODELAY

bump minor version

ok deanna@

Revision 1.12 / (download) - annotate - [select for diffs], Tue Nov 6 04:24:39 2007 UTC (16 years, 7 months ago) by jakemsr
Branch: MAIN
Changes since 1.11: +78 -58 lines
Diff to previous 1.11 (colored)


- when we need to do both AUDIO_SETINFO and AUDIO_GETINFO to emulate
  a single OSS ioctl, return the return value and errno from from
  AUDIO_SETINFO if there was an error, since it's more informative
  than the return value and errno from AUDIO_GETINFO.  also, don't
  bail if AUDIO_SETINFO fails, because OSS ioctls should return the
  current value of the parameter they are setting, even if there was
  an error.

- avoid a possible (though highly unlikely) divide by zero in
  SNDCTL_DSP_GET[IO]SPACE.

ok ratchov@

Revision 1.11 / (download) - annotate - [select for diffs], Mon Oct 8 01:00:13 2007 UTC (16 years, 7 months ago) by jakemsr
Branch: MAIN
Changes since 1.10: +12 -15 lines
Diff to previous 1.10 (colored)

- make SNDCTL_DSP_GETOSPACE much more efficient by using AUDIO_GETPRINO
  instead of AUDIO_GETINFO
- make SNDCTL_DSP_GETISPACE return correct values by using AUDIO_GETRRINFO
  instead of AUDIO_GETINFO
- remove calls to setblocksize() from SNDCTL_DSP_GET[IO]SPACE.  changing
  the blocksize inside play or record loops, where these ioctls are most
  often used, can have serious negative consequences.  the blocksize
  should be "fixed" to a power of 2 before these ioctls are called by
  using SNDCTL_DSP_SETFRAGMENT or SNDCTL_DSP_GETBLKSIZE.

heavily tested by myself.  no negative feedback from anyone else.

ok ratchov

Revision 1.10 / (download) - annotate - [select for diffs], Fri Sep 28 01:15:15 2007 UTC (16 years, 8 months ago) by jakemsr
Branch: MAIN
Changes since 1.9: +21 -25 lines
Diff to previous 1.9 (colored)

implement SNDCTL_DSP_[G|S]ETTRIGGER

SNDCTL_DSP_SETTRIGGER is used to pause and unpause recording and
playback data transfers.  SNDCTL_DSP_GETTRIGGER returns the paused
states.

this implementation of SNDCTL_DSP_SETTRIGGER also sets the audio(4)
mode (AUMODE_[PLAY|RECORD]), depending on which direction (play, record
or both) is to be triggered.

this can be used allow OSS audio programs to work in full-duplex
mode without changing the audio(4) layer itself.  according to
OSS docs, SNDCTL_DSP_SETTRIGGER is a fairly important ioctl, and
should be used "when even the first read() cannot block."

tested to not break any ports currently using SNDCTL_DSP_SETTRIGGER
which has been a no-op for quite some time.

ok ratchov

Revision 1.9 / (download) - annotate - [select for diffs], Mon Feb 13 12:01:11 2006 UTC (18 years, 3 months ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9
Changes since 1.8: +8 -8 lines
Diff to previous 1.8 (colored)

revert change that breaks KDE, until we figure out what's wrong.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jan 25 21:32:23 2006 UTC (18 years, 4 months ago) by brad
Branch: MAIN
Changes since 1.7: +9 -9 lines
Diff to previous 1.7 (colored)

Fix problem in ioctl() handling in OSS audio emulation which caused
unintentional changes of the audio settings e.g. when running "kphone".

Adapted to the userland library from a similar change in the kernel code.

ok jakemsr@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jan 19 18:35:04 2005 UTC (19 years, 4 months ago) by jason
Branch: MAIN
CVS Tags: OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.6: +4 -2 lines
Diff to previous 1.6 (colored)

compare st_dev/st_ino before declaring the cached values valid; ok miod

Revision 1.6 / (download) - annotate - [select for diffs], Sat May 3 19:01:48 2003 UTC (21 years, 1 month ago) by avsm
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.5: +11 -4 lines
Diff to previous 1.5 (colored)

- make it -Wall clean
- add SNDCTL_DSP_SETDUPLEX emulation (netbsd)
- SNDCTL_DSP_POST is a noop to prevent some apps blocking (netbsd)
- some man pages fixes (from me and netbsd)
- add some more missing #defines for SOUND_MIXER_*  (netbsd)

Revision 1.5 / (download) - annotate - [select for diffs], Wed Apr 24 21:59:53 2002 UTC (22 years, 1 month ago) by espie
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2
Changes since 1.4: +9 -2 lines
Diff to previous 1.4 (colored)

make oss_ioctl varargs.
this is not standard C, but it works on the arches we support,
and osscompat is a dirty hack in the first place.
ok millert@, tested naddy@

Revision 1.4 / (download) - annotate - [select for diffs], Sat Aug 18 19:33:30 2001 UTC (22 years, 9 months ago) by brad
Branch: MAIN
CVS Tags: OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.3: +132 -58 lines
Diff to previous 1.3 (colored)

sync up libossaudio with NetBSD changes.
--
- Add __BEGIN_DECLS & __END_DECLS for C++
- Make protection against multiple inclusion non-invasive wrt. name space
- Use EAGAIN instead of EWOULDBLOCK.  The actual numeric value is
same, but EAGAIN is the posixly correct name
- Remove white space
- Change the behaviour to report emulated encodings, too
- Implement SOUND_MIXER_INFO
- Implement OSS_GETVERSION
- Accept mixer values above max (100)
- Handle the info from AUDIO_MIXER_DEVINFO properly, parts of it is opaque
- Use accurate rounding in conversion between OSS and OpenBSD volume values
- Map OSS mixer device "line1" to native mixer device "aux"
--
Some testing by pvalchev@, no response from other testers in over a month
and a half.

Revision 1.3 / (download) - annotate - [select for diffs], Thu May 24 04:21:03 2001 UTC (23 years ago) by aaron
Branch: MAIN
Changes since 1.2: +16 -4 lines
Diff to previous 1.2 (colored)

Fix fragment handling for SNDCTL_DSP_GETxSPACE ioctls; per NetBSD PR/12796.
The kernel part of this fixes sound emulation for version 1.37c of the Linux
binary of Snes9x (Super Nintendo emulator). The userland equivalent fix should
allow espie to remove his local audio hacks in the squeak port.

Revision 1.2 / (download) - annotate - [select for diffs], Mon May 25 21:37:46 1998 UTC (26 years ago) by provos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

fix off by one error, reported by nathanw@MIT.EDU.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Fri May 1 09:23:00 1998 UTC (26 years, 1 month ago) by provos
Branch: ossaudio
CVS Tags: ossaudio00
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

libossaudio from NetBSD mostly by Lennart Augustsson <augustss@cs.chalmers.se>

Revision 1.1 / (download) - annotate - [select for diffs], Fri May 1 09:23:00 1998 UTC (26 years, 1 month ago) by provos
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.