[PATCH] resume-ndl_gsm.patch

Werner Almesberger werner at openmoko.org
Fri Apr 4 02:14:03 CEST 2008


As promised, this patch removes the noises that emerge from the rear
speaker after resume, unless one explicitly enables GSM firmware
downloads.

- Werner

---------------------------------- cut here -----------------------------------

After resume, nDL_GSM was always cleared, thus giving the modem's firmware
download lines access to the audio path, which produced loud clicking noises
on the rear speaker.

- arch/arm/plat-s3c24xx/neo1973_pm_gsm.c (gsm_write, gta01_gsm_resume): record
  the status of nDL_GSM, and restore it after resume

Index: linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
===================================================================
--- linux-2.6.24.orig/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
+++ linux-2.6.24/arch/arm/plat-s3c24xx/neo1973_pm_gsm.c
@@ -34,6 +34,8 @@
 };
 
 static struct gta01pm_priv gta01_gsm;
+static int download_on = 1; /* the signal is inverted, so 1 means "off" */
+
 
 static struct console *find_s3c24xx_console(void)
 {
@@ -146,6 +148,7 @@
 		if (machine_is_neo1973_gta02())
 			s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, on);
 #endif
+		download_on = on;
 	}
 
 	return count;
@@ -178,7 +181,7 @@
 		console_stop(gta01_gsm.con);
 
 	if (machine_is_neo1973_gta02())
-		s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, 0);
+		s3c2410_gpio_setpin(GTA02_GPIO_nDL_GSM, download_on);
 	return 0;
 }
 #else




More information about the openmoko-kernel mailing list