diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-01 08:51:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-01 08:51:39 -0300 |
commit | e1f9cac1bd52d6d0045cf6583854f1432483334a (patch) | |
tree | d70ebb2a1a058d18e5713d8d819d0cd08c077fd5 /linux | |
parent | 1ba0aa095605873394f3443f4f4c9a4e0fcde0a4 (diff) | |
download | mediapointer-dvb-s2-e1f9cac1bd52d6d0045cf6583854f1432483334a.tar.gz mediapointer-dvb-s2-e1f9cac1bd52d6d0045cf6583854f1432483334a.tar.bz2 |
Fix bug #8689: Fixes IR stop/start during suspend/resume
From: Mauro Carvalho Chehab <mchehab@infradead.org>
IR workqueue should be disabled during suspend. This avoids some troubles, like
the one reported on bug #8689:
"The Hauppauge HVR 1100 ir-remote control does not work after resume from
suspend to ram or disk."
This patch disables IR before suspending, re-enabling it after resume.
Thanks to Peter Poklop <Peter.Poklop@gmx.at> for reporting it and helping with
the fix.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-input.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-video.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88.h | 2 |
4 files changed, 13 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 0783bc1d5..6837667ae 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1117,6 +1117,9 @@ EXPORT_SYMBOL(cx88_vdev_init); EXPORT_SYMBOL(cx88_core_get); EXPORT_SYMBOL(cx88_core_put); +EXPORT_SYMBOL(cx88_ir_start); +EXPORT_SYMBOL(cx88_ir_stop); + /* * Local variables: * c-basic-offset: 8 diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index 21922ffea..fc6f476af 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -167,7 +167,7 @@ static void cx88_ir_work(struct work_struct *work) mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling)); } -static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) +void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) { if (ir->polling) { setup_timer(&ir->timer, ir_timer, (unsigned long)ir); @@ -185,7 +185,7 @@ static void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir) } } -static void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir) +void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir) { if (ir->sampling) { cx_write(MO_DDSCFG_IO, 0x0); diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 6f2277ce0..04260a209 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -2255,6 +2255,8 @@ static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state) } spin_unlock(&dev->slock); + if (core->ir) + cx88_ir_stop(core, core->ir); #if 1 /* FIXME -- shutdown device */ cx88_shutdown(core); @@ -2306,6 +2308,10 @@ static int cx8800_resume(struct pci_dev *pci_dev) /* FIXME: re-initialize hardware */ cx88_reset(core); #endif + if (core->ir) + cx88_ir_start(core, core->ir); + + cx_set(MO_PCI_INTMSK, core->pci_irqmask); /* restart video+vbi capture */ spin_lock(&dev->slock); diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 06469f218..a7872045c 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -647,6 +647,8 @@ struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci); int cx88_ir_fini(struct cx88_core *core); void cx88_ir_irq(struct cx88_core *core); +void cx88_ir_start(struct cx88_core *core, struct cx88_IR *ir); +void cx88_ir_stop(struct cx88_core *core, struct cx88_IR *ir); /* ----------------------------------------------------------- */ /* cx88-mpeg.c */ |