From 2ba5e1edcc4e4ca9facbf13974bc9a19c987ff33 Mon Sep 17 00:00:00 2001 From: Ariff Abdullah Date: Mon, 28 May 2007 16:22:07 +0000 Subject: [PATCH] - Enable soft pcm volume flag early to ensure it not being clobbered by the subsequent mix_setdevs() and friends. - Minor style(9) declaration arrangement nit. Requested by: joeld Submitted by: pluknet --- sys/dev/sound/pci/envy24ht.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/envy24ht.c b/sys/dev/sound/pci/envy24ht.c index 0f857013bad..e095ff30047 100644 --- a/sys/dev/sound/pci/envy24ht.c +++ b/sys/dev/sound/pci/envy24ht.c @@ -1836,6 +1836,7 @@ static int envy24htmixer_init(struct snd_mixer *m) { struct sc_info *sc = mix_getdevinfo(m); + struct snddev_info *d; #if(0) device_printf(sc->dev, "envy24htmixer_init()\n"); @@ -1849,14 +1850,13 @@ envy24htmixer_init(struct snd_mixer *m) envy24ht_wrmt(sc, ENVY24HT_MT_VOLRATE, 0x30, 1); /* 0x30 is default value */ #endif - mix_setdevs(m, ENVY24HT_MIX_MASK); - mix_setrecdevs(m, ENVY24HT_MIX_REC_MASK); - - struct snddev_info *d = NULL; d = device_get_softc(sc->dev); if (d != NULL) d->flags |= SD_F_SOFTPCMVOL; + mix_setdevs(m, ENVY24HT_MIX_MASK); + mix_setrecdevs(m, ENVY24HT_MIX_REC_MASK); + snd_mtxunlock(sc->lock); return 0;