Use audio line input
authorlekernel <sebastien.bourdeauducq@lekernel.net>
Sat, 26 Jun 2010 12:19:06 +0000 (14:19 +0200)
committerlekernel <sebastien.bourdeauducq@lekernel.net>
Sat, 26 Jun 2010 12:19:06 +0000 (14:19 +0200)
software/libhal/snd.c

index b650777..24a352c 100644 (file)
@@ -61,11 +61,17 @@ void snd_init()
        
        /* Unmute and set volumes */
        /* TODO: API for this */
-       snd_ac97_write(0x02, 0x0000);
-       snd_ac97_write(0x04, 0x0f0f);
-       snd_ac97_write(0x18, 0x0000);
-       snd_ac97_write(0x0e, 0x0000);
-       snd_ac97_write(0x1c, 0x0f0f);
+       snd_ac97_write(0x02, 0x0000); /* master volume */
+       snd_ac97_write(0x04, 0x0f0f); /* headphones volume */
+       snd_ac97_write(0x18, 0x0000); /* PCM out volume */
+       snd_ac97_write(0x1c, 0x0f0f); /* record gain */
+
+#ifdef USE_MIC
+       snd_ac97_write(0x0e, 0x0000); /* mic volume */
+#else
+       snd_ac97_write(0x10, 0x0000); /* line in volume */
+       snd_ac97_write(0x1a, 0x0404); /* record select */
+#endif
 
        snd_play_empty();
        snd_record_empty();