diff options
author | Gerd Knorr <devnull@localhost> | 2004-09-22 11:47:11 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-09-22 11:47:11 +0000 |
commit | 953f8692136acd6aa9201f9388697a7005756894 (patch) | |
tree | 4cf405b99592bc05d8eb87ce66da1190e2a5e819 /linux/drivers/media/video/saa7134/saa7134-tvaudio.c | |
parent | 0802f274f50202af378705c56feba19cd5abb5ee (diff) | |
download | mediapointer-dvb-s2-953f8692136acd6aa9201f9388697a7005756894.tar.gz mediapointer-dvb-s2-953f8692136acd6aa9201f9388697a7005756894.tar.bz2 |
- misc sleep cleanups.
Diffstat (limited to 'linux/drivers/media/video/saa7134/saa7134-tvaudio.c')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-tvaudio.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index 786c17d71..2e8b3d0b0 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -1,5 +1,5 @@ /* - * $Id: saa7134-tvaudio.c,v 1.12 2004/09/20 13:53:37 kraxel Exp $ + * $Id: saa7134-tvaudio.c,v 1.13 2004/09/22 11:47:11 kraxel Exp $ * * device driver for philips saa7134 based TV cards * tv audio decoder (fm stereo, nicam, ...) @@ -58,9 +58,10 @@ MODULE_PARM_DESC(audio_clock_tweak, "Audio clock tick fine tuning for cards with #define print_regb(reg) printk("%s: reg 0x%03x [%-16s]: 0x%02x\n", \ dev->name,(SAA7134_##reg),(#reg),saa_readb((SAA7134_##reg))) -#define SCAN_INITIAL_DELAY (HZ) -#define SCAN_SAMPLE_DELAY (HZ/5) -#define SCAN_SUBCARRIER_DELAY (HZ*2) +/* msecs */ +#define SCAN_INITIAL_DELAY 1000 +#define SCAN_SAMPLE_DELAY 200 +#define SCAN_SUBCARRIER_DELAY 2000 /* ------------------------------------------------------------------ */ /* saa7134 code */ @@ -326,11 +327,11 @@ static int tvaudio_sleep(struct saa7134_dev *dev, int timeout) add_wait_queue(&dev->thread.wq, &wait); if (dev->thread.scan1 == dev->thread.scan2 && !dev->thread.shutdown) { - set_current_state(TASK_INTERRUPTIBLE); - if (timeout < 0) + if (timeout < 0) { + set_current_state(TASK_INTERRUPTIBLE); schedule(); - else - schedule_timeout(timeout); + } else + msleep_interruptible(timeout); } remove_wait_queue(&dev->thread.wq, &wait); return dev->thread.scan1 != dev->thread.scan2; @@ -612,7 +613,7 @@ static int tvaudio_thread(void *data) lastmode = 42; for (;;) { - if (tvaudio_sleep(dev,5*HZ)) + if (tvaudio_sleep(dev,5000)) goto restart; if (dev->thread.shutdown || signal_pending(current)) break; @@ -840,7 +841,7 @@ static int tvaudio_thread_ddep(void *data) saa_dsp_writel(dev, 0x464 >> 2, 0x000000); saa_dsp_writel(dev, 0x470 >> 2, 0x101010); - if (tvaudio_sleep(dev,3*HZ)) + if (tvaudio_sleep(dev,3000)) goto restart; value = saa_readl(0x528 >> 2) & 0xffffff; |