summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorariff <ariff@FreeBSD.org>2007-10-26 20:49:59 +0000
committerariff <ariff@FreeBSD.org>2007-10-26 20:49:59 +0000
commit69326388218cd5b94b8d74edbdb9fac55920faba (patch)
treec2b5c47f7f2534437764e7d72d39b91bc3df2a0b /sys
parent99175bc44a99cb62fdc17fd9f872f4878ee472e6 (diff)
downloadFreeBSD-src-69326388218cd5b94b8d74edbdb9fac55920faba.zip
FreeBSD-src-69326388218cd5b94b8d74edbdb9fac55920faba.tar.gz
Remap and virtualize mixer controls for HP nx6110 with
AD1981B AC97 codec, unifying master volume control. * Remap "phout" --> SOUND_MIXER_VOLUME (internal speakers) * Virtual "vol" --> { "phout", "ogain" (headphone) } Tested by: Frederic Chardon MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/pcm/ac97.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c
index 9fcad10..22c14e8 100644
--- a/sys/dev/sound/pcm/ac97.c
+++ b/sys/dev/sound/pcm/ac97.c
@@ -932,10 +932,12 @@ ac97mix_init(struct snd_mixer *m)
switch (codec->id) {
case 0x41445374: /* AD1981B */
- if (codec->subvendor == 0x02d91014) {
+ switch (codec->subvendor) {
+ case 0x02d91014:
/*
* IBM Thinkcentre:
- * Tie "ogain" and "phone" to "vol" since its
+ *
+ * Tie "ogain" and "phout" to "vol" since its
* master volume is basically useless and can't
* control anything.
*/
@@ -953,6 +955,28 @@ ac97mix_init(struct snd_mixer *m)
mix_setrealdev(m, SOUND_MIXER_VOLUME,
SOUND_MIXER_NONE);
}
+ break;
+ case 0x099c103c:
+ /*
+ * HP nx6110:
+ *
+ * By default, "vol" is controlling internal speakers
+ * (not a master volume!) and "ogain" is controlling
+ * headphone. Enable dummy "phout" so it can be
+ * remapped to internal speakers and virtualize
+ * "vol" to control both.
+ */
+ codec->mix[SOUND_MIXER_OGAIN].enable = 1;
+ codec->mix[SOUND_MIXER_PHONEOUT].enable = 1;
+ mix_setrealdev(m, SOUND_MIXER_PHONEOUT,
+ SOUND_MIXER_VOLUME);
+ mix_setrealdev(m, SOUND_MIXER_VOLUME,
+ SOUND_MIXER_NONE);
+ mix_setparentchild(m, SOUND_MIXER_VOLUME,
+ SOUND_MASK_OGAIN | SOUND_MASK_PHONEOUT);
+ break;
+ default:
+ break;
}
break;
case 0x434d4941: /* CMI9738 */
OpenPOWER on IntegriCloud