WO2019076289A1 - 降低电子设备的功耗的方法以及电子设备 - Google Patents

降低电子设备的功耗的方法以及电子设备 Download PDF

Info

Publication number
WO2019076289A1
WO2019076289A1 PCT/CN2018/110398 CN2018110398W WO2019076289A1 WO 2019076289 A1 WO2019076289 A1 WO 2019076289A1 CN 2018110398 W CN2018110398 W CN 2018110398W WO 2019076289 A1 WO2019076289 A1 WO 2019076289A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
volume
audio
level
volume level
Prior art date
Application number
PCT/CN2018/110398
Other languages
English (en)
French (fr)
Inventor
苏俊峰
杨霖
尹朝阳
韩晓
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019076289A1 publication Critical patent/WO2019076289A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0261Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level
    • H04W52/0264Power saving arrangements in terminal devices managing power supply demand, e.g. depending on battery level by selectively disabling software applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72463User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions to restrict the functionality of the device
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/725Cordless telephones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0251Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity
    • H04W52/0254Power saving arrangements in terminal devices using monitoring of local events, e.g. events related to user activity detecting a user operation or a tactile contact or a motion of the device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present invention relates to the field of audio power consumption, and more particularly to a method and an electronic device for reducing power consumption of an electronic device.
  • sound is one of the most important basic functions, and one of the most frequently used functions of the user, including voice, music, recording, ringing, frequency modulation (FM), games and video.
  • FM frequency modulation
  • the sound needs to be transmitted to the user's ear through the electronic device, requiring a series of software process processing and hardware device enablement.
  • the power consumption of the mobile phone is relatively high during the sound playing in different scenes.
  • the current or limit of the audio device (for example, smartpa, codec, headphone hifi, etc.) is controlled mainly by reducing the volume of the sound. Press to reduce power consumption. But the control of the process is not very concerned.
  • the volume control of the audio scene and the control of the audio channel are two separate processes.
  • the volume level of other sounds can be adjusted to the 0 level by adjusting the volume key, that is, the silent mode.
  • the volume control is implemented on the framework side
  • the control of the audio path is implemented on the drive side
  • the drive side cannot obtain the volume level on the frame side.
  • the audio system of the electronic device still powers up the audio device, and the audio data is actually 0, and the audio device actually processes the audio.
  • the data that is, the audio device does not need to work at this time, still meets the requirements; the audio device at this time will cause a waste of power consumption.
  • Embodiments of the present invention provide a method for reducing power consumption of an electronic device, and an electronic device, wherein the technical problem to be solved is that, in an audio system of the electronic device, when the user sets the volume level of the sound other than the call to At 0 level, audio device operation will waste power.
  • the present invention provides a method for reducing power consumption of an electronic device, the method for reducing power consumption of the electronic device, comprising: playing an audio data stream on the electronic device, the electronic device receiving a first operation instruction input by the user, The first operation instruction is for adjusting the volume level of the electronic device; when the volume level is adjusted to the 0 level or the volume is 0, the audio device of the electronic device is turned off, so that the electronic device stops playing the audio data stream.
  • the method for reducing the power consumption of the electronic device provided in this embodiment, when the volume level is 0 level or the volume is 0, the playback of the audio data stream by the electronic device is turned off or not turned on, wherein the volume level is adjusted by the user, which is reduced. Power consumption.
  • the volume needs to be calculated according to the adjusted volume level.
  • the audio device of the electronic device is turned off, so that the electronic device stops playing. Audio data stream.
  • the volume calculation includes: determining a volume value corresponding to the volume level according to the volume level; multiplying the volume value by the audio data stream to obtain a volume.
  • the electronic device starts playing the audio data stream, the electronic device receives the second operation instruction input by the user, and the second operation instruction is used to enable the electronic device to play the audio data; if the volume level of the electronic device is Level 0, the audio device of the electronic device is not turned on.
  • the electronic device starts playing the audio data stream, the electronic device receives the second operation instruction input by the user, and the second operation instruction is used to enable the electronic device to play the audio data; if the volume of the electronic device is 0 at this time , the audio device of the electronic device is not turned on.
  • an embodiment of the present invention provides an electronic device, where the electronic device includes an input module, a processing module, and a computing module. Playing an audio data stream on the electronic device, and inputting a module, configured to receive a first operation instruction input by the user, where the first operation instruction is used to adjust a volume level of the electronic device; when the volume level is adjusted to a level of 0 or the volume is 0, the processing is performed.
  • the module turns off the audio device of the electronic device such that the electronic device stops playing the audio data stream.
  • the electronic device provided in this embodiment adjusts the volume level according to the first operation instruction, and when the volume level is 0 level or the volume is 0, the playback of the audio data stream by the electronic device is turned off or not turned on. Reduced power consumption.
  • the calculation module is configured to calculate the volume according to the volume level; in the process of adjusting the volume level, if the volume calculated according to the adjusted volume level is 0, the audio device of the electronic device is turned off, so that the electronic device Stop playing the audio stream.
  • the calculating module is specifically configured to: determine a volume value corresponding to the volume level according to the volume level; multiply the volume value by the audio data stream to obtain a volume.
  • the input unit is further configured to: start playing an audio data stream in the electronic device, the input module is further configured to receive a second operation instruction input by the user, and the second operation instruction is used to enable the electronic device to play the audio data; If the volume level of the electronic device is 0 level at this time, the processing module does not turn on the audio device of the electronic device.
  • the input unit is further configured to: start playing an audio data stream in the electronic device, the input module is further configured to receive a second operation instruction input by the user, and the second operation instruction is used to enable the electronic device to play the audio data; If the volume of the electronic device is 0 at this time, the processing module does not turn on the audio device of the electronic device.
  • the method and the electronic device for reducing the power consumption of the electronic device provided by the embodiment of the present invention, when the user adjusts the volume level to 0 level, during the audio data stream playing, the audio is turned off.
  • the data stream stops playing the audio data stream.
  • the audio device is turned off to reduce power consumption.
  • FIG. 1 is a schematic structural diagram of an audio system in the prior art
  • FIG. 2 is a schematic structural diagram of an audio system according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a method for reducing power consumption of an electronic device according to an embodiment of the present invention
  • FIG. 4 is a flowchart of a work of transmitting a volume level to a driving side of a framework side according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a working side of a driving side according to an embodiment of the present invention.
  • FIGS. 6(a)-6(b) are schematic diagrams of interfaces of a terminal according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of an electronic device according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of another electronic device according to an embodiment of the present invention.
  • FIG. 2 is a schematic structural diagram of an audio system according to an embodiment of the present invention.
  • the audio system may include a framework side and a drive side.
  • the framework side may include an audio policy management module (audiopolicymanager), an AudioFlinger, and a hardware abstraction layer (HAL).
  • audiopolicymanager audio policy management module
  • AudioFlinger audioFlinger
  • HAL hardware abstraction layer
  • the audio policy management module transmits the volume to the HAL layer through the AudioFlinger, and then to the driving side, and the HAL layer turns off or turns on the audio device on the driving side through logic control.
  • An electronic device may be a device that provides data connectivity to a user.
  • the operating system (OS) used by the electronic device may include, but is not limited to, an operating system such as Android Android or IOS.
  • the electronic device can be a mobile electronic device, such as a mobile phone (or "cellular" phone) and a computer with a mobile electronic device, for example, a portable, pocket, handheld, computer built-in or vehicle-mounted mobile device. Exchange language and/or data with the wireless access network. For example, Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, Personal Digital Assistants (Personal Digital Assistant, PDA) and other equipment.
  • the electronic device may also be referred to as a system, a Subscriber Unit, a Subscriber Station, a Mobile Station, a Mobile, a Remote Station, an Access Point, Remote Terminal, Access Terminal, User Terminal, User Agent, User Device, or User Equipment.
  • the method for reducing power consumption of an electronic device provided by the embodiment of the present invention, by setting the volume level of the electronic device, if the volume level set by the user is 0 level, turning off the audio device of the electronic device. When the volume level is 0, turn off the audio device, which reduces power consumption.
  • FIG. 3 is a flowchart of a method for reducing power consumption of an electronic device according to an embodiment of the present invention. As shown in FIG. 3, the method for reducing power consumption of an electronic device may include the following steps:
  • Step S301 Receive a first operation instruction input by the user, where the first operation instruction is used to adjust a volume level of the electronic device.
  • the volume level of the electronic device can be adjusted by the user according to his own use requirements, and the user can adjust the volume level by adjusting the volume button on the electronic device or through the sound interface.
  • the default adjustment volume button is to adjust the volume level corresponding to the ringtone.
  • the volume level corresponding to the A-type application is adjusted through the volume key; if the electronic device has the B-type application enabled, and the A-type application is not Termination (A type is different from B type).
  • the volume adjustment button is used to adjust the volume level corresponding to the B type application. Only after the application of the B type is terminated, if the volume key is adjusted again, then Adjust the volume level corresponding to the application of type A.
  • the sound interface can adjust the volume level corresponding to all application types. As shown in Figure 6(a) and Figure 6(b).
  • the adjusted volume level can be transmitted to the user's ear through the speaker of the framework-HAL-Kernel-Audiodsp-Codec-Smartpa-electronic device.
  • the volume level corresponding to the application of the media, the ringtone, the alarm clock, and the like can be adjusted to the 0 level, that is, the silent mode. As shown in Figure 6(b).
  • Step S302 When the volume level is 0 level or the volume is 0, the audio device of the electronic device is turned off.
  • the audio device of the electronic device is already in working state, that is, the electronic device is playing audio, and if the volume level is 0 level or the volume is 0, the audio of the electronic device is turned off. Device. This will reduce the power consumption.
  • the audio device of the electronic device is already in a working state, for example, the application of the media type has been enabled, that is, the audio device corresponding to the application of the media type is in a working state, if the media type is When the corresponding volume level of the application is 0 level or the volume is 0, the audio device corresponding to the application of the media type is turned off. That is to say, when the volume level corresponding to a certain type of application is adjusted from non-zero to 0, the audio device corresponding to the application of the type is turned off. This will reduce the power consumption.
  • the electronic device may be provided with a device such as a speaker, an earpiece, a microphone, etc.
  • the speaker may be disposed at the bottom of the electronic device or the outer casing of the electronic device
  • the microphone may be disposed at the bottom or the top of the electronic device.
  • the electronic device can be transmitted to the user's ear according to the position of the above device on the electronic device, and each type of application needs to be transmitted to the user's ear by using the above-mentioned device to establish a correspondence between a certain type of application and a device at different positions on the electronic device.
  • the volume level corresponding to multiple types of applications corresponding to the device at a certain location is 0 level or volume.
  • the device at that location is turned off. Assuming that the speaker at the bottom only corresponds to the audio type application, then the volume level corresponding to the application of the media type is adjusted to 0 level or the volume is 0, then the speaker at the bottom of the electronic device is turned off.
  • the audio device of the electronic device needs to be turned on to play the original audio data stream.
  • the method for reducing power consumption of the electronic device further includes:
  • Step S303 Calculate the volume according to the volume level.
  • the volume value corresponding to the volume level is determined according to the volume level; the volume value is multiplied by the data stream of the initial audio data stream to obtain the volume.
  • the auditaudiicymanager module of the framework side calculates a curve according to a fixed volume of the operating system, and obtains a volume value corresponding to each volume level, and the volume value and the audio data stream are The data streams are multiplied to get the volume.
  • step S302 is executed to turn off the audio device of the electronic device.
  • the audio device of the electronic device is already in operation, that is, the audio device of the electronic device performs audio on the audio data stream, and after the user adjusts the volume level, if the volume is 0, Then turn off the audio device of the electronic device. This will reduce the power consumption.
  • the volume needs to be recalculated according to the re-adjusted volume level. For example, if the volume level is adjusted from 0 level to non-zero level, so that the volume changes from 0 to non-zero, the audio device pair of the electronic device is re-opened. The audio stream is played.
  • the method for reducing power consumption of the electronic device further includes: step S304: the electronic device receives a second operation instruction, the second operation instruction is used to enable the audio device of the electronic device;
  • Step S305 If the volume level is 0 level, the audio device of the electronic device is not turned on.
  • the audio data stream in the audio device is clicked for playing. If the volume level is 0 level at this time, the audio device is not turned on to play the audio data stream. If the volume level is not 0 level at this time, the audio device is turned on to play the audio data stream.
  • the method for reducing power consumption of the electronic device further includes: step S304: receiving a second operation instruction, the second operation instruction is used to enable the electronic device to play the audio data stream; if the volume is 0, the execution is performed.
  • step S305 the audio device of the electronic device is not turned on.
  • the audio data stream in the audio device is clicked for playing. If the volume is 0 at this time, the audio device is not turned on to play the audio data stream. If the volume is not 0 at this time, the audio device is turned on to play the audio data stream.
  • the volume level set by the user in step S301 can be obtained by the audiopoliicymanager module on the framework side.
  • the volume level can be passed through the audiopolicyyservice module of the framework side by the setparameter interface of the operating system.
  • the audioflinger module on the framework side is passed to the driver side audio hardware abstraction layer module audio_hw.
  • the volume level on the framework side is transmitted to the drive side.
  • Equivalent replacement can be performed as long as the implementation of the volume level of the framework side is transmitted to the driving side, and details are not described herein again.
  • the volume level set by the user in step 301 can be obtained and calculated by the audiopoliicymanager module on the framework side, and the calculation is based on the volume level, that is, the volume calculated in step S303, after the calculation, the operating system can be called.
  • the setparameter interface passes the volume through the audiopolicy service module on the framework side - the audio system - the audioflinger module on the framework side to the audio - abstraction layer module audio_hw on the driver side.
  • the volume on the framework side is transmitted to the drive side. Equivalent replacement can be performed as long as the implementation of the volume of the framework side is transmitted to the driving side, and details are not described herein again.
  • the audio device is playing a song to sing the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user audio level through the volume key on the electronic device.
  • the volume level is transmitted to the audio HAL layer through the audioflinger module, and the HAL layer controls the codec and the audio device amplifier through logic control. To achieve the purpose of saving power. If the user adjusts the volume level to a non-zero level again, re-open the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel calls the driving logic corresponding to the device to be controlled by the command.
  • the device is driven to turn off the audio device through a bus such as I2C, a resource such as GPIO to control the register of the audio device.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device to be controlled by the command (smartpa, hifi, etc.).
  • the device drives through the bus such as I2C, GPIO and other resources to control the registers of the audio device to turn on the audio device.
  • the audio device starts to play the singing of the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user audio level through the volume button on the electronic device. If the volume level of the electronic device is 0 level, the volume level is transmitted to the audio HAL layer through the audioflinger module, and the HAL layer is controlled by logic to turn off the codec and Audio device power amplifier (smartpa, hifi, etc.), to achieve the purpose of saving power.
  • the codec and Audio device power amplifier asmartpa, hifi, etc.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after the kernel receives the command, the device to be controlled by the command is called (smartpa, hifi)
  • the corresponding drive logic is driven by the device to turn off the audio device through a bus such as I2C, GPIO and other resources to control the registers of the audio device.
  • the audio device is playing a song to sing the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user volume level so that the volume is zero.
  • the audiopolicymanager module obtains the volume level and calculates the volume, and transmits the volume to the audio HAL layer through the audioflinger module.
  • the HAL layer controls the logic and turns off the codec and audio device amplifiers to save power. If the user adjusts the volume level again, the volume changes from 0 to non-zero, and then re-enable the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel invokes the driving logic corresponding to the device to be controlled by the command,
  • the device driver turns off the audio device by controlling the audio device's registers through resources such as I2C bus and GPIO.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device (smartpa, hifi, etc.) to be controlled by the command.
  • Drive logic driven by the device through the I2C bus, GPIO and other resources to control the audio device registers to open the audio device.
  • the audio device starts to play the singing of the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user volume level so that the volume is zero.
  • the audiopolicymanager module obtains the volume level and calculates the volume, and transmits the volume to the audio HAL layer through the audioflinger module.
  • the HAL layer controls the logic and turns off the codec and audio device amplifiers to save power. If the user adjusts the volume level again, the volume changes from 0 to non-zero, and then re-enable the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel invokes the driving logic corresponding to the device to be controlled by the command,
  • the device driver turns off the audio device by controlling the audio device's registers through resources such as I2C bus and GPIO.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device (smartpa, hifi, etc.) to be controlled by the command.
  • Drive logic driven by the device through the I2C bus, GPIO and other resources to control the audio device registers to open the audio device.
  • the electronic device has different types of sounds, such as ringtones, media, alarms, and calls. Different types have separate volumes, which can be adjusted separately. There are many kinds of audio devices (smartpa, hifi, etc.), but for example, if you need to play with a speaker, you need to pass smartpa, whether it is ringtone or music.
  • the software recognizes that the ringer volume is 0, so that smartpa can be turned off to reduce power consumption.
  • the music starts to play.
  • the software will judge that the speaker needs to play the sound at this time, and the smartpa will be re-opened.
  • the audio power amplifier is fully called an audio power amplifier, and is a power amplifier device for pushing the sound of the speaker of the electronic device to reproduce the sound, which is used in all electronic products that emit sound.
  • the method for reducing the power consumption of the electronic device provided in this embodiment, when the volume level is 0 level or the volume is 0, the playback of the audio data stream by the electronic device is turned off or not turned on, wherein the volume level is adjusted by the user, which is reduced. Power consumption.
  • FIG. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. As shown in FIG. 7, the electronic device can include an input module 710, a processing module 720, and a computing module 730.
  • the input module 710 is configured to receive a first operation instruction input by the user, where the first operation instruction is used to adjust a volume level of the electronic device.
  • the volume level of the electronic device can be adjusted by the user according to his own use requirements, and the user can adjust the volume level by adjusting the volume button on the electronic device or through the sound interface.
  • the adjustment of the volume level of the electronic device by the user is the same as that described in the above step S301, and therefore will not be described again.
  • the adjusted volume level can be transmitted to the user's ear through the speaker of the framework-HAL-Kernel-Audiodsp-Codec-Smartpa-electronic device.
  • the volume levels of the media, ringtones, alarms, and the like can be adjusted by the user to the 0 level, that is, the silent mode. As shown in Figure 6(b).
  • the processing module 720 is configured to turn off the audio device of the electronic device when the volume level is 0 level or when the volume level is 0.
  • the processing module 720 is specifically configured to: before the user adjusts the volume level of the user, the audio device of the electronic device is already in working state, that is, the electronic device is playing audio, and if the volume level is 0 level or the volume is 0, the data is turned off. Audio device for electronic devices. This will reduce the power consumption.
  • the processing module 720 is configured to turn off the audio device of the electronic device when the volume level is 0 or the volume is 0, which is the same as described in the above step S302, and therefore will not be described again.
  • the audio device of the electronic device needs to be turned on to play the original audio data stream.
  • the electronic device further includes a computing module 730.
  • the calculation module 730 is configured to calculate the volume according to the volume level.
  • the volume value corresponding to the volume level is determined according to the volume level; the volume value is multiplied by the data stream of the initial audio data stream to obtain the volume.
  • the calculating module 730 is specifically configured to: assume that the volume level of the electronic device ranges from 0 to 15, and the auditiomicymanager module of the framework side calculates a volume according to a fixed volume of the operating system, and obtains a volume value corresponding to each volume level, and the volume value is The data stream of the audio file is multiplied to get the volume.
  • the processing module 720 is configured to turn off the audio device of the electronic device if the volume is 0.
  • the audio device of the electronic device is already in operation, that is, the audio device of the electronic device performs audio on the audio data stream, and after the user adjusts the volume level, if the volume is 0, Then turn off the audio device of the electronic device. This will reduce the power consumption.
  • the volume needs to be recalculated according to the re-adjusted volume level. For example, if the volume level is adjusted from 0 level to non-zero level, so that the volume changes from 0 to non-zero, the audio device pair of the electronic device is re-opened. The audio stream is played.
  • the processing module 720 is further configured to: when the electronic device receives the second operation instruction, the second operation instruction is used to turn on the audio device of the electronic device; if the volume level is 0, the electronic device is not turned on. The audio device of the device.
  • the audio data stream in the audio device is clicked for playing. If the volume level is 0 level at this time, the audio device is not turned on to play the audio data stream. If the volume level is not 0 level at this time, the audio device is turned on to play the audio data stream.
  • the processing module 720 is further configured to: when the second operation instruction is received, the second operation instruction is used to enable the electronic device to play the audio data stream, and if the volume is 0, the electronic device is not turned on. Audio device.
  • the audio data stream in the audio device is clicked for playing. If the volume is 0 at this time, the audio device is not turned on to play the audio data stream. If the volume is not 0 at this time, the audio device is turned on to play the audio data stream.
  • the volume level in the input module 710 can be obtained by the audiopoliicymanager module on the framework side.
  • the volume level can be passed through the auditioicyservice module of the framework side-audio system by calling the setparameter interface of the operating system.
  • the audioflinger module on the framework side is passed to the driver side audio hardware abstraction layer module audio_hw.
  • the volume level on the framework side is transmitted to the drive side.
  • Equivalent replacement can be performed as long as the implementation of the volume level of the framework side is transmitted to the driving side, and details are not described herein again.
  • the volume level in the input module 710 can be obtained and calculated by the audiopoliicymanager module on the framework side, the calculation is based on the volume level, and the volume calculated by the calculation module 730 can be calculated by calling the setparameter interface of the operating system.
  • the volume is transmitted to the driver side audio hardware abstraction layer module audio_hw through the audiopolicyyservice module of the framework side - the audio system - the audioflinger module on the framework side.
  • the volume on the framework side is transmitted to the drive side. Equivalent replacement can be performed as long as the implementation of the volume of the framework side is transmitted to the driving side, and details are not described herein again.
  • the audio device is playing a song to sing the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user audio level through the volume key on the electronic device.
  • the volume level is transmitted to the audio HAL layer through the audioflinger module, and the HAL layer controls the codec and the audio device amplifier through logic control. To achieve the purpose of saving power. If the user adjusts the volume level to a non-zero level again, re-open the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel calls the driving logic corresponding to the device to be controlled by the command.
  • the device is driven to turn off the audio device through a bus such as I2C, a resource such as GPIO to control the register of the audio device.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device to be controlled by the command (smartpa, hifi, etc.).
  • the device drives through the bus such as I2C, GPIO and other resources to control the registers of the audio device to turn on the audio device.
  • the audio device starts to play the singing of the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user audio level through the volume button on the electronic device. If the volume level of the electronic device is 0 level, the volume level is transmitted to the audio HAL layer through the audioflinger module, and the HAL layer is controlled by logic to turn off the codec and Audio device power amplifier (smartpa, hifi, etc.), to achieve the purpose of saving power.
  • the codec and Audio device power amplifier asmartpa, hifi, etc.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after the kernel receives the command, the device to be controlled by the command is called (smartpa, hifi)
  • the corresponding drive logic is driven by the device to turn off the audio device through a bus such as I2C, GPIO and other resources to control the registers of the audio device.
  • the audio device is playing a song to sing the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user volume level so that the volume is zero.
  • the audiopolicymanager module obtains the volume level and calculates the volume, and transmits the volume to the audio HAL layer through the audioflinger module.
  • the HAL layer controls the logic and turns off the codec and audio device amplifiers to save power. If the user adjusts the volume level again, the volume changes from 0 to non-zero, and then re-enable the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel invokes the driving logic corresponding to the device to be controlled by the command,
  • the device driver turns off the audio device by controlling the audio device's registers through resources such as I2C bus and GPIO.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device (smartpa, hifi, etc.) to be controlled by the command.
  • Drive logic driven by the device through the I2C bus, GPIO and other resources to control the audio device registers to open the audio device.
  • the audio device starts to play the singing of the motherland, and the process of driving the side to play the singing of the motherland can be as follows:
  • the user adjusts the user volume level so that the volume is zero.
  • the audiopolicymanager module obtains the volume level and calculates the volume, and transmits the volume to the audio HAL layer through the audioflinger module.
  • the HAL layer controls the logic and turns off the codec and audio device amplifiers to save power. If the user adjusts the volume level again, the volume changes from 0 to non-zero, and then re-enable the codec and audio device amplifier to play the singing country.
  • the command to turn off the audio device is written to the kernel node /dev/snd/control0, and after receiving the command, the kernel invokes the driving logic corresponding to the device to be controlled by the command,
  • the device driver turns off the audio device by controlling the audio device's registers through resources such as I2C bus and GPIO.
  • the command to open the audio device is written to the kernel node /dev/snd/control0.
  • the kernel will call the device (smartpa, hifi, etc.) to be controlled by the command.
  • Drive logic driven by the device through the I2C bus, GPIO and other resources to control the audio device registers to open the audio device.
  • the electronic device provided in this embodiment adjusts the volume level according to the first operation instruction, and when the volume level is 0 level or the volume is 0, the playback of the audio data stream by the electronic device is turned off or not turned on. Reduced power consumption.
  • FIG. 8 is a schematic structural diagram of another electronic device according to an embodiment of the present invention.
  • the electronic device includes: a radio frequency (RF) circuit 810, a memory 820, an input unit 830, a display unit 840, an audio circuit 850, a processor 860, and a wireless local area network (WLAN).
  • RF radio frequency
  • Module 870, power supply 880, and Bluetooth module 890 and the like It will be understood by those skilled in the art that the electronic device structure illustrated in FIG. 8 does not constitute a limitation on the electronic device, and may include more or less components than those illustrated, or a combination of certain components, or different component arrangements.
  • the RF circuit 810 can be used to send and receive information, for example, to connect to a mobile broadband.
  • RF circuit 810 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
  • LNA Low Noise Amplifier
  • RF circuitry 810 can also forward mobile bandwidth traffic to WLAN module 870 to forward mobile bandwidth traffic to other electronic devices via WLAN module 870.
  • wireless communication can adopt any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), and code division multiple access (Code).
  • CDMA Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • E-mail Short Messaging Service
  • the memory 820 can be used to store program instructions, and the processor 860 causes the electronic device to perform the method of reducing power consumption of the electronic device as shown in FIG. 3 by running the program instructions stored in the memory 820.
  • the memory 820 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system and an application program or the like required to implement the above-described method of reducing power consumption of the electronic device.
  • the storage data area may store list information of the electronic device and data generated by the electronic device when the above-described application authorization method is executed.
  • the memory 820 may include a volatile memory such as a random-access memory (RAM); the memory 820 may also include a non-volatile memory, for example, only Read-only memory (ROM), flash memory, hard disk drive (HDD) or solid-state drive (SSD).
  • RAM random-access memory
  • ROM Read-only memory
  • HDD hard disk drive
  • SSD solid-state drive
  • the memory 820 may also include a combination of the above types of memories.
  • the input unit 830 can be configured to receive an operation instruction input by the user, including turning on a WLAN hotspot instruction, selecting an instruction of an electronic device sharing the WLAN hotspot, and the like.
  • the input unit 830 may include a touch panel 831 and other input devices 832.
  • the touch panel 831 also referred to as a touch screen, can collect touch operations on or near the user (such as the user using a finger, a stylus, or the like on the touch panel 831 or near the touch panel 831. Operation), and drive the corresponding connecting device according to a preset program.
  • the touch panel 831 can include two parts: a touch detection device and a touch controller.
  • the touch detection device detects the touch orientation of the user, and detects a signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts the touch information into contact coordinates, and sends the touch information.
  • the processor 860 is provided and can receive commands from the processor 860 and execute them.
  • the input unit 830 can implement the touch panel 831 by using various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 830 may also include other input devices 832.
  • other input devices 832 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, and the like.
  • the display unit 840 can be used to display information input by the user or information provided to the user as well as various menus of the electronic device.
  • the display unit 840 can include a display screen 841.
  • the display screen 841 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 831 can cover the display screen 841. When the touch panel 831 detects a touch operation thereon or nearby, the touch panel 831 transmits to the processor 860 to determine the type of the touch event, and then the processor 860 according to the touch event. The type provides a corresponding visual output on display 841.
  • the touch panel 831 and the display screen 841 function as two separate components to implement input and input functions of the electronic device, in some embodiments, the touch panel 831 can be integrated with the display screen 841. And realize the input and output functions of electronic devices.
  • An audio circuit 850, a speaker 851, and a microphone 852 can provide an audio interface between the user and the electronic device 800.
  • the audio circuit 850 can transmit the converted electrical data of the received audio data to the speaker 851 for conversion to the sound signal output by the speaker 851; on the other hand, the microphone 852 converts the collected sound signal into an electrical signal by the audio circuit 850. After receiving, it is converted into audio data, and then processed by the audio data output processor 860, sent to an electronic device such as an electronic device via the RF circuit 810, or outputted to the memory 820 for further processing.
  • the processor 860 is a control center of the electronic device that connects various parts of the entire electronic device using various interfaces and lines, by running or executing a volume level or volume stored in the memory 820, and calling data stored in the memory 820, such as The method of reducing the power consumption of an electronic device shown in FIG.
  • processor 860 can include one or more processing units.
  • the processor 860 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the above described modem processor may also not be integrated into the processor 860.
  • the WLAN module 880 can be used to assist users in sending and receiving emails, browsing web pages, and accessing streaming media, etc., which provides users with wireless broadband WLAN Internet access.
  • the WLAN is a short-range wireless transmission technology, and the electronic device can access the WLAN hotspot through the WLAN module 870.
  • the WLAN hotspot can also be enabled by the WLAN module 870 to forward the mobile bandwidth service to other electronic devices.
  • the WLAN module 870 can also perform Wi-Fi broadcasts and scans to enable wireless communication with other nearby electronic devices.
  • the electronic device also includes a power source 880 (such as a battery) that supplies power to the various components.
  • a power source 880 such as a battery
  • the power source can be logically coupled to the processor 860 through a power management system to manage functions such as charging, discharging, and power consumption through the power management system.
  • the Bluetooth module 890 can be a Bluetooth Low Energy (BLE) device, a traditional Bluetooth device, or a dual-mode Bluetooth device supporting traditional Bluetooth and BLE.
  • BLE Bluetooth Low Energy
  • the Bluetooth module 890 establishes a BLE or classic Bluetooth connection with the Bluetooth module of other electronic devices, and the Bluetooth module 890 can also perform BR or BLE broadcast and scanning to enable wireless communication with other surrounding electronic devices.
  • the electronic device may further include a camera, a speaker, etc., and will not be described herein.
  • RF circuit 810, Bluetooth module 890, and WLAN module 870 may be collectively referred to as a wireless communication interface.
  • the electronic device includes a processor 860, a memory 820, and a wireless communication interface.
  • the memory 820 is configured to store program instructions
  • the input unit 830 receives a first operation instruction input by the user, where the first operation instruction is used to adjust a volume level of the electronic device;
  • the processor 860 is configured to execute the program according to the program instructions stored in the memory 820. Action: If the volume level is 0 or the volume is 0, turn off the audio device of the electronic device.
  • the input unit 830 is further configured to receive a second operation instruction input by the user, the second operation instruction is used to enable the electronic device to play the audio data stream, and the processor 860 is configured to use the program instruction stored in the memory 820. Do the following: If the volume level is 0 or the volume is 0, the audio device of the electronic device is not turned on.
  • the electronic device provided in this embodiment adjusts the volume level according to the first operation instruction, and when the volume level is 0 level or the volume is 0, the playback of the audio data stream by the electronic device is turned off or not turned on. Reduced power consumption.
  • the steps of a method or algorithm described in connection with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both.
  • the software module can be placed in random access memory (RAM), memory, read only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or technical field. Any other form of storage medium known.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Multimedia (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本发明实施例公开了一种降低电子设备的功耗的方法以及电子设备。所述降低电子设备的功耗的方法包括设置电子设备的音量等级;若音量等级为0等级时,则关闭电子设备的音频器件。在本发明实施例中,实现了在音量等级为0等级时,关闭音频器件,起到降低功耗的目的。

Description

降低电子设备的功耗的方法以及电子设备
本申请要求于2017年10月16日提交中国专利局、申请号为201710970314.8、发明名称为“一种音频器件的控制方法和设备”的中国专利申请的优先权,以及要求于2018年3月19日提交中国专利局、申请号为201810224989.2、发明名称为“降低电子设备的功耗的方法以及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及音频功耗领域,尤其涉及一种降低电子设备的功耗的方法以及电子设备。
背景技术
电子设备的基本功能中,声音是最重要的基本功能之一,也是用户使用最频繁的功能之一,该声音包括通话,音乐,录音,铃声,调频(frequency modulation,FM),游戏和视频。声音需通过电子设备传递到用户的耳朵中,需要一系列的软件流程处理和硬件器件的使能。使得不同场景下声音播放过程中,手机消耗的功耗是比较高的。
目前,在音频的功耗优化领域,主要通过降低声音的音量,控制音频器件(例如,智能运放(smartpa),编解码器(codec),耳机高保真芯片(hifi)等)的电流或者限压来降低功耗。但是对于流程的控制并不太关注。音频场景的音量控制和音频通路的控制是分开的两套流程,除了通话的音量外,其他声音的音量等级都可以通过调节音量键调到0等级,即静音模式。在操作***中,音量控制在框架层(framework)侧实现,音频通路的控制在驱动侧实现,驱动侧无法获取framework侧的音量等级。即使当用户将音量等级设置为0等级时,在用户开始播放音频数据流时,电子设备的音频***依然会将音频器件上电工作,此时音频数据其实是0,音频器件处理的其实是静音数据,也就是此时音频器件不需要工作也依然满足要求;音频器件此时工作反而会造成功耗上的浪费。
发明内容
本发明实施例提供了一种降低电子设备的功耗的方法以及电子设备,其要解决的技术问题是,在电子设备的音频***中,当用户将除通话之外的声音的音量等级设置为0等级时,音频器件工作会造成功耗浪费。
第一方面,本发明提供了一种降低电子设备的功耗的方法,该降低电子设备的功耗的方法包括:在电子设备播放音频数据流,电子设备接收到用户输入的第一操作指令,该第一操作指令用于调整电子设备的音量等级;当音量等级调整至0等级时或音量为0时,关闭电子设备的音频器件,使得电子设备停止播放音频数据流。
本实施例提供的降低电子设备的功耗的方法,当音量等级为0等级或音量为0时,关闭或不开启电子设备对音频数据流的播放,其中音量等级是由用户自行调整,减少了功率消耗。
在一个可能的实施例中,需要根据调整的音量等级计算得到音量,在调整音量等级过程中,若根据调整的音量等级计算的音量为0时,关闭电子设备的音频器件,使得电子设备停止播放音频数据流。
在一个可能的实施例中,音量计算包括:根据音量等级确定音量等级对应的音量值;将音量值与音频数据流相乘,得到音量。
在一个可能的实施例中,在电子设备开始播放音频数据流,电子设备接收用户输入的第二操作指令,第二操作指令用于开启电子设备播放音频数据;若此时电子设备的音量等级为0等级,则不开启电子设备的音频器件。
在一个可能的实施例中,在电子设备开始播放音频数据流,电子设备接收用户输入的第二操作指令,第二操作指令用于开启电子设备播放音频数据;若此时电子设备的音量为0,则不开启电子设备的音频器件。
第二方面,本发明实施例提供了一种电子设备,该电子设备包括输入模块、处理模块和计算模块。在电子设备播放音频数据流,输入模块,用于接收用户输入的第一操作指令,该第一操作指令用于调整电子设备的音量等级;当音量等级调整至0等级时或者音量为0,处理模块,关闭电子设备的音频器件,使得电子设备停止播放音频数据流。
本实施例提供的电子设备,通过根据第一操作指令对音量等级进行调整,当音量等级为0等级或音量为0时,关闭或不开启电子设备对音频数据流的播放。减少了功率消耗。
在一个可能的实施例中,计算模块用于根据音量等级,计算得到音量;在调整音量等级过程中,若根据调整的音量等级计算的音量为0时,关闭电子设备的音频器件,使得电子设备停止播放音频数据流。
在一个可能的实施例中,计算模块具体用于:根据音量等级确定音量等级对应的音量值;将音量值与音频数据流相乘,得到音量。
在一个可能的实施例中,输入单元还用于:在电子设备开始播放音频数据流,输入模块还用于接收用户输入的第二操作指令,第二操作指令用于开启电子设备播放音频数据;若此时电子设备的音量等级为0等级,处理模块,不开启电子设备的音频器件。
在一个可能的实施例中,输入单元还用于:在电子设备开始播放音频数据流,输入模块还用于接收用户输入的第二操作指令,第二操作指令用于开启电子设备播放音频数据;若此时电子设备的音量为0,处理模块,不开启电子设备的音频器件。
相比较现有技术,本发明实施例提供的一种降到电子设备的功耗的方法及电子设备,通过在音频数据流播放过程中,若用户将音量等级调整为0等级时,则关闭音频数据流,停止播放音频数据流。在音量等级为0等级的情况下,关闭音频器件,起到降低功耗的目的。
附图说明
图1为现有技术中的音频***的架构示意图;
图2为本发明实施例提供的音频***的架构示意图;
图3为本发明实施例提供的一种降低电子设备的功耗的方法的流程图;
图4为本发明实施例提供的framework侧传输音量等级至驱动侧的工作流程图;
图5为本发明实施例提供的驱动侧的工作流程图;
图6(a)-图6(b)为本发明实施例提供的终端的界面示意图;
图7为本发明实施例提供的一种电子设备的结构框图;
图8为本发明实施例提供的另一种电子设备的结构框图。
具体实施方式
图2为本发明实施例提供的音频***的架构示意图。如图2所示,音频***可包括framework侧和驱动侧。framework侧可包括音频策略管理模块(audiopolicymanager)、AudioFlinger和硬件抽象层(HAL),
音频策略管理模块将该音量通过AudioFlinger传输至HAL层,进而传输至驱动侧,由HAL层通过逻辑控制关闭或开启驱动侧的音频器件。
本发明实施例涉及的电子设备,可以是指向用户提供数据连通性的设备。电子设备所采用的操作***(operating system,OS)可以包括但不限于安卓Android、IOS等操作***。电子设备可以是移动电子设备,如移动电话(或称为“蜂窝”电话)和具有移动电子设备的计算机,例如,可以是便携式、袖珍式、手持式、计算机内置的或者车载的移动装置,它们与无线接入网交换语言和/或数据。例如,个人通信业务(Personal Communication Service,PCS)电话、无绳电话、会话发起协议(Session Initiation Protocol,SIP)话机、无线本地环路(Wireless Local Loop,WLL)站、个人数字助理(Personal Digital Assistant,PDA)等设备。电子设备也可以称为***、订户单元(Subscriber Unit)、订户站(Subscriber Station),移动站(Mobile Station)、移动台(Mobile)、远程站(Remote Station)、接入点(Access Point)、远程电子设备(Remote Terminal)、接入电子设备(Access Terminal)、用户电子设备(User Terminal)、用户代理(User Agent)、用户设备(User Device)、或用户装备(User Equipment)。
本发明实施例提供的降低电子设备功耗的方法,通过设置电子设备的音量等级,若用户设置的音量等级为0等级时,则关闭电子设备的音频器件。在音量等级为0等级时,关闭音频器件,这样就可以减少功耗的消耗。
图3为本发明实施例提供的一种降低电子设备的功耗的方法的流程图。如图3所示,降低电子设备功耗的方法可以包括以下步骤:
步骤S301:接收用户输入的第一操作指令,该第一操作指令用于调整电子设备的音量等级。
电子设备的音量等级可由用户根据自己的使用需求进行调整,用户可通过调整电子设备上的音量键或者通过声音界面,对音量等级进行调整。
具体地,在电子设备未开启任何类型的应用时,默认调整音量键是对铃声对应的音量等级进行调整。在电子设备开启应用时,例如,电子设备开启A类型的应用时,通过音量键对A类型的应用对应的音量等级进行调整;如果电子设备又开启了B类型的应用,且A类型的应用没有终止(A类型与B类型不同),此时,调整音量键则是对B类型的应用对应的音量等级进行调整,只有在B类型的应用终止后,如果再调整音量键,此时,则是对A类型的应用对应的音量等级进行调整。
声音界面能对所有应用类型对应的音量等级进行调整。如图6(a)和图6(b)所示。
调整后的音量等级可通过framework-HAL-Kernel-Audiodsp-Codec-Smartpa-电子设备的喇叭,耳机-听筒传输到用户的耳朵。
在本发明实施例中,除了通话外,媒体,铃声,闹钟等类型的应用对应的音量等级都可以被用户调整至0等级,也就是静音模式。如附图6(b)所示。
步骤S302:当音量等级为0等级时或音量为0时,则关闭电子设备的音频器件。
具体地,在用户调整用户音量等级之前,电子设备的音频器件已经处于工作状态,也就是电子设备正在进行音频播放,若此时音量等级为0等级时或音量为0时,关闭电子设备的音频器件。这样就可以减少功耗的消耗。
进一步,在用户调整用户音量等级之前,电子设备的音频器件已经处于工作状态,例如,已经开启了媒体类型的应用,也就是媒体类型的应用对应的音频器件处于工作状态,若此时媒体类型的应用对应的音量等级为0等级时或音量为0时,关闭该媒体类型的应用对应的音频器件。也就是说,当某一类型的应用对应的音量等级从非0调整至0,关闭该类型的应用对应的音频器件。这样就可以减少功耗的消耗。
进一步,电子设备可设置扬声器、听筒、麦克风等器件,扬声器可以设置在电子设备的底部或电子设备的外壳上,麦克风可以设置在电子设备的底部或顶部。电子设备可根据上述器件在电子设备上的位置,以及每种类型的应用需要采用上述某一位置的器件传输到用户的耳朵,建立某一类型的应用与电子设备上不同位置的器件的对应关系,当某一位置的器件与多个类型的应用对应时,则不建议关闭该位置的器件,而是在某一位置的器件对应的多个类型的应用对应的音量等级都为0等级或音量为0时,才关闭该某一位置的器件。假设底部的扬声器只与音频类型的应用对应,那么调整媒体类型的应用对应的音量等级至0等级或音量为0,则关闭电子设备底部的扬声器。
若用户再次调整音量等级,例如,从0等级调整至非0等级时,由于此时音频器件已经在播放过程中,则需要打开电子设备的音频器件对原先的音频数据流进行播放。
在一个可能的实施例中,在步骤S302之前,降低电子设备的功耗的方法还包括:
步骤S303:根据音量等级,计算得到音量。
在一个可能的实施例中,根据音量等级确定音量等级对应的音量值;将音量值与初始音频数据流的数据流相乘,得到音量。
具体地,假设电子设备的音量等级的范围为0~15级,framework侧audiopolicymanager模块根据操作***固定的音量计算曲线,获取每一音量级别对应的音量值,在将该音量值与音频数据流的数据流相乘,得到音量。
若音量为0,执行步骤S302,关闭电子设备的音频器件。
具体地,在用户调整电子设备的音量等级之前,电子设备的音频器件已经处于工作状态,也就是电子设备的音频器件对音频数据流进行音频,在用户调整音量等级后,若音量为0时,则关闭电子设备的音频器件。这样就可以减少功耗的消耗。
若用户再次调整音量等级,需要根据重新调整的音量等级重新计算音量,例如,调整音量等级从0等级调整至非0等级,使得音量从0变化为非0,则重新打开电子设备的音频器件对音频数据流进行播放。
在一个可能的实施例中,降低电子设备的功耗的方法还包括,步骤S304:电子设备接收到第二操作指令,该第二操作指令用于开启电子设备的音频器件;
步骤S305:若音量等级为0等级,则不开启电子设备的音频器件。
具体地,当用户开始对音频数据流进行播放,点击音频器件中的音频数据流进行播放,若此时音量等级为0等级,则不开启音频器件播放音频数据流。若此时音量等级不为0等级, 则开启音频器件播放音频数据流。
在一个可能的实施例中,降低电子设备的功耗的方法还包括,步骤S304:接收到第二操作指令,该第二操作指令用于开启电子设备播放音频数据流;若音量为0,执行步骤S305,不开启电子设备的音频器件。
具体地,当用户开始对音频数据流进行播放,点击音频器件中的音频数据流进行播放,若此时音量为0,则不开启音频器件播放音频数据流。若此时音量不为0,则开启音频器件播放音频数据流。
在本发明实施例中,步骤S301中用户设置的音量等级可由framework侧的audiopolicymanager模块获取,在audiopolicymanager模块获取后,可通过调用操作***的setparameter接口,将音量等级通过framework侧的audiopolicyservice模块—音频***—framework侧的audioflinger模块传递到驱动侧音频硬件抽象层模块audio_hw中。通过上述操作,将framework侧的音量等级传输至驱动侧。如附图4所示。只要能实现将framework侧的音量等级传输至驱动侧的实施方式都可以进行等效替换,在此不再赘述。
或者,将步骤301中用户设置的音量等级可由framework侧的audiopolicymanager模块获取和计算,计算是根据音量等级计算得到音量,也就是步骤S303中计算的音量,在计算完之后,可通过调用操作***的setparameter接口,将音量通过framework侧的audiopolicyservice模块—音频***—framework侧的audioflinger模块传递到驱动侧音频硬件抽象层模块audio_hw中。通过上述操作,将framework侧的音量传输至驱动侧。只要能实现将framework侧的音量传输至驱动侧的实施方式都可以进行等效替换,在此不再赘述。
音频器件正在播放歌曲歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
用户通过电子设备上的音量键调整用户音频等级,当用户将音量等级调整至0等级时,将该音量等级通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级至非0等级时,再重新打开codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量等级为0等级时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量等级为非0等级时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
音频器件开始播放歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
音频器件,用户通过电子设备上的音量键调整用户音频等级,若此时电子设备的音量等级为0等级时,该音量等级通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放(smartpa,hifi等),达到省功耗的目的。
具体地,HAL层检测到当前音量等级为0等级时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频 器件。
音频器件正在播放歌曲歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
用户调整用户音量等级,使得音量为0。audiopolicymanager模块获取该音量等级并计算得到音量,并将该音量通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级,使得音量从0变化为非0,再重新开启codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量为0时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量为非0时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
音频器件开始播放歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
音频器件在播放数据流之前,用户调整用户音量等级,使得音量为0。audiopolicymanager模块获取该音量等级并计算得到音量,并将该音量通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级,使得音量从0变化为非0,再重新开启codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量为0时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量为非0时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
在一个可能的实施例中,电子设备有不同的声音类型,例如铃声、媒体、闹钟和通话四个类型,不同类型的都有各自独立的音量,可分别进行调节。音频器件有多种(音频功放(smartpa),hifi等),但是比如只要是需要用喇叭播放的,都需要通过smartpa,无论是铃声还是音乐。
如果用户把铃声音量调为0,此时播放铃声时,软件识别铃声音量为0,就可以让smartpa关闭来降低功耗。
当铃声停止时,音乐开始播放,只要用户音量设置不为0,软件会判断此时需要喇叭播放声音,会重新打开smartpa。
在本发明实施例中,音频功放全名为音频功率放大器,是用于推动电子设备的扬声器发声,从而重现声音的功放装置,凡是发声的电子产品中都要用到它。
本实施例提供的降低电子设备的功耗的方法,当音量等级为0等级或音量为0时,关闭或不开启电子设备对音频数据流的播放,其中音量等级是由用户自行调整,减少了功率消耗。
图7为本发明实施例提供的一种电子设备的结构示意图。如图7所示,该电子设备可以包括:输入模块710、处理模块720和计算模块730。
输入模块710,用于接收用户输入的第一操作指令,该第一操作指令用于调整电子设备的音量等级。
电子设备的音量等级可由用户根据自己的使用需求进行调整,用户可通过调整电子设备上的音量键或者通过声音界面,对音量等级进行调整。用户对电子设备的音量等级的调整,与上述步骤S301中的描述相同,故不再赘述。
调整后的音量等级可通过framework-HAL-Kernel-Audiodsp-Codec-Smartpa-电子设备的喇叭,耳机-听筒传输到用户的耳朵。
在本发明实施例中,除了通话外,媒体,铃声,闹铃等场景的音量等级都可以被用户调整至0等级,也就是静音模式。如附图6(b)所示。
处理模块720,用于当音量等级为0等级时或音量为0时,则关闭电子设备的音频器件。
处理模块720具体用于,在用户调整用户音量等级之前,电子设备的音频器件已经处于工作状态,也就是电子设备正在进行音频播放,若此时音量等级为0等级时或音量为0时,关闭电子设备的音频器件。这样就可以减少功耗的消耗。
处理模块720用于当音量等级为0等级或音量为0时,关闭电子设备的音频器件,与上述步骤S302描述相同,故不再赘述。
若用户再次调整音量等级,例如,从0等级调整至非0等级时,由于此时音频器件已经在播放过程中,则需要打开电子设备的音频器件对原先的音频数据流进行播放。
在一个可能的实施例中,电子设备还包括计算模块730。
计算模块730,用于根据音量等级,计算得到音量。
在一个可能的实施例中,根据音量等级确定音量等级对应的音量值;将音量值与初始音频数据流的数据流相乘,得到音量。
计算模块730具体用于,假设电子设备的音量等级的范围为0~15级,framework侧audiopolicymanager模块根据操作***固定的音量计算曲线,获取每一音量级别对应的音量值,在将该音量值与音频文件的数据流相乘,得到音量。
处理模块720,用于若音量为0,则关闭电子设备的音频器件。
具体地,在用户调整电子设备的音量等级之前,电子设备的音频器件已经处于工作状态,也就是电子设备的音频器件对音频数据流进行音频,在用户调整音量等级后,若音量为0时,则关闭电子设备的音频器件。这样就可以减少功耗的消耗。
若用户再次调整音量等级,需要根据重新调整的音量等级重新计算音量,例如,调整音量等级从0等级调整至非0等级,使得音量从0变化为非0,则重新打开电子设备的音频器件对音频数据流进行播放。
在一个可能的实施例中,处理模块720还用于,在电子设备接收到第二操作指令时,该第二操作指令用于开启电子设备的音频器件;若音量等级为0等级,不开启电子设备的音频器件。
具体地,当用户开始对音频数据流进行播放,点击音频器件中的音频数据流进行播放, 若此时音量等级为0等级,则不开启音频器件播放音频数据流。若此时音量等级不为0等级,则开启音频器件播放音频数据流。
在一个可能的实施例中,处理模块720还用于,在接收到第二操作指令时,该第二操作指令用于开启电子设备播放音频数据流,若音量为0,则不开启电子设备的音频器件。
具体地,当用户开始对音频数据流进行播放,点击音频器件中的音频数据流进行播放,若此时音量为0,则不开启音频器件播放音频数据流。若此时音量不为0,则开启音频器件播放音频数据流。
在本发明实施例中,输入模块710中的音量等级可由framework侧的audiopolicymanager模块获取,在audiopolicymanager模块获取后,可通过调用操作***的setparameter接口,将音量等级通过framework侧的audiopolicyservice模块—音频***—framework侧的audioflinger模块传递到驱动侧音频硬件抽象层模块audio_hw中。通过上述操作,将framework侧的音量等级传输至驱动侧。如附图4所示。只要能实现将framework侧的音量等级传输至驱动侧的实施方式都可以进行等效替换,在此不再赘述。
或者,将输入模块710中的音量等级可由framework侧的audiopolicymanager模块获取和计算,计算是根据音量等级计算得到音量,计算模块730计算的音量,在计算完之后,可通过调用操作***的setparameter接口,将音量通过framework侧的audiopolicyservice模块—音频***—framework侧的audioflinger模块传递到驱动侧音频硬件抽象层模块audio_hw中。通过上述操作,将framework侧的音量传输至驱动侧。只要能实现将framework侧的音量传输至驱动侧的实施方式都可以进行等效替换,在此不再赘述。
音频器件正在播放歌曲歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
用户通过电子设备上的音量键调整用户音频等级,当用户将音量等级调整至0等级时,将该音量等级通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级至非0等级时,再重新打开codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量等级为0等级时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量等级为非0等级时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
音频器件开始播放歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
音频器件,用户通过电子设备上的音量键调整用户音频等级,若此时电子设备的音量等级为0等级时,该音量等级通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放(smartpa,hifi等),达到省功耗的目的。
具体地,HAL层检测到当前音量等级为0等级时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频 器件。
音频器件正在播放歌曲歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
用户调整用户音量等级,使得音量为0。audiopolicymanager模块获取该音量等级并计算得到音量,并将该音量通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级,使得音量从0变化为非0,再重新开启codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量为0时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量为非0时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
音频器件开始播放歌唱祖国,驱动侧播放歌唱祖国的流程可以如下:
音频器件在播放数据流之前,用户调整用户音量等级,使得音量为0。audiopolicymanager模块获取该音量等级并计算得到音量,并将该音量通过audioflinger模块传输至audio HAL层,HAL层通过逻辑控制,关闭codec和音频器件功放,达到省功耗的目的。如果用户再次调节音量等级,使得音量从0变化为非0,再重新开启codec和音频器件功放来播放歌唱祖国。
具体地,HAL层检测到当前音量为0时,将关闭音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来关闭音频器件。
HAL层检测到当前音量为非0时,将打开音频器件的命令写入内核节点/dev/snd/control0,内核收到命令后,会调用该命令所要控制的器件(smartpa,hifi等)对应的驱动逻辑,由器件驱动通过I2C等总线,GPIO等资源来控制音频器件的寄存器来开启音频器件。
本实施例提供的电子设备,通过根据第一操作指令对音量等级进行调整,当音量等级为0等级或音量为0时,关闭或不开启电子设备对音频数据流的播放。减少了功率消耗。
图8为本发明实施例提供的另一种电子设备的结构示意图。如图8所示,该电子设备包括:射频(Radio Frequency,RF)电路810、存储器820、输入单元830、显示单元840、音频电路850、处理器860、无线局域网(Wireless Local Area Networks,WLAN)模块870、电源880以及蓝牙模块890等部件。本领域技术人员可以理解,图8示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
RF电路810可用于收发信息,例如,连接移动宽带。通常,RF电路810包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路810还可以将移动带宽业务转发至WLAN模块870,以通过WLAN模块870将移动带宽业务转发给其他电子设备。其中,无线通信可以采用任一通信标准或协议,包括但不限于全球移动通讯***(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期 演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器820可用于存储程序指令,处理器860通过运行存储在存储器820的程序指令,从而使得该电子设备执行上述如图3所示的降低电子设备的功耗的方法。存储器820可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作***以及实现上述降低电子设备的功耗的方法所需的应用程序等。存储数据区可存储电子设备的列表信息以及该电子设备在执行上述应用程序授权方法时产生的数据等。此外,存储器820可包括易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM);所述存储器820也可以包括非易失性存储器(non-volatile memory),例如只读存储器(read-only memory,ROM),快闪存储器(flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)。所述存储器820还可以包括上述种类的存储器的组合。
输入单元830可用于接收用户输入的操作指令,包括开启WLAN热点指令、选择共享WLAN热点的电子设备的指令等。具体地,输入单元830可包括触控面板831以及其他输入设备832。触控面板831,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板831上或在触控面板831附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板831可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器860,并能接收处理器860发来的命令并加以执行。此外,输入单元830可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板831。除了触控面板831,输入单元830还可以包括其他输入设备832。具体地,其他输入设备832可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元840可用于显示由用户输入的信息或提供给用户的信息以及电子设备的各种菜单。显示单元840可包括显示屏841,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示屏841。进一步的,触控面板831可覆盖显示屏841,当触控面板831检测到在其上或附近的触摸操作后,传送给处理器860以确定触摸事件的类型,随后处理器860根据触摸事件的类型在显示屏841上提供相应的视觉输出。虽然在图8中,触控面板831与显示屏841是作为两个独立的部件来实现电子设备的输入和输入功能,但是在某些实施例中,可以将触控面板831与显示屏841集成而实现电子设备的输入和输出功能。
音频电路850、扬声器851,传声器852可提供用户与电子设备800之间的音频接口。音频电路850可将接收到的音频数据转换后的电信号,传输到扬声器851,由扬声器851转换为声音信号输出;另一方面,传声器852将收集的声音信号转换为电信号,由音频电路850接收后转换为音频数据,再将音频数据输出处理器860处理后,经RF电路810以发送给比如电子设备,或者将音频数据输出至存储器820以便进一步处理。
处理器860是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器820内音量等级或音量,以及调用存储在存储器820内的数据, 执行如图3所示的降低电子设备的功耗的方法。可选的,处理器860可包括一个或多个处理单元。优选的,处理器860可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作***、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器860中。
WLAN模块880可用于帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带WLAN互联网访问。WLAN属于短距离无线传输技术,电子设备可通过WLAN模块870接入WLAN热点,也可通过WLAN模块870开启WLAN热点,将移动带宽业务转发给其他电子设备。WLAN模块870还可进行Wi-Fi广播和扫描,以实现与周围其他电子设备的无线通信。
电子设备还包括给各个部件供电的电源880(比如电池),可选的,电源可以通过电源管理***与处理器860逻辑相连,从而通过电源管理***实现管理充电、放电、以及功耗等功能。
蓝牙模块890,可以是低功耗蓝牙(Bluetooth Low Energy,BLE)设备,也可以是传统蓝牙设备,也可以是支持传统蓝牙和BLE的双模蓝牙设备。蓝牙模块890与其他电子设备的蓝牙模块建立BLE或经典蓝牙连接,蓝牙模块890还可进行BR或BLE广播和扫描,以实现与周围其他电子设备的无线通信。
尽管未示出,电子设备还可以包括摄像头、扬声器等,在此不再赘述。
示例性的,可将RF电路810、蓝牙模块890以及WLAN模块870统称为无线通信接口。
示例性的,该电子设备包括处理器860、存储器820和无线通信接口。存储器820用于存储程序指令,输入单元830用户接收用户输入的第一操作指令,该第一操作指令用于调整电子设备的音量等级;处理器860用于根据存储器820中存储的程序指令执行下述操作:若音量等级为0等级或者音量为0,则关闭电子设备的音频器件。
在一个可能的实施例中,输入单元830还用于接收用户输入的第二操作指令,第二操作指令用于开启电子设备播放音频数据流;处理器860用于根据存储器820中存储的程序指令执行下述操作:若音量等级为0等级或者音量为0,则不开启电子设备的音频器件。
本实施例提供的电子设备,通过根据第一操作指令对音量等级进行调整,当音量等级为0等级或音量为0时,关闭或不开启电子设备对音频数据流的播放。减少了功率消耗。
专业人员应该还可以进一步意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、获取机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
结合本文中所公开的实施例描述的方法或算法的步骤可以用硬件、处理器执行的软件模块,或者二者的结合来实施。软件模块可以置于随机存储器(RAM)、内存、只读存储器(ROM)、电可编程ROM、电可擦除可编程ROM、寄存器、硬盘、可移动磁盘、CD-ROM、或技术领域内所公知的任意其它形式的存储介质中。
以上所述的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说 明,所应理解的是,以上所述仅为本发明的具体实施方式而已,并不用于限定本发明的保护范围,凡在本发明的精神和原则之内,所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。

Claims (10)

  1. 一种降低电子设备的功耗的方法,其特征在于,包括:
    接收用户输入的第一操作指令,所述第一操作指令用于调整所述电子设备的音量等级;
    若所述音量等级为0等级或者音量为0,则关闭所述电子设备的音频器件。
  2. 根据权利要求1所述的方法,其特征在于,所述设置所述电子设备的音量等级之后,所述方法还包括:
    根据所述音量等级,计算得到音量;
    若所述音量为0,则关闭所述电子设备的音频器件。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述音量等级,计算得到音量的步骤具体包括:
    根据所述音量等级确定所述音量等级对应的音量值;
    将所述音量值与音频数据流相乘,得到所述音量。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:
    接收用户输入的第二操作指令,所述第二操作指令用于开启所述电子设备播放音频数据;
    若所述音量等级为0等级,则不开启所述电子设备的音频器件。
  5. 根据权利要求1至3任一项所述的方法,其特征在于,所述方法还包括:
    接收用户输入的第二操作指令,所述第二操作指令用于开启所述电子设备播放音频数据流;
    若所述音量为0,则不开启所述电子设备的音频器件。
  6. 一种电子设备,其特征在于,包括:输入模块和处理模块;
    所述输入模块,用于接收用户输入的第一操作指令,所述第一操作指令用于调整所述电子设备的音量等级;
    若所述音量等级为0等级或者音量为0,所述处理模块,用于关闭所述电子设备的音频器件。
  7. 根据权利要求6所述的电子设备,其特征在于,所述电子设备还包括:计算模块;
    所述计算模块,用于根据所述音量等级,计算得到音量;
    若所述音量为0,所述处理模块,用于关闭所述电子设备的音频器件。
  8. 根据权利要求7所述的电子设备,其特征在于,所述计算模块具体用于:
    根据所述音量等级确定所述音量等级对应的音量值;
    将所述音量值与音频数据流相乘,得到所述音量。
  9. 根据权利要求6-8任一项所述的电子设备,其特征在于,所述输入单元还用于:
    接收用户输入的第二操作指令,所述第二操作指令用于开启所述电子设备播放音频数据流;
    若所述音量等级为0时,所述处理模块用于不开启所述电子设备的音频器件。
  10. 根据权利要求6-8任一项所述的电子设备,其特征在于,所述输入单元还用于:
    接收用户输入的第二操作指令,所述第二操作指令用于开启所述电子设备播放音频数据流;
    若所述音量为0,所述处理模块用于不开启所述电子设备的音频器件。
PCT/CN2018/110398 2017-10-16 2018-10-16 降低电子设备的功耗的方法以及电子设备 WO2019076289A1 (zh)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201710970314 2017-10-16
CN201710970314.8 2017-10-16
CN201810224989.2A CN109673042A (zh) 2017-10-16 2018-03-19 降低电子设备的功耗的方法以及电子设备
CN201810224989.2 2018-03-19

Publications (1)

Publication Number Publication Date
WO2019076289A1 true WO2019076289A1 (zh) 2019-04-25

Family

ID=66142689

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/110398 WO2019076289A1 (zh) 2017-10-16 2018-10-16 降低电子设备的功耗的方法以及电子设备

Country Status (2)

Country Link
CN (1) CN109673042A (zh)
WO (1) WO2019076289A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110989816B (zh) * 2019-09-24 2022-01-14 华为技术有限公司 应用的处理方法、装置以及存储介质
CN111309282B (zh) * 2020-02-11 2023-08-22 RealMe重庆移动通信有限公司 音频设备功耗控制方法、装置、音频设备及存储介质
CN113971014A (zh) * 2021-10-28 2022-01-25 歌尔光学科技有限公司 音视频设备的静音方法、装置、音视频设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101335852A (zh) * 2008-07-31 2008-12-31 中兴通讯股份有限公司 一种移动电视的终端播放方法和移动终端
WO2009124806A1 (en) * 2008-04-09 2009-10-15 Telefonaktiebolaget L M Ericsson (Publ) Discontinuous reception of bursts for voice calls
CN101848280A (zh) * 2009-03-25 2010-09-29 深圳富泰宏精密工业有限公司 静音播放音乐的省电***及方法
CN107197362A (zh) * 2016-03-15 2017-09-22 广州市动景计算机科技有限公司 一种播放多媒体信息的方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009124806A1 (en) * 2008-04-09 2009-10-15 Telefonaktiebolaget L M Ericsson (Publ) Discontinuous reception of bursts for voice calls
CN101335852A (zh) * 2008-07-31 2008-12-31 中兴通讯股份有限公司 一种移动电视的终端播放方法和移动终端
CN101848280A (zh) * 2009-03-25 2010-09-29 深圳富泰宏精密工业有限公司 静音播放音乐的省电***及方法
CN107197362A (zh) * 2016-03-15 2017-09-22 广州市动景计算机科技有限公司 一种播放多媒体信息的方法及装置

Also Published As

Publication number Publication date
CN109673042A (zh) 2019-04-23

Similar Documents

Publication Publication Date Title
WO2018121148A1 (zh) 一种通信资源选择方法,手持智能终端及接入设备
WO2015085959A1 (zh) 语音处理方法及装置
WO2021184920A1 (zh) 一种声音的掩蔽方法、装置及终端设备
US10950238B2 (en) Bluetooth speaker base, method and system for controlling thereof
KR100650398B1 (ko) 프리앰블을 측정하여 효과적인 슬립 주기를 결정하는와이브로 단말기 및 방법
WO2018000290A1 (zh) 管理蓝牙连接的方法、蓝牙主设备和装置
JP2009505545A (ja) コンテキスト情報を使って通話中音声ユーザインタフェースを実装する装置及び方法
WO2019076289A1 (zh) 降低电子设备的功耗的方法以及电子设备
WO2019029618A1 (zh) Ims语音通话网络的切换方法、存储设备及移动终端
CN106982286B (zh) 一种录音方法、设备和计算机可读存储介质
US11076354B2 (en) Cell handover method and terminal device
WO2017215661A1 (zh) 一种场景音效的控制方法、及电子设备
JP7252259B2 (ja) アクセス制御方法、メッセージ放送方法及び関連装置
WO2021169869A1 (zh) 音频播放装置、音频播放方法及电子设备
WO2023173702A1 (zh) 无线远距离配网方法、控制中心及设备
WO2019011231A1 (zh) 降低移动终端sar值的方法及存储介质、移动终端
WO2017214771A1 (zh) 下行数据传输方法和装置
WO2014078986A1 (zh) 一种终端及自动接听来电的方法
WO2019242482A1 (zh) 一种命令处理方法及终端设备
WO2017049933A1 (zh) 一种直通呼叫通信方法及终端
WO2022021787A1 (zh) 一种天线控制方法、装置及终端设备
KR100650060B1 (ko) 상대방 단말기의 통화 음량을 자동적으로 조절하는 이동통신 단말기 및 방법
WO2014086292A1 (zh) 一种由被叫终端决定主叫终端回铃音的方法及终端
WO2016023201A1 (zh) 一种并发业务的处理方法及终端
US11477591B2 (en) Audio data processing method, terminal device, and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18868767

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18868767

Country of ref document: EP

Kind code of ref document: A1