Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci/hdaudio Add missing defines for constants used i...
details: https://anonhg.NetBSD.org/src/rev/019c10ed908d
branches: trunk
changeset: 802619:019c10ed908d
user: nat <nat%NetBSD.org@localhost>
date: Tue Sep 23 13:29:30 2014 +0000
description:
Add missing defines for constants used in hdafg_enable_analog_beep.
This commit was approved by christos@
diffstat:
sys/dev/pci/hdaudio/hdafg.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diffs (56 lines):
diff -r 676e0dbeb3f6 -r 019c10ed908d sys/dev/pci/hdaudio/hdafg.c
--- a/sys/dev/pci/hdaudio/hdafg.c Tue Sep 23 10:52:21 2014 +0000
+++ b/sys/dev/pci/hdaudio/hdafg.c Tue Sep 23 13:29:30 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hdafg.c,v 1.24 2014/09/21 14:30:22 christos Exp $ */
+/* $NetBSD: hdafg.c,v 1.25 2014/09/23 13:29:30 nat Exp $ */
/*
* Copyright (c) 2009 Precedence Technologies Ltd <support%precedence.co.uk@localhost>
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.24 2014/09/21 14:30:22 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdafg.c,v 1.25 2014/09/23 13:29:30 nat Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -4369,6 +4369,10 @@
#define HDAFG_GET_ANACTRL 0xfe0
#define HDAFG_SET_ANACTRL 0x7e0
#define HDAFG_ANALOG_BEEP_EN __BIT(5)
+#define HDAFG_ALC231_MONO_OUT_MIXER 0xf
+#define HDAFG_STAC9200_AFG 0x1
+#define HDAFG_STAC9200_GET_ANACTRL_PAYLOAD 0x0
+#define HDAFG_ALC231_INPUT_BOTH_CHANNELS_UNMUTE 0x7100
static void
hdafg_enable_analog_beep(struct hdafg_softc *sc)
@@ -4388,10 +4392,11 @@
case HDAUDIO_PRODUCT_SIGMATEL_STAC9205:
case HDAUDIO_PRODUCT_SIGMATEL_STAC9205_1:
case HDAUDIO_PRODUCT_SIGMATEL_STAC9205D:
- nid = 0x01;
+ nid = HDAFG_STAC9200_AFG;
response = hdaudio_command(sc->sc_codec, nid,
- HDAFG_GET_ANACTRL, 0x00);
+ HDAFG_GET_ANACTRL,
+ HDAFG_STAC9200_GET_ANACTRL_PAYLOAD);
hda_delay(100);
response |= HDAFG_ANALOG_BEEP_EN;
@@ -4411,9 +4416,10 @@
* ALC231 that identifies as an ALC269.
* This unmutes the PCBEEP on the speaker.
*/
- nid = 0xf;
+ nid = HDAFG_ALC231_MONO_OUT_MIXER;
response = hdaudio_command(sc->sc_codec, nid,
- CORB_SET_AMPLIFIER_GAIN_MUTE, 0x7100);
+ CORB_SET_AMPLIFIER_GAIN_MUTE,
+ HDAFG_ALC231_INPUT_BOTH_CHANNELS_UNMUTE);
hda_delay(100);
break;
default:
Home |
Main Index |
Thread Index |
Old Index