flexcop-pci: add suspend/resume support
PATCH 1/1 flexcop-pci: add suspend/resume support
Hi Patrick! Hi list!
This patch adds suspend/resume support to flexcop-pci driver.
I could only test this patch with the bare card, but without having a DVB-S signal. I checked it with and without running szap (obviously getting no lock).
It works fine here with suspend-to-disk on a tuxonice kernel.
Setting of hw-filter in resume is done the same way as the watchdog does it:
Just looping over fc->demux.feed_list and running flexcop_pid_feed_control. Where I am unsure is the order at resume. For now hw filters get started first, then dma is re-started.
Do I need to give special care to irq handling?
Regards
Matthias
linux/drivers/media/dvb/b2c2/flexcop-common.h +3 -0
@@ -117,6 +117,9 @@ int flexcop_device_initialize(struct flevoid flexcop_device_exit (struct flexcop_device *fc);void flexcop_reset_block_300 (struct flexcop_device *fc); +void flexcop_device_suspend (struct flexcop_device *fc); +void flexcop_device_resume (struct flexcop_device *fc); +/* from flexcop-dma.c */ int flexcop_dma_allocate (struct pci_dev *pdev,struct flexcop_dma *dma,u32 size);
linux/drivers/media/dvb/b2c2/flexcop.c +53 -0
59 lines not on this page · raw message
linux/drivers/media/dvb/b2c2/flexcop-pci.c +66 -6
124 lines not on this page · raw message
Em Tue, 26 May 2009 21:09:28 +0200
Matthias Schwarzott <[email protected]> escreveu:
Quoted 9 lines
Hi Patrick! Hi list!
This patch adds suspend/resume support to flexcop-pci driver.
I could only test this patch with the bare card, but without having a DVB-S signal. I checked it with and without running szap (obviously getting no lock).
It works fine here with suspend-to-disk on a tuxonice kernel.
Quoted 6 lines
Setting of hw-filter in resume is done the same way as the watchdog does it:
Just looping overfc->demux.feed_listand runningflexcop_pid_feed_control. Where I am unsure is the order at resume. For now hw filters get started first, then dma is re-started.Do I need to give special care to irq handling?
It would be important to have a test with real signals to see if the patch is really working, and see if it will still work if you suspend while streaming.
Also, you missed your SOB.
Cheers,
Mauro
Hi Matthias,
Quoted 6 lines · Matthias Schwarzott
This patch adds suspend/resume support to flexcop-pci driver.
I could only test this patch with the bare card, but without having a DVB-S signal. I checked it with and without running szap (obviously getting no lock).
It works fine here with suspend-to-disk on a tuxonice kernel.
As I'm notoriously out of time I haven't yet checked the functionality with suspend though I'm looking forward to do so, because it would extremely nice to use suspend2disk for shutting down rather than shutdown.
Quoted 6 lines
Setting of hw-filter in resume is done the same way as the watchdog does it:
Just looping overfc->demux.feed_listand runningflexcop_pid_feed_control. Where I am unsure is the order at resume. For now hw filters get started first, then dma is re-started.Do I need to give special care to irq handling?
Good question. I think starting the streaming the same way as it is done in normal operation would do the trick, but I'm not sure whether this is possible for suspend/resume. I need to try.
Thanks a lot for the patch, I will try to adapt it also for dvb-usb. Like that all dvb-usb-based device will become resumable in one shot :). But time will tell when. :/
Patrick.
--
Mail: [email protected]
WWW: http://www.wi-bw.tfh-wildau.de/~pboettch/