Audio control method and device and electronic equipment

By obtaining the trigger signal of the peripheral device and confirming the working status of the telephone handset, switching the audio channel to coordinate the speaker's external playback function and call function, the problem that existing devices cannot coordinate the external playback and call is solved, and convenient call functions and wider usage scenarios are achieved.

CN119892969APending Publication Date: 2025-04-25FUJIAN LANDI COMMERCIAL EQUIPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411913732.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Existing payment equipment or display equipment cannot coordinate the speaker's external function and call function, resulting in inconvenience in use of the equipment.

Method used

By obtaining the trigger signal of the peripheral device, confirm the working status of the telephone handset, and switch the audio channel according to the status. If the answering state is, the audio signal is output to the peripheral device. If the hanging state is output, it is output to the default speaker and receive the default microphone signal.

Benefits of technology

It realizes flexible switching of multiple audio channels, coordinates the playback function and call function, so that electronic devices with call needs can realize call function, which is easy to use, and expands the use scenarios of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892969A_ABST
    Figure CN119892969A_ABST
Patent Text Reader

Abstract

The invention discloses an audio control method and device and electronic equipment, the electronic equipment is used for being connected with a first end of peripheral equipment, a patch seat is arranged at a second end of the peripheral equipment, the patch seat is used for being connected with a telephone receiver, the telephone receiver and the electronic equipment are connected through the peripheral equipment, expansion is easy, plug and play is achieved, and more convenience is achieved. And active answering and active hanging up can be realized, a trigger signal of the peripheral equipment is obtained, the working state of the telephone receiver is confirmed according to the trigger signal, if the working state is an answering state, an audio output signal is output to the peripheral equipment, and an audio input signal of the peripheral equipment is received, and if the working state is a hanging up state, the audio output signal is output to the peripheral equipment. If yes, outputting an audio output signal to the default loudspeaker, and receiving an audio input signal of the default microphone, so that flexible switching of multiple audio channels is realized through a software and hardware combination mode, a loudspeaker function and a call function are effectively coordinated, and the Android system electronic equipment with call requirements realizes the call function and is convenient to use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of audio control, and in particular to an audio control method, device and electronic equipment. Background Art

[0002] With the development of financial terminals, such as POS machines and cash registers, payment devices or display devices have gradually developed call requirements.

[0003] However, in the related art, these devices generally have only one external speaker, and cannot coordinate the speaker's external speaker function and call function, resulting in inconvenience in using the device. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an audio control method, device and electronic equipment, which can coordinate the external speaker function and the call function of the speaker and are easy to use.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is: An audio control method is applied to an electronic device, wherein the electronic device is a payment electronic device or a display electronic device, and the electronic device includes a default microphone and / or a default speaker; the electronic device is used to connect to a first end of an external device, and a patch seat is provided on a second end of the external device, and the patch seat is used to connect to a telephone handset, and the method includes: Acquire a trigger signal of the peripheral device, wherein the trigger signal is used to confirm the connection status between the telephone handset and the patch socket; confirming the working state of the telephone handset according to the trigger signal; If the working state is a listening state, outputting an audio output signal to the peripheral device and receiving an audio input signal from the peripheral device; If the working state is the hang-up state, an audio output signal is output to the default speaker, and an audio input signal of the default microphone is received.

[0006] In order to solve the above technical problems, another technical solution adopted by the present invention is: An audio control device comprises a signal acquisition module, a state confirmation module, a first audio channel switching module and a second audio channel switching module; The signal acquisition module is used to acquire a trigger signal from the peripheral device, and the trigger signal is used to confirm the connection status between the telephone handset and the patch socket; The status confirmation module is used to confirm the working status of the telephone handset according to the trigger signal; The first audio channel switching module is configured to output an audio output signal to the peripheral device and receive an audio input signal from the peripheral device if the working state is a listening state; The second audio channel switching module is used to output an audio output signal to the default speaker and receive an audio input signal from the default microphone if the working state is the hang-up state.

[0007] In order to solve the above technical problems, another technical solution adopted by the present invention is: An electronic device comprises a memory, a processor and a computer program stored in the memory and running on the processor, wherein the processor implements each step of the above-mentioned audio control method when executing the computer program.

[0008] The beneficial effects of the present invention are as follows: the electronic device of the present application is a payment electronic device or a display electronic device, the electronic device of the present application is used to connect to the first end of the peripheral device, a patch socket is arranged on the second end of the peripheral device, the patch socket is used to connect to the telephone receiver, the present application obtains a trigger signal of the peripheral device, confirms the working state of the telephone receiver according to the trigger signal, if the working state is the answering state, outputs an audio output signal to the peripheral device, and receives the audio input signal of the peripheral device, if the working state is the hang-up state, outputs an audio output signal to the default speaker, and receives the audio input signal of the default microphone, in this way, flexible switching of multiple audio channels is realized by combining software and hardware, effectively coordinating the external speaker function and the call function, so that the Android system electronic device with the call demand can realize the call function, which is convenient for use.

[0009] Moreover, the present application utilizes peripheral devices to connect telephone handsets and electronic devices, which is easy to expand, plug-and-play, more convenient, and can realize active answering and active hanging up functions, thus expanding the use scenarios of payment electronic devices or display electronic devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 A flowchart of an audio control method provided by an embodiment of the present invention; Figure 2 A control flow chart of an audio control method provided by an embodiment of the present invention; Figure 3 A structural diagram of an audio control device provided by an embodiment of the present invention; Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0011] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0012] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0013] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0014] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0015] In the related art, payment devices or display devices in Android electronic devices generally have only one speaker, and can only play audio externally through the speaker, but cannot input audio, which makes it impossible for such devices to make calls with other devices. In addition, the telephone handset in the related art is limited to calls in terms of function, and must be integrated with the telephone, and cannot be directly used for payment devices or display devices. Therefore, how to enable payment devices or display devices to coordinate the external speaker function and the call function becomes the problem to be solved by the following method of this application.

[0016] In order to solve the above problems, the present application provides an audio control method, device and electronic device. The following specifically introduces an audio control method of the present application.

[0017] The audio control method in the present application can be used for electronic devices, which are payment electronic devices or display electronic devices, such as POS machines, cash registers, tablet devices or wall-mounted devices, etc. The electronic device includes a default microphone and / or a default speaker; the electronic device is used to connect the first end of the peripheral device, and a patch seat is set on the second end of the peripheral device, and the patch seat is used to connect to the telephone receiver, wherein the peripheral device can be USB, Type-B or Type-C, etc., which is easy to expand, plug and play, and has higher applicability. The internal structure of the telephone receiver is similar to that of the existing telephone receiver, including a sound generator magnet, a magnetic coil (used to activate the magnet through current to generate a magnetic field), a converter (used to convert electrical signals into sound signals), a polyester film (used to convert vibrations into sound waves in the air), a single-chip microcomputer STM32 with a USB port, and an MCU (Microcontroller Unit) and a Codec (codec) are integrated inside, and the audio signal is transmitted by communicating with the electronic device through a USB signal.

[0018] The following is a detailed description of the audio control method of the present invention. Figure 1 , including steps S110 to S140.

[0019] Step S110: Acquire a trigger signal from the peripheral device, where the trigger signal is used to confirm the connection status between the telephone receiver and the patch socket.

[0020] For example, when the peripheral device is a USB, a USB trigger signal is obtained, or when the peripheral device is a Type-C, a Type-C trigger signal is obtained.

[0021] Step S120: confirm the working status of the telephone handset according to the trigger signal.

[0022] For example, when a telephone receiver is connected to the patch socket, the USB will send a trigger signal to the electronic device, and the working status of the telephone receiver can be confirmed through the trigger signal.

[0023] Step S130: If the working state is the answering state, output an audio output signal to the external device, and receive an audio input signal from the external device.

[0024] In one embodiment of the present application, the audio output signal includes media audio, call audio, alarm audio, notification audio, system audio, etc.

[0025] For example, the current payment electronic device or display electronic device has a call request, and the working state of the telephone receiver is the answering state, indicating that the call has been connected, and the call audio output signal is output to the USB. In addition, the media audio output signal, system audio output signal, etc. can also be output, and the USB audio input signal can be received.

[0026] Step S140: If the working state is the hang-up state, output the audio output signal to the default speaker, and receive the audio input signal of the default microphone.

[0027] For example, if the working state of the telephone receiver is the hang-up state, indicating that the current call needs to be hung up, an audio output signal is output to the default speaker, and an audio input signal of the default microphone is received, so that the electronic device resumes the audio external speaker state.

[0028] In this way, the electronic device of the present application is a payment electronic device or a display electronic device. The electronic device of the present application is used to connect to the first end of the peripheral device. A patch socket is set on the second end of the peripheral device, and the patch socket is used to connect to the telephone receiver. The present application obtains a trigger signal from the peripheral device and confirms the working state of the telephone receiver according to the trigger signal. If the working state is an answering state, an audio output signal is output to the peripheral device and an audio input signal of the peripheral device is received. If the working state is a hang-up state, an audio output signal is output to the default speaker and an audio input signal of the default microphone is received. In this way, flexible switching of multiple audio channels is achieved through a combination of software and hardware, and the external speaker function and the call function are effectively coordinated, so that Android system electronic devices with call needs can realize the call function and are easy to use.

[0029] Moreover, the present application utilizes peripheral devices to connect telephone handsets and electronic devices, which is easy to expand, plug-and-play, more convenient, and can realize active answering and active hanging up functions, thus expanding the use scenarios of payment electronic devices or display electronic devices.

[0030] In one embodiment of the present application, step S120 includes: Detect the level state of the general purpose input and output port (GPIO) corresponding to the peripheral device according to the trigger signal; If the level state is high, it is determined that the working state of the telephone receiver is the answering state; If the level state is a low level, it is determined that the working state of the telephone handset is a hang-up state.

[0031] In this way, the working state of the telephone handset can be simply and effectively determined by detecting the level state of the general input and output port.

[0032] In one embodiment of the present application, before step S110, the method further includes: Receive the induction signal sent by the sensor inside the telephone receiver; According to the sensing signal, it is determined whether the telephone handset contacts the hanging slot of the electronic device. If so, an interruption with the peripheral device is triggered to control the level state of the general input and output port to switch from a high level to a low level. If not, a connection with the peripheral device is triggered to control the level state of the general input and output port to switch from a low level to a high level. In one embodiment of the present application, the hanging slot can be U-shaped.

[0033] For example, when a telephone receiver touches or moves away from the hanging slot of a payment electronic device or a display electronic device, the sensor inside the telephone receiver can detect it and send a sensing signal to the payment electronic device or the display electronic device. If it is determined according to the sensing signal that the telephone receiver touches the hanging slot, an interruption to the USB is triggered, and the level state of the associated GPIO is switched from a high level to a low level. If it is determined according to the sensing signal that the telephone receiver is away from the hanging slot, connection with the USB is triggered, and the level state of the associated GPIO is switched from a low level to a high level.

[0034] In this way, the sensor inside the telephone receiver can trigger the interruption and connection between the electronic device and the external device to change the level state of the universal input and output port to achieve answering and hanging up of the call.

[0035] In one embodiment of the present application, before step S110, the method further includes: At startup, the audio module is initialized and the audio device is obtained from the driver. The audio device includes the default microphone and the default speaker. Initialize an audio policy profile of the electronic device based on a default microphone and a default speaker; Create an engine object and load the audio strategy configuration file into the engine object; A policy interface is generated based on the engine object for external invocation to implement the switching of audio input and output of the electronic device. In one embodiment of the present application, the policy interface includes at least one audio output policy interface and at least one audio input policy interface.

[0036] For example, when the Android system of a payment electronic device or a display electronic device is started, the audio module is initialized and the audio device is obtained from the driver. In addition to the default microphone and the default speaker, the audio device also includes information such as the telephone receiver, audio stream, routing, encoding format, and channel storage layout. The audio policy configuration file of the payment electronic device or the display electronic device is initialized based on the default microphone and the default speaker, an Engine object is created, and the audio policy configuration file is loaded into the Engine object to manage the audio policy. An audio output policy interface and an audio input policy interface are generated based on the Engine object for external calls to implement switching of audio input and output, or multiple audio output policy interfaces and multiple audio input policy interfaces can be generated based on the Engine object to achieve multi-end input and multi-end output effects.

[0037] In this way, the audio module and audio policy configuration file are initialized at startup. The audio input is set to be via the microphone and the audio output is set to be via the speaker by default. An engine object is created to manage the audio policy. The switching of multi-end audio input and output can be achieved through the policy interface, thereby improving the flexibility of audio control of electronic devices.

[0038] In one embodiment of the present application, outputting an audio output signal to the peripheral device and receiving an audio input signal from the peripheral device in step S130 includes: Use the handset as an external device object and call the policy interface to modify the audio policy configuration file.

[0039] For example, the handset is used as a USB-device object to call the audio output policy interface and the audio input policy interface to modify the audio policy configuration file so that audio input and output use the device and the associated driver decoder.

[0040] In this way, both the input and output of sound are realized through the telephone handset, so that electronic devices that originally do not have a call function can realize calls.

[0041] In one embodiment of the present application, outputting the audio output signal to the default speaker and receiving the audio input signal from the default microphone in step S140 includes: Call the policy interface to modify the audio policy configuration file based on the default speaker and default microphone.

[0042] In this way, the audio input and output can be freely switched through the policy interface in conjunction with the audio policy configuration file to coordinate the speaker function and call function of the electronic device.

[0043] In one embodiment of the present application, while executing step S130, the following is also included: Active noise reduction is performed on the audio output signal and the audio input signal through the microphone circuit on the codec of the telephone handset.

[0044] In this way, the audio signal is noise-reduced by active noise reduction, which has a good noise reduction effect and effectively improves the sound quality.

[0045] In one embodiment of the present application, performing active noise reduction on an audio output signal and an audio input signal through a microphone circuit on a codec of a telephone handset includes: The noise signal corresponding to the audio output signal and the audio input signal is collected through the microphone circuit (ANC MIC circuit) on the codec of the telephone handset, and the noise signal is transmitted to the control circuit inside the codec; The control circuit inside the codec performs calculations based on the noise signal to obtain a sound wave with a phase opposite to that of the noise signal and the same amplitude, and then superimposes the sound wave and the noise signal.

[0046] For example, the ANC MIC R / L of the two left and right channels on the Codec of the telephone handset collects the noise signal corresponding to the audio output signal and the audio input signal, and transmits the noise signal to the control circuit inside the Codec. The noise signal is then calculated by the control circuit inside the Codec to obtain a sound wave with the opposite phase and the same amplitude as the noise signal, and the sound wave is superimposed on the noise signal to cancel the noise.

[0047] In this way, the sound wave obtained by calculation and having the same amplitude as the noise signal but opposite phase to the noise signal is superimposed on the noise signal to cancel out the noise signal, thereby maintaining a clear and natural sound effect in various complex environments.

[0048] The following is a detailed description of the application embodiments of the present application. The present application can apply the above solution to the scene where audio control is required. Please refer to Figure 2 , including the following steps (1) to (12).

[0049] (1) At startup, the audio module is initialized and the audio device is obtained from the driver. The audio device includes the default microphone and the default speaker.

[0050] (2) Initialize the audio policy profile of the electronic device based on the default microphone and the default speaker.

[0051] (3) Create an engine object and load the audio policy configuration file into the engine object.

[0052] (4) Generate a strategy interface based on the engine object for external calls to implement the switching of audio input and output of the electronic device.

[0053] (5) Receive the induction signal sent by the sensor inside the telephone receiver.

[0054] (6) Determine whether the telephone handset is in contact with the hanging slot of the electronic device based on the sensing signal. If so, trigger an interrupt with the peripheral device to control the level state of the general input / output port to switch from a high level to a low level. If not, trigger a connection with the peripheral device to control the level state of the general input / output port to switch from a low level to a high level.

[0055] (7) Obtain the trigger signal of the peripheral device.

[0056] (8) Detect the level status of the general input and output port corresponding to the peripheral device according to the trigger signal.

[0057] (9) If the level state is high, it is determined that the working state of the telephone receiver is the answering state.

[0058] (10) If the level state is low, it is determined that the working state of the telephone receiver is the hang-up state.

[0059] (11) If the working state is the answering state, the audio output signal is output to the external device, and the audio input signal of the external device is received. At the same time, the audio output signal and the audio input signal are actively noise-reduced through the microphone circuit on the codec of the telephone handset.

[0060] Specifically, the telephone handset is used as an external device object to call the policy interface to modify the audio policy configuration file. At the same time, the noise signal corresponding to the audio output signal and the audio input signal is collected through the microphone circuit on the codec of the telephone handset, and the noise signal is transmitted to the control circuit inside the codec; the control circuit inside the codec performs calculations based on the noise signal to obtain a sound wave with the opposite phase and the same amplitude as the noise signal, and the sound wave is superimposed on the noise signal.

[0061] (12) If the working state is the hang-up state, the audio output signal is output to the default speaker, and the audio input signal of the default microphone is received.

[0062] Specifically, the policy interface is called according to the default speaker and the default microphone to modify the audio policy configuration file.

[0063] By obtaining a trigger signal from a peripheral device, the working state of the telephone handset is confirmed according to the trigger signal. If the working state is an answering state, an audio output signal is output to the peripheral device, and an audio input signal of the peripheral device is received. At the same time, active noise reduction is performed on the audio output signal and the audio input signal through the microphone circuit on the codec of the telephone handset. If the working state is a hang-up state, an audio output signal is output to a default speaker, and an audio input signal of a default microphone is received. Flexible switching of multiple audio channels is achieved through a combination of software and hardware, and the external speaker function and the call function are effectively coordinated, so that Android system electronic devices with call needs can realize the call function, which is easy to use, and the call quality is ensured through active noise reduction.

[0064] The present invention also provides an audio control device. Figure 3 , including a signal acquisition module, a status confirmation module, a first audio channel switching module and a second audio channel switching module; A signal acquisition module is used to obtain a trigger signal from a peripheral device, and the trigger signal is used to confirm the connection status between the telephone receiver and the patch socket; A status confirmation module, used to confirm the working status of the telephone handset according to the trigger signal; A first audio channel switching module, configured to output an audio output signal to the peripheral device and receive an audio input signal from the peripheral device if the working state is a listening state; The second audio channel switching module is used to output an audio output signal to a default speaker and receive an audio input signal from a default microphone if the working state is a hang-up state.

[0065] The beneficial effects of the audio control device of the present invention are the same as those of the above method, which will not be described in detail here.

[0066] Please refer to Figure 4 The present invention also provides an electronic device 300, including a memory 301 and a processor 302, and a computer program stored in the memory 301 and running on the processor 302. When the processor 302 executes the computer program, each step in the above-mentioned audio control method is implemented.

[0067] The beneficial effects of the electronic device of the present invention are the same as those of the above method and will not be described in detail here.

[0068] In summary, the present invention provides an audio control method, device and electronic device, the electronic device is a payment electronic device or a display electronic device, the electronic device is used to connect to a first end of an external device, a patch socket is arranged on a second end of the external device, the patch socket is used to connect to a telephone receiver, a trigger signal of the external device is obtained, the working state of the telephone receiver is confirmed according to the trigger signal, if the working state is a listening state, an audio output signal is output to the external device, and an audio input signal of the external device is received, if the working state is a hang-up state, an audio output signal is output to a default speaker, and an audio input signal of a default microphone is received, thereby realizing flexible switching of multiple audio channels through a combination of software and hardware, effectively coordinating the external speaker function and the call function, so that Android phones with call needs can switch between the external speaker and the call receiver. The system electronic device can realize the call function and is easy to use; moreover, the telephone receiver and the electronic device are connected by peripheral devices, which is easy to expand, plug and play, more convenient, and can realize the active answering and active hanging up functions, expanding the use scenarios of payment electronic devices or display electronic devices; in addition, the sensor inside the telephone receiver can trigger the interruption and connection between the electronic device and the external device to change the level state of the general input and output port to realize the answering and hanging up of the call; and, at startup, the audio module and audio policy configuration file are initialized, and the audio input is set by default through the microphone and the audio output is set through the speaker. By creating an engine object for managing the audio policy, the input and output of multi-terminal audio can be switched through the policy interface, which improves the flexibility of audio control of the electronic device.

[0069] The above are only embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the specification and drawings of the present invention, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An audio control method, characterized in that: Applied to an electronic device, the electronic device is a payment electronic device or a display electronic device, the electronic device includes a default microphone and / or a default speaker; the electronic device is used to connect to a first end of an external device, a patch seat is provided on a second end of the external device, and the patch seat is used to connect to a telephone handset, the method includes: Acquire a trigger signal of the peripheral device, wherein the trigger signal is used to confirm the connection status between the telephone handset and the patch socket; confirming the working state of the telephone handset according to the trigger signal; If the working state is a listening state, outputting an audio output signal to the peripheral device and receiving an audio input signal from the peripheral device; If the working state is the hang-up state, an audio output signal is output to the default speaker, and an audio input signal of the default microphone is received.

2. The audio control method according to claim 1, characterized in that: The confirming the working state of the telephone handset according to the trigger signal comprises: Detecting the level state of the general input / output port corresponding to the peripheral device according to the trigger signal; If the level state is a high level, determining that the working state of the telephone handset is an answering state; If the level state is a low level, it is determined that the working state of the telephone handset is a hang-up state.

3. The audio control method according to claim 2, characterized in that: Also includes: Receiving a sensing signal sent by a sensor inside the telephone handset; Determine whether the telephone handset contacts the hanging slot of the electronic device based on the sensing signal; if so, trigger an interrupt with the peripheral device to control the level state of the universal input / output port to switch from a high level to a low level; if not, trigger a connection with the peripheral device to control the level state of the universal input / output port to switch from a low level to a high level.

4. The audio control method according to claim 1, characterized in that: Before obtaining the trigger signal of the peripheral device, the method further includes: When starting, the audio module is initialized, and the audio device is obtained from the driver, where the audio device includes the default microphone and the default speaker; Initialize an audio policy profile of the electronic device based on the default microphone and the default speaker; Creating an engine object, and loading the audio policy configuration file into the engine object; A policy interface is generated based on the engine object for external invocation to implement switching of audio input and output of the electronic device.

5. The audio control method according to claim 4, characterized in that: The step of outputting an audio output signal to the peripheral device and receiving an audio input signal from the peripheral device comprises: The telephone handset is used as an external device object to call the policy interface to modify the audio policy configuration file.

6. The audio control method according to claim 4, characterized in that: The step of outputting the audio output signal to the default speaker and receiving the audio input signal from the default microphone comprises: The policy interface is called according to the default speaker and the default microphone to modify the audio policy configuration file.

7. The audio control method according to claim 1, characterized in that: The method further includes: outputting an audio output signal to the peripheral device and receiving an audio input signal from the peripheral device; Active noise reduction is performed on the audio output signal and the audio input signal through a microphone circuit on the codec of the telephone handset.

8. The audio control method according to claim 7, characterized in that: The actively reducing the audio output signal and the audio input signal by a microphone circuit on a codec of the telephone handset comprises: Collecting a noise signal corresponding to the audio output signal and the audio input signal through a microphone circuit on the codec of the telephone handset, and transmitting the noise signal to a control circuit inside the codec; The control circuit inside the codec performs calculations based on the noise signal to obtain a sound wave with a phase opposite to that of the noise signal and the same amplitude, and superimposes the sound wave with the noise signal.

9. An audio control device, characterized in that: It includes a signal acquisition module, a state confirmation module, a first audio channel switching module and a second audio channel switching module; The signal acquisition module is used to acquire a trigger signal from the peripheral device, and the trigger signal is used to confirm the connection status between the telephone handset and the patch socket; The status confirmation module is used to confirm the working status of the telephone handset according to the trigger signal; The first audio channel switching module is configured to output an audio output signal to the peripheral device and receive an audio input signal from the peripheral device if the working state is a listening state; The second audio channel switching module is used to output an audio output signal to the default speaker and receive an audio input signal from the default microphone if the working state is the hang-up state.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements each step of an audio control method as described in any one of claims 1 to 8 when executing the computer program.