- 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 <pluknet@gmail.com>
This commit is contained in:
Ariff Abdullah 2007-05-28 16:22:07 +00:00
parent 1bfd9199cf
commit 2ba5e1edcc

View file

@ -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;