#
1.12 |
|
26-Oct-2022 |
kn |
Make audio(9) get_props() optional, remove it from duplex drivers
The property bits of audio(9) are obsolete and ought to be removed completely.
sys/dev/audio.c:audio_open() currently uses get_props() to bail out if read *and* write was requested on a non-duplex driver.
Drivers that currently support playing but not recording need adjustment before the API can be cleaned up.
Drivers that advertise themselves as full duplex, i.e. those that always return AUDIO_PROP_FULLDUPLEX unconditionally in their get_props() currently always succeed this check.
As this is the only property, losen audio_open()'s DIAGNOSTIC check and only do the duplex check if the driver provides get_props().
This allows for simple removal of get_props() from full-duplex drivers without adding any other code or without changing functionality.
This includes all audio drivers under sys/dev/pci/ (maestro(4) being the only unfinished exception here).
Other drivers as well as the API change can then follow in smaller diffs.
This builds on amd64, arm64, i386, macppc and sparc64. amd64 with azalia(4) still plays, records as well as plays and records at the same time on my X230 as tested with
$ aucat -i play.wav [-o rec.wav]
alpha and hppa tests by miod OK ratchov miod
|
#
1.11 |
|
19-Oct-2022 |
kn |
Use C99 struct init for struct audio_hw_if
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style.
Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line
GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.
macppc and alpha build-tested by miod OK ratchov miod
|
#
1.10 |
|
18-Oct-2022 |
kn |
Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}
AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53 Author: ratchov <ratchov@openbsd.org> Date: Thu Jun 25 06:43:45 2015 +0000
Reimplement the audio driver in a simpler way, removing unused/unusable functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks.
but remained defined and set in drivers.
and the following merely moved them when they were dead code already:
commit 9215aa3dfad387bca877a805534df6dcfe8722eb Author: ratchov <ratchov@openbsd.org> Date: Wed Aug 31 07:22:43 2016 +0000
Delete unused ioctls and associated macros. Move macros that are still used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them.
None of this is used in base or ports; codesearch.debian.net only shows AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb.
ratchov points out that audio_if.h and audioio.h are private interfaces and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD).
OK ratchov
|
Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
|
#
1.9 |
|
21-Mar-2022 |
miod |
Constify struct {audio,midi,radio,video}_hw_if. No functional change.
ok mpi@ ratchov@ "More const is good" deraadt@
|
#
1.8 |
|
16-Feb-2022 |
anton |
Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|
#
1.11 |
|
19-Oct-2022 |
kn |
Use C99 struct init for struct audio_hw_if
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style.
Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line
GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.
macppc and alpha build-tested by miod OK ratchov miod
|
#
1.10 |
|
18-Oct-2022 |
kn |
Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}
AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53 Author: ratchov <ratchov@openbsd.org> Date: Thu Jun 25 06:43:45 2015 +0000
Reimplement the audio driver in a simpler way, removing unused/unusable functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks.
but remained defined and set in drivers.
and the following merely moved them when they were dead code already:
commit 9215aa3dfad387bca877a805534df6dcfe8722eb Author: ratchov <ratchov@openbsd.org> Date: Wed Aug 31 07:22:43 2016 +0000
Delete unused ioctls and associated macros. Move macros that are still used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them.
None of this is used in base or ports; codesearch.debian.net only shows AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb.
ratchov points out that audio_if.h and audioio.h are private interfaces and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD).
OK ratchov
|
Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
|
#
1.9 |
|
21-Mar-2022 |
miod |
Constify struct {audio,midi,radio,video}_hw_if. No functional change.
ok mpi@ ratchov@ "More const is good" deraadt@
|
#
1.8 |
|
16-Feb-2022 |
anton |
Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|
#
1.11 |
|
19-Oct-2022 |
kn |
Use C99 struct init for struct audio_hw_if
This audio(9) struct will lose a member, but drivers init their struct quite inconsistently, most pre-C99 style.
Use C99 style everywhere, to get rid of all annoying differences and allow for easy member removals/additions: - don't change current order of members - no explicit NULL members - no comments or blank lines - trailing comma in last member line
GENERIC.MP builds fine with this on arm64, amd64, i386 and sparc64.
macppc and alpha build-tested by miod OK ratchov miod
|
#
1.10 |
|
18-Oct-2022 |
kn |
Remove unused AUDIO_PROP_{MMAP,INDEPENDENT}
AUDIO_PROP_FULLDUPLEX is the only audio(9) in use, the other two died with commit 1cf2860827c8ca659d8097d8da94a5ae5b888c53 Author: ratchov <ratchov@openbsd.org> Date: Thu Jun 25 06:43:45 2015 +0000
Reimplement the audio driver in a simpler way, removing unused/unusable functionality. Same API and ABI except for the removed bits and no behaviour change for programs using libsndio. With help from armani@ and mpi@, thanks.
but remained defined and set in drivers.
and the following merely moved them when they were dead code already:
commit 9215aa3dfad387bca877a805534df6dcfe8722eb Author: ratchov <ratchov@openbsd.org> Date: Wed Aug 31 07:22:43 2016 +0000
Delete unused ioctls and associated macros. Move macros that are still used internally by low-level drivers from sys/audioio.h to dev/audio_if.h instead of deleting them.
None of this is used in base or ports; codesearch.debian.net only shows AUDIO_PROP_{CAPTURE,PLAYBACK} in firefox-esr, mozjs and cubeb.
ratchov points out that audio_if.h and audioio.h are private interfaces and the codesearch shows SunOS and NetBSD bits (#ifdef'd out on OpenBSD).
OK ratchov
|
Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
|
#
1.9 |
|
21-Mar-2022 |
miod |
Constify struct {audio,midi,radio,video}_hw_if. No functional change.
ok mpi@ ratchov@ "More const is good" deraadt@
|
#
1.8 |
|
16-Feb-2022 |
anton |
Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|
#
1.9 |
|
21-Mar-2022 |
miod |
Constify struct {audio,midi,radio,video}_hw_if. No functional change.
ok mpi@ ratchov@ "More const is good" deraadt@
|
#
1.8 |
|
16-Feb-2022 |
anton |
Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|
#
1.8 |
|
16-Feb-2022 |
anton |
Make room for a cookie argument passed to audio_attach_mi(). Currently unused but intended to be used to correlate audio and wskbd devices.
ok ratchov@
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|
Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.7 |
|
19-Sep-2016 |
ratchov |
Remove unused getdev() audio driver functions.
|
#
1.6 |
|
14-Sep-2016 |
ratchov |
Remove drain(), query_encoding(), mappage() and get_default_params() methods from all audio drivers and from the audio_if structure as they are never called.
|
Revision tags: OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
|
#
1.5 |
|
11-May-2015 |
ratchov |
Remove all audio format conversion code from the kernel (btw holding the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi
ok armani@
|
Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE
|
#
1.4 |
|
12-Jul-2014 |
tedu |
add a size argument to free. will be used soon, but for now default to 0. after discussions with beck deraadt kettenis.
|
Revision tags: OPENBSD_5_4_BASE OPENBSD_5_5_BASE
|
#
1.3 |
|
15-May-2013 |
ratchov |
Introduce a global interrupt-aware mutex protecting data structures (including sound-card registers) from concurent access by syscall and interrupt code-paths. Since critical sections remain the same, calls to splraise/spllower can be safely replaced by calls to mtx_enter/mtx_leave with two exceptions: (1) mutexes are not reentrant (the inner splraise is thus removed), and (2) we're not allowed to sleep with a mutex (either msleep is used or the mutex is released before sleeping).
ok and help from kettenis, a lot of work from armani
|
Revision tags: OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE
|
#
1.2 |
|
05-Sep-2011 |
miod |
No need to check for the size to be a multiple of 4 in the alpha-specific code to process four samples at a time - we can do as much sets of 4 as possible before falling back to the remainder processed one byte at a time.
|
#
1.1 |
|
04-Sep-2011 |
miod |
Driver for the TURBOchannel alpha baseboard audio. Ported from NetBSD, with changes to allow using non-native encodings, and alpha specific code to try and avoid doing 8 bit memory access. Tested on 3000/300LX, deaf testing on 3000/600.
|