1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-27 14:31:44 +02:00
openwrt-xburst/target/linux/s3c24xx/patches-2.6.24/1117-audio-tickless-timeout.patch.patch
mirko fc54b9bf15 changed Makefile and profiles, added patches for kernel 2.6.24
(stable-branch of Openmoko)


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-12-12 11:58:53 +00:00

58 lines
1.7 KiB
Diff

From 5d6f04132cb5bd8fa8f1c9c9c3dc337aeae18f4c Mon Sep 17 00:00:00 2001
From: Werner Almesberger <werner@openmoko.org>
Date: Sun, 13 Apr 2008 07:25:55 +0100
Subject: [PATCH] audio-tickless-timeout.patch
When we resume, we can end up in
sound/soc/s3c24xx/s3c24xx-i2s.c:s3c24xx_snd_lrsync
with the timer tick still disabled, and the LR signal never happening.
Thus, we loop forever.
The patch below changes the timeout mechanism to use udelay, which
doesn't need timer ticks.
Note that this code is in a module, so to get the fix, you have to
build the modules, and update them.
The kernel now resumes but does the ugly GSM modem ticking. I'll have
to find a good place to turn that one off ...
- Werner
---------------------------------- cut here -----------------------------------
- sound/soc/s3c24xx/s3c24xx-i2s.c (s3c24xx_snd_lrsync): in resume, we may
call s3c24xx_snd_lrsync with timer ticks disabled, thus jiffies never
change. Use udelay to avoid this problem.
---
sound/soc/s3c24xx/s3c24xx-i2s.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/s3c24xx/s3c24xx-i2s.c b/sound/soc/s3c24xx/s3c24xx-i2s.c
index 4d74cc0..43fd25a 100644
--- a/sound/soc/s3c24xx/s3c24xx-i2s.c
+++ b/sound/soc/s3c24xx/s3c24xx-i2s.c
@@ -180,7 +180,7 @@ static void s3c24xx_snd_rxctrl(int on)
static int s3c24xx_snd_lrsync(void)
{
u32 iiscon;
- unsigned long timeout = jiffies + msecs_to_jiffies(5);
+ int timeout = 50; /* 5ms */
DBG("Entered %s\n", __FUNCTION__);
@@ -189,8 +189,9 @@ static int s3c24xx_snd_lrsync(void)
if (iiscon & S3C2410_IISCON_LRINDEX)
break;
- if (timeout < jiffies)
+ if (!--timeout)
return -ETIMEDOUT;
+ udelay(100);
}
return 0;
--
1.5.6.5