summaryrefslogtreecommitdiff
path: root/sys/dev/pci/envyvar.h
diff options
context:
space:
mode:
authorAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-05-04 04:49:51 +0000
committerAlexandre Ratchov <ratchov@cvs.openbsd.org>2009-05-04 04:49:51 +0000
commitcdbca279283cc590d402e8b21f23b2fb6911db8b (patch)
treec9634bb8161864b0e5a2fb0b6c71ad93298aaabd /sys/dev/pci/envyvar.h
parent100c84bd9e24b48b68052880271804ff4c944ec7 (diff)
put codec-specific mixer bits in their own routines and
reference the code in global envy_card structures. Allows the same mixer code to be shared across differents cards. Will ease adding codec-specific knobs when adding support for new cards.
Diffstat (limited to 'sys/dev/pci/envyvar.h')
-rw-r--r--sys/dev/pci/envyvar.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/dev/pci/envyvar.h b/sys/dev/pci/envyvar.h
index 4820ab686ae..b23cfc7876f 100644
--- a/sys/dev/pci/envyvar.h
+++ b/sys/dev/pci/envyvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: envyvar.h,v 1.8 2009/05/03 20:55:44 ratchov Exp $ */
+/* $OpenBSD: envyvar.h,v 1.9 2009/05/04 04:49:50 ratchov Exp $ */
/*
* Copyright (c) 2007 Alexandre Ratchov <alex@caoua.org>
*
@@ -31,10 +31,21 @@ struct envy_buf {
size_t size;
};
+struct envy_codec {
+ char *name;
+ int ndev;
+ void (*devinfo)(struct envy_softc *, struct mixer_devinfo *, int);
+ void (*get)(struct envy_softc *, struct mixer_ctrl *, int);
+ int (*set)(struct envy_softc *, struct mixer_ctrl *, int);
+};
+
struct envy_card {
int subid;
char *name;
- int nadc, ndac;
+ int nadc;
+ struct envy_codec *adc;
+ int ndac;
+ struct envy_codec *dac;
void (*init)(struct envy_softc *);
void (*ak_write)(struct envy_softc *, int, int, int);
unsigned char *eeprom;
@@ -76,9 +87,6 @@ struct envy_softc {
#define ENVY_MIX_NCLASS 3
#define ENVY_MIX_NOUTSRC 10
#define ENVY_MIX_NMONITOR 20
-#define ENVY_MIX_NILVL 2
-#define ENVY_MIX_NOLVL 2
-#define ENVY_MIX_NOMUTE 1
#define ENVY_MIX_OUTSRC_LINEIN 0
#define ENVY_MIX_OUTSRC_SPDIN 8