Re: Suspend/Resume support for budget-av

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Oliver Endriss schrieb:
> Julian Scheel wrote:
>   
>> Attached is a patch with adds full support for suspend/resume in budget-av. 
>> Actually only the CI interface needs to be reinitialised as all the tuner 
>> stuff gets reinitialised at the next tuning-process anyway.
>> So this patch should be ready to go pretty straightforward into head.
>>     
>
> Please post the sub-system ids of the cards you tested and which power
> states you tested.
>   
Going to look up the IDs later, when I have access to my dev-system.
But it should be all current KNC DVB-C and DVB-S cards.
>> diff -r c45e373bbca3 linux/drivers/media/common/saa7146_core.c
>> --- a/linux/drivers/media/common/saa7146_core.c Sat Jul 28 00:06:44 2007 -0300
>> +++ b/linux/drivers/media/common/saa7146_core.c Tue Aug 07 23:22:54 2007 +0200
>> @@ -515,6 +515,28 @@ static void saa7146_remove_one(struct pc
>>         saa7146_num--;
>>  }
>>
>> +static int saa7146_suspend(struct pci_dev *pdev)
>> +{
>> +       struct saa7146_dev* dev = pci_get_drvdata(pdev);
>> +       DEB_EE(("dev:%p\n",dev));
>> +       int err;
>> +
>> +       err = dev->ext->suspend(dev);
>>     
>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Causes an oops if the card driver did not set the suspend hook.
>
> Fix:
> 	int err = -EBUSY;
> 	if (dev->ext->suspend)
> 		err = dev->ext->suspend(dev);
>   
Agreed (c:
>> +
>> +       return err;
>> +}
>> +
>> +static int saa7146_resume(struct pci_dev *pdev)
>> +{
>> +       struct saa7146_dev* dev = pci_get_drvdata(pdev);
>> +       DEB_EE(("dev:%p\n",dev));
>> +       int err;
>> +
>> +       err = dev->ext->resume(dev);
>>     
>
> ditto
>
> IMO this patch can only work with S1 state. Higher states turn off PCI
> power and require re-initialization of saa7146, demod, tuner etc.
> See other drivers which fully implement suspend/resume.
>   
Works perfectly fine with S3-state for me. Actually S3 always worked 
fine, only ci interface did not work anymore after S3, that is fixed 
with this patch.

-Julian

_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux