Author: NicolasPierron
Date: Tue Jun  7 15:03:03 2011
New Revision: 27365
URL: https://svn.nixos.org/websvn/nix/?rev=27365&sc=1

Log:
ASUS M60J: Enable the microphone.

Added:
   configurations/trunk/computer/asus/m60j/hda-verb.nix
Modified:
   configurations/trunk/computer/asus/m60j/jx041v.nix

Added: configurations/trunk/computer/asus/m60j/hda-verb.nix
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ configurations/trunk/computer/asus/m60j/hda-verb.nix        Tue Jun  7 
15:03:03 2011        (r27365)
@@ -0,0 +1,15 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "hda-verb-0.3";
+  src = fetchurl {
+    url = 
http://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-verb/hda-verb-0.3.tar.gz;
+    sha256 = 
"5fdc250b95afadbfa205bb8af7345604fb2ba69df7fea26e6d80b890ac844dd7";
+  };
+
+  installPhase = ''
+    ensureDir $out
+    ensureDir $out/bin
+    cp ./hda-verb $out/bin/hda-verb
+  '';
+}

Modified: configurations/trunk/computer/asus/m60j/jx041v.nix
==============================================================================
--- configurations/trunk/computer/asus/m60j/jx041v.nix  Tue Jun  7 14:42:24 
2011        (r27364)
+++ configurations/trunk/computer/asus/m60j/jx041v.nix  Tue Jun  7 15:03:03 
2011        (r27365)
@@ -1,7 +1,11 @@
-{pkgs, config, ...}:
+{config, pkgs, ...}:
 
 with pkgs.lib;
 
+let
+  hdaVerb = import ./hda-verb.nix { inherit (pkgs) stdenv fetchurl; };
+in
+
 {
   options = {
     services.xserver.twinViewOrientation = mkOption {
@@ -25,6 +29,10 @@
       "battery"
     ];
 
+    # Make the microphone works. (Realtek ALC269)
+    # See the example at https://help.ubuntu.com/community/HdaIntelSoundHowto
+    boot.extraModprobeConfig = "options snd-hda-intel model=basic";
+
     hardware.firmware = [
       pkgs.iwlwifi1000ucode
     ];
@@ -40,8 +48,8 @@
 
       synaptics = mkDefaultValue {
         enable = true;
-        minSpeed = "0.3";
-        maxSpeed = "0.6";
+        #minSpeed = "0.3";
+        #maxSpeed = "0.6";
       };
 
       # NVidia GeForce GT 240M; VRAM: DDR3 1G
@@ -77,6 +85,15 @@
       '';
     };
 
+    # see the details about it on 
https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/585858
+    jobs.fixMicrophone = {
+      name = "fix-microphone";
+      description = "Fix BIOS errors concerning the frontal microphone.";
+      startOn = "startup";
+      task = true;
+      exec = "hda-verb /dev/snd/hwC0D0 0x19 SET_PIN_WIDGET_CONTROL 0x24 > 
/var/log/hda-verb.log";
+      path = [ hdaVerb ];
+    };
 
     powerManagement.enable = mkDefaultValue true;
 
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits

Reply via email to