summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 02:10:02 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-29 02:10:02 +0000
commit13327e596da9017c7180b49d53b493be0956a3a8 (patch)
tree4549fab2a604f77f37fdc4b0d97dff4f5981b9b4 /sys/dev
parentc496441ad96ff1d247439f6f966240d5f8e657fd (diff)
use ac97 default parameters for these ac97 based drivers.
this makes the emulation expansion factor 1 by default since there's no emulation. previously the factor was 2 because these drivers emulate 8-bit ulaw playback with 16-bit linear encodings. having a factor other than 1 by default creates block size and hiwat/lowat issues with applications that set the block size and hiwat before other parameters. ok ratchov@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/cs4280.c11
-rw-r--r--sys/dev/pci/eap.c13
-rw-r--r--sys/dev/pci/emuxki.c11
-rw-r--r--sys/dev/pci/esa.c11
-rw-r--r--sys/dev/pci/fms.c11
-rw-r--r--sys/dev/pci/maestro.c11
-rw-r--r--sys/dev/pci/neo.c11
-rw-r--r--sys/dev/pci/yds.c11
8 files changed, 73 insertions, 17 deletions
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 0659eeb5aef..29d9ce9d995 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.30 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: cs4280.c,v 1.31 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -201,6 +201,7 @@ void cs4280_close(void *);
int cs4280_query_encoding(void *, struct audio_encoding *);
int cs4280_set_params(void *, int, int, struct audio_params *, struct audio_params *);
int cs4280_round_blocksize(void *, int);
+void cs4280_get_default_params(void *, int, struct audio_params *);
int cs4280_halt_output(void *);
int cs4280_halt_input(void *);
@@ -270,7 +271,7 @@ struct audio_hw_if cs4280_hw_if = {
cs4280_get_props,
cs4280_trigger_output,
cs4280_trigger_input,
- NULL
+ cs4280_get_default_params
};
#if NMIDI > 0
@@ -1224,6 +1225,12 @@ cs4280_round_buffersize(addr, direction, size)
return (size);
}
+void
+cs4280_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
cs4280_get_props(hdl)
void *hdl;
diff --git a/sys/dev/pci/eap.c b/sys/dev/pci/eap.c
index afcd912929a..d9382df3e84 100644
--- a/sys/dev/pci/eap.c
+++ b/sys/dev/pci/eap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eap.c,v 1.32 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: eap.c,v 1.33 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: eap.c,v 1.46 2001/09/03 15:07:37 reinoud Exp $ */
/*
@@ -176,6 +176,7 @@ int eap_trigger_input(void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *);
int eap_halt_output(void *);
int eap_halt_input(void *);
+void eap_get_default_params(void *, int, struct audio_params *);
void eap1370_write_codec(struct eap_softc *, int, int);
int eap_getdev(void *, struct audio_device *);
int eap1370_mixer_set_port(void *, mixer_ctrl_t *);
@@ -234,7 +235,7 @@ struct audio_hw_if eap1370_hw_if = {
eap_get_props,
eap_trigger_output,
eap_trigger_input,
- NULL
+ eap_get_default_params
};
struct audio_hw_if eap1371_hw_if = {
@@ -264,7 +265,7 @@ struct audio_hw_if eap1371_hw_if = {
eap_get_props,
eap_trigger_output,
eap_trigger_input,
- NULL
+ eap_get_default_params
};
#if NMIDI > 0
@@ -911,6 +912,12 @@ eap_query_encoding(void *addr, struct audio_encoding *fp)
}
}
+void
+eap_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
eap_set_params(void *addr, int setmode, int usemode,
struct audio_params *play, struct audio_params *rec)
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c
index 9013f6b72c6..3372c95990a 100644
--- a/sys/dev/pci/emuxki.c
+++ b/sys/dev/pci/emuxki.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: emuxki.c,v 1.27 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: emuxki.c,v 1.28 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: emuxki.c,v 1.1 2001/10/17 18:39:41 jdolecek Exp $ */
/*-
@@ -173,6 +173,7 @@ int emuxki_query_encoding(void *, struct audio_encoding *);
int emuxki_set_params(void *, int, int,
struct audio_params *,
struct audio_params *);
+void emuxki_get_default_params(void *, int, struct audio_params *);
int emuxki_round_blocksize(void *, int);
size_t emuxki_round_buffersize(void *, int, size_t);
@@ -253,7 +254,7 @@ struct audio_hw_if emuxki_hw_if = {
emuxki_get_props,
emuxki_trigger_output,
emuxki_trigger_input,
- NULL
+ emuxki_get_default_params
};
#if 0
@@ -2226,6 +2227,12 @@ emuxki_set_params(void *addr, int setmode, int usemode,
return (0);
}
+void
+emuxki_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
emuxki_halt_output(void *addr)
{
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index 91f03545bc9..c549cd9d09b 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.14 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: esa.c,v 1.15 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -109,6 +109,7 @@ void esa_close(void *);
int esa_query_encoding(void *, struct audio_encoding *);
int esa_set_params(void *, int, int, struct audio_params *,
struct audio_params *);
+void esa_get_default_params(void *, int, struct audio_params *);
int esa_round_blocksize(void *, int);
int esa_commit_settings(void *);
int esa_halt_output(void *);
@@ -208,7 +209,7 @@ struct audio_hw_if esa_hw_if = {
esa_get_props,
esa_trigger_output,
esa_trigger_input,
- NULL
+ esa_get_default_params
};
struct cfdriver esa_cd = {
@@ -249,6 +250,12 @@ esa_query_encoding(void *hdl, struct audio_encoding *ae)
return (0);
}
+void
+esa_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
esa_set_params(void *hdl, int setmode, int usemode, struct audio_params *play,
struct audio_params *rec)
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index 32e71fc9a98..1d28f079f6b 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.18 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: fms.c,v 1.19 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -88,6 +88,7 @@ void fms_close(void *);
int fms_query_encoding(void *, struct audio_encoding *);
int fms_set_params(void *, int, int, struct audio_params *,
struct audio_params *);
+void fms_get_default_params(void *, int, struct audio_params *);
int fms_round_blocksize(void *, int);
int fms_halt_output(void *);
int fms_halt_input(void *);
@@ -146,7 +147,7 @@ struct audio_hw_if fms_hw_if = {
fms_get_props,
fms_trigger_output,
fms_trigger_input,
- NULL
+ fms_get_default_params
};
int fms_attach_codec(void *, struct ac97_codec_if *);
@@ -517,6 +518,12 @@ fms_query_encoding(addr, fp)
}
}
+void
+fms_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
/*
* Range below -limit- is set to -rate-
* What a pity FM801 does not have 24000
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 597558e564b..0fadf6321fc 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.24 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: maestro.c,v 1.25 2008/05/29 02:10:01 jakemsr Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -483,6 +483,7 @@ void maestro_close(void *);
int maestro_query_encoding(void *, struct audio_encoding *);
int maestro_set_params(void *, int, int, struct audio_params *,
struct audio_params *);
+void maestro_get_default_params(void *, int, struct audio_params *);
int maestro_round_blocksize(void *, int);
int maestro_halt_output(void *);
int maestro_halt_input(void *);
@@ -572,7 +573,7 @@ struct audio_hw_if maestro_hw_if = {
maestro_get_props,
maestro_trigger_output,
maestro_trigger_input,
- NULL
+ maestro_get_default_params
};
struct audio_device maestro_audev = {
@@ -1000,6 +1001,12 @@ maestro_query_encoding(hdl, fp)
return (0);
}
+void
+maestro_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
#define UNUSED __attribute__((unused))
void
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index 1dd62e4e5ac..2baccef69de 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.21 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: neo.c,v 1.22 2008/05/29 02:10:01 jakemsr Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -185,6 +185,7 @@ int neo_open(void *, int);
void neo_close(void *);
int neo_query_encoding(void *, struct audio_encoding *);
int neo_set_params(void *, int, int, struct audio_params *, struct audio_params *);
+void neo_get_default_params(void *, int, struct audio_params *);
int neo_round_blocksize(void *, int);
int neo_trigger_output(void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *);
@@ -280,7 +281,7 @@ struct audio_hw_if neo_hw_if = {
neo_get_props,
neo_trigger_output,
neo_trigger_input,
- NULL
+ neo_get_default_params
};
@@ -829,6 +830,12 @@ neo_query_encoding(addr, fp)
}
}
+void
+neo_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
/* Todo: don't commit settings to card until we've verified all parameters */
int
neo_set_params(addr, setmode, usemode, play, rec)
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index d43184596df..64d3885ea7a 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.29 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: yds.c,v 1.30 2008/05/29 02:10:01 jakemsr Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -158,6 +158,7 @@ void yds_close(void *);
int yds_query_encoding(void *, struct audio_encoding *);
int yds_set_params(void *, int, int,
struct audio_params *, struct audio_params *);
+void yds_get_default_params(void *, int, struct audio_params *);
int yds_round_blocksize(void *, int);
int yds_trigger_output(void *, void *, void *, int, void (*)(void *),
void *, struct audio_params *);
@@ -233,7 +234,7 @@ static struct audio_hw_if yds_hw_if = {
yds_get_props,
yds_trigger_output,
yds_trigger_input,
- NULL
+ yds_get_default_params
};
struct audio_device yds_device = {
@@ -1188,6 +1189,12 @@ yds_query_encoding(addr, fp)
}
}
+void
+yds_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
yds_set_params(addr, setmode, usemode, play, rec)
void *addr;