CN106331864B - A kind of set-top box forces standby method and device - Google Patents

A kind of set-top box forces standby method and device Download PDF

Info

Publication number
CN106331864B
CN106331864B CN201610804949.6A CN201610804949A CN106331864B CN 106331864 B CN106331864 B CN 106331864B CN 201610804949 A CN201610804949 A CN 201610804949A CN 106331864 B CN106331864 B CN 106331864B
Authority
CN
China
Prior art keywords
standby
wake
field
lock
inner nuclear
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610804949.6A
Other languages
Chinese (zh)
Other versions
CN106331864A (en
Inventor
曹黎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Skyworth Digital Technology Co Ltd
Original Assignee
Shenzhen Skyworth Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Skyworth Digital Technology Co Ltd filed Critical Shenzhen Skyworth Digital Technology Co Ltd
Priority to CN201610804949.6A priority Critical patent/CN106331864B/en
Publication of CN106331864A publication Critical patent/CN106331864A/en
Priority to PCT/CN2017/099233 priority patent/WO2018045887A1/en
Application granted granted Critical
Publication of CN106331864B publication Critical patent/CN106331864B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Sources (AREA)
  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of set-top box and forces standby method and device.This method comprises: increasing by first in framework layer forces standby interface, described first forces standby interface for connecting upper layer application and system;Standby interface and default call method is forced to call the second of hardware layer to force standby interface by described first;Force standby interface that the first field and the second field are written in inner nuclear layer by described second, first field is used for screen closing operation, and second field is for forcing standby operation;The standby function of the pressure in standby interface is forced to carry out the pressure standby operation by the third of the inner nuclear layer.Set-top box in the present invention may be implemented to force it is standby, as long as pressing power key, and though currently whether have application or process obtain wake-up lock, set-top box can enter it is very standby, so that it is guaranteed that the power consumption and service life of set-top box.

Description

A kind of set-top box forces standby method and device
Technical field
Standby method and dress are forced the present embodiments relate to the technical field of set-top box more particularly to a kind of set-top box It sets.
Background technique
Android standby wakeup basic principle: when starting an application program, it can apply for that a wake_lock is called out It wakes up and locks, it is every to apply successfully all registering in kernel later once, to notify system kernel, has lock now and be applied, system The wake_lock_store of kernel is added into red black tree.When application program discharges wake_lock under certain conditions It waits, applied wake_lock before nullifying.It is important to note that: as long as have in system a wake_lock when It waits, system not can be carried out sleep at this time.But modules can carry out early_suspend at this time.When all in system After wake_lock is released, system will enter the sleep state of real kernel.
It will create a main wake-up lock main_wake_lock when system starting, which is kernel initialization and holds The non-of a WAKE_LOCK_SUSPEND attribute having wakes up lock in limited time.It therefore, will be always because should when system worked well Lock is held by kernel and cannot be introduced into sleep state.I.e. in the case where not adding new lock, main_wake_lock need to only be solved Lock, system can enter sleep state.
Having a lot of reasons to will lead to user and press the set-top box after switch of remote controler at present cannot be introduced into prototype, wherein most Chief reason be exactly apply or process obtain wake-up lock, it is standby before do not discharge, result in set-top box cannot be introduced into very to Machine, box do not enter it is very standby if power consumption naturally will be higher, be for users exactly power consumption.If box is for a long time It works and does not enter and very standby be also possible to lead to box temperature drift;Can also box be made to have the longevity in addition, component works long hours Life loss.
Summary of the invention
The purpose of the embodiment of the present invention be to propose a kind of set-top box force standby method and device aim to solve the problem that how Guarantee that set-top box can enter very standby problem.
For this purpose, the embodiment of the present invention uses following technical scheme:
In a first aspect, a kind of set-top box forces standby method, which comprises
Increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer application and being System;
Standby interface and default call method is forced to call the second of hardware layer to force standby interface by described first;
Force standby interface that the first field and the second field, first field are written in inner nuclear layer by described second For screen closing operation, second field is for forcing standby operation;
The standby function of the pressure in standby interface is forced to carry out the pressure standby operation by the third of the inner nuclear layer.
Preferably, described to force standby interface and default call method to call the second of hardware layer to force by described first Standby interface, comprising:
By the PowerManagerService of the framework layer, then it is transferred to by jni the power.c of the hardware layer In second force standby interface.
It is preferably, described to force standby interface that the first field and the second field are written in inner nuclear layer by described second, First field is used for screen closing operation, and second field is for forcing standby operation, comprising:
Interface write-in in "/sys/class/amhdmitx/amhdmitx0/config " is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
Preferably, the third by inner nuclear layer forces the standby function in standby interface to carry out the standby behaviour of pressure Make, comprising:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, passes through the wake_ in the inner nuclear layer Unlock_store function is called back.
Preferably, before the wake_unlock_store function in the inner nuclear layer is called back, further includes:
First searching the wake_lock in red-black number chained list by the inner nuclear layer and waking up to lock whether there is;
If it does not exist, then do not continue to operate.
Preferably, if described detect that "/sys/power/wake_unlock " has field write-in, the kernel is recalled to Wake_unlock_store function in layer, comprising:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have to red Searching the wake_lock in black several chained lists and waking up to lock whether there is, and the third for calling directly the inner nuclear layer forces standby connect Mouthful, entrance is very standby;
Wherein, if it is described force standby function be used to having when detecting wake_lock and waking up lock it is preset it is global force to Machine mark does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby.
Preferably, the third for calling directly the inner nuclear layer forces standby interface, before entrance is very standby, also wraps It includes:
The global variable that the inner nuclear layer is arranged is true standby mode.
Preferably, the method also includes:
When system enters the true standby mode, power_suspend_late function is recalled by the inner nuclear layer Detecting the wake_lock and waking up to lock whether there is;
If the wake_lock wake-up is latched in, the system is waken up.
Second aspect, a kind of set-top box force standby device, and described device includes:
Increase module, forces standby interface for increasing by first in framework layer, described first forces standby interface for connecting Connect upper layer application and system;
Calling module, for forcing standby interface and default call method to call the last the second of hardware layer by described first Make standby interface;
Writing module, for forcing standby interface that the first field and the second word are written in inner nuclear layer by described second Section, first field are used for screen closing operation, and second field is for forcing standby operation;
Standby module, for being forced by the third of the inner nuclear layer described in the standby function progress of the pressure in standby interface Force standby operation.
Preferably, the calling module, is specifically used for:
By the PowerManagerService of the framework layer, then it is transferred to by jni the power.c of the hardware layer In second force standby interface.
Preferably, the write module is specifically used for:
Interface write-in in "/sys/class/amhdmitx/amhdmitx0/config " is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
Preferably, the standby module, is specifically used for:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, passes through the wake_ in the inner nuclear layer Unlock_store function is called back.
Preferably, described device further include:
Searching module, for before the wake_unlock_store function in the inner nuclear layer is called back, by described Inner nuclear layer, which first searches the wake_lock in red-black number chained list and wakes up to lock, whether there is;If it does not exist, then do not continue to operate.
Preferably, the standby module, also particularly useful for:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have to red Searching the wake_lock in black several chained lists and waking up to lock whether there is, and the third for calling directly the inner nuclear layer forces standby connect Mouthful, entrance is very standby;
Wherein, if it is described force standby function be used to having when detecting wake_lock and waking up lock it is preset it is global force to Machine mark does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby.
Preferably, described device further include:
Setup module, the third for calling directly the inner nuclear layer force standby interface, before entrance is very standby, setting The global variable of the inner nuclear layer is true standby mode.
Preferably, described device further include:
Wake-up module, for recalling power_ by the inner nuclear layer when system enters the true standby mode Wake_lock described in suspend_late function check, which wakes up lock, whether there is;If the wake_lock wake-up is latched in, Then wake up the system.
The embodiment of the present invention provides a kind of set-top box and forces standby method and device, framework layer increase by first force to Machine interface, described first forces standby interface for connecting upper layer application and system;By described first force standby interface and Default call method calls the second of hardware layer to force standby interface;Standby interface is forced to be write in inner nuclear layer by described second Enter the first field and the second field, first field is used for screen closing operation, and second field is for forcing standby operation;It is logical The third for crossing the inner nuclear layer forces the standby function of the pressure in standby interface to carry out the pressure standby operation.In the present invention Set-top box may be implemented to force it is standby, as long as pressing power key, and though currently whether have application or process obtain wake-up lock, Set-top box can enter it is very standby, so that it is guaranteed that the power consumption and service life of set-top box.
Detailed description of the invention
Fig. 1 is the flow diagram that a kind of set-top box provided in an embodiment of the present invention forces standby method;
Fig. 2 is that a kind of set-top box provided in an embodiment of the present invention forces standby method schematic diagram;
Fig. 3 is the flow diagram that another set-top box provided in an embodiment of the present invention forces standby method;
Fig. 4 is the flow diagram that another set-top box provided in an embodiment of the present invention forces standby method;
Fig. 5 is the flow diagram that another set-top box provided in an embodiment of the present invention forces standby method;
Fig. 6 is the functional block diagram that a kind of set-top box provided in an embodiment of the present invention forces standby device.
Specific embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this Locate described specific embodiment and is used only for explaining the embodiment of the present invention, rather than the restriction to the embodiment of the present invention.In addition also It should be noted that only parts related to embodiments of the present invention are shown rather than entire infrastructure for ease of description, in attached drawing.
It is the flow diagram that a kind of set-top box provided in an embodiment of the present invention forces standby method with reference to Fig. 1, Fig. 1.
As shown in Figure 1, the set-top box forces the standby method to include:
Step 101, increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer Using and system;
Step 102, by described first force standby interface and default call method call the second of hardware layer force to Machine interface;
Preferably, described to force standby interface and default call method to call the second of hardware layer to force by described first Standby interface, comprising:
By the PowerManagerService of the framework layer, then it is transferred to by jni the power.c of the hardware layer In second force standby interface.
Step 103, force standby interface that the first field and the second field are written in inner nuclear layer by described second, it is described First field is used for screen closing operation, and second field is for forcing standby operation;
It is preferably, described to force standby interface that the first field and the second field are written in inner nuclear layer by described second, First field is used for screen closing operation, and second field is for forcing standby operation, comprising:
Interface write-in in "/sys/class/amhdmitx/amhdmitx0/config " is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
Step 104, the standby function of the pressure in standby interface is forced to carry out the pressure by the third of the inner nuclear layer Standby operation.
Preferably, the third by inner nuclear layer forces the standby function in standby interface to carry out the standby behaviour of pressure Make, comprising:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, recalls to the wake_ in the inner nuclear layer Unlock_store function.
Preferably, if described detect that "/sys/power/wake_unlock " has field write-in, the kernel is recalled to Wake_unlock_store function in layer, comprising:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have to red Searching the wake_lock in black several chained lists and waking up to lock whether there is, and the third for calling directly the inner nuclear layer forces standby connect Mouthful, entrance is very standby;
Wherein, if it is described force standby function be used to having when detecting wake_lock and waking up lock it is preset it is global force to Machine mark does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby.
Specifically, as shown in Fig. 2, Fig. 2 is that a kind of set-top box provided in an embodiment of the present invention forces standby method to be illustrated Figure.
Standby interface forcesuspend is forced in addition in PowerManager, which is supplied directly to upper layer application It is called with system.
As the call flow of other interfaces such as reboot, the realization of forcesuspend also exists In PowerManagerService, the force_suspend being transferred in hardware layers of power.c eventually by jni is connect Mouthful.
The first write-in into "/sys/class/amhdmitx/amhdmitx0/config " of force_suspend interface " video_off " field, i.e. progress screen closing operation;Then toward write-in " force_ inside "/sys/power/wake_unlock " Suspend " field.
An interface force_suspend is realized in kernel, work queue is added in suspend function by interface the inside And it is immediately performed.
Once "/sys/power/wake_unlock " has field write-in, wake_unlock_store function is most in kernel It can be called back eventually, it before calling real wake_unlock here first can find whether the lock is deposited in red-black number chained list If there is no then directly returning, do not continuing to operate.So we add a judgement herein, if coming into the field come (field read out from "/sys/power/wake_unlock ") is " force_suspend ", then does not have to judgement lock and exist Existence in red-black number chained list, calls directly the interface force_suspend of previous step realization, and entrance is very standby.
Certainly, due to the difference of standby mode, a global variable controls standby mode in kernel, it is strong due to us Make it is standby belong to it is very standby, so, need to be set to true standby mode before calling suspend.
There is the mechanism of many places detection lock in kernel, even if no exception in suspend function, so to be also transformed Suspend function: a global pressure standby mark is set in force_suspend function, is locked in suspend function check Place is new plus a judgement once detecting pressure standby mark does not just detect lock, continue to execute down.
In addition, kernel can also be adjusted for the last time when every standby preparation is ready to enter system standby The presence locked with power_suspend_late function check then wakes up system if there is lock.So herein also will be by upper The pressure standby mark of one step addition adds a judgement newly to judge no needs detection lock.
Normal Standby success may be implemented in aforesaid way, and verifying includes normal condition and abnormal conditions, and normal condition includes It forces to force standby, plug peripheral hardware when standby including each interface operation when playing various videos.Abnormal conditions include by answering Force standby, standby by force using circulation acquisition lock with lock is not discharged after acquisition lock.
The embodiment of the present invention provides a kind of set-top box and forces standby method, increases by first in framework layer and forces standby connect Mouthful, described first forces standby interface for connecting upper layer application and system;Standby interface is forced by described first and is preset Call method calls the second of hardware layer to force standby interface;Force standby interface that the is written in inner nuclear layer by described second One field and the second field, first field are used for screen closing operation, and second field is for forcing standby operation;Pass through institute The third for stating inner nuclear layer forces the standby function of the pressure in standby interface to carry out the pressure standby operation.
It is that another set-top box provided in an embodiment of the present invention forces the process of standby method to be illustrated with reference to Fig. 3, Fig. 3 Figure.
As shown in figure 3, the set-top box forces the standby method to include:
Step 301, increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer Using and system;
Step 302, by the PowerManagerService of the framework layer, then the hardware layer is transferred to by jni Second in power.c forces standby interface;
Step 303, force interface to "/sys/class/amhdmitx/amhdmitx0/config " by described second Middle write-in " video_off " field, " video_off " field are used for screen closing operation;Again to "/sys/power/wake_ " force_suspend " field is written in unlock ";
Step 304, whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
Step 305, the wake_lock is first searched in red-black number chained list by the inner nuclear layer and wakes up whether lock is deposited ?;If it does not exist, then do not continue to operate;
Step 306, if detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, It whether there is without searching the wake_lock in red-black number chained list and waking up to lock, the third for calling directly the inner nuclear layer is strong Standby interface is made, entrance is very standby.
It is that another set-top box provided in an embodiment of the present invention forces the process of standby method to be illustrated with reference to Fig. 4, Fig. 4 Figure.
As shown in figure 4, the set-top box forces the standby method to include:
Step 401, increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer Using and system;
Step 402, by the PowerManagerService of the framework layer, then the hardware layer is transferred to by jni Second in power.c forces standby interface;
Step 403, force interface to "/sys/class/amhdmitx/amhdmitx0/config " by described second Middle write-in " video_off " field, " video_off " field are used for screen closing operation;Again to "/sys/power/wake_ " force_suspend " field is written in unlock ";
Step 404, whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
Step 405, the wake_lock is first searched in red-black number chained list by the inner nuclear layer and wakes up whether lock is deposited ?;If it does not exist, then do not continue to operate;
Step 406, if detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, It whether there is without searching the wake_lock in red-black number chained list and waking up to lock, the third for calling directly the inner nuclear layer is strong Make standby interface;
Step 407, the global variable that the inner nuclear layer is arranged is true standby mode;
Step 408, entrance is very standby.
It is that another set-top box provided in an embodiment of the present invention forces the process of standby method to be illustrated with reference to Fig. 5, Fig. 5 Figure.
As shown in figure 5, the set-top box forces the standby method to include:
Step 501, increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer Using and system;
Step 502, by the PowerManagerService of the framework layer, then the hardware layer is transferred to by jni Second in power.c forces standby interface;
Step 503, force interface to "/sys/class/amhdmitx/amhdmitx0/config " by described second Middle write-in " video_off " field, " video_off " field are used for screen closing operation;Again to "/sys/power/wake_ " force_suspend " field is written in unlock ";
Step 504, whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
Step 505, the wake_lock is first searched in red-black number chained list by the inner nuclear layer and wakes up whether lock is deposited ?;If it does not exist, then do not continue to operate;
Step 506, if detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, It whether there is without searching the wake_lock in red-black number chained list and waking up to lock, the third for calling directly the inner nuclear layer is strong Standby interface is made, entrance is very standby;
Step 507, when system enters the true standby mode, power_suspend_ is recalled by the inner nuclear layer Wake_lock described in late function check, which wakes up lock, whether there is;If the wake_lock wake-up is latched in, institute is waken up State system.
It is that a kind of set-top box provided in an embodiment of the present invention forces the functional module of standby device to be illustrated with reference to Fig. 6, Fig. 6 Figure.
As shown in fig. 6, described device includes:
Increase module 601, forces standby interface for increasing by first in framework layer, described first forces standby interface to be used for Connect upper layer application and system;
Calling module 602, for forcing standby interface and default call method to call the of hardware layer by described first Two force standby interface;
Preferably, the calling module 602, is specifically used for:
By the PowerManagerService of the framework layer, then it is transferred to by jni the power.c of the hardware layer In second force standby interface.
Writing module 603, for forcing standby interface that the first field and second are written in inner nuclear layer by described second Field, first field are used for screen closing operation, and second field is for forcing standby operation;
Preferably, the write module 603 are specifically used for:
Interface write-in in "/sys/class/amhdmitx/amhdmitx0/config " is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
Standby module 604, for forcing the standby function of the pressure in standby interface to carry out by the third of the inner nuclear layer The pressure standby operation.
Preferably, the standby module 604, is specifically used for:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, passes through the wake_ in the inner nuclear layer Unlock_store function is called back.
Preferably, the standby module 604, also particularly useful for:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have to red Searching the wake_lock in black several chained lists and waking up to lock whether there is, and the third for calling directly the inner nuclear layer forces standby connect Mouthful, entrance is very standby;
Wherein, if it is described force standby function be used to having when detecting wake_lock and waking up lock it is preset it is global force to Machine mark does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby.
Preferably, described device further include:
Searching module, for before the wake_unlock_store function in the inner nuclear layer is called back, by described Inner nuclear layer, which first searches the wake_lock in red-black number chained list and wakes up to lock, whether there is;If it does not exist, then do not continue to operate.
Preferably, described device further include:
Setup module, the third for calling directly the inner nuclear layer force standby interface, before entrance is very standby, setting The global variable of the inner nuclear layer is true standby mode.
Preferably, described device further include:
Wake-up module, for recalling power_ by the inner nuclear layer when system enters the true standby mode Wake_lock described in suspend_late function check, which wakes up lock, whether there is;If the wake_lock wake-up is latched in, Then wake up the system.
The embodiment of the present invention provides a kind of set-top box and forces standby device, increases by first in framework layer and forces standby connect Mouthful, described first forces standby interface for connecting upper layer application and system;Standby interface is forced by described first and is preset Call method calls the second of hardware layer to force standby interface;Force standby interface that the is written in inner nuclear layer by described second One field and the second field, first field are used for screen closing operation, and second field is for forcing standby operation;Pass through institute The third for stating inner nuclear layer forces the standby function of the pressure in standby interface to carry out the pressure standby operation.
Describe the technical principle of the embodiment of the present invention in conjunction with specific embodiments above.These descriptions are intended merely to explain this The principle of inventive embodiments, and it cannot be construed to the limitation to protection scope of the embodiment of the present invention in any way.Based on herein Explanation, those skilled in the art, which does not need to pay for creative labor, can associate the other specific of the embodiment of the present invention Embodiment, these modes are fallen within the protection scope of the embodiment of the present invention.

Claims (16)

1. a kind of set-top box forces standby method, which is characterized in that the described method includes:
Increase by first in framework layer and force standby interface, described first forces standby interface for connecting upper layer application and system;
Standby interface and default call method is forced to call the second of hardware layer to force standby interface by described first;
Force standby interface that the first field and the second field are written in inner nuclear layer by described second, first field is used for Screen closing operation, second field is for forcing standby operation;
The standby function of the pressure in standby interface is forced to carry out the pressure standby operation by the third of the inner nuclear layer.
2. the method according to claim 1, wherein described force standby interface and default tune by described first Standby interface is forced with the second of method call hardware layer, comprising:
It is transferred in the power.c of the hardware layer by the PowerManagerService of the framework layer, then by jni Second forces standby interface.
3. the method according to claim 1, wherein described force standby interface in inner nuclear layer by described second The first field of middle write-in and the second field, first field are used for screen closing operation, and second field is for forcing standby behaviour Make, comprising:
The write-in in "/sys/class/amhdmitx/amhdmitx0/config " of standby interface is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
4. according to claim 1 to method described in 3 any one, which is characterized in that the third by inner nuclear layer is forced The standby function of pressure in standby interface carries out the pressure standby operation, comprising:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, adjusts back the wake_ in the inner nuclear layer Unlock_store function.
5. according to the method described in claim 4, it is characterized in that, wake_unlock_store function in the inner nuclear layer Before being called back, further includes:
First searching wake_lock in red-black number chained list by the inner nuclear layer and waking up to lock whether there is;
If it does not exist, then do not continue to operate.
6. according to the method described in claim 4, it is characterized in that, if described detect "/sys/power/wake_unlock " There is field write-in, then adjust back the wake_unlock_store function in the inner nuclear layer, comprising:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have in red-black number Searching wake_lock in chained list and waking up lock whether there is, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby;
Wherein, if described force standby function for there is the preset global standby mark of pressure when detecting wake_lock and waking up lock Knowledge does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into very to Machine.
7. according to the method described in claim 6, it is characterized in that, the third pressure for calling directly the inner nuclear layer is standby Interface, before entrance is very standby, further includes:
The global variable that the inner nuclear layer is arranged is true standby mode.
8. according to the method described in claim 6, it is characterized in that, the method also includes:
When system enters the true standby mode, power_suspend_late function check is recalled by the inner nuclear layer The wake_lock, which wakes up lock, whether there is;
If the wake_lock wake-up is latched in, the system is waken up.
9. a kind of set-top box forces standby device, which is characterized in that described device includes:
Increase module, forces standby interface for increasing by first in framework layer, described first forces standby interface for connecting Layer application and system;
Calling module, for by described first force standby interface and default call method call the second of hardware layer force to Machine interface;
Writing module, for forcing standby interface that the first field and the second field, institute are written in inner nuclear layer by described second The first field is stated for screen closing operation, second field is for forcing standby operation;
Standby module, for forcing the standby function of the pressure in standby interface to carry out the pressure by the third of the inner nuclear layer Standby operation.
10. device according to claim 9, which is characterized in that the calling module is specifically used for:
It is transferred in the power.c of the hardware layer by the PowerManagerService of the framework layer, then by jni Second forces standby interface.
11. device according to claim 9, which is characterized in that the write module is specifically used for:
The write-in in "/sys/class/amhdmitx/amhdmitx0/config " of standby interface is forced by described second " video_off " field, " video_off " field are used for screen closing operation;
" force_suspend " field is written in "/sys/power/wake_unlock " again.
12. according to device described in claim 9 to 11 any one, which is characterized in that the standby module is specifically used for:
Whether there is field write-in by inner nuclear layer detection "/sys/power/wake_unlock ";
If detecting, "/sys/power/wake_unlock " has field write-in, adjusts back the wake_ in the inner nuclear layer Unlock_store function.
13. device according to claim 12, which is characterized in that described device further include:
Searching module, for passing through the kernel before the wake_unlock_store function in the inner nuclear layer is called back Layer, which first searches wake_lock in red-black number chained list and wakes up to lock, whether there is;If it does not exist, then do not continue to operate.
14. device according to claim 12, which is characterized in that the standby module, also particularly useful for:
If detecting, "/sys/power/wake_unlock " has the write-in of " force_suspend " field, does not have in red-black number Searching wake_lock in chained list and waking up lock whether there is, and the third for calling directly the inner nuclear layer forces standby interface, into true It is standby;
Wherein, if described force standby function for there is the preset global standby mark of pressure when detecting wake_lock and waking up lock Knowledge does not detect the wake_lock then and wakes up lock, and the third for calling directly the inner nuclear layer forces standby interface, into very to Machine.
15. device according to claim 14, which is characterized in that described device further include:
Setup module, the third for calling directly the inner nuclear layer force standby interface, before entrance is very standby, described in setting The global variable of inner nuclear layer is true standby mode.
16. device according to claim 14, which is characterized in that described device further include:
Wake-up module, for recalling power_ by the inner nuclear layer when system enters the true standby mode Wake_lock described in suspend_late function check, which wakes up lock, whether there is;If the wake_lock wake-up is latched in, Then wake up the system.
CN201610804949.6A 2016-09-06 2016-09-06 A kind of set-top box forces standby method and device Active CN106331864B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610804949.6A CN106331864B (en) 2016-09-06 2016-09-06 A kind of set-top box forces standby method and device
PCT/CN2017/099233 WO2018045887A1 (en) 2016-09-06 2017-08-28 Method and apparatus for force standby of set top box

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610804949.6A CN106331864B (en) 2016-09-06 2016-09-06 A kind of set-top box forces standby method and device

Publications (2)

Publication Number Publication Date
CN106331864A CN106331864A (en) 2017-01-11
CN106331864B true CN106331864B (en) 2019-05-07

Family

ID=57787972

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610804949.6A Active CN106331864B (en) 2016-09-06 2016-09-06 A kind of set-top box forces standby method and device

Country Status (2)

Country Link
CN (1) CN106331864B (en)
WO (1) WO2018045887A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106331864B (en) * 2016-09-06 2019-05-07 深圳创维数字技术有限公司 A kind of set-top box forces standby method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101964861A (en) * 2010-10-11 2011-02-02 深圳市九洲电器有限公司 Standby control method and device of set-top box and set-top box
US8305249B2 (en) * 2008-07-18 2012-11-06 EchoStar Technologies, L.L.C. Systems and methods for controlling power consumption in electronic devices
CN105354491A (en) * 2015-10-12 2016-02-24 广东小天才科技有限公司 Standby state detection method and device of intelligent terminal
CN105376645A (en) * 2014-08-25 2016-03-02 深圳市中兴微电子技术有限公司 Set-top box and power consumption reduction method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2901949B1 (en) * 2006-05-30 2008-09-05 Nds Technologies France Soc Pa METHOD OF SLEEPING A DIGITAL TELEVISION DECODER AND DIGITAL DECODER WITH LOW POWER SAVING MODE
CN101282431B (en) * 2008-05-06 2012-04-04 华为技术有限公司 Set-top box and standby, awakening method thereof
US8543803B2 (en) * 2009-02-20 2013-09-24 Lenovo (Singapore) Pte Ltd Apparatus, system, and method for accurate automated scheduling of computer suspend and resume
CN101715045B (en) * 2009-11-25 2012-06-06 福建新大陆通信科技股份有限公司 Method for realizing low power consumption and true standby function of set-top box
CN103024543A (en) * 2012-12-21 2013-04-03 青岛海信宽带多媒体技术有限公司 Implementation method and implementation device for low power consumption of set top box
CN104394458A (en) * 2014-11-19 2015-03-04 四川长虹电器股份有限公司 Flat television Wi-Fi (Wireless Fidelity) module passive standby power supply control method and circuit
CN106331864B (en) * 2016-09-06 2019-05-07 深圳创维数字技术有限公司 A kind of set-top box forces standby method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8305249B2 (en) * 2008-07-18 2012-11-06 EchoStar Technologies, L.L.C. Systems and methods for controlling power consumption in electronic devices
CN101964861A (en) * 2010-10-11 2011-02-02 深圳市九洲电器有限公司 Standby control method and device of set-top box and set-top box
CN105376645A (en) * 2014-08-25 2016-03-02 深圳市中兴微电子技术有限公司 Set-top box and power consumption reduction method
CN105354491A (en) * 2015-10-12 2016-02-24 广东小天才科技有限公司 Standby state detection method and device of intelligent terminal

Also Published As

Publication number Publication date
WO2018045887A1 (en) 2018-03-15
CN106331864A (en) 2017-01-11

Similar Documents

Publication Publication Date Title
CN104221445B (en) A kind of method and terminal waking up terminal system
CN103324500B (en) A kind of method and device reclaiming internal memory
CN101539803B (en) Standby management method and relevant standby management module thereof
CN101673216B (en) Closing application program method and apparatus
CN103324549B (en) The implementation method of sleep standby and communication terminal
CN109788330A (en) TV bluetooth standby wakeup processing method, TV and remote controler
CN105204931A (en) Low-power wearable equipment and multi-operation system switching, communication and management method thereof
CN101395584A (en) JTAG power collapse debug
CN102968174A (en) Deep sleep awakening method of android device
CN107295166A (en) The startup method and mobile terminal of a kind of dual system mobile terminal
CN103336572A (en) Intelligent terminal and power saving method thereof
CN102014021A (en) Method and device for controlling connection/disconnection of data link
CN106658194B (en) A kind of fast boot of television method and device
US9285856B2 (en) Method and system for rapid entry into and for rapid exiting from sleep states for processors of a portable computing device
CN106056012A (en) Terminal power key control method and system
CN104506362A (en) Method for system state switching and monitoring on CC-NUMA (cache coherent-non uniform memory access architecture) multi-node server
CN102855428B (en) A kind of method of controlling security of computing machine and this computing machine
CN106331864B (en) A kind of set-top box forces standby method and device
CN105573757B (en) The language update method and device of android system
CN105159722B (en) RTC wakes up the method and computer of system
CN106371938A (en) Automatic intelligent delaying shutdown system and method
CN106293709A (en) The management method of application program, managing device and terminal
CN109344104A (en) Electronic equipment and method for transmitting signals
CN101646227A (en) Power management method for mobile terminal and mobile terminal
US20170308154A1 (en) Fast system setting changes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant