History log of /openbsd-current/sys/arch/macppc/dev/daca.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.15 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.14 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


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.13 21-Mar-2022 miod

Constify struct {audio,midi,radio,video}_hw_if. No functional change.

ok mpi@ ratchov@ "More const is good" deraadt@


# 1.12 13-Mar-2022 mpi

Constify struct cfattach.

ok miod@


# 1.11 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.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@


# 1.14 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


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.13 21-Mar-2022 miod

Constify struct {audio,midi,radio,video}_hw_if. No functional change.

ok mpi@ ratchov@ "More const is good" deraadt@


# 1.12 13-Mar-2022 mpi

Constify struct cfattach.

ok miod@


# 1.11 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.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@


# 1.13 21-Mar-2022 miod

Constify struct {audio,midi,radio,video}_hw_if. No functional change.

ok mpi@ ratchov@ "More const is good" deraadt@


# 1.12 13-Mar-2022 mpi

Constify struct cfattach.

ok miod@


# 1.11 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.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@


# 1.12 13-Mar-2022 mpi

Constify struct cfattach.

ok miod@


# 1.11 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.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@


# 1.11 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.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@


Revision tags: OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.10 19-Sep-2016 ratchov

Remove unused getdev() audio driver functions.


# 1.9 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_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.8 26-Feb-2010 jasper

- remove double cvs id's


# 1.7 26-Oct-2009 deraadt

Do not do strncmp comparisons on dv_xname because longer device names which
look similar could arrive in the future. Instead, compare directly against
dv_cfdata->cf_driver->cd_name
Issue originally spotted by miod


Revision tags: OPENBSD_4_5_BASE OPENBSD_4_6_BASE
# 1.6 29-Oct-2008 jakemsr

native default parameters for i2s devices instead of 8kHz
mulaw mono, which few can even do.

"Please just get this in." brad@


Revision tags: OPENBSD_4_4_BASE
# 1.5 21-Apr-2008 jakemsr

allow low level audio drivers to specify a default sample format,
instead of 8-bit mono mulaw @ 8kHz.

this is just the infrastructure; no drivers are specifying a default
yet.

ok ratchov@, deanna@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE
# 1.4 23-Apr-2007 deraadt

rename drivers with numbers in them; ok gwk drahn


Revision tags: OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.3 20-Nov-2005 brad

- add a datasheet for daca(4)
- add a datasheet for a very similar chipset to onyx(4); From kettenis@


# 1.2 05-Nov-2005 brad

some driver cleanup, ANSI/KNF and more consistency between the drivers.

ok joris@


# 1.1 30-Oct-2005 joris

add daca audio support, found in some macppc machines;
ok drahn@