From 5d91ad679d7e846c122e5f476a50ae4c02e4f505 Mon Sep 17 00:00:00 2001 From: Cameron Grant Date: Tue, 18 Sep 2001 14:34:59 +0000 Subject: [PATCH] add a method for retrieving codec capabilities --- sys/dev/sound/pcm/ac97.c | 6 ++++++ sys/dev/sound/pcm/ac97.h | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index bb2906353e8..545f19ddd65 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -256,6 +256,12 @@ ac97_getextcaps(struct ac97_info *codec) return codec->extcaps; } +u_int16_t +ac97_getcaps(struct ac97_info *codec) +{ + return codec->caps; +} + static int ac97_setrecsrc(struct ac97_info *codec, int channel) { diff --git a/sys/dev/sound/pcm/ac97.h b/sys/dev/sound/pcm/ac97.h index 38dd2df3107..3c2e5088358 100644 --- a/sys/dev/sound/pcm/ac97.h +++ b/sys/dev/sound/pcm/ac97.h @@ -29,6 +29,15 @@ #define AC97_MUTE 0x8000 #define AC97_REG_RESET 0x00 +#define AC97_CAP_MICCHANNEL (1 << 0) +#define AC97_CAP_TONE (1 << 2) +#define AC97_CAP_SIMSTEREO (1 << 3) +#define AC97_CAP_HEADPHONE (1 << 4) +#define AC97_CAP_LOUDNESS (1 << 5) +#define AC97_CAP_DAC_18 (1 << 6) +#define AC97_CAP_DAC_20 (1 << 7) +#define AC97_CAP_ADC_18 (1 << 8) +#define AC97_CAP_ADC_20 (1 << 9) #define AC97_MIX_MASTER 0x02 #define AC97_MIX_PHONES 0x04 #define AC97_MIX_MONO 0x06 @@ -82,4 +91,5 @@ int ac97_setrate(struct ac97_info *codec, int which, int rate); int ac97_setextmode(struct ac97_info *codec, u_int16_t mode); u_int16_t ac97_getextmode(struct ac97_info *codec); u_int16_t ac97_getextcaps(struct ac97_info *codec); +u_int16_t ac97_getcaps(struct ac97_info *codec); -- 2.45.2