CN114710583A - Microphone calling method and device, electronic equipment and readable storage medium - Google Patents

Microphone calling method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114710583A
CN114710583A CN202210366201.8A CN202210366201A CN114710583A CN 114710583 A CN114710583 A CN 114710583A CN 202210366201 A CN202210366201 A CN 202210366201A CN 114710583 A CN114710583 A CN 114710583A
Authority
CN
China
Prior art keywords
microphone
sound data
equipment
external
electronic device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210366201.8A
Other languages
Chinese (zh)
Inventor
王晓雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202210366201.8A priority Critical patent/CN114710583A/en
Publication of CN114710583A publication Critical patent/CN114710583A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Telephone Function (AREA)

Abstract

The application discloses a microphone calling method and device, electronic equipment and a readable storage medium, and belongs to the technical field of terminal equipment. The microphone calling method comprises the following steps: detecting the type of external equipment under the condition that the earphone interface is accessed with the external equipment; detecting first sound data of a microphone channel of the electronic device and second sound data of a microphone channel of a four-stage device when the external device is the four-stage device; calling a microphone of the electronic device when the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold; invoking a microphone of the four-stage device if a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to the first threshold.

Description

Microphone calling method and device, electronic equipment and readable storage medium
Technical Field
The application belongs to the technical field of terminal equipment, and particularly relates to a microphone calling method and device, electronic equipment and a readable storage medium.
Background
With the development of electronic devices, not only the rear-end shooting effect is good, but also the front-end shooting effect is good, and therefore, the front-end shooting effect is often used for self-shooting. When many people are autodyned together, need one person handheld electronic equipment to shoot, because the distance is close, probably can make someone can not shoot, can adopt at this moment to shoot supplementary shooting apparatus such as selfie stick and shoot. In some examples, the selfie stick has two forms of connection through wireless Bluetooth and wired connection. For wired connection, the selfie stick is connected with the electronic equipment end through the earphone interface of the electronic equipment, at the moment, the electronic equipment end can wrongly identify the selfie stick as an earphone, and the selfie stick can use the functions related to the earphone, such as a play/pause key, to control the selfie stick to take a picture or make a video.
Under the condition that the electronic equipment end will be from rapping bar ground discernment for the earphone by mistake, if the user uses from rapping bar to record a video, the electronic equipment end can open earphone microphone passageway, does not have the microphone from the rapping bar in fact, and this just leads to the user to use not have sound when recording a video from the rapping bar, influences user experience.
Disclosure of Invention
The embodiment of the application provides a microphone calling method and device, electronic equipment and a readable storage medium, and can solve the problem that no sound exists when a selfie stick is used for recording video in the prior art.
In a first aspect, an embodiment of the present application provides a microphone calling method, which is applied to an electronic device, where the electronic device is provided with an earphone interface, and the method includes:
under the condition that the earphone interface is connected with external equipment, detecting the type of the external equipment;
detecting first sound data of a microphone channel of the electronic device and second sound data of a microphone channel of a four-stage device when the external device is the four-stage device;
calling a microphone of the electronic device when the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold;
invoking a microphone of the four-stage device if a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to the first threshold.
In a second aspect, an embodiment of the present application provides a microphone invoking device, which is applied to an electronic device, where the electronic device is provided with a headset interface, and the microphone invoking device includes:
the first detection module is used for detecting the type of the external equipment under the condition that the external equipment is connected to the earphone interface;
a second detection module, configured to detect, when the external device is a four-stage device, first sound data of a microphone channel of the electronic device and second sound data of the microphone channel of the four-stage device;
the first calling module is used for calling a microphone of the electronic equipment under the condition that the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold value;
a second calling module, configured to call a microphone of the four-stage device when a difference between the amplitude of the first sound data and the amplitude of the second sound data is smaller than or equal to the first threshold.
In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the first aspect.
In a fourth aspect, embodiments of the present application provide a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a chip, where the chip includes a processor and a communication interface, where the communication interface is coupled to the processor, and the processor is configured to execute a program or instructions to implement the method according to the first aspect.
In the embodiment of the application, first, when an external device is connected to an earphone interface, the type of the external device is detected, then, when the external device is determined to be a four-segment device, first sound data of a microphone channel of an electronic device and second sound data of the microphone channel of the four-segment device are detected, and finally, when a difference between a magnitude of the first sound data and a magnitude of the second sound data is larger than a first threshold value, a microphone of the electronic device is called, otherwise, the microphone of the four-segment device is called. Under the condition that the external equipment is judged to be four-section type equipment, whether a microphone is arranged on the four-section type equipment or not is further judged, whether the microphone can be normally used or not is judged, the microphone on the four-section type equipment is used if the microphone can be normally used, otherwise, the microphone of the electronic equipment is used, and whether the microphone exists on the external equipment or not can be guaranteed, and sound can be recorded.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flow chart of a microphone invocation method provided by an embodiment of the present application;
fig. 2 is an equivalent schematic diagram of an earphone provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a microphone invoking device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 5 is a hardware structure diagram of an electronic device according to an embodiment of the present application.
In the figure, 10-power supply; 20-resistance; 30-a headset microphone; 41-left channel; 42-right channel.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments that can be derived by one of ordinary skill in the art from the embodiments given herein are intended to be within the scope of the present disclosure.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application are capable of operation in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
A microphone calling method, a microphone calling device, an electronic device, and a readable storage medium according to embodiments of the present application are described in detail below with reference to fig. 1 to 5 through specific embodiments and application scenarios thereof.
Fig. 1 is a schematic flow chart of a microphone calling method according to an embodiment of the present application. The microphone calling method is applied to electronic equipment, and the electronic equipment is provided with an earphone interface. The microphone calling method may include the contents shown in S101 to S104.
In S101, when an external device is connected to the headphone interface, the type of the external device is detected.
In this embodiment, the external device may be a three-segment device, such as a three-segment earphone, or a four-segment device, such as a four-segment earphone and a selfie stick, wherein the four-segment earphone has a microphone, and the three-segment earphone has no microphone.
If the external equipment that earphone interface inserts is for from rapping bar, when the user used to record a video from rapping bar, thereby because electronic equipment will be discerned as the direct earphone microphone of transferring of four-section type earphone by mistake from rapping bar, the condition that does not have sound when probably appearing the recording. Therefore, in S102, in the case where the external apparatus is a four-stage apparatus, first sound data of a microphone channel of the electronic apparatus and second sound data of the microphone channel of the four-stage apparatus are detected.
That is to say, before the microphone is called, the microphone channel of the electronic device and the microphone channel of the accessed four-segment device can be simultaneously opened, and whether the microphone is arranged on the four-segment device or not is further judged by comparing the sound data of the two channels, so that whether the microphone is arranged on the external device or not is accurately judged.
In this embodiment, when the audio codec determines that the four-segment device is inserted into the electronic device through the earphone circuit, the audio codec may communicate with the controller to notify the controller that the four-segment device is inserted, and then the controller may control the audio codec to open the microphone channel of the four-segment device and the microphone channel of the electronic device at the same time, and the microphone of the four-segment device and the microphone of the electronic device may pick up external sounds at the same time, and transmit the sounds to the audio codec through the earphone circuit and the microphone circuit of the electronic device, and then transmit the sounds to the controller through the audio codec, and compare the amplitudes of the sound data in the controller through an algorithm to determine whether to call the microphone of the electronic device or the microphone of the four-segment headset.
In S103, in a case where the difference between the magnitude of the first sound data and the magnitude of the second sound data is greater than a first threshold, a microphone of the electronic device is called.
That is, if the difference between the amplitude of the first sound data of the microphone of the electronic device and the amplitude of the second sound data of the microphone of the four-stage device is greater than the first threshold, it indicates that there is no microphone or the microphone is abnormal in function on the external device, which indicates that the four-stage device may be a selfie stick, and at this time, the microphone of the electronic device needs to be called.
The first threshold may be a value set according to experimental data, may also be a value set according to experience of a technician, and may also be set according to an actual situation, and is not limited in this embodiment specifically.
For example, if the four-segment device is an auxiliary shooting device such as a selfie stick, since the device does not have an earphone microphone, the sound data in the earphone microphone channel will be small, and the sound data in the electronic device microphone channel will be large, so that the microphone of the electronic device needs to be called to avoid the situation that the recorded video has no sound. If the four-segment type device is a four-segment type earphone, but the earphone microphone of the four-segment type earphone is abnormal, the sound signal cannot be normally converted into the electric signal, the sound data on the earphone microphone channel is small, and the sound data on the electronic device microphone channel is large, so that the microphone of the electronic device needs to be called, and the situation that the conversation has no sound is avoided.
In S104, in a case where a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to a first threshold value, a microphone of the four-stage apparatus is called.
That is, if the difference between the amplitude of the first sound data of the microphone of the electronic device and the amplitude of the second sound data of the microphone of the four-segment device is smaller than or equal to the first threshold, it indicates that the external device is the four-segment headset, and the microphone of the four-segment headset is enabled to be used normally.
In the embodiment of the application, first, when an external device is connected to an earphone interface, the type of the external device is detected, then, when it is determined that the external device is a four-segment device, first sound data of a microphone channel of an electronic device and second sound data of the microphone channel of the four-segment device are detected, and finally, when a difference between a magnitude of the first sound data and a magnitude of the second sound data is larger than a first threshold value, a microphone of the electronic device is called, otherwise, the microphone of the four-segment device is called. Under the condition that the external equipment is judged to be four-section type equipment, whether a microphone is arranged on the four-section type equipment or not is further judged, whether the microphone can be normally used or not is judged, the microphone on the four-section type equipment is used if the microphone can be normally used, otherwise, the microphone of the electronic equipment is used, and whether the microphone exists on the external equipment or not can be guaranteed, and sound can be recorded.
In one possible embodiment of the present application, in a case where the external device is connected to the earphone interface, the detecting the type of the external device may include: under the condition that the earphone interface is connected with external equipment, detecting an impedance value between a first preset position and a second preset position of the external equipment; under the condition that the impedance value is within a preset range, judging that the external equipment is four-section equipment; and under the condition that the impedance value is smaller than the minimum value of the preset range, judging that the external equipment is three-section equipment.
Since not all external devices are provided with the earphone microphone, the specific type of the external device connected to the earphone interface can be determined only by detecting the impedance value between the first preset position and the second preset position of the external device.
Specifically, if the impedance value between the first preset position and the second preset position is within the preset range, it indicates that there is an element, which may be a microphone, or an element such as a resistor or a diode, between the first preset position and the second preset position, and it may be determined that the external device is a four-segment device, if the microphone is disposed between the first preset position and the second preset position, it may be determined that the external device is a four-segment earphone, and if the element such as a resistor or a diode is disposed between the first preset position and the second preset position, it may be determined that the external device is an auxiliary shooting device such as a selfie stick. If the impedance value between the first preset position and the second preset position is smaller than the minimum value of the preset range, it indicates that the impedance value between the first preset position and the second preset position is smaller, and at this time, it can be determined that the external device is a three-stage device.
In addition, if the impedance value between the first preset position and the second preset position is greater than the maximum value of the preset range, it indicates that the impedance value between the first preset position and the second preset position is large, it may be that there is an open circuit between the first preset position and the second preset position, it may be that the external device is damaged, and if the microphone needs to be called, the microphone of the electronic device is called.
The preset range may be a range set according to the type of the element, or may be set according to practical applications, for example, the preset range may be a range from several ohms to 100k Ω, or may be other ranges, and this embodiment is not particularly limited.
In this embodiment, the type of the external device may be determined by detecting an impedance value between a first preset position and a second preset position of the external device, specifically, as shown in fig. 2, the type of the external device is an equivalent circuit diagram of an earphone, where if the earphone is a four-segment earphone, and a space between the first preset position a and the second preset position B is an earphone microphone 30, an anode of the power supply 10 is connected to a first end of the resistor 20, a second end of the resistor 20 is connected to a first end of the earphone microphone 30, a second end of the earphone microphone 30 is respectively connected to a cathode of the power supply 10, a first end of the left channel 41, a first end of the right channel 42, and a second end of the left channel 41, a second end of the right channel 42, and a cathode of the power supply 10 are all grounded. If the earphone is a three-section earphone, and there is no element between the first preset position a and the second preset position B, the positive electrode of the power supply 10 is connected to the first end of the resistor 20, the second end of the resistor 20 is connected to the negative electrode of the power supply 10, the first end of the left sound channel 41, and the first end of the right sound channel 42, and the second end of the left sound channel 41, the second end of the right sound channel 42, and the negative electrode of the power supply 10 are all grounded. Therefore, the impedance value between the first preset position A and the second preset position B can be calculated by detecting the voltage value between the first preset position A and the second preset position B, the type of the external equipment is detected by the impedance value, the external equipment is judged to be the four-section type equipment when the impedance value is within the preset range, the three-section type earphone is judged when the impedance value is smaller than the minimum value of the preset range, and the external equipment is judged to be abnormal when the impedance value is larger than the maximum value of the preset range.
In one possible embodiment of the present application, after detecting the type of the external device, the microphone calling method may further include: in the case where the external device is a three-stage device, a microphone of the electronic device is invoked.
That is to say, the three-segment device itself does not have a microphone channel, and if the external device is a three-segment device, it may be a three-segment earphone, and only the microphone of the electronic device may be called to record sound, so that the user may record sound when using the external device.
In one possible embodiment of the present application, before detecting the first sound data of the microphone channel of the electronic device and the second sound data of the microphone channel of the four-segment device, the microphone calling method may further include: opening a microphone channel of the electronic equipment and a microphone channel of the four-section equipment; first sound data of a microphone channel of an electronic device and second sound data of a microphone channel of a four-segment device are acquired.
That is, before detecting the first sound data of the microphone channel of the electronic device and the second sound data of the microphone channel of the four-segment device, the microphone channel of the electronic device and the microphone channel of the four-segment device need to be opened, so as to obtain the sound data of the two channels, and then compare the sound data of the two channels, that is, if the difference between the amplitude of the first sound data of the microphone of the electronic device and the amplitude of the second sound data of the microphone of the four-segment device is greater than the first threshold, it indicates that there is no microphone on the external device, that is, there is no microphone on the four-segment device or the microphone has an abnormal function, at this time, the microphone of the electronic device needs to be called; if the difference between the amplitude of the first sound data of the microphone of the electronic device and the amplitude of the second sound data of the microphone of the four-section device is smaller than or equal to the first threshold, it indicates that the external device is equipped with the microphone, and the microphone can be used normally, and at this time, the microphone on the four-section device can be called, and the microphone channel on the electronic device is closed. To ensure that sound can be recorded regardless of whether a microphone is present on the external device.
It should be noted that, in the microphone invoking method provided in the embodiment of the present application, the execution subject may be a microphone invoking device, or a control module in the microphone invoking device for executing the microphone invoking method. In the embodiment of the present application, a method for executing a microphone call by a microphone call device is taken as an example, and the microphone call device provided in the embodiment of the present application is described.
Fig. 3 is a schematic diagram of a microphone invoking device according to an embodiment of the present disclosure. As shown in fig. 3, the microphone invoking device may be applied to an electronic device, and the electronic device is provided with a headset interface. The microphone invoking device may include: a first detection module 31, a second detection module 32, a first calling module 33 and a second calling module 34.
The first detection module 31 is configured to detect the type of an external device when the external device is connected to the earphone interface; a second detection module 32, configured to detect first sound data of a microphone channel of the electronic device and second sound data of the microphone channel of the four-stage device when the external device is the four-stage device; a first calling module 33, configured to call a microphone of the electronic device when a difference between the amplitude of the first sound data and the amplitude of the second sound data is greater than a first threshold; a second invoking module 34, configured to invoke a microphone of the four-stage device if a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to a first threshold.
In this embodiment, first, in a case that an external device is connected to an earphone interface, the first detecting module 31 detects a type of the external device, then, in a case that the external device is a four-segment device, the second detecting module 32 detects first sound data of a microphone channel of the electronic device and second sound data of the microphone channel of the four-segment device, and finally, in a case that a difference between a magnitude of the first sound data and a magnitude of the second sound data is greater than a first threshold, the first calling module 33 calls a microphone of the electronic device, otherwise, the second calling module 34 calls the microphone of the four-segment device. Under the condition that the external equipment is judged to be four-section type equipment, whether a microphone is arranged on the four-section type equipment or not is further judged, whether the microphone can be normally used or not is judged, the microphone on the four-section type equipment is used if the microphone can be normally used, otherwise, the microphone of the electronic equipment is used, and whether the microphone exists on the external equipment or not can be guaranteed, and sound can be recorded.
In one possible embodiment of the present application, the first detection module 31 may include: the device comprises a first detection unit, a first judgment unit and a second judgment unit.
The earphone interface comprises a first detection unit, a second detection unit and a control unit, wherein the first detection unit is used for detecting an impedance value between a first preset position and a second preset position of external equipment under the condition that the earphone interface is connected with the external equipment; the first judging unit is used for judging that the external equipment is four-section equipment under the condition that the impedance value is within a preset range; and the second judging unit is used for judging that the external equipment is three-section equipment under the condition that the impedance value is smaller than the minimum value of the preset range.
In one possible embodiment of the present application, the microphone invoking device may further include: and a third calling module.
The third calling module is used for calling a microphone of the electronic device under the condition that the external device is a three-section device.
In one possible embodiment of the present application, the microphone invoking device may further include: the device comprises a starting module and an obtaining module.
The starting module is used for starting a microphone channel of the electronic equipment and a microphone channel of the four-section equipment; the acquisition module is used for acquiring first sound data of a microphone channel of the electronic equipment and second sound data of a microphone channel of the four-section equipment.
The microphone invoking device in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The microphone invoking device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The microphone invoking device provided in the embodiment of the present application can implement each process implemented by the method embodiment shown in fig. 1, and is not described here again to avoid repetition.
Optionally, as shown in fig. 4, an electronic device 400 is further provided in this embodiment of the present application, and includes a processor 401, a memory 402, and a program or an instruction stored in the memory 402 and executable on the processor 401, where the program or the instruction is executed by the processor 401 to implement each process of the foregoing embodiment of the microphone invoking method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
It should be noted that the electronic device in the embodiment of the present application includes the mobile electronic device and the non-mobile electronic device described above.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
The electronic device 500 includes, but is not limited to: radio frequency unit 501, network module 502, audio output unit 503, input unit 504, sensor 505, display unit 506, user input unit 507, interface unit 508, memory 509, processor 510, and the like.
Those skilled in the art will appreciate that the electronic device 500 may further include a power supply (e.g., a battery) for supplying power to various components, and the power supply may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system. The electronic device structure shown in fig. 5 does not constitute a limitation of the electronic device, and the electronic device may include more or less components than those shown, or combine some components, or arrange different components, and thus, the description is omitted here.
The processor 510 is configured to detect a type of an external device when the external device is connected to the earphone interface; detecting first sound data of a microphone channel of the electronic device and second sound data of the microphone channel of the four-stage device under the condition that the external device is the four-stage device; calling a microphone of the electronic equipment under the condition that the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold value; in a case where a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to a first threshold value, a microphone of the four-stage device is invoked.
In the embodiment of the application, first, when an external device is connected to an earphone interface, the type of the external device is detected, then, when the external device is determined to be a four-segment device, first sound data of a microphone channel of an electronic device and second sound data of the microphone channel of the four-segment device are detected, and finally, when a difference between a magnitude of the first sound data and a magnitude of the second sound data is larger than a first threshold value, a microphone of the electronic device is called, otherwise, the microphone of the four-segment device is called. Under the condition that the external equipment is judged to be four-section type equipment, whether a microphone is arranged on the four-section type equipment or not is further judged, whether the microphone can be normally used or not is judged, the microphone on the four-section type equipment is used if the microphone can be normally used, otherwise, the microphone of the electronic equipment is used, and whether the microphone exists on the external equipment or not can be guaranteed, and sound can be recorded.
It should be understood that in the embodiment of the present application, the input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of still pictures or videos obtained by an image capturing device (such as a camera) in a video capturing mode or an image capturing mode. The display unit 506 may include a display panel 5061, and the display panel 5061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 507 includes a touch panel 5071 and other input devices 5072. The touch panel 5071 is also called a touch screen. The touch panel 5071 may include two parts of a touch detection device and a touch controller. Other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in further detail herein. The memory 509 may be used to store software programs as well as various data including, but not limited to, application programs and operating systems. Processor 510 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the above-mentioned microphone invoking method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
The embodiment of the present application further provides a chip, where the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is configured to execute a program or an instruction to implement each process of the embodiment of the microphone calling method, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
It should be understood that the chips mentioned in the embodiments of the present application may also be referred to as system-on-chip, system-on-chip or system-on-chip, etc.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the present embodiments are not limited to those precise embodiments, which are intended to be illustrative rather than restrictive, and that various changes and modifications may be effected therein by one skilled in the art without departing from the scope of the appended claims.

Claims (10)

1. A microphone calling method is applied to an electronic device, the electronic device is provided with an earphone interface, and the method comprises the following steps:
detecting the type of external equipment under the condition that the earphone interface is accessed with the external equipment;
detecting first sound data of a microphone channel of the electronic device and second sound data of a microphone channel of a four-stage device when the external device is the four-stage device;
calling a microphone of the electronic device when the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold;
invoking a microphone of the four-stage device if a difference between the magnitude of the first sound data and the magnitude of the second sound data is less than or equal to the first threshold.
2. The method of claim 1, wherein detecting the type of the external device if the external device is connected to the earphone interface comprises:
detecting an impedance value between a first preset position and a second preset position of the external equipment under the condition that the external equipment is connected to the earphone interface;
under the condition that the impedance value is within a preset range, judging that the external equipment is four-section equipment;
and under the condition that the impedance value is smaller than the minimum value of the preset range, determining that the external equipment is three-section equipment.
3. The method of claim 2, wherein after the detecting the type of the external device, the method further comprises:
and calling a microphone of the electronic equipment under the condition that the external equipment is three-section equipment.
4. The method of claim 1, wherein prior to the detecting the first sound data for the microphone channel of the electronic device and the second sound data for the microphone channel of the four-stage device, the method further comprises:
opening a microphone channel of the electronic equipment and a microphone channel of the four-section equipment;
and acquiring first sound data of a microphone channel of the electronic equipment and second sound data of a microphone channel of the four-section equipment.
5. A microphone calling device, applied to an electronic device provided with an earphone interface, the device comprising:
the first detection module is used for detecting the type of the external equipment under the condition that the external equipment is connected to the earphone interface;
a second detection module, configured to detect first sound data of a microphone channel of the electronic device and second sound data of the microphone channel of the four-stage device when the external device is a four-stage device;
the first calling module is used for calling a microphone of the electronic equipment under the condition that the difference between the amplitude of the first sound data and the amplitude of the second sound data is larger than a first threshold value;
a second calling module, configured to call a microphone of the four-stage device when a difference between the amplitude of the first sound data and the amplitude of the second sound data is smaller than or equal to the first threshold.
6. The apparatus of claim 5, wherein the first detection module comprises:
the earphone interface comprises a first detection unit, a second detection unit and a control unit, wherein the first detection unit is used for detecting an impedance value between a first preset position and a second preset position of an external device under the condition that the external device is connected to the earphone interface;
a first determination unit configured to determine that the external device is a four-stage device when the impedance value is within a preset range;
a second determination unit configured to determine that the external device is a three-stage device when the impedance value is smaller than a minimum value of the preset range.
7. The apparatus of claim 6, further comprising:
and the third calling module is used for calling the microphone of the electronic equipment under the condition that the external equipment is three-section equipment.
8. The apparatus of claim 5, further comprising:
the starting module is used for starting a microphone channel of the electronic equipment and a microphone channel of the four-section equipment;
the acquisition module is used for acquiring first sound data of a microphone channel of the electronic equipment and second sound data of a microphone channel of the four-section equipment.
9. An electronic device comprising a processor, a memory, and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the microphone invocation method according to any of claims 1-4.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a program or instructions which, when executed by a processor, carry out the steps of the microphone invocation method according to any of the claims 1-4.
CN202210366201.8A 2022-04-08 2022-04-08 Microphone calling method and device, electronic equipment and readable storage medium Pending CN114710583A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210366201.8A CN114710583A (en) 2022-04-08 2022-04-08 Microphone calling method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210366201.8A CN114710583A (en) 2022-04-08 2022-04-08 Microphone calling method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114710583A true CN114710583A (en) 2022-07-05

Family

ID=82172673

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210366201.8A Pending CN114710583A (en) 2022-04-08 2022-04-08 Microphone calling method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114710583A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924835A (en) * 2010-08-17 2010-12-22 惠州Tcl移动通信有限公司 Mobile telephone communication method and mobile telephone
CN101938546A (en) * 2010-08-26 2011-01-05 惠州Tcl移动通信有限公司 Earphone microphone detection method based on mobile phone and mobile phone
US20140321673A1 (en) * 2013-04-30 2014-10-30 Samsung Electronics Co., Ltd. Method and apparatus for controlling a sound input path
CN105611446A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
CN105611450A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Method and device for identifying selfie stick and mobile terminal
CN105611445A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
CN105611449A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Method and device for identifying selfie stick and mobile terminal
CN105611447A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
CN105744418A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for identifying selfie stick, and mobile terminal
CN105741862A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for recording audios through mobile terminal and mobile terminal
CN105741863A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for mobile terminal to play voice frequency, and mobile terminal
WO2016161596A1 (en) * 2015-04-09 2016-10-13 华为技术有限公司 Audio connector recognition method and portable electronic device
WO2018232604A1 (en) * 2017-06-20 2018-12-27 华为技术有限公司 Audio control method, circuit, graphic user interface, electronic apparatus, and storage medium
CN110248264A (en) * 2019-04-25 2019-09-17 维沃移动通信有限公司 A kind of voice transmission control method and terminal device
WO2020078237A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Audio processing method and electronic device
WO2022061653A1 (en) * 2020-09-24 2022-03-31 深圳市大疆创新科技有限公司 Jack-plug detection apparatus, audio processing device, audio processing system, and jack-plug detection method

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101924835A (en) * 2010-08-17 2010-12-22 惠州Tcl移动通信有限公司 Mobile telephone communication method and mobile telephone
CN101938546A (en) * 2010-08-26 2011-01-05 惠州Tcl移动通信有限公司 Earphone microphone detection method based on mobile phone and mobile phone
US20140321673A1 (en) * 2013-04-30 2014-10-30 Samsung Electronics Co., Ltd. Method and apparatus for controlling a sound input path
WO2016161596A1 (en) * 2015-04-09 2016-10-13 华为技术有限公司 Audio connector recognition method and portable electronic device
CN107005762A (en) * 2015-04-09 2017-08-01 华为技术有限公司 Audio connector recognition methods and portable electric appts
CN105611450A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Method and device for identifying selfie stick and mobile terminal
CN105611449A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Method and device for identifying selfie stick and mobile terminal
CN105611447A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
CN105744418A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for identifying selfie stick, and mobile terminal
CN105741862A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for recording audios through mobile terminal and mobile terminal
CN105741863A (en) * 2016-01-29 2016-07-06 广东欧珀移动通信有限公司 Method and device for mobile terminal to play voice frequency, and mobile terminal
CN105611445A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
CN105611446A (en) * 2016-01-29 2016-05-25 广东欧珀移动通信有限公司 Self-stick, self-stick identification method and apparatus, and mobile terminal
WO2018232604A1 (en) * 2017-06-20 2018-12-27 华为技术有限公司 Audio control method, circuit, graphic user interface, electronic apparatus, and storage medium
CN109417667A (en) * 2017-06-20 2019-03-01 华为技术有限公司 A kind of audio control method, circuit, graphic user interface, electronic equipment and storage medium
WO2020078237A1 (en) * 2018-10-15 2020-04-23 华为技术有限公司 Audio processing method and electronic device
CN110248264A (en) * 2019-04-25 2019-09-17 维沃移动通信有限公司 A kind of voice transmission control method and terminal device
WO2022061653A1 (en) * 2020-09-24 2022-03-31 深圳市大疆创新科技有限公司 Jack-plug detection apparatus, audio processing device, audio processing system, and jack-plug detection method

Similar Documents

Publication Publication Date Title
CN109828688B (en) Screen damage processing method, mobile terminal and computer readable storage medium
CN111314784B (en) Video playing method and electronic equipment
CN108391008B (en) Message reminding method and mobile terminal
CN111884908B (en) Contact person identification display method and device and electronic equipment
CN108664818B (en) Unlocking control method and device
US10853092B2 (en) Method and device for sound effect processing
CN108762641B (en) Text editing method and terminal equipment
CN113253964A (en) Data management method, device, equipment and storage medium
CN110740265B (en) Image processing method and terminal equipment
CN112367583A (en) Wireless earphone and wearing detection method thereof
CN111064847A (en) False touch prevention method and device, storage medium and electronic equipment
CN114710583A (en) Microphone calling method and device, electronic equipment and readable storage medium
CN111143580B (en) Multimedia data storage method and device, storage medium and electronic equipment
CN111045583B (en) Camera control method and electronic equipment
CN109361792B (en) Mobile terminal, control method and device
CN113821391B (en) Device identification method, device and storage medium
CN111580911A (en) Operation prompting method and device for terminal, storage medium and terminal
CN111355991A (en) Video playing method and device, storage medium and mobile terminal
CN108446046A (en) A kind of touch screen control method, terminal and computer readable storage medium
CN111010477B (en) Audio signal calling method and system, storage medium and terminal equipment
CN110995920B (en) Response control method for specified operation instruction and terminal equipment
CN108462630B (en) Method and device for searching contact person and mobile terminal
CN108255377B (en) Information processing method and mobile terminal
CN110602310B (en) Interaction method and terminal
CN113722735A (en) Privacy protection method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination