Bug 8689

Summary: HVR 1100 remote does not work after resume from S3 or S5
Product: v4l-dvb Reporter: Peter Poklop (Peter.Poklop)
Component: cx88Assignee: Mauro Carvalho Chehab (mchehab)
Severity: normal CC: bunk
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.20-15 Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 7216    
Attachments: stop IR on suspend and restart on resume
Small correction to the previous patch.
this patch works for me

Description Peter Poklop 2007-06-29 10:45:56 UTC
Distribution:Ubuntu 7.04
Problem Description:
The Hauppauge HVR 1100 ir-remote control does not work after resume from suspend to ram or disk. 
After reloading the cx88*-modules the remote works again.

After adding the following lines in the function cx8800_resume in module cx88-video.c the remote works instantly after resume (this is only a hack):

cx_write(MO_DDS_IO, 0xa80a80);	/* 4 kHz sample rate */
cx_write(MO_DDSCFG_IO, 0x5);	/* enable */
cx_set(MO_PCI_INTMSK, core->pci_irqmask);
Comment 1 Mauro Carvalho Chehab 2007-06-29 13:52:11 UTC
Created attachment 11906 [details]
stop IR on suspend and restart on resume

Could you test this patch?
Comment 2 Peter Poklop 2007-06-30 08:50:18 UTC
Patch doesn't work.
During startup i get this :

Jun 30 17:34:43 ideq kernel: [   30.036175] cx8800: Unknown symbol cx88_ir_stop
Jun 30 17:34:43 ideq kernel: [   30.036269] cx8800: Unknown symbol cx88_ir_start
Comment 3 Peter Poklop 2007-07-11 08:43:31 UTC
Created attachment 12000 [details]
Small correction to the previous patch.

I made a small correction to the patch which makes the modules loadable. It is not perfect yet because the ir only works jerky after resume. 
Adding the line "cx_set(MO_PCI_INTMSK, core->pci_irqmask);" it is ok.
Comment 4 Rafael J. Wysocki 2007-09-23 05:35:46 UTC
Can you attach the patch that works best for you, please?
Comment 5 Peter Poklop 2007-09-28 10:07:31 UTC
Created attachment 12980 [details]
this patch works for me
Comment 6 Mauro Carvalho Chehab 2007-10-01 04:47:47 UTC

I'll add the modified patch to the driver. Thanks for your feedback.

If I understood you correctly, you're still suffering some troubles with IR, after the resume, right? Could you better describe the issues?

Also, it would be nice if you can send us a "Reviewed-by" tag, for me to add at the committed patch at mainstream.
Comment 7 Peter Poklop 2007-10-05 10:03:11 UTC
I tried the latest linuxtv-source and it looks fine for me, thank you.
(although i realized that the IR sometimes still does'nt work after suspend2ram, but suspend2disk looks ok)

The problem i discribed concerns the previeous version of the patch. The remote responded only for a short time in a regular interval of some seconds. I had the same behaviour with an older kernel (2.6.17) sporadically after a normal boot.

Reviewed-by: Peter Poklop <Peter.Poklop@gmx.at>
Comment 8 Mauro Carvalho Chehab 2007-10-05 11:40:37 UTC
Thanks for your help!

From what I know, the same code should work for both s2ram and s2disk. I'll close this bug. 

Maybe you can open another bug, reporting the issues you're having with s2ram to the suspend guys. It may be related to some initialization specific to your motherboard.