summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/sound/isa/sb16.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/sound/isa/sb16.c b/sys/dev/sound/isa/sb16.c
index 94e5f91..f8d09fe 100644
--- a/sys/dev/sound/isa/sb16.c
+++ b/sys/dev/sound/isa/sb16.c
@@ -299,6 +299,7 @@ static const struct sb16_mixent sb16_mixtab[32] = {
[SOUND_MIXER_OGAIN] = { 0x41, 2, 6, 1 },
[SOUND_MIXER_TREBLE] = { 0x44, 4, 4, 1 },
[SOUND_MIXER_BASS] = { 0x46, 4, 4, 1 },
+ [SOUND_MIXER_LINE1] = { 0x52, 5, 3, 1 }
};
static int
@@ -308,11 +309,11 @@ sb16mix_init(struct snd_mixer *m)
mix_setdevs(m, SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_SPEAKER |
SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD |
- SOUND_MASK_IGAIN | SOUND_MASK_OGAIN |
+ SOUND_MASK_IGAIN | SOUND_MASK_OGAIN | SOUND_MASK_LINE1 |
SOUND_MASK_VOLUME | SOUND_MASK_BASS | SOUND_MASK_TREBLE);
mix_setrecdevs(m, SOUND_MASK_SYNTH | SOUND_MASK_LINE |
- SOUND_MASK_MIC | SOUND_MASK_CD);
+ SOUND_MASK_LINE1 | SOUND_MASK_MIC | SOUND_MASK_CD);
sb_setmixer(sb, 0x3c, 0x1f); /* make all output active */
@@ -369,6 +370,12 @@ sb16mix_setrecsrc(struct snd_mixer *m, u_int32_t src)
sb_setmixer(sb, SB16_IMASK_L, recdev);
sb_setmixer(sb, SB16_IMASK_R, recdev);
+ /* Switch on/off FM tuner source */
+ if (src & SOUND_MASK_LINE1)
+ sb_setmixer(sb, 0x4a, 0x0c);
+ else
+ sb_setmixer(sb, 0x4a, 0x00);
+
/*
* since the same volume controls apply to the input and
* output sections, the best approach to have a consistent
OpenPOWER on IntegriCloud