diff options
author | RaymondWu <xywu@marvell.com> | 2010-11-01 11:13:47 +0800 |
---|---|---|
committer | Joseph Lo <jlo@marvell.com> | 2010-11-08 10:34:52 +0800 |
commit | cece4cedd6efe73c07ddede125451f274040bc2b (patch) | |
tree | 5634c521c516aa0c016a485a97f1a450ef6b9a6a | |
parent | c93076fa32db30d63f3819a89f45e03a51db74a2 (diff) |
Fix cannot enter suspend after playback
Root cause is IPP/application cannot garantee that vmeta clock
or power can be turned off before exit. So add code in vdec_os_driver_clean()
to handle this.
Change-Id: I60d89def830bba5124309d320e54fc8788cc4d0d
Signed-off-by: RaymondWu <xywu@marvell.com>
-rwxr-xr-x | vmeta_lib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/vmeta_lib.c b/vmeta_lib.c index af953a6..2fa6602 100755 --- a/vmeta_lib.c +++ b/vmeta_lib.c @@ -499,6 +499,14 @@ SIGN32 vdec_os_driver_clean(void) return 0; } + // close clock and power + if(vdec_os_api_get_user_count() <=0) + { + vdec_os_api_clock_off(); + vdec_os_api_power_off(); + dbg_printf(VDEC_DEBUG_ALL, "close vmeta power and clock in case app doesn't close\n"); + } + // unmap memory area if(vdec_iface->io_mem_virt_addr > 0) { munmap((void*)vdec_iface->io_mem_virt_addr, vdec_iface->io_mem_size); |