Audio data acquisition method, electronic equipment and readable storage medium
By using a switching switch module and filtering unit in electronic devices, the external audio module is connected to the codec, which solves the problem of poor audio effect caused by the distance between the microphone and the user, and achieves a wider range of audio data acquisition and higher audio loudness, improving call quality.
Patent Information
- Application Number
- CN202510398297.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-04
AI Technical Summary
In scenarios such as video conferencing or voice calls, existing electronic devices have poor audio effects due to the long distance between the microphone and the user, which affects the quality and efficiency of the call.
The switch module is used to electrically connect the external audio module to the codec, combine the filter unit and the power supply unit to filter out the noise signal, and collect audio data through the external audio module in a fixed position.
It expands the audio range of electronic devices, improves the sound clarity and audio loudness, and improves the quality of audio communication.
Smart Images

Figure CN120264182A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of control technologies, and particularly to an audio data acquisition method, an electronic device, and a readable storage medium. Background Art
[0002] Existing electronic devices are usually provided with microphones to collect the sounds of the surrounding environment. When the number of microphones is multiple, collecting the sounds of the surrounding environment by multiple microphones can increase the sound collection range.
[0003] In some scenarios such as video conferences or voice calls, the distance between the electronic device and the user is relatively far, and the sound collection effect of the microphone is poor, such as the sound being too small or the other party on the call not being able to hear clearly, etc., which affects the call quality and efficiency. Summary of the Invention
[0004] The present disclosure provides an audio data acquisition method, an electronic device, and a readable storage medium to solve the deficiencies of the related technologies.
[0005] According to a first aspect of an embodiment of the present disclosure, an electronic device is provided, including a codec, a switching switch module, a communication interface module, and a local audio module; the switching switch module is electrically connected to the communication interface module and the local audio module respectively; the local audio module includes a first local audio module and a second local audio module;
[0006] The communication interface module is used to connect to an external audio module;
[0007] The switching switch module is used to switch to the connection between the external audio module and the codec after the external audio module is connected to the communication interface module; the codec is electrically connected to the first local audio module before the switching switch module switches;
[0008] The first audio data collected by the external audio module and the second audio data collected by the second local audio module are used as the audio data of the electronic device.
[0009] Optionally, the communication interface module includes: a first filtering unit and a peripheral power supply unit; the first filtering unit is electrically connected to the codec and the peripheral power supply unit respectively; the peripheral power supply unit is electrically connected to the external audio module; the first filtering unit is used to filter the DC signal in the first audio data; the codec is used to supply power to the peripheral power supply unit; the peripheral power supply unit is used to supply power to the external audio module.
[0010] Optionally, the first filtering unit includes a first capacitor and a second capacitor; the first capacitor is connected in series between the first end of the peripheral power supply unit and the first pin of the codec; the second capacitor is connected in series between the second end of the peripheral power supply unit and the second pin of the codec.
[0011] Optionally, the peripheral power supply unit includes a first resistor, a second resistor, and a third capacitor;
[0012] The first end of the first resistor is electrically connected to the first power supply pin of the codec, and the second end of the first resistor is electrically connected to the first end of the peripheral power supply unit and the first end of the second resistor respectively;
[0013] The second end of the second resistor is electrically connected to the first end of the peripheral power supply unit, the first end of the third capacitor, and the first end of the external audio module respectively;
[0014] The second end of the third capacitor is grounded, and the second end of the external audio module is grounded.
[0015] Optionally, the communication interface module further includes a second filtering unit; the second filtering unit is electrically connected to the first filtering unit and the peripheral power supply unit respectively;
[0016] The second filtering unit is used to filter out the noise signals received by the external audio module.
[0017] Optionally, the second filtering unit includes a fourth capacitor, a fifth capacitor, and a sixth capacitor;
[0018] The first end of the fourth capacitor is electrically connected to the second end of the peripheral power supply unit, and the second end of the fourth capacitor is electrically connected to the first end of the peripheral power supply unit and the first end of the fifth capacitor respectively; the second end of the fifth capacitor is grounded;
[0019] The first end of the sixth capacitor is electrically connected to the first end of the fourth capacitor, and the second end of the sixth capacitor is grounded.
[0020] Optionally, the communication interface module further includes a third filtering unit; the third filtering unit is electrically connected to the peripheral power supply unit and the interface of the communication interface module respectively; the third filtering unit is used to filter out the noise signals received by the external audio module.
[0021] Optionally, the third filtering unit includes a seventh capacitor and a bead device;
[0022] The first end of the seventh capacitor is electrically connected to the second end of the peripheral power supply unit, and the second end of the seventh capacitor is grounded;
[0023] The first end of the magnetic bead device is electrically connected to the first end of the peripheral power supply unit, and the second end of the magnetic bead device is electrically connected to the interface of the communication interface module.
[0024] Optionally, the first end of the peripheral power supply unit is further electrically connected to the category identification pin of the codec; the codec is configured to identify the category of the external audio module according to the voltage value at the first end of the peripheral power supply unit, and the category of the external audio module includes an analog peripheral or a data peripheral.
[0025] Optionally, the local audio module includes a microphone device and a matching circuit; the matching circuit includes: a first 0-ohm resistor, a second 0-ohm resistor, a third 0-ohm resistor, a seventh capacitor, an eighth capacitor, a ninth capacitor, a tenth capacitor, and an eleventh capacitor;
[0026] The first end of the first 0-ohm resistor is electrically connected to the first pin of the codec, and the second end of the first 0-ohm resistor is electrically connected to the second end of the seventh capacitor, the first end of the eighth capacitor, and the output end of the local audio module; the second end of the eighth capacitor is grounded;
[0027] The first end of the second 0-ohm resistor is electrically connected to the second pin of the codec, and the second end of the second 0-ohm resistor is electrically connected to the first end of the seventh capacitor, the first end of the third 0-ohm resistor, the ground end of the local audio module, and the first end of the ninth capacitor; the second end of the ninth capacitor is grounded;
[0028] The second end of the third 0-ohm resistor is grounded, the first ends of the tenth capacitor and the eleventh capacitor are electrically connected to the power supply end of the local audio module respectively, and the second ends of the tenth capacitor and the eleventh capacitor are grounded.
[0029] Optionally, the electronic device further includes a processor; the processor is electrically connected to the switching switch module; the processor is configured to generate a control signal to the switching switch module after detecting that the external audio module is connected to the communication interface module;
[0030] The switching switch module is configured to switch from being electrically connected to the first local audio module to being electrically connected to the communication interface module after receiving the control signal, so as to switch from transmitting the audio data collected by the first local audio module to transmitting the first audio data collected by the external audio module.
[0031] According to a second aspect of the embodiments of the present disclosure, there is provided an audio data acquisition method, the method including:
[0032] After detecting that the external audio module is connected to the communication interface module, determining the category of the external audio module;
[0033] According to the category of the external audio module, control the switching switch module of the electronic device to switch to the connection where the external audio module is electrically connected to the codec; before the switching of the switching switch module, the codec is electrically connected to the first local audio module;
[0034] Obtain the first audio data collected by the external audio module and the second audio data collected by the second local audio module as the audio data of the electronic device.
[0035] According to the third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0036] A codec, a switching switch module, a communication interface module, and a local audio module;
[0037] A processor;
[0038] A memory for storing computer programs executable by the processor;
[0039] Wherein, the processor is configured to execute the computer program in the memory to implement the method as described in the second aspect.
[0040] According to the fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, when the executable computer program in the storage medium is executed by a processor, it can implement the method as described in the second aspect.
[0041] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0042] The electronic device provided by the embodiments of the present disclosure includes a codec, a switching switch module, a communication interface module, and a local audio module; the switching switch module is electrically connected to the communication interface module and the local audio module respectively; the local audio module includes a first local audio module and a second local audio module; the communication interface module is used to connect to an external audio module; the switching switch module is used to switch to the connection where the external audio module is electrically connected to the codec after the external audio module is connected to the communication interface module; before the switching of the switching switch module, the codec is electrically connected to the first local audio module; the first audio data collected by the external audio module and the second audio data collected by the second local audio module are used as the audio data of the electronic device. In this way, in this embodiment, by adopting the solution of using an external audio module to replace the local audio module to collect audio data, compared with the fixed position of the local audio module in the electronic device, since the moving range of the external audio module is greater than that of the local audio module, the sound collection range of the audio module of the electronic device can be extended, the sound collection clarity and audio loudness can be improved, and the audio communication quality can be enhanced.
[0043] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure. Brief Description of the Drawings
[0044] The drawings herein are incorporated into the specification and form a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0045] Figure 1 is a schematic diagram of an electronic device shown according to an exemplary embodiment.
[0046] Figure 2 is a block diagram of a communication interface module shown according to an exemplary embodiment.
[0047] Figure 3 is a circuit diagram of a communication interface module shown according to an exemplary embodiment.
[0048] Figure 4 is a block diagram of another communication interface module shown according to an exemplary embodiment.
[0049] Figure 5 is a circuit diagram of another communication interface module shown according to an exemplary embodiment.
[0050] Figure 6 is a block diagram of yet another communication interface module shown according to an exemplary embodiment.
[0051] Figure 7 is a circuit diagram of yet another communication interface module shown according to an exemplary embodiment.
[0052] Figure 8 is a circuit diagram of a matching circuit of a local audio module shown according to an exemplary embodiment.
[0053] Figure 9 is a schematic diagram of the sound collection range of an electronic device shown according to an exemplary embodiment.
[0054] Figure 10 is a schematic diagram of the sound collection range of another electronic device shown according to an exemplary embodiment.
[0055] Figure 11 is a schematic diagram of the pins of a processor CPU shown according to an exemplary embodiment.
[0056] Figure 12 is a schematic diagram of the pins of a codec 14, i.e., a Codec chip, shown according to an exemplary embodiment.
[0057] Figure 13It is a schematic diagram of the pins of a switching switch module shown according to an exemplary embodiment.
[0058] Figure 14 It is a schematic diagram of the TypeC MIC USB interface circuit of a local audio module shown according to an exemplary embodiment.
[0059] Figure 15 It is a schematic diagram of the TypeC MIC USB interface circuit of an external audio module shown according to an exemplary embodiment.
[0060] Figure 16 It is a flowchart of an audio data acquisition method shown according to an exemplary embodiment. Detailed implementation manners
[0061] Here, the exemplary embodiments will be described in detail, and the examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The exemplary embodiments described below do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims. It should be noted that, without conflict, the features in the following embodiments and implementation manners can be combined with each other.
[0062] To solve the above technical problems, the embodiments of the present disclosure provide an audio data acquisition method, an electronic device, and a readable storage medium, which can be applicable to electronic devices. The electronic device may include, but is not limited to, a smart phone, a tablet computer, a Bluetooth speaker, a personal terminal, or a display screen and other devices with audio functions. For the convenience of describing the solution, the following embodiments will describe the solutions of each embodiment with a tablet computer as an example, but it does not constitute a limitation to the solutions of the present disclosure.
[0063] See Figure 1 , the electronic device may include: a switching switch module 11, a communication interface module 12, a local audio module 13, and a codec 14. The switching switch module 11 is electrically connected to the communication interface module 12 and the local audio module 13 respectively; the codec 14 is electrically connected to the communication interface module 12 through the switching switch module 11 respectively; the local audio module 13 is electrically connected to the codec 14;
[0064] The communication interface module 12 is used to connect to the external audio module 10;
[0065] The switching switch module 11 is used to switch to electrically connect the external audio module 10 to the codec 14 after the external audio module 10 is connected to the communication interface module 12; the codec is electrically connected to the first local audio module before the switching of the switching switch module; or rather, before the switching switch module 11 switches, the first local audio module is electrically connected to the codec 14; after the switching, the external audio module 10 is electrically connected to the codec 14, and can replace the first local audio module to be electrically connected to the codec.
[0066] The first audio data collected by the external audio module 10 and the second audio data collected by the second local audio module are used as the audio data of the electronic device.
[0067] Considering that the installation position of the local audio module 13 in the electronic device is fixed, the sound collection range of the electronic device is relatively fixed. In this embodiment, an external audio module with a variable position is used to replace the local audio module to collect audio data. The moving range of the external audio module is greater than that of the local audio module, which can expand the sound collection range of the audio module of the electronic device, improve the sound collection clarity and audio loudness, and improve the audio communication quality.
[0068] In one embodiment, the above external audio module 10 can be implemented by using a headset, a microphone, other electronic devices, etc. equipped with an audio collection function (i.e., a microphone). The external audio module 10 and the electronic device can be implemented by means of wired connection and / or wireless connection, etc. For the convenience of describing the solution, the subsequent embodiments will be described by taking the wired connection method as an example.
[0069] In one embodiment, the switching switch module 11 can be implemented by using a circuit or a chip with a switching function. In one example, the switching switch module 11 can be implemented by using an audio switch chip, such as a TypeC Audio Swicth.
[0070] In one embodiment, refer to Figure 2, the communication interface module 12 may include a first filtering unit 121 and a peripheral power supply unit 122. The first filtering unit 121 is electrically connected to the codec 14 and the peripheral power supply unit 122 respectively; the peripheral power supply unit 122 is electrically connected to the external audio module 10; the first filtering unit 121 is used to filter the DC signal in the first audio data; the codec 14 is used to supply power to the peripheral power supply unit 122; the peripheral power supply unit 122 is used to supply power to the external audio module 10. In this way, after the communication interface module 12 of the electronic device is inserted into the external audio module 10, the peripheral power supply unit 122 supplies power to the external audio module 10; in this scenario, after the external audio module 10 is powered on and works, it can collect the surrounding environmental sounds to generate audio data, that is, the above-mentioned first audio data. The first filtering unit 121 performs filtering processing on the above-mentioned first audio data to filter the DC signal in the first audio data and ensure the signal quality of the first audio data.
[0071] In one embodiment, referring to Figure 3 , the first filtering unit 121 may include a first capacitor C1 and a second capacitor C2; the first capacitor C1 is connected in series between the first terminal P1 of the peripheral power supply unit 122 and the first pin AU_VIN1_P of the codec 14, and is used to filter the DC signal between the first terminal P1 and the first pin AU_VIN1_P; the second capacitor C2 is connected in series between the second terminal P2 of the peripheral power supply unit 122 and the second pin AU_VIN1_N of the codec 14, and is used to filter the DC signal between the second terminal P2 and the second pin AU_VIN1_N. In one example, the first capacitor C1 and the second capacitor C2 may be implemented by capacitors of 100 nF. In this way, the first capacitor C1 and the second capacitor C2 jointly filter the DC signal to ensure the signal quality of the first audio data.
[0072] In one embodiment, continue to refer to Figure 3, the peripheral power supply unit 122 may include a first resistor R1, a second resistor R2, and a third capacitor C3. The first end of the first resistor R1 is electrically connected to the first power supply pin AU_MIC_BIAS1 of the codec 14, and the second end of the first resistor R1 is electrically connected to the second end P2 of the peripheral power supply unit 122 and the first end of the second resistor R2 respectively; the second end of the second resistor R2 is electrically connected to the second end of the peripheral power supply unit 122, the first end of the third capacitor C3, and the first end of the external audio module 10 respectively; the second end of the third capacitor C3 is grounded to GND, and the second end of the external audio module 10 is grounded to GND. In one example, the first resistor R1 may be implemented with a 1K ohm resistor, and the second resistor R2 may be implemented with a 1.5K ohm resistor. The third capacitor may be implemented with a 10nF capacitor. In this way, in this embodiment, the first resistor R1 and the second resistor R2 can form a voltage dividing circuit to supply power to the external audio module; and the third capacitor C3 can filter out AC signals, reduce the influence of ripple on the external audio module, and improve the power supply quality. Also, the third capacitor C3 can filter out RF signals, which is beneficial to improving the signal-to-noise ratio of audio data.
[0073] In one embodiment, referring to Figure 4 , the communication interface module 12 further includes a second filtering unit 123; the second filtering unit 123 is electrically connected to the first filtering unit 121 and the peripheral power supply unit 122 respectively; the second filtering unit 123 is used to filter out the noise signals received by the external audio module 10. In this embodiment, by setting the second filtering unit 123, the noise signals of the surrounding environment used by the external audio module 10 can be filtered out, such as RF signals, Bluetooth signals, or WiFi signals of the electronic device, etc., to improve the signal-to-noise ratio of the first audio data.
[0074] In one embodiment, referring to Figure 5 , the second filtering unit 123 includes a fourth capacitor C4, a fifth capacitor C5, and a sixth capacitor C6. The first end of the fourth capacitor C4 is electrically connected to the second end P2 of the peripheral power supply unit 122, and the second end of the fourth capacitor C4 is electrically connected to the first end P1 of the peripheral power supply unit 122 and the first end of the fifth capacitor C5 respectively; the second end of the fifth capacitor C5 is grounded to GND; the first end of the sixth capacitor C6 is electrically connected to the first end of the fourth capacitor C4, and the second end of the sixth capacitor C6 is grounded to GND. In one example, the fourth capacitor C4 may be implemented with 100pF; the fifth capacitor C5 may be implemented with a 33pF capacitor; the sixth capacitor C6 may be implemented with a 33p capacitor. In this way, in this embodiment, the fourth capacitor C4, the fifth capacitor C5, and the sixth capacitor C6 can filter out RF signals in the medium and high frequency bands, such as RF signals of 400 - 800Mhz and / or 2.5GHz, which is beneficial to improving the signal-to-noise ratio of the first audio data.
[0075] In one embodiment, referring toFigure 6 Moreover, the communication interface module 12 further includes a third filtering unit 124. The third filtering unit 124 is electrically connected to the peripheral power supply unit 122 and the interface of the communication interface module 12 respectively; the third filtering unit 124 is used to filter out the noise signals received by the external audio module 10. In this way, in this embodiment, by setting the third filtering unit 124, the signal-to-noise ratio of the first audio data can be improved.
[0076] In one embodiment, referring to Figure 7 the third filtering unit 124 includes a seventh capacitor C7 and a bead device B; the first end of the seventh capacitor C7 is electrically connected to the second end P2 of the peripheral power supply unit 122, and the second end of the seventh capacitor C7 is grounded to GND; the first end of the bead device B is electrically connected to the first end P1 of the peripheral power supply unit 122, and the second end of the bead device B is electrically connected to the interface of the communication interface module 12. In one example, the seventh capacitor C7 can be implemented by a 4.7uF capacitor; the type of the bead device B can be selected, for example, a bead with an impedance of 1800 ohms at 100MHz can be selected to suppress high-frequency noise and spike interference. In this way, in this embodiment, through the seventh capacitor C7 and the bead device B, the signal-to-noise ratio of the first audio data is improved.
[0077] In one embodiment, continuing to refer to Figure 7 the first end P1 of the peripheral power supply unit 122 is also electrically connected to the class identification pin ACCDET of the codec 14; the codec 14 is used to identify the operation class of the external audio module 10 according to the voltage value at the first end of the peripheral power supply unit 122, and the operation classes of the external audio module 10 include increasing the volume, decreasing the volume, hanging up, etc. In this way, in this embodiment, by identifying the operation class of the external audio module 10, it is beneficial to obtain high-quality first audio data.
[0078] In one embodiment, referring to Figure 8 the local audio module 13 includes a microphone device MIC and a matching circuit 131. The matching circuit 131 includes: a first zero-ohm resistor R01, a second zero-ohm resistor R02, a third zero-ohm resistor R03, a seventh capacitor C7, an eighth capacitor C8, a ninth capacitor C9, a tenth capacitor C10, and an eleventh capacitor C11.
[0079] The first end of the first zero-ohm resistor R01 is electrically connected to the first pin AU_VIN1_P of the codec 14, and the second end of the first zero-ohm resistor R01 is electrically connected to the second end of the seventh capacitor C7, the first end of the eighth capacitor C8, and the output end Output of the local audio module 13 respectively; the second end of the eighth capacitor C8 is grounded to GND;
[0080] The first end of the 20-ohm resistor R02 is electrically connected to the second pin AU_VIN1-N of the codec 14, and the second end of the 20-ohm resistor R02 is electrically connected to the first end of the seventh capacitor C7, the first end of the 30-ohm resistor R03, the ground terminal GND of the local audio module 13, and the first end of the ninth capacitor C9; the second end of the ninth capacitor C9 is grounded to GND;
[0081] The second end of the 30-ohm resistor R03 is grounded to GND, the first end of the tenth capacitor C10 is electrically connected to the power supply terminal Power of the local audio module 13, and the second end of the tenth capacitor C10 is grounded to GND.
[0082] In one example, the seventh capacitor C7 and the ninth capacitor C9 can be implemented with 33 pF capacitors, the eighth capacitor C8 can be implemented with 100 pF capacitors, the tenth capacitor C10 can be implemented with 33 pF capacitors, and the eleventh capacitor C11 can be implemented with 100 nF capacitors.
[0083] In this embodiment, the first 0-ohm resistor R01 and the second 0-ohm resistor R02 are set to achieve circuit connection; the seventh capacitor C7, the eighth capacitor C8, and the ninth capacitor C9 are set to filter out radio frequency signals, which has the same function as the second filtering unit 123; the 30-ohm resistor R03 can ground the second end of the second 0-ohm resistor to keep the wire at zero potential; the tenth capacitor C10 and the eleventh capacitor C11 are used to filter out radio frequency interference introduced from the power supply side.
[0084] In one embodiment, the electronic device further includes a processor CPU. Refer to Figure 1 , the processor CPU is electrically connected to the switching switch module 11; the processor CPU is configured to generate a control signal to the switching switch module 11 after detecting the connection between the external audio module 10 and the communication interface module 12; the switching switch module 11 is configured to switch from being electrically connected to the first local audio module to being electrically connected to the communication interface module 12 after receiving the control signal, so as to switch from transmitting the audio data collected by the first local audio module to transmitting the first audio data collected by the external audio module. Considering that in addition to the first local audio module, the second local audio module continues to receive the second audio data, at this time the processor CPU can receive the first audio data and the second audio data. Considering that the moving range of the external audio module 10 is much larger than the activity range of the local audio module, after the external audio module 10 is connected to the electronic device, the sound collection range of the electronic device changes from Figure 9 to Figure 10 , achieving the effect of increasing the 360-degree circular sound collection range (or circular sound field) of the electronic device.
[0085] Based on the above Figures 1 to 10 illustrated electronic device, this embodiment provides an implementation solution for an electronic device. Figure 11It is a schematic diagram of the pins of a processor CPU shown according to an exemplary embodiment. Figure 12 It is a schematic diagram of the pins of a codec 14, i.e., a Codec chip, shown according to an exemplary embodiment. Figure 13 It is a schematic diagram of the pins of a switching switch module shown according to an exemplary embodiment. Figure 14 It is a schematic diagram of the TypeC MIC USB interface circuit of a local audio module shown according to an exemplary embodiment. Figure 15 It is a schematic diagram of the TypeC MIC USB interface circuit of an external audio module shown according to an exemplary embodiment. Combining Figures 11 to 15 the exemplified circuit schematic and Figure 7 and Figure 8 the exemplified circuits, the process by which the electronic device acquires audio data is as shown in Figure 16 and includes:
[0086] In the t1 stage, when the audio acquisition function, i.e., the MIC function, needs to be called in scenarios such as calls, recordings, and conferences, the corresponding application program app is started.
[0087] During this stage, the processor CPU works, the COPEC works, and the control pins AU_MICBIAS0 are powered on, AU_MICBIAS1 are powered on, and AU_MICBIAS2 are powered on. The four channels of AU_VIN1_P / N, AU_VIN2_P / N, AU_VIN3_P / N, and AU_VIN4_P / N are in the open state.
[0088] It should be noted that AU_MICBIAS0 powers local MIC1 and local MIC4, AU_MICBIAS1 powers external TypeC MIC1 and external TypeC MIC2, and AU_MICBIAS2 powers local MIC2 and local MIC3. When external TypeC MIC1 and external TypeC MIC2 are inserted, AU_MICBIAS1 is powered on while AU_MICBIAS0 is not powered on; when external TypeC MIC1 and external TypeC MIC2 are not inserted, AU_MICBIAS1 is not powered on while AU_MICBIAS0 is powered on; U_MICBIAS2 is always powered on to supply power to local MIC2 and local MIC3.
[0089] In the t2 stage, when the processor CPU detects that an external device is inserted, the communication interface module is implemented using a USB TypeC interface. In this scenario, the processor can determine whether the external device is a TypeC MIC, i.e., an external audio module. If it is a TypeC MIC, then execute:
[0090] When AU_MICBIAS0 is not powered on, the transmission channel of the local audio module is disconnected; when AU_MICBIAS1 is powered on, the transmission channel of the external audio module is enabled; when AU_MICBIAS2 is powered on, the transmission channels of the local audio module, namely the transmission channels of local MIC2 and local MIC3, are enabled.
[0091] Drive and configure the Codec channels AU_VIN1_P / N and AU_VIN4_P / N to be in analog working mode, ACC mode; drive and configure the Codec channels AU_VIN2_P / N and AU_VIN3_P / N to be in digital working mode, DCC mode.
[0092] The Codec receives the first audio data collected by TypeC MIC1 (replacing local MIC1) and TypeC MIC2, and the second audio data collected by local MIC2 and MIC3. After encoding and decoding the above first audio data and second audio data, it is sent to the processor CPU.
[0093] The CPU processes the first audio data and the second audio data after encoding and decoding.
[0094] At stage t3, when the CPU detects that an external device is inserted and determines that it is not TypeC MIC, the following operations are performed:
[0095] When AU_MICBIAS0 is powered on, the transmission channels of the local audio module, namely local MIC1 and local MIC4, are enabled; when AU_MICBIAS1 is not powered on, the transmission channel of the external audio module is disconnected; when AU_MICBIAS2 is powered on, the transmission channels of the local audio module, namely the transmission channels of local MIC2 and local MIC3, are enabled.
[0096] Drive and configure the Codec channels AU_VIN1_P / N and AU_VIN4_P / N to be in digital working mode, DCC mode.
[0097] Drive and configure the Codec channels AU_VIN2_P / N and AU_VIN3_P / N to be in digital working mode, DCC mode.
[0098] The Codec receives the second audio data output by MIC1, MIC2, MIC3, and MIC4. After encoding and decoding the above four-way second audio data, it is sent to the processor CPU.
[0099] The CPU processes the four-way second audio data after encoding and decoding.
[0100] At stage t4, when the CPU detects that no TypeC device is inserted, the following operations are performed:
[0101] AU_MICBIAS0 is powered on to enable the transmission channels of the local audio module, namely the local MIC1 and local MIC4; AU_MICBIAS1 is not powered on to disconnect the transmission channel of the external audio module; AU_MICBIAS2 is powered on to enable the transmission channels of the local audio module, namely the local MIC2 and local MIC3.
[0102] Drive and configure the Codec channels AU_VIN1_P / N and AU_VIN4_P / N to the digital working mode DCC mode.
[0103] Drive and configure the Codec channels AU_VIN2_P / N and AU_VIN3_P / N to the digital working mode DCC mode.
[0104] The Codec receives the second audio data output by MIC1, MIC2, MIC3, and MIC4; after encoding and decoding the above four-way second audio data, it is sent to the processor CPU.
[0105] The CPU processes the second audio data after four-way encoding and decoding.
[0106] It should be noted that this embodiment exemplifies a scenario where there are 4 local MICs in the local audio module within the electronic device and two USB Type-C interfaces allow one or two external audio modules to be inserted. After the external audio module is inserted into USB Type-C interface 1, it can replace local MIC1 to collect audio data; after the external audio module is inserted into USB Type-C interface 2, it can replace local MIC4 to collect audio data; while local MIC2 and MIC3 collect audio data synchronously, and finally form four-way audio data for the processor CPU to use.
[0107] In an example scenario, when no external audio module is inserted into the electronic device, when the local MIC1 to MIC4 are arranged with a spacing of 30 - 70 mm, the sound loudness that can be picked up is 60 dB; assuming that local MIC1 and MIC4 are respectively replaced by external MIC1 and MIC4, for every 10 cm increase in the wire length between the external MIC1 and MIC4 and the electronic device, the picked-up loudness increases by 6 dB; when it increases from 10 cm to 1 m, the picked-up loudness increases by 30 dB, and the picked-up loudness of the electronic device becomes 96 dB. In this way, in this embodiment, the problems of small picked-up loudness, short picked-up distance, or strong picked-up directivity of the electronic device can be solved, and the use experience of picking up sound with the electronic device can be improved.
[0108] Based on the above example content, it can be seen that in the solution of this embodiment, after detecting that an external audio module is connected to the communication interface module, the type of the external audio module can be determined; according to the type of the external audio module, the switching switch module can be controlled to switch to electrically connect the external audio module to the codec, so as to replace the first local audio module having a mapping relationship therewith and be electrically connected to the codec; then, the first audio data collected by the external audio module and the second audio data collected by the second local audio module are obtained as the audio data of the electronic device, which can expand the sound collection range of the audio module of the electronic device, improve the sound collection clarity and audio loudness, and improve the audio communication quality.
[0109] In an exemplary embodiment, an electronic device is further provided, including:
[0110] a codec, a switching switch module, a communication interface module, and a local audio module;
[0111] a processor;
[0112] a processor;
[0113] a memory for storing computer programs executable by the processor;
[0114] wherein, the processor is configured to execute the computer program in the memory to implement the method as described above.
[0115] In an exemplary embodiment, a computer-readable storage medium is further provided, such as a memory including an executable computer program, and the above executable computer program can be executed by the processor to implement the method of the above embodiment. Among them, the readable storage medium can be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0116] Those skilled in the art will readily think of other implementation manners of the present disclosure after considering the specification and practicing the disclosure here. The present disclosure is intended to cover any variations, uses, or adaptations, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed by the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0117] It should be understood that the present disclosure is not limited to the exact structures already described and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. An electronic device, characterized in that, It includes a codec, a switching switch module, a communication interface module, and a local audio module; the switching switch module is electrically connected to the communication interface module and the local audio module respectively; the local audio module includes a first local audio module and a second local audio module; The communication interface module is used to connect to an external audio module; The switching switch module is used to switch to the connection between the external audio module and the codec after the external audio module is connected to the communication interface module; The codec is electrically connected to the first local audio module before the switching switch module switches; The first audio data collected by the external audio module and the second audio data collected by the second local audio module serve as the audio data of the electronic device.
2. The electronic device according to claim 1, wherein The communication interface module includes: a first filtering unit and a peripheral power supply unit; the first filtering unit is electrically connected to the codec and the peripheral power supply unit respectively; the peripheral power supply unit is electrically connected to the external audio module; the first filtering unit is used to filter the DC signal in the first audio data; the codec is used to supply power to the peripheral power supply unit; the peripheral power supply unit is used to supply power to the external audio module.
3. The electronic device according to claim 2, wherein The first filtering unit includes a first capacitor and a second capacitor; the first capacitor is connected in series between the first end of the peripheral power supply unit and the first pin of the codec; the second capacitor is connected in series between the second end of the peripheral power supply unit and the second pin of the codec.
4. The electronic device according to claim 2 or 3, characterized in that, The peripheral power supply unit includes a first resistor, a second resistor, and a third capacitor; The first end of the first resistor is electrically connected to the first power pin of the codec, and the second end of the first resistor is electrically connected to the first end of the peripheral power supply unit and the first end of the second resistor respectively; The second end of the second resistor is electrically connected to the first end of the peripheral power supply unit, the first end of the third capacitor, and the first end of the external audio module respectively; The second end of the third capacitor is grounded, and the second end of the external audio module is grounded.
5. The electronic device according to claim 4, wherein The communication interface module further includes a second filtering unit; the second filtering unit is electrically connected to the first filtering unit and the peripheral power supply unit respectively; The second filtering unit is used to filter the noise signal received by the external audio module.
6. The electronic device according to claim 5, wherein The second filtering unit includes a fourth capacitor, a fifth capacitor, and a sixth capacitor; The first end of the fourth capacitor is electrically connected to the second end of the peripheral power supply unit, and the second end of the fourth capacitor is electrically connected to the first end of the peripheral power supply unit and the first end of the fifth capacitor respectively; the second end of the fifth capacitor is grounded; The first end of the sixth capacitor is electrically connected to the first end of the fourth capacitor, and the second end of the sixth capacitor is grounded.
7. The electronic device according to claim 4, wherein The communication interface module further includes a third filtering unit; the third filtering unit is electrically connected to the peripheral power supply unit and the interface of the communication interface module respectively; the third filtering unit is used to filter the noise signal received by the external audio module.
8. The electronic device according to claim 7, wherein The third filtering unit includes a seventh capacitor and a magnetic bead device; The first end of the seventh capacitor is electrically connected to the second end of the peripheral power supply unit, and the second end of the seventh capacitor is grounded; The first end of the bead device is electrically connected to the first end of the peripheral power supply unit, and the second end of the bead device is electrically connected to the interface of the communication interface module.
9. The electronic device according to claim 4, wherein The local audio module includes a microphone device and a matching circuit; the matching circuit includes: a first zero-ohm resistor, a second zero-ohm resistor, a third zero-ohm resistor, a seventh capacitor, an eighth capacitor, a ninth capacitor, a tenth capacitor, and an eleventh capacitor; The first end of the first zero-ohm resistor is electrically connected to the first pin of the codec, and the second end of the first zero-ohm resistor is electrically connected to the second end of the seventh capacitor, the first end of the eighth capacitor, and the output end of the local audio module respectively; the second end of the eighth capacitor is grounded; The first end of the second zero-ohm resistor is electrically connected to the second pin of the codec, and the second end of the second zero-ohm resistor is electrically connected to the first end of the seventh capacitor, the first end of the third zero-ohm resistor, the ground end of the local audio module, and the first end of the ninth capacitor respectively; the second end of the ninth capacitor is grounded; The second end of the third zero-ohm resistor is grounded, the first ends of the tenth capacitor and the eleventh capacitor are electrically connected to the power supply end of the local audio module respectively, and the second ends of the tenth capacitor and the eleventh capacitor are grounded.
10. The electronic device according to claim 1, characterized in that, The electronic device further includes a processor; the processor is electrically connected to the switching switch module; the processor is configured to generate a control signal for the switching switch module after detecting that an external audio module is connected to the communication interface module; The switching switch module is configured to switch from being electrically connected to the first local audio module to being electrically connected to the communication interface module after receiving the control signal, so as to switch from transmitting the audio data collected by the first local audio module to transmitting the first audio data collected by the external audio module.
11. An audio data acquisition method, characterized in that, The method includes: After detecting that an external audio module is connected to the communication interface module, determining the category of the external audio module; According to the category of the external audio module, controlling the switching switch module of the electronic device to switch to electrically connect the external audio module to the codec; the codec is electrically connected to the first local audio module before the switching switch module switches; Obtaining the first audio data collected by the external audio module and the second audio data collected by the second local audio module as the audio data of the electronic device.
12. An electronic device, characterized in that, Including: A codec, a switching switch module, a communication interface module, and a local audio module; A processor; A memory for storing computer programs executable by the processor; Wherein, the processor is configured to execute the computer program in the memory to implement the method as claimed in claim 11.
13. A computer-readable storage medium, characterized in that, When the executable computer program in the storage medium is executed by the processor, the method as claimed in claim 11 can be implemented.