summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDeanna Phillips <deanna@cvs.openbsd.org>2007-07-31 17:06:26 +0000
committerDeanna Phillips <deanna@cvs.openbsd.org>2007-07-31 17:06:26 +0000
commit1f5b68959cef2f24cfad2209c717a9332b729c62 (patch)
treefc72c31ec325e95f3c858cfb0c83ee630af41ff2 /sys
parent7a3c4ca27908ce3f8cf4c61564b300fd9646a8cc (diff)
Our audio layer doesn't know anything about mixer names like
"selector" and "front", so instead create the items that it actually needs. This unbreaks the mute button in wscons, and allows setting the volume in programs like xmms and xine. This is for STAC9200 only - similiar fixes for other codecs coming soon. Tested and ok krw@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/azalia_codec.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/sys/dev/pci/azalia_codec.c b/sys/dev/pci/azalia_codec.c
index 656175b7112..245feb4e3b2 100644
--- a/sys/dev/pci/azalia_codec.c
+++ b/sys/dev/pci/azalia_codec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia_codec.c,v 1.28 2007/07/31 16:14:26 deanna Exp $ */
+/* $OpenBSD: azalia_codec.c,v 1.29 2007/07/31 17:06:25 deanna Exp $ */
/* $NetBSD: azalia_codec.c,v 1.8 2006/05/10 11:17:27 kent Exp $ */
/*-
@@ -2327,23 +2327,29 @@ static const mixer_item_t stac9200_mixer_items[] = {
{{AZ_CLASS_OUTPUT, {AudioCoutputs}, AUDIO_MIXER_CLASS, AZ_CLASS_OUTPUT, 0, 0}, 0},
{{AZ_CLASS_RECORD, {AudioCrecord}, AUDIO_MIXER_CLASS, AZ_CLASS_RECORD, 0, 0}, 0},
+ {{0, {AudioNmaster}, AUDIO_MIXER_VALUE, AZ_CLASS_OUTPUT,
+ 4, 0, .un.v={{""}, 2, MIXER_DELTA(31)}}, 0x0b, MI_TARGET_OUTAMP},
+ {{0, {AudioNmute}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
+ 0, 3, ENUM_OFFON}, 0x0b, MI_TARGET_OUTAMP},
+ {{0, {AudioNvolume}, AUDIO_MIXER_VALUE, AZ_CLASS_RECORD,
+ 0, 0, .un.v={{""}, 2, MIXER_DELTA(15)}}, 0x0a, MI_TARGET_OUTAMP},
+ {{0, {AudioNvolume"."AudioNmute}, AUDIO_MIXER_ENUM, AZ_CLASS_RECORD,
+ 0, 0, ENUM_OFFON}, 0x0a, MI_TARGET_OUTAMP},
+ {{0, {AudioNsource}, AUDIO_MIXER_ENUM, AZ_CLASS_RECORD,
+ 0, 0, .un.e={5, {{{AudioNline}, 0}, {{AudioNmicrophone}, 1},
+ {{AudioNline"2"}, 2}, {{AudioNline"3"}, 3},
+ {{AudioNcd}, 4}}}},
+ 0x0c, MI_TARGET_CONNLIST},
+ {{0, {AudioNmicrophone}, AUDIO_MIXER_VALUE, AZ_CLASS_INPUT,
+ 0, 0, .un.v={{""}, 2, MIXER_DELTA(4)}}, 0x0c, MI_TARGET_OUTAMP},
+ {{0, {AudioNmicrophone"."AudioNmute}, AUDIO_MIXER_ENUM, AZ_CLASS_INPUT,
+ 0, 0, ENUM_OFFON}, 0x0c, MI_TARGET_OUTAMP},
{{0, {AudioNsource}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
0, 0, .un.e={3, {{{AudioNdac}, 0}, {{"digital-in"}, 1}, {{"selector"}, 2}}}},
0x07, MI_TARGET_CONNLIST},
{{0, {"digital."AudioNsource}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
0, 0, .un.e={2, {{{AudioNdac}, 0}, {{"selector"}, 1}}}},
0x09, MI_TARGET_CONNLIST}, /* AudioNdac is not accurate name */
- {{0, {"selector."AudioNmute}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
- 0, 0, ENUM_OFFON}, 0x0a, MI_TARGET_OUTAMP},
- {{0, {"selector"}, AUDIO_MIXER_VALUE, AZ_CLASS_OUTPUT,
- 0, 0, .un.v={{""}, 2, MIXER_DELTA(15)}}, 0x0a, MI_TARGET_OUTAMP},
- {{0, {AudioNmaster"."AudioNmute}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
- 0, 0, ENUM_OFFON}, 0x0b, MI_TARGET_OUTAMP},
- {{0, {AudioNmaster}, AUDIO_MIXER_VALUE, AZ_CLASS_OUTPUT,
- 0, 0, .un.v={{""}, 2, MIXER_DELTA(31)}}, 0x0b, MI_TARGET_OUTAMP},
- {{0, {"selector."AudioNsource}, AUDIO_MIXER_ENUM, AZ_CLASS_INPUT,
- 0, 0, .un.e={3, {{{"mic1"}, 0}, {{"mic2"}, 1}, {{AudioNcd}, 4}}}},
- 0x0c, MI_TARGET_CONNLIST},
{{0, {AudioNheadphone".boost"}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,
0, 0, ENUM_OFFON}, 0x0d, MI_TARGET_PINBOOST},
{{0, {AudioNspeaker".boost"}, AUDIO_MIXER_ENUM, AZ_CLASS_OUTPUT,