Method, device, equipment and storage medium for closing multi-stage operational amplifier
By sending off the shutdown command step by step in preset order when the multi-stage op-amp is turned off, ensuring that each OPA is successfully closed and then closing the next OPA is closed, the burst sound problem when the multi-stage op-amp is turned off is solved and the sound quality is improved and system performance.
Patent Information
- Application Number
- CN202210386029.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-13
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2042-04-13
AI Technical Summary
In the prior art, multi-stage op amps are prone to generate burst sounds (POP sounds) when shutting down. Due to the discharge delay of the OPA, the shutdown may be untimely. The other OPA may be turned off when one OPA is not closed, causing audio interference.
The main controller sends close instructions step by step according to the preset sequence and receives feedback information to ensure that each OPA is closed successfully before closing the next OPA, avoiding closing the next OPA when the previous OPA is not completely closed.
It effectively avoids the blasting sound problem when the multi-stage op amp is turned off, ensures the smooth shutdown of the audio signal, and improves the sound quality and system performance.
Smart Images

Figure CN114827832B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio control technology, and in particular to a method, device, equipment and storage medium for shutting down a multi-stage operational amplifier. Background Art
[0002] Multi-stage audio amplifier circuits are often used in electronic products. In some systems with special requirements on sound volume, the amplification level of an op amp is not enough to achieve the desired effect. Multiple MCUs are often used to control multi-stage audio signal amplification or multiple output devices to output in sequence to achieve the desired effect.
[0003] like Figure 1 As shown, Figure 1 The schematic diagram of a two-stage audio amplifier in the prior art shows that MCU1 generates a differential audio signal, MCU1 controls the enablement of the first-stage op amp, and MCU2 controls the enablement of the second-stage op amp. The sound is amplified in the first stage and the second stage, and finally the audio output signals SPK_P_OUT and SPK_N_OUT are obtained. MCU1 and MCU2 communicate through UART (Universal Asynchronous Receiver / Transmitter). After MCU1 finishes playing the voice, it tells MCU2 that the voice is finished playing through UART.
[0004] Figure 2 This is the schedule for closing the OPA (op amp) after the voice playback is completed in the prior art. After the voice playback of MCU1 is completed, the voice playback thread is closed, MCU1 closes OPA1, and MCU1 sends a "TTS: END" message to URAT to tell MCU2 that the playback is completed. After MCU2 receives the playback completion message "TTS: END" from MCU1 through UART, it closes OPA2 and runs other functions of MCU2.
[0005] However, in the process of closing each OPA, the discharge duration of different OPAs is different. After OPA1 receives the OPA1 closing command, it will not be closed immediately due to the discharge delay. At this time, if OPA2 receives the command to close OPA2 before OPA1 is closed, it is easy to produce a popping sound (POP sound). Summary of the invention
[0006] The present application provides a method, device, equipment and storage medium for shutting down a multi-stage operational amplifier, so as to solve the problem in the prior art that plosive sounds are easily generated when the multi-stage operational amplifier is shut down.
[0007] In a first aspect, an embodiment of the present application provides a method for shutting down a multi-stage operational amplifier, which is applicable to a main controller, and the method includes:
[0008] Determine the slave controller corresponding to the operational amplifier to be shut down according to a preset sequence;
[0009] The slave controller is shut down as follows:
[0010] Generate a shutdown instruction, and send the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller;
[0011] receiving feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier;
[0012] Judgment step: if it is determined that the feedback information indicates that the slave controller has turned off the operational amplifier, the slave controller corresponding to the next operational amplifier to be turned off is determined according to the preset order, and the closing operation is performed; if it is determined that the feedback information indicates that the slave controller fails to turn off the operational amplifier, the closing instruction is sent to the slave controller again, and the feedback information is received to perform the judgment step.
[0013] Optionally, the receiving feedback information from the slave controller in response to the closing instruction includes:
[0014] Acquire a preset duration corresponding to the slave controller; wherein the preset duration is set according to the discharge duration when the operational amplifier is turned off;
[0015] Within a preset time period after sending the closing instruction, feedback information from the slave controller in response to the closing instruction is received.
[0016] Optionally, after determining that the feedback information indicates that the slave controller fails to shut down the operational amplifier, and before sending the shut down instruction to the slave controller again, the method further includes:
[0017] It is determined that the number of times the closing instruction has been sent to the slave controller is less than a preset number.
[0018] Optionally, generating a closing instruction includes:
[0019] Acquire an identification number and shutdown indication data corresponding to the slave controller; wherein the shutdown indication data is used to indicate shutdown of the operational amplifier;
[0020] The closing instruction is generated according to the identification number and the closing instruction data.
[0021] Optionally, the feedback information includes: a closing result identification bit and a closing result prompt bit;
[0022] When the shutdown result identification bit is ACK, it indicates that the slave controller has successfully shut down the operational amplifier; the shutdown result prompt bit is used to indicate that the operational amplifier is shut down normally;
[0023] When the shutdown result identification bit is NACK, it indicates that the slave controller fails to shut down the operational amplifier; the shutdown result prompt bit is used to indicate the reason why the operational amplifier fails to shut down.
[0024] Optionally, after determining that the feedback information indicates that the slave controller has turned off the operational amplifier and before determining the slave controller corresponding to the next operational amplifier to be turned off according to the preset sequence, the method further includes:
[0025] Determine whether there is the next op amp to be turned off.
[0026] Optionally, the method further includes: when the multi-stage operational amplifiers are successfully shut down according to the shut down operation, releasing the audio playback resources and shutting down the audio.
[0027] In a second aspect, an embodiment of the present application provides a shutdown device for a multi-stage operational amplifier, which is applicable to a main controller, and the method includes:
[0028] A determination module, used to determine the slave controller corresponding to the operational amplifier to be shut down according to a preset order;
[0029] A shutdown module is used to perform the following shutdown operations on the slave controller: generate a shutdown instruction, and send the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller; receive feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier; a judgment step: if it is determined that the feedback information indicates that the slave controller has shut down the operational amplifier, then determine the slave controller corresponding to the next operational amplifier to be shut down according to the preset sequence, and execute the shutdown operation; if it is determined that the feedback information indicates that the slave controller fails to shut down the operational amplifier, then send the shutdown instruction to the slave controller again, receive the feedback information, and execute the judgment step.
[0030] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a communication bus, wherein the processor and the memory communicate with each other via the communication bus;
[0031] The memory is used to store computer programs;
[0032] The processor is used to execute the program stored in the memory to implement the method for shutting down the multi-stage operational amplifier described in the first aspect.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method for shutting down a multi-stage operational amplifier described in the first aspect.
[0034] The above technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application, when shutting down each stage of the operational amplifier, each stage of the operational amplifier is shut down in sequence according to a preset order, and only when the feedback information of the shutdown instruction is received from the controller indicating that the operational amplifier is successfully shut down, the next operational amplifier to be shut down is shut down. The method of sending the shutdown instruction by the main controller and feeding back the shutdown result from the controller can ensure that the next operational amplifier is shut down only after one operational amplifier is successfully shut down, avoiding the situation where the previous operational amplifier is not successfully shut down, that is, the next operational amplifier is shut down, thereby solving the problem of plosive sound being easily generated when multi-stage operational amplifiers are shut down. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 A principle block diagram of a two-stage audio amplifier provided by the prior art;
[0038] Figure 2 The OPA closure timeline provided for existing technologies;
[0039] Figure 3 A schematic flow chart of a method for shutting down a multi-stage operational amplifier provided in an embodiment of the present application;
[0040] Figure 4 A schematic diagram of a waveform diagram of an OPA closed according to an embodiment of the present application;
[0041] Figure 5 A timing diagram of the OPA shutdown operation of each MCU provided in the embodiment of the present application;
[0042] Figure 6 A flow chart of a preferred embodiment of a method for shutting down a multi-stage operational amplifier provided in an embodiment of the present application;
[0043] Figure 7 A circuit diagram of the audio part provided in an embodiment of the present application;
[0044] Figure 8 A schematic diagram of an output waveform and a control waveform of an audio signal provided in an embodiment of the present application;
[0045] Fig. 9 A schematic diagram of the structure of a closing device for a multi-stage operational amplifier provided in an embodiment of the present application;
[0046] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0048] The method provided in the embodiment of the present application can be applied to an electronic device, which can be a module capable of realizing a communication function or a terminal device including the module, etc. The terminal device can be a mobile terminal or a smart terminal. The mobile terminal can be at least one of a mobile phone, a tablet computer, a laptop computer, etc.; the smart terminal can be a terminal including a wireless communication module such as a smart car, a smart watch, a shared bicycle, a smart cabinet, etc.; the module can be a wireless communication module, such as any one of a 2G communication module, a 3G communication module, a 4G communication module, a 5G communication module, and a NB-IOT communication module.
[0049] In order to solve the problems existing in the prior art, the embodiment of the present application provides a method for shutting down a multi-stage operational amplifier, such as Figure 3 As shown, a method for shutting down a multi-stage operational amplifier provided in an embodiment of the present application is applicable to a main controller, and the method includes:
[0050] Step 301, determining the slave controller corresponding to the operational amplifier to be turned off according to a preset order;
[0051] In the embodiment of the present application, each operational amplifier is turned off in sequence according to a preset sequence. When each operational amplifier is turned off in sequence, the master controller sends a turn-off instruction to each slave controller corresponding to each operational amplifier.
[0052] In specific implementation, each slave controller and the operational amplifier corresponding to the slave controller may be numbered, and each operational amplifier may be turned off in sequence according to a preset sequence from small to large. Of course, each operational amplifier may also be turned off in sequence according to other preset sequences.
[0053] Perform the following shutdown operations on the slave controller:
[0054] Step 302, generating a shutdown instruction, and sending the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller;
[0055] When the main controller MCU finishes playing the audio, it sends the closing command to the slave controller MCU of each level of operational amplifier in sequence.
[0056] In a specific embodiment, generating a shutdown instruction includes: obtaining an identification number and shutdown indication data corresponding to a slave controller; wherein the shutdown indication data is used to instruct to shut down an operational amplifier; and generating a shutdown instruction according to the identification number and the shutdown indication data.
[0057] The feedback information includes: a closing result identification bit and a closing result prompt bit;
[0058] When the shutdown result flag is ACK, it indicates that the slave controller has successfully shut down the op amp; the shutdown result prompt bit is used to indicate that the op amp is shut down normally;
[0059] When the shutdown result flag is NACK, it indicates that the slave controller fails to shut down the op amp; the shutdown result prompt bit is used to indicate the reason why the op amp fails to shut down.
[0060] In the specific implementation, the closing instruction may be generated according to the communication format shown in Table 1.
[0061] Table 1 Communication format of close command
[0062]
[0063] For the meaning of each data bit in the communication format of the close command, please refer to Table 2.
[0064] Table 2 Meaning of each data bit in the communication format of the close command
[0065]
[0066] Step 303, receiving feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier;
[0067] In the specific implementation, it is determined whether the feedback information of the slave controller for the shutdown instruction is received within the preset time. Different slave controllers have different circuit designs and different discharge times, and the preset time lengths are also different. Figure 4 As shown, Figure 4The waveform diagram of OPA closing is shown. When receiving the control command to close, it is not closed immediately, and a certain discharge time is required. Since each OPA uses different devices, the discharge time is different when it is closed, and the time to close the OPA is different. Therefore, the preset time of each slave controller can be set according to the discharge time. In the specific implementation, a time can be added on the basis of the discharge time as the preset time.
[0068] In the specific implementation, first obtain the preset time length corresponding to the slave controller, and determine whether feedback information from the slave controller regarding the shutdown instruction is received within the preset time length after sending the shutdown instruction. If feedback information from the slave controller is received within the preset time length, it means that the communication is normal. If no feedback information from the controller is received after the preset time length, it means that the communication is abnormal.
[0069] In specific implementation, the feedback information may adopt the communication format shown in Table 3.
[0070] Table 3 Communication format of feedback information
[0071]
[0072] For the meaning of each data bit in the communication format of the feedback information, please refer to Table 4.
[0073] Table 4 Meaning of each data bit in the communication format of feedback information
[0074]
[0075] In addition, it should be noted that the MCUID in the communication format is a number agreed upon by the system, for example, the slave MCU number corresponding to OPA1 is 01, the slave MCU number corresponding to OPA2 is 02, and so on. LRC is a cumulative sum check, which is used to verify the accuracy of communication data.
[0076] Step 304, a judgment step: if it is determined that the feedback information indicates that the slave controller has turned off the op amp, the slave controller corresponding to the next op amp to be turned off is determined according to a preset order, and a closing operation is performed; if it is determined that the feedback information indicates that the slave controller fails to turn off the op amp, a closing instruction is sent to the slave controller again, and feedback information is received to perform a judgment step.
[0077] The feedback information carries NACK or ACK information. By reading the NACK or ACK in the feedback information, it can be determined whether the slave controller has successfully shut down the op amp. If the shutdown is successful, that is, the feedback information carries ACK information. At this time, if it is determined that there is a next op amp to be shut down, the next op amp will continue to be shut down. If the shutdown is not successful, that is, the feedback information carries NACK information, the shutdown command can be resent again.
[0078] In a specific embodiment, after determining that the feedback information indicates that the slave controller has failed to shut down the operational amplifier, before sending a shutdown instruction to the slave controller again, it also includes: determining that the number of shutdown instructions sent to the slave controller is less than a preset number.
[0079] The preset number of times can be set according to actual conditions, for example, the preset number of times is set to 3 times. If the number of times the shutdown command has been sent to the slave controller reaches the preset number of times, for example, 3 times, it means that the shutdown has encountered an abnormal situation, and the shutdown command will not be resent. The next level of op amp can be closed. When the remaining op amps are closed, try again to close the op amp that was not successfully closed before. When the multi-level op amps are successfully closed according to the closing operation, the audio playback resources are released and the audio is turned off.
[0080] In the embodiment of the present application, when shutting down each stage of the operational amplifier, each stage of the operational amplifier is shut down in sequence according to a preset order, and only when the feedback information of the shutdown instruction is received from the controller indicating that the operational amplifier is shut down successfully, the next operational amplifier to be shut down is shut down. By sending the shutdown instruction by the main controller and feeding back the shutdown result from the controller, it can be ensured that the next operational amplifier is shut down only after one operational amplifier is shut down successfully, avoiding the situation that the previous operational amplifier is not shut down successfully, that is, the next operational amplifier is shut down, thereby solving the problem of plosive sound that is easy to generate when multi-stage operational amplifiers are shut down.
[0081] For ease of understanding, the method for shutting down the multi-stage operational amplifier provided in the embodiment of the present application is further described below.
[0082] After the main MCU (i.e., main controller) completes the audio playback, it notifies each MCU to close the corresponding OPA in the communication format of Table 1. The main MCU can control the closing sequence of each OPA in real time. After receiving the closing information, each MCU immediately closes the current OPA and returns ACK in the format of Table 3. If it cannot be closed at present, it returns NACK and reports the feedback return code CODE and reason to the main MCU. The main MCU processes them according to different return codes (CODE). After each op amp is closed, it closes the main MCU audio signal playback thread to release resources.
[0083] like Figure 5 As shown, Figure 5 The timing of closing the OPA operation of each MCU provided in the embodiment of the present application is shown. The main MCU controls the closing timing of each OPA. After the main MCU closes each OPA, it releases resources and turns off the sound source.
[0084] In order to facilitate understanding of the method for shutting down a multi-stage operational amplifier provided in the embodiment of the present application, Figure 6 The process of a preferred embodiment of the method for shutting down a multi-stage operational amplifier provided in an embodiment of the present application is described.
[0085] When the audio playback is completed, turn off the op amps one by one. Before sending the shutdown command to the slave MCU of the op amp, determine whether the number of shutdown commands currently sent to the op amp is less than 3 times. If so, generate notification data (i.e., shutdown command) to close OPA1. The MCU sends the notification data to close OPA1 according to the communication format and waits for a response. The slave MCU1 corresponding to OPA1 receives data, parses the notification data from MCU1, executes the shutdown command, and determines whether the slave MCU1 successfully closes OPA1. If so, send feedback information with ACK; otherwise, send feedback information with NACK. Whether the main MCU receives feedback information within the preset time, where the preset time is set according to the electrical characteristics of OPA1. After receiving the feedback information, the main MCU determines whether it is the ACK fed back by MCU1. If so, determine whether there is a next-level op amp. If so, execute the shutdown process for the next-level op amp; if NACK is received, the shutdown process is executed again if the number of shutdown commands sent is less than 3 times.
[0086] The logic of the shutdown process of each level of op amp is consistent. When all op amps are turned off, the main MCU turns off the playback thread and the main MCU turns off the built-in amplifier. If the op amp is turned off and the shutdown command is sent more than 3 times, or no feedback information is received within the preset time, it means that an abnormal situation has occurred and additional processing is required. The processing method is not the focus of the embodiment of this application and will not be described here.
[0087] The embodiment of the present application is based on the mechanism of sending notifications by the main MCU. It relies on the communication protocol to send notifications through the main MCU. The MCUs that control the PA at each level respond according to the situation. The main MCU accurately controls the timing of shutting down each level of PA, thereby achieving the effect of reducing background noise, optimizing sound quality, and controlling separately.
[0088] Take the application of the communication module as the main control MCU in the cash register system as an example. Figure 7 The schematic diagram of the audio part of the product is shown. The communication module is the main MCU that generates the audio signal and controls the timing of closing each OPA. The communication module generates differential audio signals L610_SPK_P and L610_SPK_N. The system control MCU is the slave device. When the system control MCU outputs a high level, the voice signal is amplified and output through the LPA4890MSF. When the system control MCU outputs a low level, the power amplifier is turned off. When the OPA is turned off, MUTE outputs a low level. Due to the energy storage effect of the circuit, the actual audio shutdown waveform is as follows Figure 8 shown.
[0089] like Figure 8The slightly brighter waveform is the output waveform of the audio signal (PIN8 of OPA), and the slightly darker step-shaped waveform is the control waveform of PA MUTE (PIN1 of OPA). When the system control MCU receives the "ENDMESSAGE" (shutdown command) sent by the communication module MCU, the system control MCU enables SPK_MUTE (PIN1 of OPA) to shut down OPA. The audio signal will be completely shut down about 125ms after OPA is shut down. The specific steps are as follows:
[0090] In the first step, after playing the audio signal, the communication module sends the data "020E01454E44205041204D45535341474503C1" to the system control MCU through the UART, as shown in Table 5, which shows a data example of the closing instruction.
[0091]
[0092] Step 2: After receiving the data, the system controls the MCU to process the data, parse out the relevant information, and close the OPA as needed.
[0093] Step 3: The system controls the MCU to send feedback information to the communication module through UART. The feedback information is "06090100434C4F53454F4B20"
[0094]
[0095] Step 4: After the communication module receives the ACK from the system control MCU, it closes the voice playback thread, releases resources, and closes the internal OPA of the communication module.
[0096] In summary, the embodiment of the present application improves system performance and effectively improves sound quality by controlling the timing of shutting down each stage of op amps through the main MCU; it can be set according to the different electrical characteristics of each stage of op amps, and the shutdown time of each stage of op amps can be accurately controlled; moreover, it has strong scalability, and whether it is a single-stage op amp or a multi-stage op amp, whether it is serial or other connection methods, it can be effectively controlled by the main MCU.
[0097] Based on the same concept, a multi-stage operational amplifier shutdown device is provided in the embodiment of the present application. The specific implementation of the device can be found in the description of the method embodiment part, and the repeated parts will not be repeated. Fig. 9 As shown, the device mainly includes:
[0098] A determination module 901 is used to determine the slave controller corresponding to the operational amplifier to be shut down according to a preset order;
[0099] The closing module 902 is used to perform the following closing operations on the slave controller: generate a closing instruction, and send the closing instruction to the slave controller; wherein the closing instruction is used to close the operational amplifier corresponding to the slave controller; receive feedback information from the slave controller in response to the closing instruction; wherein the feedback information is used to indicate whether the slave controller has successfully closed the operational amplifier; a judgment step: if it is determined that the feedback information indicates that the slave controller has closed the operational amplifier, then determine the slave controller corresponding to the next operational amplifier to be closed according to the preset order, and perform the closing operation; if it is determined that the feedback information indicates that the slave controller has failed to close the operational amplifier, then send the closing instruction to the slave controller again, receive the feedback information, and perform the judgment step.
[0100] In a specific embodiment, the shutdown module 902 is used to obtain a preset duration corresponding to the slave controller; wherein the preset duration is set according to the discharge duration when the operational amplifier is shut down; and within the preset duration after sending the shutdown instruction, feedback information from the slave controller in response to the shutdown instruction is received.
[0101] In a specific embodiment, a shutdown device for a multi-stage operational amplifier provided in the embodiment of the present application also includes: a determination module for determining that the number of shutdown instructions sent to the slave controller is less than a preset number before sending the shutdown instruction to the slave controller again after determining that the feedback information indicates that the slave controller has failed to shut down the operational amplifier.
[0102] In a specific embodiment, the closing module 902 is used to obtain the identification number and closing indication data corresponding to the slave controller; wherein the closing indication data is used to indicate closing the operational amplifier; and the closing instruction is generated according to the identification number and the closing indication data.
[0103] In a specific embodiment, the feedback information includes: a shutdown result identification bit and a shutdown result prompt bit; when the shutdown result identification bit is ACK, it indicates that the slave controller has successfully shut down the op amp; the shutdown result prompt bit is used to indicate that the op amp is shut down normally; when the shutdown result identification bit is NACK, it indicates that the slave controller fails to shut down the op amp; the shutdown result prompt bit is used to indicate the reason for the failure to shut down the op amp.
[0104] In a specific embodiment, the determination module is further used to determine whether there is a next op amp to be turned off after determining that the feedback information indicates that the slave controller has turned off the op amp and before determining the slave controller corresponding to the next op amp to be turned off according to the preset order.
[0105] In a specific embodiment, the closing module 902 is further configured to release audio playback resources and turn off the audio when the multi-stage operational amplifiers are successfully turned off according to the closing operation.
[0106] Based on the same concept, an electronic device is also provided in the embodiment of the present application, such as Fig.10 As shown, the electronic device mainly includes: a processor 1001, a memory 1002 and a communication bus 1003, wherein the processor 1001 and the memory 1002 communicate with each other through the communication bus 1003. The memory 1002 stores a program that can be executed by the processor 1001, and the processor 1001 executes the program stored in the memory 1002 to implement the following steps:
[0107] Determine the slave controller corresponding to the operational amplifier to be shut down according to a preset sequence;
[0108] The slave controller is shut down as follows:
[0109] Generate a shutdown instruction, and send the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller;
[0110] receiving feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier;
[0111] Judgment step: if it is determined that the feedback information indicates that the slave controller has turned off the operational amplifier, the slave controller corresponding to the next operational amplifier to be turned off is determined according to the preset order, and the closing operation is performed; if it is determined that the feedback information indicates that the slave controller fails to turn off the operational amplifier, the closing instruction is sent to the slave controller again, and the feedback information is received to perform the judgment step.
[0112] The communication bus 1003 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1003 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.10 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0113] The memory 1002 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Alternatively, the memory may also be at least one storage device located away from the processor 1001.
[0114] The above-mentioned processor 1001 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc., and can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0115] In another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program runs on a computer, the computer executes a method for shutting down a multi-stage operational amplifier described in the above embodiment.
[0116] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instruction can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instruction is transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server, a data center, etc. that contains one or more available media integration. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape, etc.), an optical medium (e.g., a DVD) or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0117] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0118] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for shutting down a multi-stage operational amplifier, characterized in that: Applicable to a main controller, the operational amplifier is used to process an audio signal, and the method includes: Determine the slave controller corresponding to the operational amplifier to be shut down according to a preset sequence; The slave controller is shut down as follows: Generate a shutdown instruction, and send the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller; receiving feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier; Judgment step: if it is determined that the feedback information indicates that the slave controller has turned off the operational amplifier, the slave controller corresponding to the next operational amplifier to be turned off is determined according to the preset order, and the closing operation is performed; if it is determined that the feedback information indicates that the slave controller fails to turn off the operational amplifier, the closing instruction is sent to the slave controller again, and the feedback information is received to perform the judgment step.
2. The method for shutting down a multi-stage operational amplifier according to claim 1, characterized in that: The receiving feedback information from the controller in response to the closing instruction includes: Acquire a preset duration corresponding to the slave controller; wherein the preset duration is set according to the discharge duration when the operational amplifier is turned off; Within a preset time period after sending the closing instruction, feedback information from the slave controller in response to the closing instruction is received.
3. The method for shutting down a multi-stage operational amplifier according to claim 1, characterized in that: After determining that the feedback information indicates that the slave controller fails to shut down the operational amplifier, and before sending the shut down instruction to the slave controller again, the method further includes: It is determined that the number of times the closing instruction has been sent to the slave controller is less than a preset number.
4. The method for shutting down a multi-stage operational amplifier according to claim 1, characterized in that: The generating of the closing instruction comprises: Acquire an identification number and shutdown indication data corresponding to the slave controller; wherein the shutdown indication data is used to indicate shutdown of the operational amplifier; The closing instruction is generated according to the identification number and the closing instruction data.
5. The method for shutting down a multi-stage operational amplifier according to claim 1, characterized in that: The feedback information includes: a closing result identification bit and a closing result prompt bit; When the shutdown result identification bit is ACK, it indicates that the slave controller has successfully shut down the operational amplifier; the shutdown result prompt bit is used to indicate that the operational amplifier is shut down normally; When the shutdown result identification bit is NACK, it indicates that the slave controller fails to shut down the operational amplifier; the shutdown result prompt bit is used to indicate the reason why the operational amplifier fails to shut down.
6. The method for shutting down a multi-stage operational amplifier according to claim 1, characterized in that: After determining that the feedback information indicates that the slave controller has turned off the operational amplifier, and before determining the slave controller corresponding to the next operational amplifier to be turned off according to the preset sequence, the method further includes: Determine whether there is the next op amp to be turned off.
7. The method for shutting down a multi-stage operational amplifier according to any one of claims 1 to 6, characterized in that: Also includes: When the multi-stage operational amplifiers are all successfully turned off according to the turning-off operation, the audio playback resources are released and the audio is turned off.
8. A closing device for a multi-stage operational amplifier, characterized in that: Applicable to a main controller, the operational amplifier is used to process audio signals, and the device comprises: A determination module, used to determine the slave controller corresponding to the operational amplifier to be shut down according to a preset order; A shutdown module is used to perform the following shutdown operations on the slave controller: generate a shutdown instruction, and send the shutdown instruction to the slave controller; wherein the shutdown instruction is used to shut down the operational amplifier corresponding to the slave controller; receive feedback information from the slave controller in response to the shutdown instruction; wherein the feedback information is used to indicate whether the slave controller has successfully shut down the operational amplifier; a judgment step: if it is determined that the feedback information indicates that the slave controller has shut down the operational amplifier, then determine the slave controller corresponding to the next operational amplifier to be shut down according to the preset sequence, and execute the shutdown operation; if it is determined that the feedback information indicates that the slave controller fails to shut down the operational amplifier, then send the shutdown instruction to the slave controller again, receive the feedback information, and execute the judgment step.
9. An electronic device, characterized in that: include: A processor, a memory and a communication bus, wherein the processor and the memory communicate with each other via the communication bus; The memory is used to store computer programs; The processor is used to execute the program stored in the memory to implement the method for shutting down the multi-stage operational amplifier described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for shutting down a multi-stage operational amplifier as described in any one of claims 1 to 7 is implemented.
