summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-08-13 15:52:39 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 12:00:44 +0900
commit71c040c5ceef63dd392b73885ae7b25ba3ecf1ac (patch)
treec371d73754dbd5977cc82a92fbe3cdd8432eaf7d /drivers/media
parentd3996eddd2a1ec19ba92c97e40f15c6b1864f925 (diff)
downloadlinux-3.10-71c040c5ceef63dd392b73885ae7b25ba3ecf1ac.tar.gz
linux-3.10-71c040c5ceef63dd392b73885ae7b25ba3ecf1ac.tar.bz2
linux-3.10-71c040c5ceef63dd392b73885ae7b25ba3ecf1ac.zip
upstream media: fix: au0828 call dvb core suspend
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=66cae53024c4 Upstream Author: Shuah Khan <shuah.kh@samsung.com> Original subject: [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. Change-Id: I84820422af70bea19cefe6d24f0f9bff5756637d Signed-off-by: Shuah Khan <shuah.kh@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/au0828/au0828-dvb.c47
1 files changed, 26 insertions, 21 deletions
diff --git a/drivers/media/usb/au0828/au0828-dvb.c b/drivers/media/usb/au0828/au0828-dvb.c
index 821f86e92cd..4bd9d687d2d 100644
--- a/drivers/media/usb/au0828/au0828-dvb.c
+++ b/drivers/media/usb/au0828/au0828-dvb.c
@@ -620,34 +620,39 @@ int au0828_dvb_register(struct au0828_dev *dev)
void au0828_dvb_suspend(struct au0828_dev *dev)
{
struct au0828_dvb *dvb = &dev->dvb;
+ int rc;
- if (dvb->frontend && dev->urb_streaming) {
- pr_info("stopping DVB\n");
-
- cancel_work_sync(&dev->restart_streaming);
-
- /* Stop transport */
- mutex_lock(&dvb->lock);
- stop_urb_transfer(dev);
- au0828_stop_transport(dev, 1);
- mutex_unlock(&dvb->lock);
- dev->need_urb_start = 1;
+ if (dvb->frontend) {
+ if (dev->urb_streaming) {
+ cancel_work_sync(&dev->restart_streaming);
+ /* Stop transport */
+ mutex_lock(&dvb->lock);
+ stop_urb_transfer(dev);
+ au0828_stop_transport(dev, 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)
{
struct au0828_dvb *dvb = &dev->dvb;
+ int rc;
- if (dvb->frontend && dev->need_urb_start) {
- pr_info("resuming DVB\n");
-
- au0828_set_frontend(dvb->frontend);
-
- /* Start transport */
- mutex_lock(&dvb->lock);
- au0828_start_transport(dev);
- start_urb_transfer(dev);
- mutex_unlock(&dvb->lock);
+ if (dvb->frontend) {
+ /* resume frontend - does fe and tuner init */
+ rc = dvb_frontend_resume(dvb->frontend);
+ pr_info("au0828_dvb_resume(): Resuming DVB fe %d\n", rc);
+ if (dev->need_urb_start) {
+ /* Start transport */
+ mutex_lock(&dvb->lock);
+ au0828_start_transport(dev);
+ start_urb_transfer(dev);
+ mutex_unlock(&dvb->lock);
+ }
}
}