Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev make this work with PMF hotkey events



details:   https://anonhg.NetBSD.org/src/rev/0fb1ff6758b6
branches:  trunk
changeset: 757616:0fb1ff6758b6
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Sep 07 18:47:24 2010 +0000

description:
make this work with PMF hotkey events
Now the volume control buttons work on my Pismo

diffstat:

 sys/arch/macppc/dev/awacs.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (67 lines):

diff -r a5d6ccf7ad6b -r 0fb1ff6758b6 sys/arch/macppc/dev/awacs.c
--- a/sys/arch/macppc/dev/awacs.c       Tue Sep 07 18:25:38 2010 +0000
+++ b/sys/arch/macppc/dev/awacs.c       Tue Sep 07 18:47:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: awacs.c,v 1.36 2009/11/05 05:37:30 dyoung Exp $        */
+/*     $NetBSD: awacs.c,v 1.37 2010/09/07 18:47:24 macallan Exp $      */
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.36 2009/11/05 05:37:30 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.37 2010/09/07 18:47:24 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/audioio.h>
@@ -529,6 +529,7 @@
            &sc->sc_thread, "%s", "awacs") != 0) {
                printf("awacs: unable to create event kthread");
        }
+       pmf_device_register(sc->sc_dev, NULL, NULL);
 }
 
 static int
@@ -952,7 +953,7 @@
        switch (dip->index) {
 
        case AWACS_OUTPUT_SELECT:
-               dip->mixer_class = AWACS_MONITOR_CLASS;
+               dip->mixer_class = AWACS_OUTPUT_CLASS;
                strcpy(dip->label.name, AudioNoutput);
                dip->type = AUDIO_MIXER_SET;
                dip->prev = dip->next = AUDIO_MIXER_LAST;
@@ -964,11 +965,12 @@
                return 0;
 
        case AWACS_VOL_MASTER:
-               dip->mixer_class = AWACS_MONITOR_CLASS;
+               dip->mixer_class = AWACS_OUTPUT_CLASS;
                strcpy(dip->label.name, AudioNmaster);
                dip->type = AUDIO_MIXER_VALUE;
                dip->prev = dip->next = AUDIO_MIXER_LAST;
                dip->un.v.num_channels = 2;
+               dip->un.v.delta = 16;
                strcpy(dip->un.v.units.name, AudioNvolume);
                return 0;
 
@@ -985,7 +987,7 @@
        case AWACS_BASS:
                if (sc->sc_sgsmix == NULL)
                        return ENXIO;
-               dip->mixer_class = AWACS_MONITOR_CLASS;
+               dip->mixer_class = AWACS_OUTPUT_CLASS;
                strcpy(dip->label.name, AudioNbass);
                dip->type = AUDIO_MIXER_VALUE;
                dip->prev = dip->next = AUDIO_MIXER_LAST;
@@ -996,7 +998,7 @@
        case AWACS_TREBLE:
                if (sc->sc_sgsmix == NULL)
                        return ENXIO;
-               dip->mixer_class = AWACS_MONITOR_CLASS;
+               dip->mixer_class = AWACS_OUTPUT_CLASS;
                strcpy(dip->label.name, AudioNtreble);
                dip->type = AUDIO_MIXER_VALUE;
                dip->prev = dip->next = AUDIO_MIXER_LAST;



Home | Main Index | Thread Index | Old Index