summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-25 23:59:34 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2008-05-25 23:59:34 +0000
commit25c56bfecc8cfd48beae2373d3295d2a2d74994f (patch)
treed5331f7533b47eb0533332eab097980a67dd6a1d /sys/dev/pci
parentf0cdbe4f7744702991b761684e14a7e861e6663d (diff)
use ac97 default parameters for auich(4), auixp(4) and auvia(4).
they may have codecs which only handle 48kHz sampling rates. ok ratchov@
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/auich.c11
-rw-r--r--sys/dev/pci/auixp.c11
-rw-r--r--sys/dev/pci/auvia.c10
3 files changed, 26 insertions, 6 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 57e2c4a7014..b69877153fe 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.72 2008/04/21 00:32:43 jakemsr Exp $ */
+/* $OpenBSD: auich.c,v 1.73 2008/05/25 23:59:33 jakemsr Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -304,6 +304,7 @@ int auich_trigger_input(void *, void *, void *, int, void (*)(void *),
int auich_alloc_cdata(struct auich_softc *);
int auich_allocmem(struct auich_softc *, size_t, size_t, struct auich_dma *);
int auich_freemem(struct auich_softc *, struct auich_dma *);
+void auich_get_default_params(void *, int, struct audio_params *);
void auich_powerhook(int, void *);
@@ -334,7 +335,7 @@ struct audio_hw_if auich_hw_if = {
auich_get_props,
auich_trigger_output,
auich_trigger_input,
- NULL
+ auich_get_default_params
};
int auich_attach_codec(void *, struct ac97_codec_if *);
@@ -635,6 +636,12 @@ auich_close(v)
{
}
+void
+auich_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
auich_query_encoding(v, aep)
void *v;
diff --git a/sys/dev/pci/auixp.c b/sys/dev/pci/auixp.c
index 2e37dbe7e04..2e418b15dc1 100644
--- a/sys/dev/pci/auixp.c
+++ b/sys/dev/pci/auixp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auixp.c,v 1.18 2008/04/21 00:32:42 jakemsr Exp $ */
+/* $OpenBSD: auixp.c,v 1.19 2008/05/25 23:59:33 jakemsr Exp $ */
/* $NetBSD: auixp.c,v 1.9 2005/06/27 21:13:09 thorpej Exp $ */
/*
@@ -133,6 +133,7 @@ int auixp_allocmem(struct auixp_softc *, size_t, size_t,
struct auixp_dma *);
int auixp_freemem(struct auixp_softc *, struct auixp_dma *);
paddr_t auixp_mappage(void *, void *, off_t, int);
+void auixp_get_default_params(void *, int, struct audio_params *);
/* power management (do we support that already?) */
@@ -201,7 +202,7 @@ struct audio_hw_if auixp_hw_if = {
auixp_get_props,
auixp_trigger_output,
auixp_trigger_input,
- NULL
+ auixp_get_default_params
};
int
@@ -216,6 +217,12 @@ auixp_close(void *v)
{
}
+void
+auixp_get_default_params(void *v, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
+
int
auixp_query_encoding(void *hdl, struct audio_encoding *aep)
{
diff --git a/sys/dev/pci/auvia.c b/sys/dev/pci/auvia.c
index 610d7a85add..7d42dbc3068 100644
--- a/sys/dev/pci/auvia.c
+++ b/sys/dev/pci/auvia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auvia.c,v 1.37 2008/04/21 00:32:42 jakemsr Exp $ */
+/* $OpenBSD: auvia.c,v 1.38 2008/05/25 23:59:33 jakemsr Exp $ */
/* $NetBSD: auvia.c,v 1.28 2002/11/04 16:38:49 kent Exp $ */
/*-
@@ -88,6 +88,7 @@ void auvia_set_params_sub(struct auvia_softc *, struct auvia_softc_chan *,
struct audio_params *);
int auvia_set_params(void *, int, int, struct audio_params *,
struct audio_params *);
+void auvia_get_default_params(void *, int, struct audio_params *);
int auvia_round_blocksize(void *, int);
int auvia_halt_output(void *);
int auvia_halt_input(void *);
@@ -211,7 +212,7 @@ struct audio_hw_if auvia_hw_if = {
auvia_get_props,
auvia_trigger_output,
auvia_trigger_input,
- NULL
+ auvia_get_default_params
};
int auvia_attach_codec(void *, struct ac97_codec_if *);
@@ -577,6 +578,11 @@ auvia_set_params_sub(struct auvia_softc *sc, struct auvia_softc_chan *ch,
}
}
+void
+auvia_get_default_params(void *addr, int mode, struct audio_params *params)
+{
+ ac97_get_default_params(params);
+}
int
auvia_set_params(void *addr, int setmode, int usemode,