Commit 66cae530 authored by Shuah Khan's avatar Shuah Khan Committed by Mauro Carvalho Chehab

[media] media: fix au0828 dvb suspend/resume to call dvb_frontend_suspend/resume

au0828 doesn't resume correctly and TV tuning fails with
xc_set_signal_source(0) failed message. Change au0828 dvb
suspend and resume interfaces to suspend and resume frontend
during suspend and resume respectively. dvb_frontend_suspend()
suspends tuner and fe using tuner and fe ops. dvb_frontend_resume()
resumes fe and tuner using fe and tuner ops ini before waking up
the frontend. With this change HVR950Q suspend and resume work
when system gets suspended when digital function is tuned to a
channel and with active TV stream, and after resume it went right
back to active TV stream.
Signed-off-by: default avatarShuah Khan <shuah.kh@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 662c97cf
...@@ -620,34 +620,39 @@ int au0828_dvb_register(struct au0828_dev *dev) ...@@ -620,34 +620,39 @@ int au0828_dvb_register(struct au0828_dev *dev)
void au0828_dvb_suspend(struct au0828_dev *dev) void au0828_dvb_suspend(struct au0828_dev *dev)
{ {
struct au0828_dvb *dvb = &dev->dvb; struct au0828_dvb *dvb = &dev->dvb;
int rc;
if (dvb->frontend && dev->urb_streaming) { if (dvb->frontend) {
pr_info("stopping DVB\n"); if (dev->urb_streaming) {
cancel_work_sync(&dev->restart_streaming);
cancel_work_sync(&dev->restart_streaming); /* Stop transport */
mutex_lock(&dvb->lock);
/* Stop transport */ stop_urb_transfer(dev);
mutex_lock(&dvb->lock); au0828_stop_transport(dev, 1);
stop_urb_transfer(dev); mutex_unlock(&dvb->lock);
au0828_stop_transport(dev, 1); dev->need_urb_start = 1;
mutex_unlock(&dvb->lock); }
dev->need_urb_start = 1; /* suspend frontend - does tuner and fe to sleep */
rc = dvb_frontend_suspend(dvb->frontend);
pr_info("au0828_dvb_suspend(): Suspending DVB fe %d\n", rc);
} }
} }
void au0828_dvb_resume(struct au0828_dev *dev) void au0828_dvb_resume(struct au0828_dev *dev)
{ {
struct au0828_dvb *dvb = &dev->dvb; struct au0828_dvb *dvb = &dev->dvb;
int rc;
if (dvb->frontend && dev->need_urb_start) { if (dvb->frontend) {
pr_info("resuming DVB\n"); /* resume frontend - does fe and tuner init */
rc = dvb_frontend_resume(dvb->frontend);
au0828_set_frontend(dvb->frontend); pr_info("au0828_dvb_resume(): Resuming DVB fe %d\n", rc);
if (dev->need_urb_start) {
/* Start transport */ /* Start transport */
mutex_lock(&dvb->lock); mutex_lock(&dvb->lock);
au0828_start_transport(dev); au0828_start_transport(dev);
start_urb_transfer(dev); start_urb_transfer(dev);
mutex_unlock(&dvb->lock); mutex_unlock(&dvb->lock);
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment