History log of /src/lib/libossaudio/soundcard.h |
Revision | | Date | Author | Comments |
1.34 |
| 09-May-2021 |
nia | libossaudio: Various OSSv4 fixes to allow reference programs to compile
- Define various new AFMT_*. These are not returned as supported formats by SNDCTL_DSP_GETFMTS, because it would be very silly to have Vorbis in the kernel.
- Implement PLAYTGT and RECSRC. For each NetBSD audio device we only return one playback and recording source, "primary".
- Return preferred channel configuration in capabilities. Either DSP_CH_STEREO, DSP_CH_MONO, or DSP_CH_MULTI depending on the current hardware format.
- SNDCTL_DSP_HALT_* simply flushes the audio device.
|
1.33 |
| 03-Dec-2020 |
nia | branches: 1.33.2; Add some missing channel order related ioctl defines.
These are no-ops (unimplemented) on both FreeBSD and Solaris and the one piece of code I've found that uses it seems to assume the call will fail so it should be safe to leave this returning EINVAL.
However, it does need the definitions to compile...
|
1.32 |
| 03-Nov-2020 |
nia | ossaudio(3): More capability defines from OSSv4
|
1.31 |
| 23-Oct-2020 |
nia | ossaudio(3): Add an implementation of SNDCTL_CARDINFO
Correct some of the counts returned by SNDCTL_SYSINFO so this works.
|
1.30 |
| 20-Oct-2020 |
nia | ossaudio(3): Add SNDCTL_AUDIOINFO_EX as an alias of SNDCTL_AUDIOINFO
|
1.29 |
| 20-Oct-2020 |
nia | ossaudio(3): Add some endian-specific U16 formats
for compatibility with FreeBSD
|
1.28 |
| 19-Oct-2020 |
nia | ossaudio(3): add some no-op defines for ossv4 compat.
|
1.27 |
| 19-Oct-2020 |
nia | ossaudio(3): Add SNDCTL_DSP_CURRENT_(I|O)PTR
In OSSv4 these are supposed to avoid the wrapping problems with the older GET(I|O)PTR ioctls but we don't quite get the same benefit here.
XXX: We could probably fake it by maintaining some state in-between calls.
|
1.26 |
| 17-Oct-2020 |
nia | ossaudio(3): Add initial support for the OSSv4.1 Mixer API
One or two calls from this API were supported previously and have been moved to the correct place.
Mapping the controls correctly is a difficult task. There is a define hidden in the OSS headers that would allow an AUDIO_MIXER_SET control to be represented perfectly, but it seems to _only_ exist there, and no software supports it. So for now only one member of a set can be set at a time - unfortunate. I've hidden code that should unlock doing this the proper way under #notyet.
I'm not too happy with the way this code is managing file descriptors. Currently it has to open a new fd for each ioctl due to OSSv4 deciding to specify the device number in a structure rather than in the filename. In the future, we could reuse the file descriptor if the correct one is detected open.
This allows the mixer programs provided with the OSSv4 sources to compile and work cleanly. I've observed problems with it failing to work on secondary devices, and should investigate this later. There may be a fd leak somewhere.
|
1.25 |
| 16-Oct-2020 |
nia | ossaudio(3): Add SNDCTL_DSP_COOKEDMODE, SNDCTL_DSP_GETERROR
SNDCTL_DSP_COOKEDMODE simply always returns 1. "Cooked mode" is a silly way the OSSv4 authors chose to refer to allowing for reprocessed streams. The NetBSD kernel always performs format conversion and it can't be turned off.
SNDCTL_DSP_GETERROR provides access to the read/write over/underrun counters. There are other things it might return, but they don't make sense for our implementation.
|
1.24 |
| 09-Sep-2014 |
nat | Add missing defines for 16, 24 and 32 bit NE and OE formats. Add the ability to set 24 and 32 bit precision.
This commit was approved by wiz@
|
1.23 |
| 17-May-2014 |
nat | branches: 1.23.2; Adds ioctls and defines for OSSv4 compatibility.
The ioctl definitions and accompanying structures were taken from FreeBSD's soundcard.h, hopefully providing some binary compatibility.
The ioctls are as follows: SNDCTL_SYSINFO: Returns a structure containing details about the audio device. SNDCTL_ENGINEINFO - SNDCTL_AUDIOINFO: Returns a structure with playback/recording characteristics. SNDCTL_DSP_GETPLAYVOL, SNDCTL_DSP_SETPLAYVOL, SNDCTL_DSP_GETRECVOL, SNDCTL_DSP_SETRECVOL: Retrieves/Sets Playback/Recording volume. SNDCTL_DSP_SKIP - SNDCTL_DSP_SILENCE: These ioctls were intended to manipulate the underlying audio buffer skip or insert silence. These return EINVAL.
SOUND_VERSION is unchanged, but is definable, It will be changed when the mixer OSSv4 ioctls are written.
Addresses PR 46611 This commit was approved by wiz@.
|
1.22 |
| 05-May-2012 |
christos | branches: 1.22.2; 1.22.8; fix typo, WARNS=5
|
1.21 |
| 05-May-2012 |
christos | avoid using cpp variadic macros and explain why.
|
1.20 |
| 04-May-2012 |
christos | - match regular ioctl prototype (3rd argument is optional) - fix lint issues
|
1.19 |
| 06-Sep-2011 |
jmcneill | branches: 1.19.2; 1.19.4; Add support for AFMT_AC3
|
1.18 |
| 28-Apr-2008 |
martin | Remove clause 3 and 4 from TNF licenses
|
1.17 |
| 15-Mar-2008 |
bjs | branches: 1.17.2; s/prototyoe/prototype/
|
1.16 |
| 18-Sep-2007 |
mlelstv | branches: 1.16.4; Implement OSS_SNDCTL_DSP_GETODELAY and provide a no-op function for OSS_SNDCTL_DSP_PROFILE.
|
1.15 |
| 09-Feb-2005 |
drochner | branches: 1.15.16; work around a prototype conflict by including ioctl.h before we redefile ioctl()
|
1.14 |
| 04-Feb-2005 |
perry | de-__P
|
1.13 |
| 27-May-2002 |
wiz | Add SOUND_MASK_* for the last SOUND_MIXER_* values that didn't have any.
|
1.12 |
| 11-Jan-2002 |
kleink | Determine the 'native' endianness using _BYTE_ORDER from <machine/endian_machdep.h>.
The previous method of wrapping a definition of _POSIX_SOURCE around the inclusion of other headers to reduce namespace pollution had the side-effect of not all required identifiers being defined when included thereafter by the application itself (due to multiple-inclusion protection), and is not blessed by that standard.
|
1.11 |
| 09-May-2001 |
augustss | Apply patch in PR lib/12796 from Frederick Bruckman <fb@enteract.com>
|
1.10 |
| 16-Nov-1999 |
augustss | branches: 1.10.4; Implement SOUND_MIXER_INFO.
|
1.9 |
| 13-Apr-1999 |
augustss | branches: 1.9.4; Make copyrights conform.
|
1.8 |
| 18-Mar-1999 |
augustss | branches: 1.8.2; Avoid defining _POSIX_SOURCE.
|
1.7 |
| 05-Feb-1999 |
kleink | Make protection against multiple inclusion non-invasive wrt. name space.
|
1.6 |
| 29-Jun-1998 |
augustss | Revert the #define of ioctl to its previous state since my "improvement" broke some packages.
|
1.5 |
| 19-Jun-1998 |
augustss | Add __BEGIN_DECLS & __END_DECLS for C++ and clean up a little.
|
1.4 |
| 29-Oct-1997 |
augustss | Add even more defines.
|
1.3 |
| 29-Oct-1997 |
augustss | Fix a serious emulation bug. Add some missing #defines. Add a little more documentation.
|
1.2 |
| 26-Oct-1997 |
augustss | Add some missing defines and add history to man page.
|
1.1 |
| 16-Oct-1997 |
augustss | branches: 1.1.2; Initial version of a user level emulation of the OSS audio API. Useful for compiling Linux audio programs.
|
1.1.2.2 |
| 30-Oct-1997 |
mellon | Pull rev 1.4 up from trunk (augustss)
|
1.1.2.1 |
| 29-Oct-1997 |
mellon | Pull rev 1.2 and 1.3 up from trunk (augustss)
|
1.8.2.1 |
| 16-Apr-1999 |
augustss | Make a bunch of copyright headers conform to the standard. Pullup approved by Perry.
|
1.9.4.1 |
| 27-Dec-1999 |
wrstuden | Pull up to last week's -current.
|
1.10.4.2 |
| 06-Feb-2002 |
he | Pull up revision 1.12 (requested by kleink): Determine the ``native'' endianness using _BYTE_ORDER from <machine/endian_machdep.h>.
|
1.10.4.1 |
| 16-Aug-2001 |
tv | Pullup [fb]:
lib/libossaudio/ossaudio.c 1.13-1.14 lib/libossaudio/soundcard.h 1.11 sys/compat/ossaudio/ossaudio.c 1.34-1.35
Correctly calculate input and output hardware buffer sizes. Fixes PR lib/12796.
|
1.15.16.2 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.15.16.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.16.4.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.17.2.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.19.4.1 |
| 07-May-2012 |
riz | Apply patches (requested by christos in ticket #225): lib/libossaudio/Makefile patch lib/libossaudio/ossaudio.c patch lib/libossaudio/soundcard.h patch
Fix compilation of ioctls without the 3rd argument in ossaudio. [christos, ticket #225]
|
1.19.2.1 |
| 23-May-2012 |
yamt | sync with head.
|
1.22.8.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.22.2.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.23.2.1 |
| 11-Sep-2014 |
martin | Pull up following revision(s) (requested by nat in ticket #92): lib/libossaudio/ossaudio.c: revision 1.30 lib/libossaudio/soundcard.h: revision 1.24 Add missing defines for 16, 24 and 32 bit NE and OE formats. Add the ability to set 24 and 32 bit precision.
|
1.33.2.1 |
| 31-May-2021 |
cjep | sync with head
|