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.

> 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);

> +
> +       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.

CU
Oliver

-- 
----------------------------------------------------------------
VDR Remote Plugin 0.3.9: http://www.escape-edv.de/endriss/vdr/
----------------------------------------------------------------


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

Reply via email to