A method for reducing power consumption in a bluetooth device and a bluetooth device
By introducing a dedicated buffer and power management unit into the Bluetooth device and setting sleep and hold modes, the problem of high power consumption in Bluetooth headsets is solved, achieving a significant reduction in power consumption and an extension of usage time without affecting normal operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI JUXIN INTELLIGENT TECH CO LTD
- Filing Date
- 2021-07-28
- Publication Date
- 2026-05-12
AI Technical Summary
Bluetooth headsets consume a lot of power, resulting in a short usage time. Existing hardware optimization methods have high requirements for hardware design and are difficult to effectively reduce power consumption without affecting normal operation.
By introducing a dedicated buffer and power management unit into the Bluetooth device, setting the system hardware to sleep mode and caching data in audio hardware hold mode, the non-real-time nature of Bluetooth audio data is utilized to enter sleep mode during idle time and resume working mode when woken up.
It effectively reduces the average power consumption of Bluetooth devices and extends battery life, especially in Bluetooth music playback scenarios where power consumption is significantly reduced without affecting the normal operation of the device.
Smart Images

Figure CN115696285B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of electronic technology, and more particularly to a method for reducing power consumption in Bluetooth devices and Bluetooth devices. Background Technology
[0002] In recent years, with the widespread adoption of smartphones, Bluetooth wireless communication technology has been widely used. Among these applications, peripheral audio extension devices for products such as mobile phones, computers, and televisions, such as Bluetooth headsets and Bluetooth speakers, have garnered significant attention. Since mobile phone manufacturers no longer include wired headphones in their packages, consumers now need to purchase them separately, making Bluetooth headsets a hot market trend. The sound quality and battery life of Bluetooth headsets are key factors for consumers when making a purchase.
[0003] Due to their size, Bluetooth headphones cannot carry large-capacity batteries, especially in-ear headphones, which typically have batteries with capacities of only tens of milliamp-hours. High power consumption in Bluetooth headphones leads to short usage time. Since listening to music via Bluetooth is the most common use case for Bluetooth headphones, power consumption during music playback becomes a crucial performance indicator. To improve Bluetooth music playback time, manufacturers have made significant efforts to reduce power consumption in their hardware. However, most of these efforts are purely hardware-based, such as designing powergate (dynamic switching) technology for dynamic power control, and reducing manufacturing processes and operating voltages to lower static power consumption. These undoubtedly require a high level of hardware design expertise from each manufacturer.
[0004] Therefore, a new method to reduce the power consumption of Bluetooth devices is urgently needed. Summary of the Invention
[0005] In view of this, the main objective of this invention is to provide a method for reducing power consumption in the Bluetooth device, which can effectively reduce the power consumption of the Bluetooth device without affecting its normal operation.
[0006] This invention is implemented as follows: a method for reducing power consumption in a Bluetooth device, the Bluetooth device including system hardware and audio hardware; the method includes:
[0007] (1) Process the audio signal to generate cached data, and store the cached data in a dedicated cache;
[0008] (2) Set the system hardware to sleep mode and the audio hardware to hold mode;
[0009] (3) When the sleep mode duration reaches the wake-up preset condition, the system hardware is woken up and restored to working mode.
[0010] Furthermore, the method further includes: when the cached data in the dedicated cache reaches a predetermined threshold, repeating and cyclically executing steps (1) to (3).
[0011] Furthermore, the method further includes: saving the operating state of the system hardware and the audio hardware to a fixed location variable in an SRAM cell.
[0012] Furthermore, when the Bluetooth device is a receiving device, the dedicated buffer is a front-end buffer, which is a dedicated memory inside the playback unit of the receiving device; the audio signal is Bluetooth audio data; step (1) includes: receiving the Bluetooth audio data and decoding it into PCM data, and storing the PCM data in the front-end buffer.
[0013] Furthermore, the sleep mode includes: powering off the system hardware via the power management unit; the hold mode includes: continuing to play the PCM data cached in the front-end buffer at the current rate.
[0014] Furthermore, the audio hardware configured in hold mode includes: a BT unit, a RAM unit, a playback unit, and a timer; the system hardware configured in sleep mode includes: other hardware units of the Bluetooth device besides the audio hardware.
[0015] Furthermore, the wake-up preset condition is the sleep mode retention time T1, and the sleep mode retention time T1 is less than the PCM data duration T2 in the front-end buffer.
[0016] Furthermore, step (3) further includes: when the timer holding time T1 is reached, a wake-up signal is sent to the power management unit, the power management unit wakes up the CPU unit according to the wake-up signal, and the CPU unit re-powers the system hardware to restore the working mode according to the working state in the fixed location variable of the SRAM unit.
[0017] Furthermore, when the Bluetooth device is a transmitting device, the dedicated buffer is a back-end buffer, the audio signal is an analog audio signal or an audio digital signal, and step (1) includes: receiving the analog audio signal collected by the sound data acquisition unit and converting it into PCM data or storing the collected digital audio signal as PCM data, and storing the PCM data in the back-end buffer.
[0018] Furthermore, the sleep mode includes: powering off the system hardware via the power management unit; the hold mode is: acquiring the audio analog signal or the audio digital signal, processing it into PCM data, and then storing it in the back-end buffer.
[0019] Furthermore, the audio hardware configured in hold mode includes: a BT unit, a RAM unit, a sound data acquisition unit, and a timer; the system hardware configured in sleep mode includes: other hardware units besides the audio hardware.
[0020] Furthermore, the wake-up preset condition is that the current cache amount reaches a predetermined proportion of the total cache amount of the backend cache.
[0021] Further, the data duration T3 that the backend buffer can cache is calculated based on the current sampling rate. The wake-up preset condition is the sleep mode retention time T4, and the data duration T3 is greater than the retention time T4. Step (3) further includes: when the timer retention time T4 is reached, a wake-up signal is sent to the power management unit. The power management unit wakes up the CPU unit according to the wake-up signal. The CPU unit re-powers the system hardware to restore the working mode according to the working state in the fixed position variable of the SRAM unit.
[0022] Furthermore, when the Bluetooth device is a transmitting device, the dedicated buffer is a signal transmitting buffer, which is a dedicated memory inside the transmitting unit. The audio signal is Bluetooth audio data to be transmitted. Step (1) includes: receiving the PCM data to be transmitted and encoding and packaging it into Bluetooth audio data to be transmitted, and storing the Bluetooth audio data to be transmitted in the signal transmitting buffer.
[0023] Furthermore, the sleep mode includes: powering off the system hardware via the power management unit; the hold mode includes: continuing to transmit the Bluetooth audio data to be transmitted cached in the signal transmission buffer.
[0024] In another aspect of the embodiments of the present invention, the main objective of the embodiments of the present invention is to provide a Bluetooth device that can effectively reduce the power consumption of the Bluetooth device without affecting its normal operation.
[0025] This invention is implemented as follows: a Bluetooth device includes system hardware and audio hardware; the Bluetooth device further includes:
[0026] An audio processing device used to process audio signals and generate buffered data;
[0027] A dedicated cache is used to store the cached data;
[0028] The power management unit is used to set the system hardware to sleep mode and the audio hardware to hold mode; the power management unit is also used to wake up the system hardware and restore it to working mode when the hold time of sleep mode reaches the wake-up preset condition.
[0029] Furthermore, the Bluetooth device further includes an SRAM unit for storing the operating states of the system hardware and the audio hardware in a fixed location variable.
[0030] Furthermore, the Bluetooth device is a receiving device, the dedicated buffer is a front-end buffer, and the front-end buffer is the dedicated memory inside the playback unit of the receiving device; the audio signal is Bluetooth audio data; the audio processing unit is used to receive the Bluetooth audio data and decode it into PCM data, and store the PCM data in the front-end buffer.
[0031] Furthermore, the power management unit is used to power off the system hardware to enter sleep mode; the power management unit is also used to maintain power supply to the audio hardware to enter hold mode, and play the PCM data cached in the front-end buffer at the current rate.
[0032] Furthermore, the audio hardware includes: a BT unit, a RAM unit, a playback unit, and a timer; the system hardware includes: other hardware units in the Bluetooth device besides the audio hardware; the timer is used to send a wake-up signal to the power management unit when the hold time T1 is reached; the power management unit is used to wake up the CPU unit according to the wake-up signal; the CPU unit is used to restore the system hardware to working mode by re-powering it according to the working state in the fixed location variable of the SRAM unit.
[0033] Furthermore, the Bluetooth device is a transmitting device, which includes a sound data acquisition unit; the dedicated buffer is a back-end buffer; the audio signal is an analog audio signal or a digital audio signal; the audio processing unit is used to receive the analog audio signal acquired by the sound data acquisition unit, convert it into PCM data, or store the acquired digital audio signal as PCM data, and store the PCM data in the back-end buffer.
[0034] Furthermore, the power management unit is used to power off the system hardware to enter sleep mode; the power management unit is used to maintain power supply to the audio hardware to enter hold mode, collect the audio analog signal or the audio digital signal, process it into PCM data, and store it in the back-end buffer.
[0035] Furthermore, the audio hardware includes: a BT unit, a RAM unit, a sound data acquisition unit, and a timer; the system hardware includes: other hardware units in the Bluetooth device besides the audio hardware.
[0036] Furthermore, the back-end memory includes a computing unit for calculating the data duration T3 that the back-end buffer can cache based on the current sampling rate. The wake-up preset condition is the sleep mode hold time T4, and the data duration T3 is greater than the hold time T4. The timer is used to send a wake-up signal to the power management unit when the timer hold time T4 is reached. The power management unit is used to wake up the CPU unit according to the wake-up signal. The CPU unit is used to restore the system hardware to working mode by re-powering it according to the working state in the fixed location variable of the SRAM unit.
[0037] Furthermore, the Bluetooth device is a transmitting device, the dedicated buffer is a signal transmission buffer, the signal transmission buffer is a dedicated memory inside the transmitting unit, the audio signal is Bluetooth audio data to be transmitted, the audio processing unit is used to receive the PCM data to be transmitted, encode and package it into Bluetooth audio data to be transmitted, and store the Bluetooth audio data to be transmitted in the signal transmission buffer.
[0038] Furthermore, the power management unit is used to power off the system hardware to enter sleep mode; the power management unit is also used to maintain power supply to the audio hardware to enter hold mode and continue transmitting the Bluetooth audio data to be transmitted buffered in the signal transmission buffer.
[0039] According to the above technical solution, the embodiments of the present invention have the following effects: By combining hardware and software, Bluetooth headphones can enter a sleep state even when listening to music via Bluetooth, thus significantly reducing average power consumption; based on the non-real-time and delayed nature of Bluetooth audio data push from mobile phones or other transmitting devices, a sleep transmission state is innovatively introduced, thereby greatly reducing the power consumption of Bluetooth headphones in Bluetooth music listening scenarios. For Bluetooth transmitting devices, based on the non-real-time and delayed nature of Bluetooth audio data transmission, a sleep state for the audio acquisition module is innovatively introduced, thereby greatly reducing the power consumption of Bluetooth transmitting devices in Bluetooth music listening scenarios. Using this solution, battery wear on Bluetooth devices is effectively reduced, significantly extending battery life. Attached Figure Description
[0040] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0041] Figure 1This application provides a flowchart of a method for reducing power consumption in Bluetooth devices.
[0042] Figure 2 This application provides a circuit block diagram for reducing the power consumption of Bluetooth devices.
[0043] Figure 3 This application provides a schematic diagram of a process for reducing the power consumption of Bluetooth devices.
[0044] Figure 4 This application provides a circuit block diagram of another embodiment for reducing the power consumption of Bluetooth devices.
[0045] Figure 5 This illustration shows a flowchart of another embodiment of the method for reducing power consumption of Bluetooth devices provided in this application. Detailed Implementation
[0046] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0047] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0048] The key use case for Bluetooth headphones is Bluetooth music playback. Generally, Bluetooth headphones have a sniff (breathing mode) function. When a phone connects to the Bluetooth headphones, if the phone doesn't push any songs to the headphones, the phone will set the current Bluetooth connection to sniff mode. In this state, the headphone's Bluetooth hardware will only communicate with the phone at relatively long intervals. During the gaps between communication sessions, the headphones can enter a special state. In this state, the headphones will turn off the power to all hardware except for the SRAM and BT units, including the power-intensive CPU. This state is called SLEEP&BT mode. Before the Bluetooth communication timeout expires, the Bluetooth hardware will wake up the CPU, which will return to its state before disconnection and restore the working state of other hardware based on the information stored in the SRAM unit.
[0049] When the headphones are in SLEEP & BT mode, power consumption is lowest because only the Bluetooth and SRAM units (which are in powergate mode) are powered on, while other hardware is powered off. Conversely, power consumption is highest when the headphones are in Bluetooth music playback mode, as all hardware modules are active.
[0050] The embodiments provided by this invention, through a combination of hardware and software, enable Bluetooth headphones to enter SLEEP & BT mode even when listening to music via Bluetooth, thereby significantly reducing average power consumption. When a mobile phone pushes songs to the headphones via Bluetooth, the headphones' BT unit needs to send and receive Bluetooth data, and the CPU unit needs to process the sent and received Bluetooth audio data, making it impossible to enter SLEEP & BT mode. However, based on the fundamental principle of Bluetooth music playback, the phone doesn't constantly transmit Bluetooth data to the earphones, especially TWS earphones. Since TWS earphones need to forward data from the phone to the secondary earphone, manufacturers use a time-slice polling method for Bluetooth reception and forwarding. This time is approximately 40ms to 60ms. The primary earphone processes Bluetooth data in the following order: (40ms receiving Bluetooth data from the phone) -> (40ms forwarding Bluetooth data to the secondary earphone) -> (40ms receiving Bluetooth data from the phone) -> (40ms forwarding Bluetooth data to the secondary earphone), and so on. This means the phone cannot transmit Bluetooth data to the earphones in real time. Therefore, the phone's Bluetooth transmission method is generally like this: after each batch of Bluetooth data is sent, there is a gap in between. So, in reality, Bluetooth over-the-air transmission is neither real-time nor frequent during Bluetooth music playback; it can be delayed. This is why Bluetooth music playback generally has a relatively large latency. Earphones often buffer a longer amount of audio data to prevent sound interruptions due to this transmission delay. This invention utilizes the aforementioned technical principle to take advantage of the 40-60ms interval, allowing the headphones to enter a state similar to SLEEP & BT during this time period, thereby reducing power consumption. The principles of this invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0051] like Figure 1 As shown, this invention provides a method for reducing power consumption in a Bluetooth device, the Bluetooth device including system hardware and audio hardware; the method includes:
[0052] S101, Process the audio signal to generate buffer data, and store the buffer data in a dedicated buffer;
[0053] S102, set the system hardware to sleep mode and the audio hardware to hold mode;
[0054] S103, when the sleep mode duration reaches the wake-up preset condition, the system hardware is woken up and restored to working mode.
[0055] When the cached data in the dedicated cache reaches a predetermined threshold, the above steps are repeated and executed cyclically.
[0056] like Figure 3 The diagram illustrates a process for reducing power consumption in Bluetooth devices according to an embodiment of the present invention. In this embodiment, the Bluetooth device is a receiving device, and a Bluetooth headset is used as an example. The dedicated buffer is a front-end buffer, which is dedicated memory within the playback unit. The audio signal is Bluetooth audio data. Processing the audio signal to generate buffered data specifically involves receiving the Bluetooth audio data, decoding it into PCM data, and storing the PCM data in the front-end buffer. The front-end buffer is used to cache hardware buffering that continues to maintain headphone speaker sound playback when the CPU is powered off or the software stops running. In hardware design, it is integrated with the playback unit and is dedicated memory within the playback unit.
[0057] The audio hardware portion of this invention incorporates a front-end buffer. This buffer caches PCM music data for a specific duration, and the playback unit can operate independently in SLEEP & BT mode, continuously outputting the cached PCM audio data at the current sampling rate. Typically, headphone buffers refer to general-purpose memory connected to the data bus, accessible to software via CPU read / write instructions. However, the front-end buffer is a dedicated memory designed within the playback unit, inaccessible directly to CPU instructions. Instead, it requires writing to the playback unit's input register, transferring the data to the front-end buffer. Even when the CPU and data bus are powered off, the playback unit and its internal front-end buffer can continue operating, converting the digital audio in the buffer into analog signals, amplifying them, and outputting them to the speaker.
[0058] In step S102, the sleep mode includes: powering off the system hardware via the power management unit; the hold mode includes: continuing to play the cached PCM data at the current rate. The wake-up preset condition is the hold time T1 of the sleep mode, which is less than the duration T2 of the PCM data in the front-end buffer. Specifically, after receiving the mobile phone song data and decoding it into PCM data, the software caches the PCM data in the front-end buffer. When the data in the front-end buffer accumulates to a certain level, such as 30ms, the software sets the hardware to enter the following mode: setting the system hardware to sleep mode, setting the playback unit to hold mode, and continuing to play the cached PCM audio data in the front-end buffer at the current rate. The audio hardware set to hold mode includes: a BT unit, a RAM unit, a playback unit, and a timer; the system hardware set to sleep mode includes: other hardware units of the Bluetooth device besides the audio hardware. Those skilled in the art will understand that for a receiving device like headphones, the playback unit is the headphone's sound data playback unit, typically a DAC unit, and correspondingly, the front-end buffer is a DAC front-end buffer. However, for non-headphone devices, such as large speakers, whose playback units include i2s / spdif / spi / hdmi units, the technical solution provided in this embodiment of the invention can be configured with a buffer accordingly.
[0059] Taking headphones as an example, the hardware in hold mode is the audio hardware, including the BT unit, RAM unit, DAC unit, and timer; the hardware in sleep mode is the Bluetooth device's system hardware, mainly including the CPU unit, DSP unit, and ADC unit, as well as other system hardware such as DMA, PWM, GPIO, SD card, I2S, SPDIF, LCD, SPI, IRC, USB, FM, I2C, and UART—that is, hardware units other than the BT unit, RAM unit, DAC unit, timer, and power management unit. Figure 2 As shown, the current state of all hardware except the BT unit, RAM unit, DAC unit, and timer, including whether the power management unit is supplying power normally, the current operation and its content, and internal register values, which can be used to restore the working state, are saved to a fixed location variable in the SRAM unit. The power management unit register is then set to disconnect the power supply to all hardware modules except the BT unit, RAM unit, DAC unit, and timer. The entire SOC (System on a Chip) then enters the SLEEP&BT state. For the next 30ms, the entire SOC remains in the SLEEP&BT&AUDIO mode, which is the sleep mode entered by the system hardware as described in this embodiment of the invention, where power consumption is at its lowest.
[0060] In step S103, when the sleep mode duration reaches the preset wake-up condition, the system hardware is woken up and restored to working mode. A hardware timer is set to wake up after a sleep duration of T1, for example, after 30ms. When the timer duration T1 is reached, a wake-up signal is sent to the power management unit. The power management unit wakes up the CPU unit based on the wake-up signal. The CPU unit then re-powers the system hardware to restore working mode based on the working state stored in the fixed-position variables of the SRAM unit. Specifically, when the hardware timer reaches 30ms, a wake-up signal is triggered. After the power management unit detects the wake-up signal, it re-powers the CPU unit, and the CPU unit resumes its working state. The software running in the CPU resets the system hardware based on the state data of each hardware module saved in the SRAM unit before entering sleep mode, and restores the system hardware to its working state. Taking the DSP as an example, if the DSP was performing SBC decoding before entering sleep mode, after waking from sleep mode, the CPU unit will reload the DSP firmware and restore the DSP's state to the state before the DSP was powered off, continuing to receive and decode Bluetooth data and cache it in the DAC front-end buffer. When the data in the DAC front-end buffer accumulates to a certain level and reaches a predetermined threshold, such as when the buffered data duration reaches 30ms, the entire process S101, S102, and S103 is re-executed and repeated in a loop.
[0061] The following example illustrates the power reduction method described above. Through the steps above, the headphones will alternate between the sleep state (lowest power consumption) and the working state (highest power consumption). The higher the proportion of time spent in the sleep state, the lower the overall system power consumption. Generally, this time ratio can reach 1 / 3 or even more, and the power reduction ratio can also reach 1 / 3 or even more, which can play a significant role in extending the usage time in Bluetooth music listening scenarios.
[0062] Taking headphones as an example: the power consumption when not in use is 150uA, and the power consumption when in normal operation is 8mA. In every 80ms Bluetooth transmission time, 50ms is idle time and 30ms is transmission time. 30ms of this 50ms is used for sleep, audio, and audio timing. If the power consumption in sleep mode is reduced to 1mA, the power consumption after implementation is (30ms*1mA + 50ms*8mA) / 80ms = 5.375mA, a reduction of 2.625mA, compared to the original 8mA, a 32% reduction. If 45ms of the 50ms is used for sleep mode timing, the power consumption after implementation is (45ms*1mA + 35ms*8mA) / 80ms = 4.0625mA, a 49% reduction. This data shows that this technical solution can effectively reduce the power consumption of Bluetooth headphones without affecting normal music playback.
[0063] This invention also provides another embodiment, whereby the aforementioned power reduction method can be used not only in Bluetooth headsets but also in other portable Bluetooth transmitting devices requiring low power consumption, such as Bluetooth watches. This invention embodiment addresses the application scenario of Bluetooth transmitting devices collecting sound data. The following is in conjunction with… Figure 4 and Figure 5 The embodiments of the present invention will be described as follows: Figure 5 The diagram shown is a flowchart of an embodiment of the present invention for reducing the power consumption of Bluetooth devices. The Bluetooth device is a transmitting device that collects sound data and sends it to a Bluetooth receiving device.
[0064] When the Bluetooth device is a transmitting device, the dedicated buffer is a back-end buffer, and the audio signal is an analog audio signal or an digital audio signal. Step S101, processing the audio signal to generate buffer data, specifically includes: receiving the analog audio signal acquired by the sound data acquisition unit, converting it into PCM data (analog-to-digital conversion) or storing the acquired digital audio signal as PCM data, and storing the PCM data in the back-end buffer. The sound data acquisition unit has two modes: one is to acquire analog audio signals and then perform ADC conversion (the sound data acquisition unit is an ADC unit); the other is a digital acquisition unit where the acquired audio signal has been directly converted into PCM data. The acquisition unit may include an I2S unit, an SPDIF unit, or an SPI unit. Step S102's sleep mode includes: powering off the system hardware through the power management unit; the hold mode is: acquiring the analog audio signal or the digital audio signal, processing it into PCM data, and then storing it in the back-end buffer. The audio hardware set to hold mode includes a BT unit, a RAM unit, a sound data acquisition unit, and a timer; the system hardware set to sleep mode includes other hardware units besides the audio hardware. Specifically, the hardware in hold mode is the audio hardware, including the BT unit, RAM unit, sound data acquisition unit, and timer; the hardware units in sleep mode are the system hardware of the Bluetooth device, mainly including the CPU unit, DSP unit, and DAC unit, and also including other system hardware such as DMA, PWM, GPIO, SD card, I2S, SPDIF, LCD, SPI, IRC, USB, FM, I2C, and UART, that is, other hardware units besides the BT unit, RAM unit, sound data acquisition unit, timer, and power management unit. The wake-up preset condition in step S103 is that the current cache size reaches a predetermined proportion of the total cache size of the backend cache. The data duration T3 that the backend buffer can cache is calculated based on the current sampling rate. The wake-up preset condition is the sleep mode retention time T4, and the data duration T3 is greater than the retention time T4. When the timer's retention time T4 is reached, a wake-up signal is sent to the power management unit. The power management unit wakes up the CPU unit according to the wake-up signal. The CPU unit restores power to the system hardware to return to the working mode according to the working state in the fixed location variable of the SRAM unit.
[0065] Combination Figure 4The above process is described exemplarily. The sound data acquisition unit operates independently, converting the analog sound signal on the microphone input signal line into a digital signal and saving it to the back-end buffer. Those skilled in the art will understand that if digital signals are being acquired, PCM data can be stored directly without conversion to digital signals. When the timer reaches T4, or when the buffer size of the back-end buffer reaches a predetermined percentage of its total capacity, the timer or the sound data acquisition unit triggers a wake-up signal to the power management unit. The power management unit then powers the CPU back on. The CPU unit, based on the operating state stored in a fixed location variable in the SRAM (i.e., the operating state of the system hardware before sleep), restores the system hardware to operating mode. In operating mode, the CPU unit retrieves PCM data from the back-end buffer and sends it to the audio encoder for encoding. The encoder encodes compressed audio data, which the CPU unit sends to the Bluetooth module for Bluetooth transmission. If the data in the back-end buffer is empty, the CPU unit saves the current operating state of each system hardware component to a fixed location variable in the SRAM, and the power management unit powers off the system hardware to enter sleep mode.
[0066] Depending on the audio data acquisition unit, the back-end buffer can be any one of the following: an ADC back-end buffer, an I2S back-end buffer, an SPDIF back-end buffer, or an SPI back-end buffer; wherein the ADC back-end buffer is dedicated internal memory of the ADC unit, the I2S back-end buffer is dedicated internal memory of the I2S unit, the SPDIF back-end buffer is dedicated internal memory of the SPDIF unit, and the SPI back-end buffer is dedicated internal memory of the SPI unit. The following is a separate explanation for different audio data acquisition units.
[0067] (1) SLEEP&BT&LINEIN_MICIN mode refers to the audio processing method when receiving analog signal input through an analog signal interface or microphone. In Bluetooth transmission mode, an ADC back-end buffer is added at the back end of the linein / micin. The sound picked up by the linein / micin is first buffered in the ADC back-end buffer. The SoC is then put into SLEEP&BT&LINEIN_MICIN mode. When the ADC back-end buffer reaches a certain percentage, such as 80%, the linein / micin hardware wakes up the CPU unit before audio encoding and Bluetooth transmission are performed uniformly. Alternatively, the software calculates the amount of sound that the ADC back-end buffer can buffer based on the current sampling rate, and the CPU unit is woken up by a hardware timer.
[0068] (2) SLEEP&BT&I2SIN mode refers to the audio processing method when receiving sound and directly obtaining I2S signals. In Bluetooth transmission mode, an I2S back-end buffer is added to the I2S back-end to buffer the PCM data picked up by the I2S. The SOC is then put into SLEEP&BT&I2SIN mode. When the I2S back-end buffer reaches a certain percentage, such as 80%, the CPU unit is woken up by the I2S hardware before audio encoding and Bluetooth transmission are performed uniformly. Alternatively, the software calculates the amount of sound that the I2S back-end buffer can buffer based on the current sampling rate, and the CPU unit is woken up by a hardware timer.
[0069] (3) SLEEP&BT&SPDIFIN mode refers to the audio processing method when receiving sound and directly obtaining the SPDIF signal. In Bluetooth transmission mode, an SPDIF back-end buffer is added to the SPDIF back-end. The PCM data picked up by SPDIF is first buffered in the SPDIF back-end buffer. The SoC enters the SLEEP&BT&SPDIFIN mode. When the SPDIF back-end buffer reaches a certain percentage, such as 80%, the CPU unit is woken up by the SPDIF hardware before audio encoding and Bluetooth transmission are performed uniformly. Alternatively, the software calculates the sound time that the SPDIF back-end buffer can buffer based on the current sampling rate, and the CPU unit is woken up by a hardware timer.
[0070] (4) SLEEP&BT&SPI mode refers to the audio processing method when receiving sound and directly obtaining the SPI signal. In Bluetooth transmission mode, an SPI back-end buffer is added to the SPI back-end to buffer the PCM data received by SPI. The SoC enters the SLEEP&BT&SPI mode. When the SPI back-end buffer reaches a certain percentage, such as 80%, the CPU unit is woken up by the SPI hardware before audio encoding and Bluetooth transmission are performed uniformly. Alternatively, the software calculates the sound time that the SPI back-end buffer can buffer based on the current sampling rate, and the CPU unit is woken up by a hardware timer.
[0071] This invention also provides another embodiment. The above-mentioned power reduction method can be used not only for sound acquisition in Bluetooth headsets and Bluetooth transmitting devices, but also for Bluetooth transmitting hosts in music playback scenarios. When the Bluetooth device is a transmitting device, the dedicated buffer is a signal transmission buffer, which is a dedicated memory inside the transmitting unit. The audio signal is Bluetooth audio data to be transmitted. Step S101, processing the audio signal to generate buffered data, specifically includes: receiving PCM data to be transmitted and encoding and packaging it into Bluetooth audio data to be transmitted, and storing the Bluetooth audio data to be transmitted in the signal transmission buffer. The sleep mode in step 102 includes: powering off the system hardware through the power management unit; the hold mode includes: continuing to transmit the Bluetooth audio data to be transmitted buffered in the signal transmission buffer.
[0072] The present invention also provides another embodiment, which is a Bluetooth device for reducing power consumption corresponding to the foregoing embodiments. The Bluetooth device includes system hardware and audio hardware; the Bluetooth device further includes:
[0073] An audio processing device used to process audio signals and generate buffered data;
[0074] A dedicated cache is used to store the cached data;
[0075] The power management unit is used to set the system hardware to sleep mode and the audio hardware to hold mode; the power management unit is also used to wake up the system hardware and restore it to working mode when the hold time of sleep mode reaches the wake-up preset condition.
[0076] The hardware of the Bluetooth device described above will be explained in detail below through several different embodiments.
[0077] This invention provides an embodiment, such as... Figure 2 As shown, the Bluetooth device is a receiving device, such as a Bluetooth headset; the dedicated buffer is a DAC front-end buffer, which is a dedicated memory within the DAC unit; the audio signal is Bluetooth audio data; the specific process for processing the audio signal to generate buffered data is: receiving the Bluetooth audio data and decoding it into PCM data, and storing the PCM data in the DAC front-end buffer. The DAC front-end buffer is used to cache hardware buffers that continue to maintain sound playback from the headphone speaker when the CPU is powered off or the software stops running. In hardware design, it is integrated with the DAC unit and is a dedicated memory within the DAC. The Bluetooth device further includes an SRAM unit for storing the operating states of the system hardware and the audio hardware in a fixed-location variable.
[0078] The audio hardware portion of this invention incorporates a DAC front-end buffer. This buffer can cache PCM music data for a certain period, and the DAC unit can operate independently in SLEEP & BT mode, continuously outputting the PCM audio data cached in the DAC front-end buffer at the current sampling rate. Typically, headphone buffers refer to general-purpose memory connected to the data bus, accessible to software via CPU read / write instructions. In contrast, the DAC front-end buffer is a dedicated memory designed within the DAC, inaccessible directly to CPU instructions. It requires writing to the DAC's input registers, transferring the data from the DAC unit to the DAC front-end buffer. Even when the CPU unit and data bus are powered off, the DAC and its internal DAC front-end buffer can continue operating, converting the digital audio in the DAC front-end buffer into analog signals, amplifying them, and outputting them to the speakers.
[0079] The power management unit is used to power off the system hardware to enter sleep mode; the power management unit is also used to maintain power supply to the audio hardware to enter hold mode, playing PCM data buffered in the DAC back-end buffer at the current rate. The audio hardware includes a BT unit, a RAM unit, a DAC unit, and a timer; the system hardware includes other hardware units in the Bluetooth device besides the audio hardware; the timer is used to send a wake-up signal to the power management unit when the hold time T1 is reached; the power management unit is used to wake up the CPU unit according to the wake-up signal; the CPU unit is used to restore power to the system hardware to its working mode according to the working state in the fixed location variable of the SRAM unit.
[0080] Specifically, the system hardware is powered off via the power management unit; the hold mode includes continuing to play PCM data cached in the DAC back-end buffer at the current rate. The wake-up preset condition is the hold time T1 of the sleep mode, which is less than the duration T2 of the PCM data in the DAC front-end buffer. Specifically, after receiving song data from the mobile phone and decoding it into PCM data, the software caches the PCM data in the DAC front-end buffer. When the data in the DAC front-end buffer accumulates to a certain level, such as 30ms, the software sets the hardware to enter the following mode: setting the system hardware to sleep mode, setting the DAC unit to hold mode, and continuing to play the PCM audio data cached in the DAC back-end buffer at the current rate. The audio hardware set to hold mode includes: the BT unit, RAM unit, DAC unit, and timer; the system hardware set to sleep mode includes: other hardware units of the Bluetooth device besides the audio hardware. The hardware in hold mode is audio hardware, including the BT unit, RAM unit, DAC unit, and timers; the hardware in sleep mode is the system hardware of the Bluetooth device, mainly including the CPU unit, DSP unit, and ADC unit, as well as other system hardware such as DMA, PWM, GPIO, SD card, I2S, SPDIF, LCD, SPI, IRC, USB, FM, I2C, and UART—that is, hardware units other than the BT unit, RAM unit, DAC unit, timers, and power management unit. Figure 2 As shown, the current state of all hardware components except the BT unit, RAM unit, DAC unit, and timer is saved to a fixed location variable in the SRAM unit. This includes whether the power management unit is supplying power normally, the current operation and its content, and internal register values—values that can be used to restore the working state. Setting the power management unit register disconnects the power supply to all hardware modules except the BT unit, RAM unit, DAC unit, and timer. The entire SoC then enters the SLEEP&BT state. For the next 30ms, the entire SoC remains in the SLEEP&BT&AUDIO mode, where the Bluetooth device consumes the least power.
[0081] The present invention also provides another embodiment, such as Figure 4As shown, the Bluetooth device is a transmitting device, such as a Bluetooth watch, and includes a sound data acquisition unit; the dedicated buffer is a back-end buffer; the audio signal is an analog audio signal or a digital audio signal; the audio processing unit is used to receive the analog audio signal acquired by the sound data acquisition unit, convert it into PCM data, or store the acquired digital audio signal as PCM data, and store the PCM data in the back-end buffer. The power management unit is used to power off the system hardware to enter sleep mode; the power management unit is also used to maintain power to the audio hardware to enter hold mode, acquire the analog audio signal or the digital audio signal, process it into PCM data, and store it in the back-end buffer. The audio hardware includes: a BT unit, a RAM unit, a sound data acquisition unit, and a timer; the system hardware includes: other hardware units in the Bluetooth device besides the audio hardware. The back-end memory includes a computing unit for calculating the data duration T3 that the back-end buffer can cache based on the current sampling rate. The wake-up preset condition is the sleep mode hold time T4, where the data duration T3 is greater than the hold time T4. A timer is used to send a wake-up signal to the power management unit when the timer hold time T4 is reached. The power management unit is used to wake up the CPU unit according to the wake-up signal. The CPU unit is used to restore power to the system hardware to its working mode based on the working state in the fixed location variable of the SRAM unit. The back-end buffer is any one of the following: an ADC back-end buffer, an I2S back-end buffer, an SPDIF back-end buffer, or an SPI back-end buffer; wherein the ADC back-end buffer is dedicated memory within the ADC unit, the I2S back-end buffer is dedicated memory within the I2S unit, the SPDIF back-end buffer is dedicated memory within the SPDIF unit, and the SPI back-end buffer is dedicated memory within the SPI unit.
[0082] The present invention also provides another embodiment, wherein the Bluetooth device is a transmitting device, the dedicated buffer is a signal transmission buffer, the signal transmission buffer is a dedicated memory inside the transmitting unit, the audio signal is Bluetooth audio data to be transmitted, the audio processing unit is used to receive the PCM data to be transmitted, encode and package it into Bluetooth audio data to be transmitted, and store the Bluetooth audio data to be transmitted in the signal transmission buffer. The power management unit is used to power off the system hardware to enter sleep mode; the power management unit is also used to maintain power supply to the audio hardware to enter hold mode, and continue transmitting the Bluetooth audio data to be transmitted buffered in the signal transmission buffer.
[0083] Since the contents and functional descriptions of the above-described hardware device embodiments have been described in detail in the method embodiments, they will not be repeated here.
[0084] All the embodiments of the present invention described above are based on reducing power consumption in Bluetooth devices. It should be understood that the technical solutions provided in the embodiments of the present invention can be applied to other wireless transmission devices or playback devices, such as products that use Wi-Fi, Zigbee, FM and other methods for data transmission.
[0085] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for reducing power consumption in Bluetooth devices, characterized in that, The Bluetooth device includes system hardware and audio hardware; the method includes: (1) During the gap between two communications, the audio signal is processed to generate buffer data, and the buffer data is stored in a dedicated buffer; (2) Set the system hardware to sleep mode and the audio hardware to hold mode, wherein the system hardware includes a CPU unit, a DSP unit, an ADC unit and other system hardware, and the audio hardware includes a BT unit, a RAM unit, a playback unit and a timer; (3) When the sleep mode duration reaches the wake-up preset condition, the system hardware is woken up and restored to working mode; When the Bluetooth device is a transmitting device, the dedicated buffer is a back-end buffer, the audio signal is an audio analog signal or an audio digital signal, and step (1) includes: receiving the audio analog signal collected by the sound data acquisition unit and converting it into PCM data or storing the collected audio digital signal as PCM data, and storing the PCM data in the back-end buffer; The sleep mode includes: powering off the system hardware via the power management unit; the hold mode is: acquiring the audio analog signal or the audio digital signal, processing it into PCM data, and then storing it in the back-end buffer; The data duration T3 that the backend buffer can cache is calculated based on the current sampling rate. The wake-up preset condition is the sleep mode retention time T4. The data duration T3 is greater than the retention time T4. Step (3) further includes: when the timer retention time T4 is reached, a wake-up signal is sent to the power management unit. The power management unit wakes up the CPU unit according to the wake-up signal. The CPU unit re-powers the system hardware to restore the working mode according to the working state in the fixed position variable of the SRAM unit.
2. The method according to claim 1, characterized in that, The method further includes: when the cached data in the dedicated cache reaches a predetermined threshold, repeating and cyclically executing steps (1) to (3).
3. The method according to claim 2, characterized in that, The method further includes: saving the operating state of the system hardware and the audio hardware to a fixed location variable in an SRAM cell.
4. The method according to claim 3, characterized in that, When the Bluetooth device is a receiving device, the dedicated buffer is a front-end buffer, which is the dedicated memory inside the playback unit of the receiving device; the audio signal is Bluetooth audio data. Step (1) includes: receiving the Bluetooth audio data and decoding it into PCM data, and storing the PCM data in the front-end buffer.
5. The method according to claim 4, characterized in that, The sleep mode includes: powering off the system hardware via the power management unit; the hold mode includes: continuing to play the PCM data cached in the front-end buffer at the current rate.
6. The method according to claim 5, characterized in that, The audio hardware set to hold mode includes: a BT unit, a RAM unit, a playback unit, and a timer; the system hardware set to sleep mode includes: other hardware units of the Bluetooth device besides the audio hardware.
7. The method according to claim 6, characterized in that, The wake-up preset condition is the sleep mode retention time T1, which is less than the PCM data duration T2 in the front-end cache.
8. The method according to claim 7, characterized in that, Step (3) further includes: when the timer holding time T1 is reached, a wake-up signal is sent to the power management unit, the power management unit wakes up the CPU unit according to the wake-up signal, and the CPU unit re-powers the system hardware to restore the working mode according to the working state in the fixed location variable of the SRAM unit.
9. The method according to claim 1, characterized in that, The audio hardware set to hold mode includes: a BT unit, a RAM unit, a sound data acquisition unit, and a timer; the system hardware set to sleep mode includes: other hardware units besides the audio hardware.
10. The method according to claim 9, characterized in that, The wake-up preset condition is that the current cache size reaches a predetermined proportion of the total cache size of the backend cache.
11. The method according to claim 3, characterized in that, When the Bluetooth device is a transmitting device, the dedicated buffer is a signal transmitting buffer. The signal transmitting buffer is a dedicated memory inside the transmitting unit. The audio signal is Bluetooth audio data to be transmitted. Step (1) includes: receiving the PCM data to be transmitted and encoding and packaging it into Bluetooth audio data to be transmitted, and storing the Bluetooth audio data to be transmitted in the signal transmitting buffer.
12. The method according to claim 11, characterized in that, The sleep mode includes: powering off the system hardware via the power management unit; the hold mode includes: continuing to transmit the Bluetooth audio data to be transmitted that is cached in the signal transmission buffer.
13. A Bluetooth device, characterized in that, The Bluetooth device includes system hardware and audio hardware; the Bluetooth device further includes: An audio processing device used to process audio signals and generate buffered data; A dedicated cache is used to store the cached data; The power management unit is used to set the system hardware to sleep mode and the audio hardware to hold mode; the power management unit is also used to wake up the system hardware and restore it to working mode when the hold time of the sleep mode reaches the wake-up preset condition, wherein the system hardware includes a CPU unit, a DSP unit, an ADC unit and other system hardware, and the audio hardware includes a BT unit, a RAM unit, a playback unit and a timer. The Bluetooth device is a transmitting device, which includes a sound data acquisition unit; the dedicated buffer is a back-end buffer; the audio signal is an analog audio signal or a digital audio signal; the audio processing device is used to receive the analog audio signal acquired by the sound data acquisition unit, convert it into PCM data, or store the acquired digital audio signal as PCM data, and store the PCM data in the back-end buffer; The power management unit is used to power off the system hardware and put it into sleep mode; the power management unit is also used to maintain power supply to the audio hardware and put it into hold mode, and to collect the audio analog signal or the audio digital signal, process it into PCM data, and store it in the back-end buffer; The audio hardware includes: a BT unit, a RAM unit, a sound data acquisition unit, and a timer; The system hardware includes: other hardware units in the Bluetooth device besides the audio hardware; the back-end buffer includes a calculation unit, used to calculate the data duration T3 that the back-end buffer can cache based on the current sampling rate, the wake-up preset condition is the sleep mode hold time T4, and the data duration T3 is greater than the hold time T4; the timer is used to send a wake-up signal to the power management unit when the timer hold time T4 is reached; the power management unit is used to wake up the CPU unit according to the wake-up signal; the CPU unit is used to restore the system hardware to working mode by re-powering it according to the working state in the fixed location variable of the SRAM unit.
14. The Bluetooth device according to claim 13, characterized in that, The Bluetooth device further includes an SRAM unit for storing the operating states of the system hardware and the audio hardware in a fixed location variable.
15. The Bluetooth device according to claim 14, characterized in that, The Bluetooth device is a receiving device, the dedicated buffer is a front-end buffer, and the front-end buffer is the dedicated memory inside the playback unit of the receiving device; the audio signal is Bluetooth audio data; the audio processing unit is used to receive the Bluetooth audio data and decode it into PCM data, and store the PCM data in the front-end buffer.
16. The Bluetooth device according to claim 15, characterized in that, The power management unit is used to power off the system hardware and put it into sleep mode; the power management unit is also used to keep the audio hardware powered and put it into hold mode, so as to play the PCM data cached in the front-end buffer at the current rate.
17. The Bluetooth device according to claim 16, characterized in that, The audio hardware includes a BT unit, a RAM unit, a playback unit, and a timer; the system hardware includes other hardware units in the Bluetooth device besides the audio hardware; the timer is used to send a wake-up signal to the power management unit when the hold time T1 is reached; the power management unit is used to wake up the CPU unit according to the wake-up signal; the CPU unit is used to restore the system hardware to working mode according to the working state in the fixed location variable of the SRAM unit.
18. The Bluetooth device according to claim 14, characterized in that, The Bluetooth device is a transmitting device, the dedicated buffer is a signal transmission buffer, the signal transmission buffer is a dedicated memory inside the transmitting unit, the audio signal is Bluetooth audio data to be transmitted, the audio processing unit is used to receive the PCM data to be transmitted, encode and package it into Bluetooth audio data to be transmitted, and store the Bluetooth audio data to be transmitted in the signal transmission buffer.
19. The Bluetooth device according to claim 18, characterized in that, The power management unit is used to power off the system hardware and put it into sleep mode; the power management unit is also used to keep the audio hardware powered and put it into hold mode, so as to continue transmitting the Bluetooth audio data to be transmitted that is cached in the signal transmission buffer.