Change the alsa configuration file for the new kernel. Update the
paths for the new kernel and fix the gps power on part.

Signed-off-by: Michael Trimarchi <michael@panicking.kicks-ass.org>

---
diff --git a/etc/asound.conf b/etc/asound.conf
index 0beec0e..f28f45d 100644
--- a/etc/asound.conf
+++ b/etc/asound.conf
@@ -100,25 +100,11 @@ pcm.AndroidPlayback {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value false					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value true					}
-			{ name 'Right Mixer Bypass Playback Swi'	value false					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value true					}
-			{ name 'Left Mixer Bypass Playback Swit'	value false					}
 			{ name 'DAPM Stereo Out Switch'				value true					}
 			{ name 'DAPM GSM Line Out Switch'			value false					}
 			{ name 'DAPM GSM Line In Switch'			value false					}
@@ -208,25 +194,11 @@ pcm.AndroidPlayback_Speaker_normal {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value false					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value true					}
-			{ name 'Right Mixer Bypass Playback Swi'	value false					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value true					}
-			{ name 'Left Mixer Bypass Playback Swit'	value false					}
 			{ name 'DAPM Stereo Out Switch'				value true					}
 			{ name 'DAPM GSM Line Out Switch'			value false					}
 			{ name 'DAPM GSM Line In Switch'			value false					}
@@ -316,25 +288,11 @@ pcm.AndroidPlayback_Speaker {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value false					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value true					}
-			{ name 'Right Mixer Bypass Playback Swi'	value false					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value true					}
-			{ name 'Left Mixer Bypass Playback Swit'	value false					}
 			{ name 'DAPM Stereo Out Switch'				value true					}
 			{ name 'DAPM GSM Line Out Switch'			value false					}
 			{ name 'DAPM GSM Line In Switch'			value false					}
@@ -427,25 +385,11 @@ pcm.AndroidPlayback_Headset {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value false					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value true					}
-			{ name 'Right Mixer Bypass Playback Swi'	value false					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value true					}
-			{ name 'Left Mixer Bypass Playback Swit'	value false					}
 			{ name 'DAPM Stereo Out Switch'				value true					}
 			{ name 'DAPM GSM Line Out Switch'			value false					}
 			{ name 'DAPM GSM Line In Switch'			value false					}
@@ -537,25 +481,11 @@ pcm.AndroidPlayback_Speaker_incall {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value true					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value false					}
-			{ name 'Right Mixer Bypass Playback Swi'	value true					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value false					}
-			{ name 'Left Mixer Bypass Playback Swit'	value true					}
 			{ name 'DAPM Stereo Out Switch'				value false					}
 			{ name 'DAPM GSM Line Out Switch'			value true					}
 			{ name 'DAPM GSM Line In Switch'			value true					}
@@ -647,25 +577,11 @@ pcm.AndroidPlayback_Headset_incall {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value true					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value false					}
-			{ name 'Right Mixer Bypass Playback Swi'	value true					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value false					}
-			{ name 'Left Mixer Bypass Playback Swit'	value true					}
 			{ name 'DAPM Stereo Out Switch'				value true					}
 			{ name 'DAPM GSM Line Out Switch'			value true					}
 			{ name 'DAPM GSM Line In Switch'			value true					}
@@ -693,7 +609,7 @@ pcm.AndroidPlayback_Earpiece_incall {
 			{ name 'PCM Volume'							value [ 0 0 ]				}
 			{ name 'ADC Capture Volume'					value [ 0 0 ]				}
 			{ name 'Headphone Playback Volume'			value [ 0 0 ]				}
-			{ name 'Speaker Playback Volume'			value [ 97 97 ]				}
+			{ name 'Speaker Playback Volume'			value [ 115 115 ]				}
 			{ name 'Mono Playback Volume'				value 103					}
 			{ name 'Bypass Playback Volume'				value [ 7 7 ]				}
 			{ name 'Sidetone Playback Volume'			value [ 0 0 ]				}
@@ -757,25 +673,11 @@ pcm.AndroidPlayback_Earpiece_incall {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value Stereo				}
 			{ name 'Capture Left Mixer'					value Stereo				}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value true					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value false					}
-			{ name 'Right Mixer Bypass Playback Swi'	value true					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value false					}
-			{ name 'Left Mixer Bypass Playback Swit'	value true					}
 			{ name 'DAPM Stereo Out Switch'				value false					}
 			{ name 'DAPM GSM Line Out Switch'			value true					}
 			{ name 'DAPM GSM Line In Switch'			value true					}
@@ -875,25 +777,11 @@ pcm.AndroidRecord_Microphone {
 			{ name 'Capture Left Mux'					value PGA					}
 			{ name 'Capture Right Mixer'				value 'Analogue Mix Left'	}
 			{ name 'Capture Left Mixer'					value 'Analogue Mix Left'	}
-			{ name 'Playback Mixer Voice Capture Sw'	value false					}
-			{ name 'Playback Mixer Left Capture Swi'	value false					}
-			{ name 'Playback Mixer Right Capture Sw'	value false					}
 			{ name 'Out4 Mux'							value VREF					}
 			{ name 'Out3 Mux'							value VREF					}
 			{ name 'Mono 2 Mux'							value 'Inverted Mono 1'		}
 			{ name 'Mono Mixer Left Playback Switch'	value false					}
-			{ name 'Mono Mixer Right Playback Switc'	value false					}
-			{ name 'Mono Mixer Voice Playback Switc'	value false					}
-			{ name 'Mono Mixer Sidetone Playback Sw'	value false					}
-			{ name 'Mono Mixer Bypass Playback Swit'	value false					}
-			{ name 'Right Mixer Voice Playback Swit'	value false					}
-			{ name 'Right Mixer Sidetone Playback S'	value false					}
-			{ name 'Right Mixer Right Playback Swit'	value false					}
-			{ name 'Right Mixer Bypass Playback Swi'	value false					}
-			{ name 'Left Mixer Voice Playback Switc'	value false					}
-			{ name 'Left Mixer Sidetone Playback Sw'	value false					}
 			{ name 'Left Mixer Left Playback Switch'	value false					}
-			{ name 'Left Mixer Bypass Playback Swit'	value false					}
 			{ name 'DAPM Stereo Out Switch'				value false					}
 			{ name 'DAPM GSM Line Out Switch'			value true					}
 			{ name 'DAPM GSM Line In Switch'			value true					}
diff --git a/init.rc b/init.rc
index 15ec7a9..3a5eefd 100644
--- a/init.rc
+++ b/init.rc
@@ -43,7 +43,7 @@ loglevel 3
     chmod 0771 /data
 
     # Same reason as /data above
-    mount yaffs2 mtd@cache /cache nosuid nodev
+    # mount yaffs2 mtd@cache /cache nosuid nodev
     chown system cache /cache
     chmod 0770 /cache
 
@@ -53,6 +53,7 @@ loglevel 3
 
 # create basic filesystem structure
     mkdir /data/misc 01771 system misc
+    mkdir /data/misc/wifi 0770 wifi wifi
     mkdir /data/misc/hcid 0770 bluetooth bluetooth
     mkdir /data/local 0771 shell shell
     mkdir /data/local/tmp 0771 shell shell
@@ -60,9 +61,10 @@ loglevel 3
     mkdir /data/app-private 0771 system system
     mkdir /data/app 0771 system system
     mkdir /data/property 0700 root root
+    mkdir /data/ppp 0771 radio system
 
-    mkdir /data/misc/wifi 0770 wifi wifi
     mkdir /data/system/wpa_supplicant 0770 wifi wifi
+    mkdir /data/misc/wifi/sockets 0770 wifi wifi
     mkdir /data/misc/dhcp 0770 dhcp dhcp
     chown dhcp dhcp /data/misc/dhcp
 
@@ -82,10 +84,11 @@ loglevel 3
     chmod 0770 /cache/lost+found
 
     # Turn on GSM
-    write /sys/bus/platform/devices/neo1973-pm-gsm.0/power_on 1
+    write /sys/class/i2c-adapter/i2c-0/0-0073/neo1973-pm-gsm.0/power_on 1
 
-    # Turn off GPS
-    write /sys/bus/platform/devices/neo1973-pm-gps.0/pwron 0
+    # Turn on GPS
+    write /sys/bus/platform/devices/neo1973-pm-gps.0/power_on 0
+    write /sys/bus/platform/devices/neo1973-pm-gps.0/power_on 1
 
     # Use LEDs with a timer trigger
     write /sys/class/leds/gta02-aux:red/trigger timer
@@ -96,8 +99,8 @@ loglevel 3
     write /sys/bus/platform/devices/neo1973-pm-gsm.0/power_on 1
 
     # Set scaling of accelerometers
-    write /sys/devices/platform/spi_s3c24xx_gpio.1/spi0.0/full_scale 2.3
-    write /sys/devices/platform/spi_s3c24xx_gpio.1/spi0.1/full_scale 2.3
+    write /sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.1/full_scale 2.3
+    write /sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.2/full_scale 2.3
 
 on boot
 # basic network init
@@ -142,11 +145,14 @@ on boot
     #setprop net.dns1 192.168.0.200
 
     # Permissions for System Server and daemons.
-    chown radio system /sys/android_power/state
-    chown radio system /sys/android_power/request_state
-    chown radio system /sys/android_power/acquire_full_wake_lock
-    chown radio system /sys/android_power/acquire_partial_wake_lock
-    chown radio system /sys/android_power/release_wake_lock
+    chown radio system /sys/power/state
+    chown radio system /sys/power/wake_full_lock
+    chown radio system /sys/power/wake_lock
+    chown radio system /sys/power/wake_unlock
+    chmod 660 /sys/power/state
+    chmod 660 /sys/power/wake_full_lock
+    chmod 660 /sys/power/wake_lock
+    chmod 660 /sys/power/wake_unlock
     chown system system /sys/class/backlight/gta02-bl/brightness
     chown system system /sys/class/leds/gta02-aux:red/brightness
     chown system system /sys/class/leds/gta02-aux:red/delay_on
@@ -171,10 +177,11 @@ on boot
 
     # Open up access to GPS interface
     chmod 666 /dev/s3c2410_serial1
-    chmod 666 /sys/bus/platform/devices/neo1973-pm-gps.0/pwron
+    chmod 666 /sys/bus/platform/devices/neo1973-pm-gps.0/power_on
 
     # Open up access to bluetooth interface
-    chmod 666 /sys/bus/platform/devices/neo1973-pm-bt.0/power_on
+    chmod 666 /sys/class/rfkill/rfkill1/state
+    # Open up access to wireless rfkill
     chmod 666 /sys/class/rfkill/rfkill0/state
 
 # Define TCP buffer sizes for various networks
@@ -233,7 +240,9 @@ service ril-daemon /system/bin/rild
 
 service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
     socket zygote stream 666
-    onrestart write /sys/android_power/request_state wake
+    user root
+    group system
+    onrestart write /sys/power/state on
 
 service media /system/bin/mediaserver
     user media
diff --git a/system.prop b/system.prop
index 2e858fa..852bbbd 100644
--- a/system.prop
+++ b/system.prop
@@ -12,6 +12,7 @@ bluetooth.power_on=/sys/bus/platform/devices/neo1973-pm-bt.0/power_on
 
 # GPS Interface
 ro.kernel.android.gps=s3c2410_serial1
+gps.power_on=/sys/bus/platform/devices/neo1973-pm-gps.0/power_on
 
 # GPRS Interface
 ro.radio.use-ppp=yes
