Monkeh in #gentoo-chat on Freenode was able to point out that I was not removing the old modules before rebuilding, so my changes weren't actually being installed. The attached patch successfully sets the default volume to 0 on all channels using hdaudio. After thinking about it for a while, I think this is a more sane default than 90%. The potential for damage to audio equipment or ears when starting up with a default of 90% seems to outweigh the work involved in manually raising the volume to reasonable levels.

Will
diff -urNw oss-v4.0-build1016-src-gpl.old/kernel/drv/hdaudio/hdaudio_generic.c 
oss-v4.0-build1016-src-gpl/kernel/drv/hdaudio/hdaudio_generic.c
--- oss-v4.0-build1016-src-gpl.old/kernel/drv/hdaudio/hdaudio_generic.c 
2008-08-28 13:55:41.000000000 -0400
+++ oss-v4.0-build1016-src-gpl/kernel/drv/hdaudio/hdaudio_generic.c     
2008-08-28 13:58:35.000000000 -0400
@@ -184,7 +184,7 @@
                return cnum;
 
              /* Setup initial volume */
-             val = (maxval * 9) / 10;  /* 90% of the maximum */
+             val = (maxval * 0) / 10;  /* Default to muting all channels to 
avoid positive feedback between mic and speakers */
              val = val | (val << 16);
 
              hdaudio_set_control (mixer->mixer_dev, num, SNDCTL_MIX_WRITE,
@@ -291,7 +291,7 @@
 
 
              /* setup volume */
-             val = (maxval * 9) / 10;  /* 90% of the maximum */
+             val = (maxval * 0) / 10;  /* Default to muting all channels to 
avoid positive feedback between mic and speakers */
              val = val | (val << 16);
              hdaudio_set_control (mixer->mixer_dev, num, SNDCTL_MIX_WRITE,
                                   val);

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to