WO2016161596A1 - 音频接头识别方法和便携式电子设备 - Google Patents

音频接头识别方法和便携式电子设备 Download PDF

Info

Publication number
WO2016161596A1
WO2016161596A1 PCT/CN2015/076159 CN2015076159W WO2016161596A1 WO 2016161596 A1 WO2016161596 A1 WO 2016161596A1 CN 2015076159 W CN2015076159 W CN 2015076159W WO 2016161596 A1 WO2016161596 A1 WO 2016161596A1
Authority
WO
WIPO (PCT)
Prior art keywords
voltage
switch
input device
processor
segment
Prior art date
Application number
PCT/CN2015/076159
Other languages
English (en)
French (fr)
Inventor
罗文林
周学中
胡家福
彦许星
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201580064063.6A priority Critical patent/CN107005762B/zh
Priority to PCT/CN2015/076159 priority patent/WO2016161596A1/zh
Publication of WO2016161596A1 publication Critical patent/WO2016161596A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones

Definitions

  • Embodiments of the present invention relate to electronic device technologies, and in particular, to an audio connector identification method and a portable electronic device.
  • Portable electronic devices such as smart phones and tablets
  • K-song functions Many portable electronic devices have K-song functions.
  • portable electronic devices come with them.
  • the microphone microphone, referred to as MIC
  • the output mode of the K song mainly includes the following: the speaker of the portable electronic device, the external wired small speaker, the bluetooth earphone or the bluetooth speaker.
  • the portable electronic device cannot recognize the three-segment microphone, and the user can only use the microphone of the portable electronic device or the microphone of the wired earphone.
  • the user uses the microphone of the portable electronic device or the microphone of the wired earphone, the user needs to sing to the portable electronic device due to the limitation of the microphone, and cannot sing freely, which seriously affects the user experience, for example, the user uses the portable electronic device.
  • the device comes with a microphone K song, the user must hold the portable electronic device, which is very inconvenient; when the user uses the microphone of the wired earphone K song, the earphone cable of the wired earphone is too short, and the user cannot move at will.
  • the microphones used in the existing K-song input mode are all amateur-level accessories, and the input signal quality is not good, which directly affects the quality of the singing voice, and cannot create a good K-song atmosphere, affecting the entertainment effect and reducing the user experience.
  • the embodiment of the invention provides an audio connector identification method and a portable electronic device, so that the portable electronic device can recognize the three-segment microphone, so that the user can use the three-segment microphone K song, and the user who uses the portable electronic device K song is improved.
  • the portable electronic device can recognize the three-segment microphone, so that the user can use the three-segment microphone K song, and the user who uses the portable electronic device K song is improved.
  • a first aspect of the present invention provides a portable electronic device, including: a processor, a detection circuit, a first power module, and a second power module, wherein the detection circuit includes: a switch, a first voltage divider circuit And a second voltage dividing circuit, the impedance of the first voltage dividing circuit is greater than the impedance of the second voltage dividing circuit;
  • a first end of the switch is connected to the input device, and a second end of the switch is respectively connected to the first end of the first voltage dividing circuit and the processor, and the first voltage dividing circuit is The second end is connected to the first power module, and the third end of the switch is respectively connected to the first end of the second voltage dividing circuit and the processor, and the second end of the second voltage dividing circuit is The second power module is connected;
  • the processor is configured to detect a voltage of the second end of the switch, and determine, according to a voltage of the second end of the switch, whether the input device is connected to a first end of the switch; wherein, initially, the switch The first end is connected to the second end of the switch;
  • the processor is further configured to: when determining that the interface of the input device is a three-segment interface, control a first end of the switch to be connected to a third end of the switch, and detect a third end of the switch The voltage of the terminal determines the type of the input device according to the voltage of the third terminal of the switch.
  • the processor is further configured to: connect an interface of the input device to a corresponding interface on the processor according to a type of the input device connection.
  • the determining, according to a voltage of the third end of the switch, determining a type of the input device include:
  • the processor determines that the type of the input device is a three-segment microphone
  • the processor determines that the type of the input device is a three-segment earphone, and the voltage value in the first voltage range is greater than the second voltage The voltage value within the range.
  • the determining, according to a voltage of the third end of the switch include:
  • the processor determines that the type of the input device is a three-segment microphone
  • the processor determines The type of input device is a three-segment earphone.
  • the processor switches an interface signal of the input device to the Input signals corresponding to the type of input device, including:
  • the processor connects an interface of the input device with an interface of a three-segment microphone on the processor;
  • the processor connects the interface of the input device to the interface of the three-segment earphone on the processor.
  • the portable electronic device further includes: an analog-to-digital converter, the first end of the analog-to-digital converter and the second end of the switch a second end connected to the third end, the second end of the analog to digital converter being coupled to the processor, the analog to digital converter for detecting a voltage of the second end and the third end of the switch, and detecting the detected The voltage is converted to a digital signal and transmitted to the processor.
  • the first voltage dividing circuit includes the first And a second voltage dividing circuit comprising a second resistor, the impedance of the first resistor being greater than the impedance of the second resistor.
  • any one of the first to the sixth possible implementation manners of the first aspect in a seventh possible implementation manner of the first aspect, is further configured to:
  • the processor controls the first end of the switch to be coupled to the second end of the switch when a voltage at the third end of the switch is equal to a voltage of the second power module.
  • the processor is further configured to:
  • the Bluetooth output device is turned on.
  • a second aspect of the present invention provides an audio connector identification method, the method being applied to a portable electronic device, the portable electronic device comprising: a processor, a detection circuit, a first power module, and a second power module, the detection circuit
  • the method includes: a switch, a first voltage dividing circuit, and a second voltage dividing circuit, wherein an impedance of the first voltage dividing circuit is greater than an impedance of the second voltage dividing circuit; a first end of the switch is connected to an input device, a second end of the switch is respectively connected to the first end of the first voltage dividing circuit and the processor, and the second end of the first voltage dividing circuit and the first power mode a third end of the switch is connected to the first end of the second voltage dividing circuit and the processor, and a second end of the second voltage dividing circuit is connected to the second power module.
  • the method includes:
  • the portable electronic device detects a voltage of the second end of the switch, and determines, according to a voltage of the second end of the switch, whether the input device is connected to the first end of the switch, wherein, initially, the switch One end is connected to the second end of the switch;
  • the portable electronic device determines that the interface of the input device is a three-segment interface
  • the portable electronic device controls the first end of the switch to be turned on with the third end of the switch, and detects the switch The voltage at the third end;
  • the portable electronic device determines the type of the input device based on a voltage of a third end of the switch.
  • the method further includes:
  • the portable electronic device connects an interface of the input device with a corresponding interface on the processor according to a type of the input device.
  • the portable electronic device determines the input device according to a voltage of a third end of the switch Types include:
  • the portable electronic device determines that the type of the input device is a three-segment microphone
  • the portable electronic device determines that the type of the input device is a three-segment earphone, and the voltage value in the first voltage range is greater than the second voltage The voltage value within the range.
  • the portable electronic device determines the input device according to a voltage of the third end of the switch Types, including:
  • the portable electronic device determines that the type of the input device is a three-segment microphone
  • the portable electronic device It is determined that the type of the input device is a three-segment earphone.
  • the portable electronic device according to the type of the input device, the interface of the input device and the processor
  • the corresponding interface connection including:
  • the portable electronic device connects the input device to an interface of a three-segment microphone on the processor;
  • the portable electronic device interfaces the interface with an interface of a three-segment headset on the processor.
  • any one of the first to third possible implementation manners of the second aspect in a fourth possible implementation manner of the second aspect, the method further includes:
  • the portable electronic device controls the first end of the switch to be turned on with the second end of the switch when the voltage at the third end of the switch is equal to the voltage of the second power module.
  • any one of the first to fourth possible implementation manners of the second aspect in a fifth possible implementation manner of the second aspect, the method further includes:
  • the method further includes:
  • the portable electronic device turns on the Bluetooth output device.
  • the portable electronic device detects the voltage of the second end of the switch, and determines whether the input device is connected to the first end of the switch according to the voltage of the second end of the switch;
  • the first end of the portable electronic device control switch is connected to the third end of the switch, and detects the voltage of the third end of the switch, and determines the input device according to the voltage of the third end of the switch. type.
  • the portable electronic device can recognize the three-segment microphone and the three-segment earphone, and therefore, the user can use the three-segment microphone K song, which can enhance the user experience of the user using the portable electronic device K song.
  • FIG. 1 is a schematic structural diagram of a portable electronic device according to Embodiment 1 of the present invention.
  • FIG. 2 is a schematic diagram of an interface structure of a three-stage earphone and a three-segment microphone
  • FIG. 3 is a schematic diagram of an interface of the processor 11;
  • FIG. 4 is a flowchart of a method for identifying an audio connector according to Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a method for identifying an audio connector according to Embodiment 3 of the present invention.
  • K songs are becoming more and more popular in daily life.
  • users can not sing through the microphones of the portable electronic devices or the wired headphones with microphones. Free singing, affecting the user experience.
  • the microphones used in the existing K-song input mode are all amateur-level accessories, and the input signal quality is not good, which directly affects the quality of the singing voice, and cannot create a good K-song atmosphere, affecting the entertainment effect and reducing the user experience.
  • the interface of the wired earphone with a microphone is a four-segment interface
  • the wired earphone without a microphone is a three-segment interface.
  • the following wired headset without a microphone is simply referred to as a four-segment wired earphone, which will have a microphone.
  • the wired headset is simply referred to as a three-segment wired headset, and the portable electronic determines whether the input device is a four-segment earphone or a three-segment earphone by judging the interface type of the inserted input device.
  • the interface of the three-segment microphone is also a three-segment interface, and the external interface structure of the three-segment wired earphone and the three-segment microphone is the same.
  • the interface type of the input device is identified as a three-segment interface, the interface cannot be identified. Whether the input device is a three-segment microphone or a three-segment wired headset.
  • FIG. 1 is a schematic structural diagram of a portable electronic device according to Embodiment 1 of the present invention.
  • Portable electronic devices include: a processor 11.
  • the detection circuit 12 includes a switch 121, a first voltage dividing circuit 122, and a second voltage dividing circuit 133.
  • the impedance of the first voltage dividing circuit 122 is greater than the impedance of the second voltage dividing circuit 123.
  • the first end of the switch 121 is connected to the input device, and the second end of the switch 121 is respectively connected to the first end of the first voltage dividing circuit 122 and the processor 11, and the second end of the first voltage dividing circuit 121 is first
  • the power module 13 is connected.
  • the third end of the switch 121 is connected to the first end of the second voltage dividing circuit 122 and the processor 11, and the second end of the second voltage dividing circuit 123 is connected to the second power module 14.
  • the switch 121 can adopt a single-pole double-throw switch, and the single-pole double-throw switch is composed of a movable end and a non-moving end, the movable end is the first end of the switch 121, and the fixed end is the second end and the third end of the switch 121. end.
  • the processor 11 can control the first ends of the switches 121 to be connected to the second and third ends of the switch 121, respectively.
  • the processor 11 may be a processor already in the portable electronic device, and the processor may be composed of an integrated circuit (English name: Integrated Circuit, IC for short), for example, may be composed of a single package IC. It can also be composed of a packaged IC that connects multiple identical functions or different functions.
  • the processor 11 may include only a central processing unit (English name: Central Processing Unit, CPU for short), or a GPU, a digital signal processor (English name: Digital Signal Processor, abbreviated as DSP), and communication. A combination of control chips in a unit.
  • a CPU or a DSP or the like may be added to the portable electronic device, and the newly added CPU or DSP is the processor 11.
  • the first voltage dividing circuit 122 and the second voltage dividing circuit 123 are used to implement voltage division on the path, and the impedance of the first voltage dividing circuit 122 should be much larger than the impedance of the second voltage dividing circuit 123, for example, the first voltage dividing circuit
  • the impedance is 100K ohms and the impedance of the second voltage divider circuit is 100 ohms.
  • the first voltage dividing circuit 122 and the second voltage dividing circuit 123 may each be a circuit composed of one resistor.
  • the first voltage dividing circuit 122 and the second voltage dividing circuit 123 may also have multiple electronic components.
  • the first power module 13 and the second power module 14 are used to provide the required voltage for the detecting circuit 12.
  • the first power module 13 and the second power module 14 can be used in a portable electronic device, or can be portable. A new power module in the electronic device.
  • the first end of the switch 121 is connected to one end of the input device.
  • the input device can be a three-segment earphone, a three-segment microphone or a four-segment earphone, and the other end of the input device is connected to the ground.
  • the portable electronic device can recognize whether the interface of the input device is a three-stage interface or four. Segment interface, but when the interface of the input device is a three-segment interface, the portable electronic device cannot recognize whether the input device is a three-segment earphone or a three-segment microphone. This is mainly because the three-segment earphone and the three-segment microphone have the same external interface structure.
  • FIG. 2 is a schematic diagram of the interface structure of the three-stage earphone and the three-segment microphone.
  • the three-segment earphone and the three-segment microphone are three segments, and the signal definition of the three-segment earphone is from left to right.
  • the signal definition of the three-segment microphone is from the left to the right of the microphone positive (hereinafter referred to as MIC+), the microphone negative (hereinafter referred to as MIC-) and the ground.
  • the signal definition of the three-segment earphone and the three-segment microphone is different from the internal circuit of the device, due to the three-stage earphone and the three-stage type.
  • the internal circuit of the microphone is different, which causes the impedance of the three-stage earphone and the three-segment microphone to vary greatly to the ground.
  • Table 1 compares the impedance (in ohms) parameters of the three-stage earphone and the three-segment microphone on the market. schematic diagram.
  • the impedance of the three-segment microphone is much larger than that of the three-segment earphone.
  • the difference of the impedance of the three-segment microphone and the three-segment earphone is used to identify the input device. Types of.
  • the input device is a three-segment earphone, since the impedance of the three-stage earphone is relatively small, the path current is large, the voltage drop across the second voltage dividing circuit 123 is large, and the voltage V4 of the third terminal of the switch 121 is relatively small.
  • the input device is a three-segment microphone
  • the three-segment microphone due to the three-segment microphone
  • the wind impedance is relatively large, the path current is small, the voltage drop across the second voltage dividing circuit 123 is small, and the voltage V4 at the third end of the switch 121 is large. Therefore, the input can be judged by the voltage V4 of the third end of the switch 121.
  • the type of device due to the three-segment microphone.
  • the first end of the switch 121 is connected to the second end of the switch 121, and the voltage V3 of the second end of the switch 121 is equal to the voltage V1 of the first power module 13.
  • the input device is connected, a path is formed from the ground terminal to the first power module 13, and the voltage V3 of the second end of the switch 121 changes.
  • the impedance of the first voltage dividing resistor 122 Since the impedance of the first voltage dividing resistor 122 is large, the impedance of the input device is relative to the first The voltage dividing resistor 122 is small, the first voltage dividing resistor 122 shares most of the voltage, the voltage V3 of the second end of the switch 121 is close to 0, and the processor 11 is configured to detect the voltage of the second end of the switch 121, according to the switch 121 The voltage at the two terminals determines the first end of the input device access switch.
  • the processor 11 determines the interface type of the input device by detecting the structure of the interface of the input device, that is, determining whether the interface type of the input device is a three-segment interface or a four-segment interface. The processor 11 determines whether the interface type of the input device is a three-segment interface or a four-segment interface. The prior art does not describe too much.
  • the processor 11 When the processor 11 is further configured to determine that the interface type of the input device is a three-segment interface, the processor 11 controls the first end of the switch 121 to be disconnected from the second end of the switch 121, and controls the first end of the switch 121. The third end of the switch 121 is turned on. At this time, a path is formed from the ground end to the second power module 14, the processor 11 detects the voltage V4 of the third end of the switch 121, and determines the input device according to the voltage of the third end of the switch 121. Types of. When the processor 11 determines that the interface type of the input device is a four-segment interface, the processor 11 does nothing, and the first end of the switch 121 is still connected to the second end of the switch 121.
  • the processor 11 can specifically determine the type of the input device in the following two ways:
  • the processor 11 determines that the type of the input device is a three-segment microphone; if the voltage of the third end of the switch 121 belongs to the second voltage range, the processing The device 11 determines that the type of the input device is a three-segment earphone, wherein the voltage values in the first voltage range are all greater than the voltage values in the second voltage range.
  • the processor 11 determines that the type of the input device is a three-segment microphone; if the voltage of the third end of the switch 121 is less than the voltage threshold, The processor 11 determines that the type of the input device is a three-segment earphone. It should be noted that the voltage threshold is smaller than a minimum voltage value of the first voltage range, and the voltage threshold is The value is greater than the maximum voltage value of the second voltage range.
  • the voltage V4 of the third end of the switch 121 is R/(R+R2)U, where R is the impedance of the input device, R2 is the impedance of the second voltage dividing circuit, and U is the impedance of the second power module 14.
  • the voltage, R2 and U are known parameters. Since the impedance of the three-stage microphone is much larger than the impedance of the three-stage earphone, the voltage at the third end of the switch 121 must be greater than that of the three-segment earphone when the three-segment microphone is connected. The voltage at the time.
  • the voltage of the third end of the switch 121 changes when the impedance of the three-segment microphone and the three-segment earphone of different impedances are inserted.
  • the first voltage range is calculated according to different impedances of the existing three-stage earphone, and the minimum voltage value of the first voltage range is a voltage obtained when the impedance of the three-segment earphone takes a minimum value, first
  • the maximum voltage value of the voltage range is the voltage obtained when the impedance of the three-stage earphone takes the maximum value.
  • the second voltage range is calculated according to different impedances of the existing three-segment microphone, and the minimum voltage value of the second voltage range is obtained when the impedance of the three-segment microphone is the minimum value, and the second voltage range is obtained.
  • the maximum voltage value is obtained when the impedance of the three-segment microphone is taken as the maximum value.
  • the processor 11 is further configured to connect the interface of the input device with the corresponding interface on the processor 11 according to the type of the input device. Specifically, if the type of the input device is a three-segment microphone, the processor 11 connects the interface of the input device with the interface of the three-segment microphone on the processor 11; if the type of the input device is a three-segment earphone, the processor 11 The interface of the input device is interfaced with the interface of the three-segment headset on the processor 11.
  • 3 is a schematic diagram of the interface of the processor 11. As shown in FIG. 3, the processor 11 includes the following five interfaces: MIC+, MIC-, ground, left channel, and right channel.
  • the processor 11 connects the MIC+, MIC-, and ground terminals of the three-segment microphone to the MIC+, MIC-, and ground terminals of the processor 11, respectively.
  • the processor 11 connects the grounding end, the left channel and the right channel of the three-segment earphone to the grounding end, the left channel and the right channel of the processor 11, respectively. Thereby completing the connection of the signal of the input device to the processor 11.
  • the processor 11 is further configured to: when determining that the type of the input device is a three-segment microphone, turn on the Bluetooth output device, where the Bluetooth output device can be a Bluetooth headset or a Bluetooth speaker. Specifically, the processor 11 may send an open command to the Bluetooth output device, the open command instructing the user to turn on the Bluetooth output device.
  • the processor 11 is further configured to: when the voltage V4 of the third end of the switch 121 is equal to the voltage V2 of the second power module 14, the processor 11 controls the first end of the switch 121 to be disconnected from the third end of the switch 121, and controls the switch The first end of 121 is coupled to the second end of switch 121.
  • the voltage V4 of the third end of the switch 121 is equal to the voltage V2 of the second power module 14 indicating that the input device is pulled out, and the processor 11 controls the first end of the switch 121 to be turned on with the second end of the switch 121.
  • the portable electronic device of this embodiment may further include: an analog-to-digital converter (ADC), the first end of the analog-to-digital converter and the second end and the third end of the switch 121 respectively
  • ADC analog-to-digital converter
  • the second end of the analog-to-digital converter is connected to the processor 11, and the analog-to-digital converter 11 is configured to detect the voltages of the second end and the third end of the switch 121, and convert the detected voltage into a digital signal and transmit it to the Processor 11.
  • ADC analog-to-digital converter
  • the portable electronic device of the embodiment can recognize the three-segment microphone, so that the user can use the external three-segment microphone K song, and can push and pull the distance of the microphone from the mouth to remove the plosive sound, the breath, and the K-song treble.
  • the output aspect supports the use of a three-segment microphone K song, the Bluetooth output device works at the same time, improve the volume and sound quality, and create a good K song atmosphere.
  • FIG. 4 is a flowchart of the audio connector identification method according to the second embodiment of the present invention. Referring to FIG. 1 and FIG. 4, the method provided in this embodiment may include the following steps:
  • Step 101 The portable electronic device detects a voltage of the second end of the switch, and determines, according to the voltage of the second end of the switch, whether the input device is connected to the first end of the switch, wherein, initially, the first end of the switch is connected to the second end of the switch through.
  • Step 102 When the portable electronic device determines that the interface of the input device is a three-segment interface, the first end of the portable electronic device control switch is connected to the third end of the switch, and detects the voltage of the third end of the switch.
  • Step 103 The portable electronic device determines the type of the input device according to the voltage of the third end of the switch.
  • the portable electronic device determines that the type of the input device is a three-segment microphone; if the interface voltage of the input device belongs to the second voltage range, the portable electronic device determines The type of the input device is a three-segment earphone, and the voltage values in the first voltage range are greater than the voltage values in the second voltage range.
  • the portable electronic device determines that the type of the input device is a three-segment microphone; if the voltage of the third end of the switch is less than a voltage threshold, the portable electronic The device determines that the type of input device is a three-segment headset. It should be noted that the voltage threshold is smaller than the minimum voltage value of the first voltage range, and the voltage threshold is greater than the maximum voltage value of the second voltage range.
  • the portable electronic device further connects the interface of the input device with the corresponding interface on the processor according to the type of the input device. Specifically, if the type of the input device is a three-segment microphone, the portable electronic device connects the input device to the interface of the three-segment microphone on the processor; if the type of the input device is a three-segment earphone, the portable electronic device inputs the device Interface to the three-piece headset on the processor.
  • the first end of the portable electronic device control switch is connected to the second end of the switch.
  • the portable electronic device when the type of the input device is a three-segment microphone, if the portable electronic device has a Bluetooth output device, the portable electronic device turns on the Bluetooth output device.
  • the portable electronic device can recognize the three-segment earphone and the three-segment microphone, thereby enriching the method for the user to use the portable electronic device K song, and the user can use the following methods to enhance the user's use of the portable device.
  • User experience of electronic device K song (1) Bluetooth earphone K song, Bluetooth output device and portable electronic device comes with the speaker output at the same time; (2) four-segment earphone K song, four-segment earphone and Bluetooth output device Simultaneous output; (3) Support for Bluetooth output device output when the three-segment microphone K song.
  • the portable electronic device detects the voltage of the second end of the switch, and determines whether the input device is connected to the first end of the switch according to the voltage of the second end of the switch; when the portable electronic device determines that the interface of the input device is three segments Portable interface control switch The first end is connected to the third end of the switch, and detects the voltage of the third end of the switch, and determines the type of the input device according to the voltage of the third end of the switch.
  • the portable electronic device can recognize the three-segment microphone and the three-segment earphone, and therefore, the user can use the three-segment microphone K song, which can enhance the user experience of the user using the portable electronic device K song.
  • FIG. 5 is a flowchart of a method for identifying an audio connector according to Embodiment 3 of the present invention. As shown in FIG. 5, the method provided in this embodiment may include the following steps:
  • Step 201 The portable electronic device detects whether an input device is inserted into the audio interface.
  • step 202 is performed. If no, that is, no input device is inserted into the audio interface, then step 201 is performed to continue the detection.
  • Step 202 The portable electronic device determines whether the interface of the input device is a three-segment interface or a four-segment interface.
  • step 203 is performed. If the interface of the input device is a four-segment interface, step 204 is performed.
  • Step 203 The portable electronic device determines whether the input device is a three-segment earphone or a three-segment microphone.
  • step 205 is performed. If the input device is a three-segment earphone, step 206 is performed.
  • Step 204 The portable electronic device connects the interface of the input device to the interface of the four-segment earphone on the processor.
  • Step 205 The portable electronic device connects the interface of the input device with the interface of the three-segment earphone on the processor, and simultaneously turns on the Bluetooth output device.
  • Step 206 The portable electronic device connects the interface of the input device to the interface of the three-segment earphone on the processor.
  • Step 207 The portable electronic device determines whether the input device is pulled out of the audio interface.
  • This step is performed after performing any of the steps 204-206. If the input device is pulled out, the identification process is terminated. If the electronic device is not pulled out, the process returns to execution 201.
  • the aforementioned program can be stored in a calculation
  • the machine can be read from the storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

一种音频接头识别方法和便携式电子设备,便携式电子设备检测开关(121)的第二端(2)的电压,根据开关(121)的第二端(2)的电压确定输入设备是否接入所述开关(121)的第一端(1);当便携式电子设备确定输入设备的接口为三段式接口时,便携式电子设备控制开关(121)的第一端(1)与开关(121)的第三端(3)接通,并检测开关(121)的第三端(3)的电压,根据开关(121)的第三端(3)的电压确定输入设备的类型。便携式电子设备能够识别三段式麦克风和三段式耳机,用户可以使用三段式麦克风K歌,提升了用户使用便携式电子设备K歌的用户体验。

Description

音频接头识别方法和便携式电子设备 技术领域
本发明实施例涉及电子设备技术,尤其涉及一种音频接头识别方法和便携式电子设备。
背景技术
便携式电子设备(例如,智能手机和平板电脑)功能日益丰富,很多便携式电子设备都有K歌功能,但是目前市场上便携式电子设备实现K歌的输入方式主要有以下几种:便携式电子设备自带的麦克风(microphone,简称MIC)、有线耳机的麦克风或蓝牙麦克风;K歌的输出方式主要有以下几种:便携式电子设备自带的喇叭、外置有线小音箱、蓝牙耳机或蓝牙音箱。
现有K歌过程中,便携式电子设备不能识别三段式麦克风,用户只能使用便携式电子设备自带的麦克风或有线耳机的麦克风K歌。当用户使用便携式电子设备自带的麦克风或有线耳机的麦克风K歌时,由于麦克风的限制,用户需要对着便携式电子设备唱歌,不能随心自由的唱,严重影响用户体验,例如,用户使用便携式电子设备自带的麦克风K歌时,用户必须拿着便携式电子设备,很不方便;用户使用有线耳机的麦克风K歌时,有线耳机的耳机线太短,用户不能随意的移动。另外,现有的K歌输入方式采用的麦克风都是业余级别的配件,输入的信号质量不好,直接影响歌声质量,无法营造良好的K歌氛围,影响娱乐效果,降低用户体验。
发明内容
本发明实施例提供一种音频接头识别方法和便携式电子设备,使得便携式电子设备能够识别三段式麦克风,从而使得用户可以使用三段式麦克风K歌,改善了用户使用便携式电子设备K歌的用户体验。
本发明第一方面提供一种便携式电子设备,包括:处理器、检测电路、第一电源模块和第二电源模块,所述检测电路包括:开关、第一分压电路 和第二分压电路,所述第一分压电路的阻抗大于所述第二分压电路的阻抗;
所述开关的第一端用于与输入设备连接,所述开关的第二端分别与所述第一分压电路的第一端和所述处理器连接,所述第一分压电路的第二端与所述第一电源模块连接,所述开关的第三端分别与所述第二分压电路的第一端和所述处理器连接,所述第二分压电路的第二端与所述第二电源模块连接;
所述处理器,用于检测所述开关的第二端的电压,根据所述开关的第二端的电压确定所述输入设备是否接入所述开关的第一端;其中,初始时,所述开关的第一端与所述开关的第二端接通;
所述处理器,还用于当确定所述输入设备的接口为三段式接口时,控制所述开关的第一端与所述开关的第三端接通,并检测所述开关的第三端的电压,根据所述开关的第三端的电压确定所述输入设备的类型。
结合第一方面,在第一方面的第一种可能的实现方式中,所述处理器还用于,根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述根据所述开关的第三端的电压确定所述输入设备的类型,包括:
若所述开关的第三端的电压属于第一电压范围,则所述处理器确定所述输入设备的类型为三段式麦克风;
若所述开关的第三端的电压属于第二电压范围,则所述处理器确定所述输入设备的类型为三段式耳机,所述第一电压范围内的电压值均大于所述第二电压范围内的电压值。
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述根据所述开关的第三端的电压确定所述输入设备的类型,包括:
若所述开关的第三端的电压大于预设的电压阈值,则所述处理器确定所述输入设备的类型为三段式麦克风;
若所述开关的第三端的电压小于所述电压阈值,则所述处理器确定所 述输入设备的类型为三段式耳机。
结合第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述处理器根据所述输入设备的类型将所述输入设备的接口信号切换到所述输入设备的类型对应的输入信号,包括:
若所述输入设备的类型为三段式麦克风,所述处理器将所述输入设备的接口与所述处理器上的三段式麦克风的接口连接;
若所述输入设备的类型为三段式耳机,所述处理器将所述输入设备的接口与所述处理器上的三段式耳机的接口连接。
结合第一方面,在第一方面的第五种可能的实现方式中,所述便携式电子设备还包括:模数转换器,所述模数转换器的第一端分别与所述开关的第二端和第三端连接,所述模数转换器的第二端与所述处理器连接,所述模数转换器用于检测所述开关的第二端和第三端的电压,并将检测到的电压转换为数字信号后传输给所述处理器。
结合第一方面、第一方面的第一种至第五种可能的实现方式中的任意一种,在第一方面的第六种可能的实现方式中,所述第一分压电路包括第一电阻,所述第二分压电路包括第二电阻,所述第一电阻的阻抗大于所述第二电阻的阻抗。
结合第一方面、第一方面的第一种至第六种可能的实现方式中的任意一种,在第一方面的第七种可能的实现方式中,所述处理器还用于:
当所述开关的第三端的电压等于所述第二电源模块的电压时,所述处理器控制所述开关的第一端与所述开关的第二端接通。
结合第一方面、第一方面的第一种至第七种可能的实现方式中的任意一种,在第一方面的第八种可能的实现方式中,所述处理器还用于:
当确定所述输入设备的类型为三段式麦克风时,开启蓝牙输出设备。
本发明第二方面提供一种音频接头识别方法,所述方法应用于便携式电子设备中,所述便携式电子设备包括:处理器、检测电路、第一电源模块和第二电源模块,所述检测电路包括:开关、第一分压电路和第二分压电路,所述第一分压电路的阻抗大于所述第二分压电路的阻抗;所述开关的第一端与输入设备连接,所述开关的第二端分别与所述第一分压电路的第一端和所述处理器连接,所述第一分压电路的第二端与所述第一电源模 块连接,所述开关的第三端分别与所述第二分压电路的第一端和所述处理器连接,所述第二分压电路的第二端与所述第二电源模块连接,所述方法包括:
所述便携式电子设备检测所述开关的第二端的电压,根据所述开关的第二端的电压确定所述输入设备是否接入所述开关的第一端,其中,初始时,所述开关的第一端与所述开关的第二端接通;
当所述便携式电子设备确定所述输入设备的接口为三段式接口时,所述便携式电子设备控制所述开关的第一端与所述开关的第三端接通,并检测所述开关的第三端的电压;
所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型。
结合第二方面,在第二方面的第一种可能的实现方式中,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型之后,所述方法还包括:
所述便携式电子设备根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接。
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型,包括:
若所述输入设备的接口电压属于第一电压范围,则所述便携式电子设备确定所述输入设备的类型为三段式麦克风;
若所述输入设备的接口电压属于第二电压范围,则所述便携式电子设备确定所述输入设备的类型为三段式耳机,所述第一电压范围内的电压值均大于所述第二电压范围内的电压值。
结合第二方面或第二方面的第一种可能的实现方式,在第二方面第三种可能的实现方式中,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型,包括:
若所述开关的第三端的电压大于预设的电压阈值,则所述便携式电子设备确定所述输入设备的类型为三段式麦克风;
若所述开关的第三端的电压小于所述电压阈值,则所述便携式电子设 备确定所述输入设备的类型为三段式耳机。
结合第二方面的第一种可能的实现方式,在第二方面第三种可能的实现方式中,所述便携式电子设备根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接,包括:
若所述输入设备的类型为三段式麦克风,所述便携式电子设备将所述输入设备与所述处理器上的三段式麦克风的接口连接;
若所述输入设备的类型为三段式耳机,所述便携式电子设备将所述输入设备与所述处理器上的三段式耳机的接口连接。
结合第二方面、第二方面第一种至第三种可能的实现方式中的任意一种,在第二方面第四种可能的实现方式中,所述方法还包括:
当所述开关的第三端的电压等于所述第二电源模块的电压时,所述便携式电子设备控制所述开关的第一端与所述开关的第二端接通。
结合第二方面、第二方面第一种至第四种可能的实现方式中的任意一种,在第二方面第五种可能的实现方式中,所述方法还包括:
当所述输入设备的类型为三段式麦克风时,所述方法还包括:
当所述输入设备的类型为三段式麦克风时,所述便携式电子设备开启蓝牙输出设备。
本发明实施例提供的音频接头识别方法和便携式电子设备,便携式电子设备检测开关的第二端的电压,根据开关的第二端的电压确定输入设备是否接入所述开关的第一端;当便携式电子设备确定输入设备的接口为三段式接口时,便携式电子设备控制开关的第一端与开关的第三端接通,并检测开关的第三端的电压,根据开关的第三端的电压确定输入设备的类型。所述方法中,便携式电子设备能够识别三段式麦克风和三段式耳机,因此,用户可以使用三段式麦克风K歌,可以提升用户使用便携式电子设备K歌的用户体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员 来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例一提供的便携式电子设备的结构示意图;
图2为三段式耳机和三段式麦克风的接口结构的示意图;
图3为处理器11的接口示意图;
图4为本发明实施例二提供的音频接头识别方法的流程图;
图5为本发明实施例三提供的一种音频接头识别方法的流程图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
通过便携式电子设备(例如,手机和平板电脑)K歌作为一种娱乐方式在日常生活中日益普及,现有技术中,通过便携式电子设备自带的麦克风或带麦克风的有线耳机唱歌,用户不能随心自由的唱,影响用户体验。另外,现有的K歌输入方式采用的麦克风都是业余级别的配件,输入的信号质量不好,直接影响歌声质量,无法营造良好的K歌氛围,影响娱乐效果,降低用户体验。
现有技术中,带麦克风的有线耳机的接口为四段式接口,不带麦克风的有线耳机为三段式接口,以下将不带麦克风的有线耳机简称为四段式有线耳机,将带麦克风的有线耳机简称为三段式有线耳机,便携式电子通过判断插入的输入设备的接口类型判断输入设备为四段式耳机还是三段式耳机。三段式麦克风的接口也为三段式接口,三段式有线耳机和三段式麦克风的外部接口结构一样,现有技术中在识别出输入设备的接口类型为三段式接口后,无法识别输入设备为三段式麦克风还是三段式有线耳机。
为了使得便携式电子设备能够识别三段式麦克风,本发明实施例一提供一种便携式电子设备,图1为本发明实施例一提供的便携式电子设备的结构示意图,如图1所示,本实施例提供的便携式电子设备包括:处理器 11、检测电路12、第一电源模块13和第二电源模块14。
其中,检测电路12包括:开关121、第一分压电路122和第二分压电路133,第一分压电路122的阻抗大于第二分压电路123的阻抗。开关121的第一端用于与输入设备连接,开关121的第二端分别与第一分压电路122的第一端和处理器11连接,第一分压电路121的第二端与第一电源模块13连接,开关121的第三端分别与第二分压电路122的第一端和处理器11连接,第二分压电路123的第二端与第二电源模块14连接。
本实施例中,开关121可以采用单刀双掷开关,单刀双掷开关由动端和不动端组成,动端即开关121的第一端,不动端即开关121的第二端和第三端。处理器11可以控制开关121的第一端分别和开关121的第二端和第三端连接。本实施例中,处理器11可以为便携式电子设备中已经有的处理器,该处理器可以由集成电路(英文全称:Integrated Circuit,简称:IC)组成,例如可以由单颗封装的IC所组成,也可以由连接多颗相同功能或不同功能的封装IC而组成。举例来说,处理器11可以仅包括中央处理器(英文全称:Central Processing Unit,简称:CPU),也可以是GPU、数字信号处理器(英文全称:Digital Signal Processor,简称:DSP)、及通信单元中的控制芯片的组合。当然,为了实现本实施例的方法,还可以在便携式电子设备中新增一个CPU或DSP等,该新增的CPU或DSP即为处理器11。
第一分压电路122和第二分压电路123用于实现通路上的分压,第一分压电路122的阻抗应该远大于第二分压电路123的阻抗,例如,第一分压电路的阻抗为100K欧姆,第二分压电路的阻抗为100欧姆。在具体实现时,第一分压电路122和第二分压电路123分别可以为一个电阻组成的电路,当然,第一分压电路122和第二分压电路123也可以是有多个电子元件组成的电路。第一电源模块13和第二电源模块14用于为检测电路12提供所需的电压,第一电源模块13和第二电源模块14可以采用便携式电子设备中已有的电源模块,也可以为便携式电子设备中新增的电源模块。
开关121的第一端和输入设备的一端连接,该输入设备可以为三段式耳机、三段式麦克风或四段式耳机,输入设备的另一端与接地端连接。现有技术中便携式电子设备能够识别输入设备的接口为三段式接口还是四 段式接口,但是当输入设备的接口为三段式接口时,便携式电子设备无法识别输入设备为三段式耳机还是三段式麦克风。这主要是因为,三段式耳机和三段式麦克风的外部接口结构一样。图2为三段式耳机和三段式麦克风的接口结构的示意图,如图2所示,三段式耳机和三段式麦克风都为三段,三段式耳机的信号定义从左到右依次为左声道L、右声道R和接地端GND,三段式麦克风的信号定义从左到右依次为麦克风正极(以下简称MIC+)、麦克风负极(以下简称MIC-)和接地端。
需要说明的是,虽然三段式耳机和三段式麦克风的外部接口结构一样,但是三段式耳机和三段式麦克风的信号定义和器件内部电路不一样,由于三段式耳机和三段式麦克风的内部电路不同,导致三段式耳机和三段式麦克风对地的阻抗差别很大,表1为目前市场上的三段式耳机和三段式麦克风的阻抗(单位为欧姆)参数的比较示意图。
表1
Figure PCTCN2015076159-appb-000001
从表1中可以看出,三段式麦克风的阻抗比三段式耳机的阻抗大的多,本实施例中就是利用三段式麦克风和三段式耳机的阻抗的差异性来识别输入设备的类型。当输入设备为三段式耳机时,由于三段式耳机阻抗比较小,通路电流会很大,在第二分压电路123上的压降很大,开关121的第三端的电压V4比较小。当输入设备为三段式麦克风时,由于三段式麦克 风阻抗比较大,通路电流会很小,在第二分压电路123上的压降很小,开关121的第三端的电压V4很大,因此,可以通过开关121的第三端的电压V4判断输入设备的类型。
初始时,开关121的第一端与开关121的第二端接通,此时开关121的第二端的电压V3等于第一电源模块13的电压V1。当输入设备接入时,从接地端到第一电源模块13形成通路,开关121的第二端的电压V3发生变化,由于第一分压电阻122的阻抗很大,输入设备的阻抗相对于第一分压电阻122很小,第一分压电阻122分担了大部分的电压,开关121的第二端的电压V3接近0,处理器11用于检测开关121的第二端的电压,根据开关121的第二端的电压确定输入设备接入开关的第一端。
处理器11在确定有输入设备接入后,通过检测输入设备的接口的结构确定输入设备的接口类型,即判断输入设备的接口类型为三段式接口还是四段式接口。处理器11确定输入设备的接口类型为三段式接口还是四段式接口为现有技术,这里不做过多的描述。
当处理器11还用于,在确定输入设备的接口类型为三段式接口时,处理器11控制开关121的第一端与开关121的第二端断开,并控制开关121的第一端与开关121的第三端接通,此时,从接地端到第二电源模块14形成通路,处理器11检测开关121的第三端的电压V4,根据开关121的第三端的电压确定输入设备的类型。当处理器11确定输入设备的接口类型为四段式接口时,处理器11不做任何处理,开关121的第一端仍与与开关121的第二端接通。
处理器11具体可以通过如下两种方式确定输入设备的类型:
第一种方式,若开关121的第三端的电压属于第一电压范围,则处理器11确定输入设备的类型为三段式麦克风;若开关121的第三端的电压属于第二电压范围,则处理器11确定输入设备的类型为三段式耳机,其中,第一电压范围内的电压值均大于第二电压范围内的电压值。
第二种实现方式中,若开关121的第三端的电压大于预设的电压阈值,则处理器11确定输入设备的类型为三段式麦克风;若开关121的第三端的电压小于电压阈值,则处理器11确定输入设备的类型为三段式耳机。需要说明的是,该电压阈值小于第一电压范围的最小电压值,且该电压阈 值大于第二电压范围的最大电压值。
本实施例中,开关121的第三端的电压V4=R/(R+R2)U,其中,R为输入设备的阻抗,R2为第二分压电路的阻抗,U为第二电源模块14的电压,R2和U为已知参数,由于三段式麦克风的阻抗远大于三段式耳机的阻抗,因此,接入三段式麦克风时开关121的第三端的电压一定大于接入三段式耳机时的电压。由于不同厂家生成的三段式麦克风和三段式耳机的阻抗有差异,插入不同阻抗的三段式麦克风和三段式耳机的阻抗时三段式麦克风时开关121的第三端的电压有变化。
本实施例中,第一电压范围就是根据现有的三段式耳机的不同阻抗计算得到的,第一电压范围的最小电压值为三段式耳机的阻抗取最小值时得到的电压,第一电压范围的最大电压值为三段式耳机的阻抗取最大值时得到的电压,在具体计算时,将三段式耳机的阻抗的最大值和最小值带入公式:V4=R/(R+R2)U得到第一电压范围的最大电压值和最小值。同理,第二电压范围是根据现有的三段式麦克风的不同阻抗计算得到的,第二电压范围的最小电压值为三段式麦克风的阻抗取最小值时得到的,第二电压范围的最大电压值为三段式麦克风的阻抗取最大值时得到的,在具体计算时,将三段式麦克风的阻抗的最大值和最小值带入公式:V4=R/(R+R2)U得到第二电压范围的最大电压值和最小值。
在确定输入设备的类型后,处理器11还用于根据输入设备的类型将输入设备的接口与处理器11上对应的接口连接。具体的,若输入设备的类型为三段式麦克风,处理器11将输入设备的接口与处理器11上的三段式麦克风的接口连接;若输入设备的类型为三段式耳机,处理器11将输入设备的接口与处理器11上三段式耳机的接口连接。图3为处理器11的接口示意图,如图3所示,处理器11包括如下五种接口:MIC+、MIC-、接地端、左声道、右声道。若处理器检测到输入设备类型为三段式麦克风,则处理器11将三段式麦克风的MIC+、MIC-、接地端分别与处理器11上的MIC+、MIC-、接地端连接,若处理器11检测到输入设备类型为三段式耳机,则处理器11将三段式耳机的接地端、左声道、右声道分别与处理器11上的接地端、左声道、右声道连接,从而完成将输入设备的信号连接到处理器11上。
可选的,处理器11还用于:当确定输入设备的类型为三段式麦克风时,开启蓝牙输出设备,该蓝牙输出设备可以为蓝牙耳机或蓝牙音箱。具体的,处理器11可以向蓝牙输出设备发送一条开启指令,该开启指令用户开启蓝牙输出设备。
处理器11还用于:当开关121的第三端的电压V4等于第二电源模块14的电压V2时,处理器11控制开关121的第一端与开关121的第三端断开,并控制开关121的第一端与开关121的第二端接通。开关121的第三端的电压V4等于第二电源模块14的电压V2说明输入设备被拔出,处理器11控制开关121的第一端与开关121的第二端接通。
可选的,本实施例的便携式电子设备还可以包括:模数转换器(Analog-to-Digital Converter,简称ADC),模数转换器的第一端分别与开关121的第二端和第三端连接,模数转换器的第二端与处理器11连接,模数转换器11用于检测开关121的第二端和第三端的电压,并将检测到的电压转换为数字信号后传输给处理器11。
本实施例的便携式电子设备,能够识别三段式麦克分,使得用户可以使用外接的三段式麦克风K歌,可以推拉麦克风离嘴边的距离,去除爆破音、气息、K歌高音缓降。输出方面支持在用三段式麦克风K歌的时候,蓝牙输出设备同时工作,提升音量和音质,营造良好K歌氛围。
本发明实施例二提供一种音频接头识别方法,本实施例的方法可以应用于实施例一提供的便携式电子设备中,图4为本发明实施例二提供的音频接头识别方法的流程图,请参照图1和图4,本实施例提供的方法可以包括以下步骤:
步骤101、便携式电子设备检测开关的第二端的电压,根据开关的第二端的电压确定输入设备是否接入开关的第一端,其中,初始时,开关的第一端与开关的第二端接通。
步骤102、当便携式电子设备确定输入设备的接口为三段式接口时,便携式电子设备控制开关的第一端与开关的第三端接通,并检测开关的第三端的电压。
步骤103、便携式电子设备根据开关的第三端的电压确定输入设备的类型。
一种实现方式中,若输入设备的接口电压属于第一电压范围,则便携式电子设备确定输入设备的类型为三段式麦克风;若输入设备的接口电压属于第二电压范围,则便携式电子设备确定输入设备的类型为三段式耳机,第一电压范围内的电压值均大于第二电压范围内的电压值。
另一种实现方式中,若开关的第三端的电压大于预设的电压阈值,则便携式电子设备确定输入设备的类型为三段式麦克风;若开关的第三端的电压小于电压阈值,则便携式电子设备确定输入设备的类型为三段式耳机。需要说明的是,该电压阈值小于第一电压范围的最小电压值,电压阈值大于第二电压范围的最大电压值。
可选的,便携式电子设备根据开关的第三端的电压确定输入设备的类型后,便携式电子设备还根据输入设备的类型将输入设备的接口与处理器上对应的接口连接。具体的,若输入设备的类型为三段式麦克风,便携式电子设备将输入设备与处理器上的三段式麦克风的接口连接;若输入设备的类型为三段式耳机,便携式电子设备将输入设备与处理器上的三段式耳机的接口连接。
可选的,当开关的第三端的电压等于第二电源模块的电压时,便携式电子设备控制开关的第一端与开关的第二端接通。
可选的,当输入设备的类型为三段式麦克风时,若便携式电子设备具有蓝牙输出设备,则便携式电子设备开启蓝牙输出设备。
本实施例的具体实现方式可参照实施例一的相关描述,这里不再赘述。
通过本实施例的方法,便携式电子设备可以识别三段式耳机和三段式麦克风,从而丰富了用户使用便携式电子设备K歌的方法,用户可以通过以下几种方式K歌,以提升用户使用便携式电子设备K歌的用户体验:(1)蓝牙耳机K歌时,蓝牙输出设备和便携式电子设备自带的喇叭同时输出;(2)四段式耳机K歌时,四段式耳机和蓝牙输出设备同时输出;(3)三段式麦克风K歌时,支持蓝牙输出设备输出。
本实施例的方法,便携式电子设备检测开关的第二端的电压,根据开关的第二端的电压确定输入设备是否接入所述开关的第一端;当便携式电子设备确定输入设备的接口为三段式接口时,便携式电子设备控制开关的 第一端与开关的第三端接通,并检测开关的第三端的电压,根据开关的第三端的电压确定输入设备的类型。所述方法中,便携式电子设备能够识别三段式麦克风和三段式耳机,因此,用户可以使用三段式麦克风K歌,可以提升用户使用便携式电子设备K歌的用户体验。
图5为本发明实施例三提供的一种音频接头识别方法的流程图,如图5所示,本实施例提供的方法可以包括以下步骤:
步骤201、便携式电子设备检测是否有输入设备插入音频接口。
若是,即有输入设备插入音频接口,则执行步骤202,若否,即没有输入设备插入音频接口则返回执行步骤201,继续进行检测。
步骤202、便携式电子设备判断输入设备的接口为三段式接口还是四段式接口。
若输入设备的接口为三段式接口,则执行步骤203,若输入设备的接口为四段式接口,则执行步骤204。
步骤203、便携式电子设备判断输入设备为三段式耳机还是三段式麦克风。
若输入设备为三段式麦克风,则执行步骤205,若输入设备为三段式耳机,则执行步骤206。
步骤204、便携式电子设备将输入设备的接口与处理器上的四段式耳机的接口连接。
步骤205、便携式电子设备将输入设备的接口与处理器上的三段式耳机的接口连接,同时开启蓝牙输出设备。
步骤206、便携式电子设备将输入设备的接口与处理器上的三段式耳机的接口连接。
步骤207、便携式电子设备判断输入设备是否拔出音频接口。
在执行完步骤204-206中任意一个步骤之后,执行本步骤。若输入设备拔出,则结束本次识别流程,若电子设备没有拔出,则返回执行201。
本实施例的具体实现方式可参照实施例一和实施例二的相关描述,这里不再赘述。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算 机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (16)

  1. 一种便携式电子设备,其特征在于,包括:处理器、检测电路、第一电源模块和第二电源模块,所述检测电路包括:开关、第一分压电路和第二分压电路,所述第一分压电路的阻抗大于所述第二分压电路的阻抗;
    所述开关的第一端用于与输入设备连接,所述开关的第二端分别与所述第一分压电路的第一端和所述处理器连接,所述第一分压电路的第二端与所述第一电源模块连接,所述开关的第三端分别与所述第二分压电路的第一端和所述处理器连接,所述第二分压电路的第二端与所述第二电源模块连接;
    所述处理器,用于检测所述开关的第二端的电压,根据所述开关的第二端的电压确定所述输入设备是否接入所述开关的第一端,其中,初始时,所述开关的第一端与所述开关的第二端接通;
    所述处理器,还用于当确定所述输入设备的接口为三段式接口时,控制所述开关的第一端与所述开关的第三端接通,并检测所述开关的第三端的电压,根据所述开关的第三端的电压确定所述输入设备的类型。
  2. 根据权利要求1所述的设备,其特征在于,所述处理器还用于,根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接。
  3. 根据权利要求1或2所述的设备,其特征在于,所述根据所述开关的第三端的电压确定所述输入设备的类型,包括:
    若所述开关的第三端的电压属于第一电压范围,则所述处理器确定所述输入设备的类型为三段式麦克风;
    若所述开关的第三端的电压属于第二电压范围,则所述处理器确定所述输入设备的类型为三段式耳机,所述第一电压范围内的电压值均大于所述第二电压范围内的电压值。
  4. 根据权利要求1或2所述的设备,其特征在于,所述根据所述开关的第三端的电压确定所述输入设备的类型,包括:
    若所述开关的第三端的电压大于预设的电压阈值,则所述处理器确定所述输入设备的类型为三段式麦克风;
    若所述开关的第三端的电压小于所述电压阈值,则所述处理器确定所述输入设备的类型为三段式耳机。
  5. 根据权利要求2所述的设备,其特征在于,所述处理器根据所述输入设备的类型将所述输入设备的接口信号切换到所述输入设备的类型对应的输入信号,包括:
    若所述输入设备的类型为三段式麦克风,所述处理器将所述输入设备的接口与所述处理器上的三段式麦克风的接口连接;
    若所述输入设备的类型为三段式耳机,所述处理器将所述输入设备的接口与所述处理器上的三段式耳机的接口连接。
  6. 根据权利要求1所述的设备,其特征在于,所述便携式电子设备还包括:模数转换器,所述模数转换器的第一端分别与所述开关的第二端和第三端连接,所述模数转换器的第二端与所述处理器连接,所述模数转换器用于检测所述开关的第二端和第三端的电压,并将检测到的电压转换为数字信号后传输给所述处理器。
  7. 根据权利要求1-6中任一项所述的设备,其特征在于,所述第一分压电路包括第一电阻,所述第二分压电路包括第二电阻,所述第一电阻的阻抗大于所述第二电阻的阻抗。
  8. 根据权利要求1-7中任一项所述的设备,其特征在于,所述处理器还用于:
    当所述开关的第三端的电压等于所述第二电源模块的电压时,所述处理器控制所述开关的第一端与所述开关的第二端接通。
  9. 根据权利要求1-8中任一项所述的设备,其特征在于,所述处理器还用于:
    当确定所述输入设备的类型为三段式麦克风时,开启蓝牙输出设备。
  10. 一种音频接头识别方法,其特征在于,所述方法应用于便携式电子设备中,所述便携式电子设备包括:处理器、检测电路、第一电源模块和第二电源模块,所述检测电路包括:开关、第一分压电路和第二分压电路,所述第一分压电路的阻抗大于所述第二分压电路的阻抗;所述开关的第一端与输入设备连接,所述开关的第二端分别与所述第一分压电路的第一端和所述处理器连接,所述第一分压电路的第二端与所述第一电源模块 连接,所述开关的第三端分别与所述第二分压电路的第一端和所述处理器连接,所述第二分压电路的第二端与所述第二电源模块连接,所述方法包括:
    所述便携式电子设备检测所述开关的第二端的电压,根据所述开关的第二端的电压确定所述输入设备是否接入所述开关的第一端,其中,初始时,所述开关的第一端与所述开关的第二端接通;
    当所述便携式电子设备确定所述输入设备的接口为三段式接口时,所述便携式电子设备控制所述开关的第一端与所述开关的第三端接通,并检测所述开关的第三端的电压;
    所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型。
  11. 根据权利要求10所述的方法,其特征在于,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型之后,所述方法还包括:
    所述便携式电子设备根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接。
  12. 根据权利要求10或11所述的方法,其特征在于,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型,包括:
    若所述输入设备的接口电压属于第一电压范围,则所述便携式电子设备确定所述输入设备的类型为三段式麦克风;
    若所述输入设备的接口电压属于第二电压范围,则所述便携式电子设备确定所述输入设备的类型为三段式耳机,所述第一电压范围内的电压值均大于所述第二电压范围内的电压值。
  13. 根据权利要求10或11所述的方法,其特征在于,所述便携式电子设备根据所述开关的第三端的电压确定所述输入设备的类型,包括:
    若所述开关的第三端的电压大于预设的电压阈值,则所述便携式电子设备确定所述输入设备的类型为三段式麦克风;
    若所述开关的第三端的电压小于所述电压阈值,则所述便携式电子设备确定所述输入设备的类型为三段式耳机。
  14. 根据权利要求11所述的方法,其特征在于,所述便携式电子设 备根据所述输入设备的类型将所述输入设备的接口与所述处理器上对应的接口连接,包括:
    若所述输入设备的类型为三段式麦克风,所述便携式电子设备将所述输入设备与所述处理器上的三段式麦克风的接口连接;
    若所述输入设备的类型为三段式耳机,所述便携式电子设备将所述输入设备与所述处理器上的三段式耳机的接口连接。
  15. 根据权利要求10-14中任一项所述的方法,其特征在于,所述方法还包括:
    当所述开关的第三端的电压等于所述第二电源模块的电压时,所述便携式电子设备控制所述开关的第一端与所述开关的第二端接通。
  16. 根据权利要求10-15中任一项所述的方法,其特征在于,所述方法还包括:
    当所述输入设备的类型为三段式麦克风时,所述便携式电子设备开启蓝牙输出设备。
PCT/CN2015/076159 2015-04-09 2015-04-09 音频接头识别方法和便携式电子设备 WO2016161596A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201580064063.6A CN107005762B (zh) 2015-04-09 2015-04-09 音频接头识别方法和便携式电子设备
PCT/CN2015/076159 WO2016161596A1 (zh) 2015-04-09 2015-04-09 音频接头识别方法和便携式电子设备

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/076159 WO2016161596A1 (zh) 2015-04-09 2015-04-09 音频接头识别方法和便携式电子设备

Publications (1)

Publication Number Publication Date
WO2016161596A1 true WO2016161596A1 (zh) 2016-10-13

Family

ID=57072966

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/076159 WO2016161596A1 (zh) 2015-04-09 2015-04-09 音频接头识别方法和便携式电子设备

Country Status (2)

Country Link
CN (1) CN107005762B (zh)
WO (1) WO2016161596A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316064A (zh) * 2021-04-28 2021-08-27 杭州小派智能科技有限公司 耳机和喇叭识别的方法、系统、头戴显示设备和存储介质
CN114710583A (zh) * 2022-04-08 2022-07-05 维沃移动通信有限公司 麦克风调用方法、装置、电子设备及可读存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112327211B (zh) * 2020-09-29 2023-07-21 惠州市德赛西威汽车电子股份有限公司 一种车载麦克风电源连接状态监测电路及方法
CN112924499A (zh) * 2021-01-27 2021-06-08 三诺生物传感股份有限公司 一种试条插条识别的装置、试条吸样判断的装置及其方法

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003143687A (ja) * 2001-10-18 2003-05-16 Internatl Business Mach Corp <Ibm> マイクプラグとラインプラグの検出回路、ジャックの共用回路、ジャックを共用するためのアダプタ、および、共用ジャックを備えるノートブック型pc
US6856046B1 (en) * 2002-03-08 2005-02-15 Analog Devices, Inc. Plug-in device discrimination circuit and method
CN2819226Y (zh) * 2005-07-22 2006-09-20 华为技术有限公司 一种耳机插入检测装置
US20130130744A1 (en) * 2003-04-17 2013-05-23 Pantech Co., Ltd. Apparatus and method for automatically detecting presence of external device in mobile terminal
CN103686535A (zh) * 2013-12-02 2014-03-26 Tcl集团股份有限公司 自动识别耳机麦克风与卡拉ok设备的终端及识别方法
CN203734827U (zh) * 2014-03-14 2014-07-23 宁波萨瑞通讯有限公司 一种麦克风检测电路及其移动终端设备
CN104093114A (zh) * 2014-07-22 2014-10-08 Tcl通讯(宁波)有限公司 一种耳机按键的检测装置、检测系统及检测方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783986B (zh) * 2010-03-17 2013-02-20 青岛海信移动通信技术股份有限公司 耳机接口电路以及电子设备
CN102739183B (zh) * 2012-06-13 2013-08-21 天地融科技股份有限公司 移动终端的音频接口匹配识别方法、装置和电子签名工具
CN102761804B (zh) * 2012-06-14 2013-10-09 天地融科技股份有限公司 一种音频接口自适应方法、装置和电子签名工具
CN103219988B (zh) * 2013-03-19 2016-06-08 福建联迪商用设备有限公司 自动识别拔插音频设备的方法及终端
CN103414981A (zh) * 2013-07-17 2013-11-27 天地融科技股份有限公司 音频接口管脚识别装置、方法及终端
CN103702055A (zh) * 2013-12-13 2014-04-02 乐视致新电子科技(天津)有限公司 音视频信号接头自识别系统及方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003143687A (ja) * 2001-10-18 2003-05-16 Internatl Business Mach Corp <Ibm> マイクプラグとラインプラグの検出回路、ジャックの共用回路、ジャックを共用するためのアダプタ、および、共用ジャックを備えるノートブック型pc
US6856046B1 (en) * 2002-03-08 2005-02-15 Analog Devices, Inc. Plug-in device discrimination circuit and method
US20130130744A1 (en) * 2003-04-17 2013-05-23 Pantech Co., Ltd. Apparatus and method for automatically detecting presence of external device in mobile terminal
CN2819226Y (zh) * 2005-07-22 2006-09-20 华为技术有限公司 一种耳机插入检测装置
CN103686535A (zh) * 2013-12-02 2014-03-26 Tcl集团股份有限公司 自动识别耳机麦克风与卡拉ok设备的终端及识别方法
CN203734827U (zh) * 2014-03-14 2014-07-23 宁波萨瑞通讯有限公司 一种麦克风检测电路及其移动终端设备
CN104093114A (zh) * 2014-07-22 2014-10-08 Tcl通讯(宁波)有限公司 一种耳机按键的检测装置、检测系统及检测方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113316064A (zh) * 2021-04-28 2021-08-27 杭州小派智能科技有限公司 耳机和喇叭识别的方法、系统、头戴显示设备和存储介质
CN114710583A (zh) * 2022-04-08 2022-07-05 维沃移动通信有限公司 麦克风调用方法、装置、电子设备及可读存储介质

Also Published As

Publication number Publication date
CN107005762A (zh) 2017-08-01
CN107005762B (zh) 2019-12-13

Similar Documents

Publication Publication Date Title
US20100104119A1 (en) Audio output device
US9680980B2 (en) Electronic device accessory
WO2015165345A1 (zh) 一种传输方法、移动终端、多声道耳机及音频播放系统
JP6054416B2 (ja) プラグタイプの検出
US9338570B2 (en) Method and apparatus for an integrated headset switch with reduced crosstalk noise
US20070164861A1 (en) Recognition of audio device in portable terminal
WO2016161596A1 (zh) 音频接头识别方法和便携式电子设备
US9179218B2 (en) Mobile device for multi-channel sound collection and output using common connector, and driving method thereof
TW201336326A (zh) 實現耳機相容的電子裝置及方法
WO2018076628A1 (zh) 一种usb接口电路、终端、耳机电路及耳机、存储介质
TW201320471A (zh) 訊號連接模組、電子裝置及其接頭辨識之方法
WO2020187024A1 (zh) 音频电路、相关设备及控制方法
WO2017140101A1 (zh) 耳机及耳机进行数据处理的方法
TWI522904B (zh) 電子裝置及用以校正電子裝置的耳機麥克風
WO2019100750A1 (zh) 一种消除音频信号播放通路之间串扰的方法、电路及设备
CN201898602U (zh) 一种手机无源音箱接口
KR101868542B1 (ko) 이동 단말
CN103200480A (zh) 耳麦及其工作方法
CN108196818B (zh) 耳机识别装置
CN203181164U (zh) 耳麦
US9247336B2 (en) Apparatus and method for confirming control information of earphone in portable terminal
CN105848033A (zh) 一种在听音乐状态下与人交谈的耳机
US20110035032A1 (en) Audio signal processing device
CN109218914B (zh) 音频播放装置及音频传输电路
JP5211099B2 (ja) 変換アダプタ及び電子機器

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15888153

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15888153

Country of ref document: EP

Kind code of ref document: A1