WO2018014474A1 - Audio switching method, device, terminal, earpiece and storage medium - Google Patents

Audio switching method, device, terminal, earpiece and storage medium Download PDF

Info

Publication number
WO2018014474A1
WO2018014474A1 PCT/CN2016/106151 CN2016106151W WO2018014474A1 WO 2018014474 A1 WO2018014474 A1 WO 2018014474A1 CN 2016106151 W CN2016106151 W CN 2016106151W WO 2018014474 A1 WO2018014474 A1 WO 2018014474A1
Authority
WO
WIPO (PCT)
Prior art keywords
pin
type
terminal
switch
switching
Prior art date
Application number
PCT/CN2016/106151
Other languages
French (fr)
Chinese (zh)
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
Priority claimed from CN201610826661.9A external-priority patent/CN107645690A/en
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018014474A1 publication Critical patent/WO2018014474A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones

Definitions

  • the present invention relates to the field of communications, and in particular to an audio switching method and apparatus, a terminal, an earphone, and a storage medium.
  • the digital audio of intelligent terminals on the market has risen, and the 3.5mm headphone jack has a promising future.
  • the Type-c interface replaces the 3.5mm interface, just around the corner.
  • Smart terminal audio contains a lot of scenes, which are mainly talking, talking, playing and recording. Whether it is in a call, play or recording, the data transmitted through the 3.5mm headphone is an analog signal; if digital audio is implemented, the Type-c interface needs to be taken.
  • the playback mode is digital mode
  • the call and recording are mixed modes of the analog mode; although the analog-digital hybrid method can avoid the problem of call delay and power consumption, but introduces a new problem, the headphone interface cannot be defined according to the Type-c pin. , resulting in headphones that are not versatile.
  • the analog-to-digital mixing method the call is in an analog format, and the playback is in a digital format; the D+/- of the mobile phone side is connected together; the digital and analog data are taken in the same physical channel.
  • the B6/7 on the earphone side is the NA pin; it supports forward and reverse switching. To some extent, it solves the short board with large call delay and increased power consumption; but from playback to call or from call to play, the USB device re-initiation enumeration process is required, and the enumeration process is repeated twice, and the delay is increased. And the headset can only be used with a specific phone to complete the call function. Headphones are not versatile and the user's physical examination is poor.
  • the embodiment of the invention provides an audio switching method and device, a terminal, and an earphone, so as to at least solve the problem that the earphone or the terminal in the related art does not have universality.
  • an audio switching method including: determining a type of an audio stream that is turned on; and switching a switch of the terminal to a pin corresponding to the type in the Type C interface of the terminal according to the type.
  • the types include: a play process, a call flow, and a recording process;
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin
  • switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type includes one of the following: when the type is a playback process, switching the switch of the terminal to the first pin and the second On the pin; when the type is the call flow, switch the switch of the terminal to the third pin and the fourth pin; when the type is the recording process, switch the switch of the terminal to the fifth pin or the sixth pin
  • the Type C interface includes: a fifth pin and a sixth pin.
  • the method further includes: identifying a type of the Type C device inserted into the terminal; and sending the Type C headset to the Type C headset if the Type C device is identified as the Type C headset; Instructing to switch the switch of the Type C headset to the first indication of the third and fourth pins of the Type C interface in the Type C headset, or to send a switch to the Type C headset to indicate that the switch of the Type C headset is maintained The second indication of the first pin and the second pin of the Type C interface in the Type C headset.
  • identifying the type of the Type C device inserted into the terminal includes: determining a type of the Type C device by detecting a state of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance
  • the state of the RD state and the CC2 pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state.
  • the Type C device is of type Type C headset.
  • the method further includes: the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin state.
  • the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin state.
  • the method further includes: the state of the CC1 pin is the disconnected open state and the CC2 pin state.
  • the state of the CC1 pin is the disconnected open state and the CC2 pin state.
  • the switch of the terminal is switched from the fifth pin to the sixth pin; wherein the Type C interface further includes the fifth pin and The sixth pin.
  • an audio switching method including: receiving switching information sent by a terminal; and switching a switch of the earphone to a pin corresponding to the switching information in a Type C interface of the earphone according to the switching information.
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; and the second pin is defined as a D-tube
  • the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
  • the switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third pin and a second indication information on the fourth pin; a third indication information indicating that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: a fifth pin and the sixth pin.
  • the switching information is the first indication information; when the audio process opened by the terminal is a call flow, the switching information is the second indication information; and the audio flow opened in the terminal In the recording process, the switching information is the third indication information.
  • the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used to indicate the switch of the earphone Switch to the sixth pin.
  • an audio switching apparatus including: a determining module, configured to determine a type of an audio stream that is turned on; and a switching module, configured to switch a switch of the terminal to a Type C interface of the terminal according to a type. On the pin corresponding to the type.
  • the types include: a play process, a call flow, and a recording process.
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
  • the switching module is used to: switch the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, switch the switch of the terminal to the first On the three-pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes the A8 pin and the B8 pin.
  • the device further includes: an identification module, configured to identify a type of the Type C device inserted into the terminal; and a sending module, configured to send the Type C headset to the Type C headset if the Type C device is identified as a Type C headset Indicates the first indication of switching the switch of the Type C headset to the third and fourth pins of the Type C interface in the Type C headset, or to the Type C headset to indicate that the switch of the Type C headset is maintained at the Type The second indication information of the first pin and the second pin of the Type C interface in the C headset.
  • an identification module configured to identify a type of the Type C device inserted into the terminal
  • a sending module configured to send the Type C headset to the Type C headset if the Type C device is identified as a Type C headset Indicates the first indication of switching the switch of the Type C headset to the third and fourth pins of the Type C interface in the Type C headset, or to the Type C headset to indicate that the switch of the Type C headset is maintained at the Type
  • the identification module is further configured to determine a type of the Type C device by detecting a state of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin Type C device type when the state is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state.
  • the identification module is further configured to determine a type of the Type C device by detecting a state of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin Type C device type when the state is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state.
  • the identification module is further configured to determine a type of the Type C device
  • the identification module is further configured to determine that the Type C headset is positively inserted into the terminal when the state of the CC1 pin is the pull-down impedance RD state and the state of the CC2 pin is the open state; the switching module further It is used to hold or switch the switch of the terminal to the fifth pin; wherein the Type C interface further includes a fifth pin.
  • the identification module is further configured to determine that the Type C headset is inserted into the terminal in reverse when the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state; The switch for switching the terminal is switched from the fifth pin to the sixth pin; wherein the Type C interface further includes a fifth pin and a sixth pin.
  • an audio switching apparatus including: a receiving module, configured to receive switching information sent by a terminal; and a switching module, configured to switch a switch of the earphone to a Type C interface of the earphone according to the switching information. On the pin corresponding to the switching information.
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; and the second pin is defined as a D-tube
  • the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
  • the switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third pin and a second indication information on the fourth pin; a third indication information indicating that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: a fifth pin and the sixth pin.
  • the switching information is the first indication information; when the audio process opened by the terminal is a call flow, the switching information is the second indication information; and the audio flow opened in the terminal In the recording process, the switching information is the third indication information.
  • the switching information further includes: indicating to switch the switch of the earphone to the fifth pin or a third indication information on the sixth pin; wherein, when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third The indication information is used to indicate that the switch of the earphone is switched to the sixth pin.
  • a terminal including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein, the first tube The foot is a D+ pin; the second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  • the third pin is docked with the right channel pin of the earphone
  • the fourth pin is docked with the left channel pin of the earphone.
  • the right channel pin of the earphone is the third pin of the Type C interface of the earphone
  • the left channel pin of the earphone is the fourth pin of the Type C interface of the earphone.
  • an earphone including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein, One pin is a D+ pin; the second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  • the third pin is docked with the right channel pin of the terminal
  • the fourth pin is docked with the left channel pin of the terminal.
  • the right channel pin of the terminal is the third pin of the Type C interface of the terminal
  • the left channel pin of the terminal is the fourth pin of the Type C interface of the terminal.
  • an audio switching method including: determining a type of an audio stream that is turned on; determining an insertion direction of the earphone insertion terminal; and switching a switch of the terminal to the terminal according to a type and an insertion direction of the audio flow On the corresponding pin in the Type C interface.
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
  • the type of the audio process includes at least one of the following: a play process, a call flow, and a recording process; and the insertion direction includes one of the following: forward insertion and reverse insertion.
  • switching the switch of the terminal to the corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow includes: switching the switch to when the audio flow is the playback process and the insertion direction is forward insertion. The first pin and the second pin; when the audio flow is the playback process and the insertion direction is reverse insertion, the switch is switched to the third pin and the fourth pin; the audio flow is the call flow and the insertion direction is positive When inserting, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; in the audio flow For the recording process and the insertion direction is forward insertion, switch the switch to the fifth pin;
  • the switch is switched to the sixth pin; wherein the Type C interface includes: a fifth pin and a sixth pin.
  • an audio switching apparatus including: a determining module, configured to determine a type of an audio stream that is turned on; a determining module, configured to determine an insertion direction of the earphone insertion terminal; and a switching module, configured to The type and insertion direction of the audio stream switches the switch of the terminal to the corresponding pin in the Type C interface of the terminal.
  • the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
  • the type of the audio process includes at least one of the following: a play process, a call flow, and a recording process; and the insertion direction includes one of the following: forward insertion and reverse insertion.
  • the switching module is further configured to: at least one of: switching the switch to the first pin and the second pin when the audio flow is a playback process and the insertion direction is forward insertion; the audio flow is a playback process and When the insertion direction is reverse insertion, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is forward insertion, switch the switch to the third pin And the fourth pin; when the audio flow is a call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; when the audio flow is a recording process and the insertion direction is forward insertion, Switch the switch to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, the switch is switched to the sixth pin; wherein the Type C interface includes: the fifth pin and the sixth pin.
  • a storage medium is also provided.
  • the storage medium is configured to store program code for performing the following steps: determining the type of the audio process that is turned on; wherein the type includes: a play process, a call flow, a recording process; and switching the switch of the terminal to the Type C interface of the terminal according to the type
  • the type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; the second tube The foot is a D-pin; the third pin is a right channel pin; the fourth pin is a left channel pin.
  • the first pin in the Type C interface is defined as a D+ pin; the second pin in the Type C interface is defined as a D-pin; in the Type C interface
  • the third pin is redefined as the right channel pin; the fourth pin in the Type C interface is redefined as the left channel pin; making the first and third interfaces of the Type C in the terminal side in the related art
  • the pins are D+ pins, the second and fourth pins are D-pins; the first pin of the Type C interface on the earphone side is D+ pin, the second pin is D-pin, and the third Compared with the fourth pin, the fourth pin can realize the versatility of the earphone, and solves the problem that the earphone does not have versatility in the related art.
  • FIG. 1 is a block diagram showing the hardware structure of a mobile terminal of an audio switching method according to an embodiment of the present invention
  • FIG. 2 is a flowchart 1 of an audio switching method according to an embodiment of the present invention.
  • FIG. 3 is a second flowchart of an audio switching method according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 1 of a structure of an audio switching device according to an embodiment of the present invention.
  • FIG. 5 is a second structural block diagram of an audio switching apparatus according to an embodiment of the present invention.
  • FIG. 6 is a definition diagram of a Type-c port pin on a main control module side and an earphone side according to a preferred embodiment of the present invention
  • FIG. 7 is a schematic diagram showing states of CC1 and CC2 pins of an auxiliary control module and corresponding headphone position relationships according to a preferred embodiment of the present invention
  • FIG. 8 is a schematic structural diagram of an auxiliary control module according to a preferred embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a switching module according to a preferred embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a 24-wire standard interface definition provided in accordance with a preferred embodiment of the present invention.
  • FIG. 11 is a schematic diagram of a non-low cost non-standard interface definition interface provided in accordance with a preferred embodiment of the present invention.
  • FIG. 12 is a schematic diagram of related provisions of a USB protocol according to a preferred embodiment of the present invention.
  • FIG. 13 is a schematic diagram of a call scenario according to a preferred embodiment of the present invention.
  • FIG. 14 is a schematic diagram of a playback scenario according to a preferred embodiment of the present invention.
  • FIG. 15 is a schematic diagram of a Barge-in scenario provided in accordance with a preferred embodiment of the present invention.
  • 16 is a flowchart 3 of an audio switching method according to an embodiment of the present invention.
  • FIG. 17 is a third flowchart of an audio switching device according to an embodiment of the present invention.
  • FIG. 18 is a schematic diagram of a Type-c interface on a terminal side according to a preferred embodiment of the present invention.
  • FIG. 1 is a hardware structural block diagram of a mobile terminal of an audio switching method according to an embodiment of the present invention.
  • the mobile terminal 10 may include one or more (only one shown) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA).
  • FIG. 1 is merely illustrative and does not limit the structure of the above electronic device.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
  • the memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the audio switching method in the embodiment of the present invention, and the processor 102 executes various programs by running software programs and modules stored in the memory 104. Functional application and data processing, that is, the above method is implemented.
  • Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory.
  • memory 104 may further include memory remotely located relative to processor 102, which may be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
  • Transmission device 106 is for receiving or transmitting data via a network.
  • the above-described network specific example may include a wireless network provided by a communication provider of the mobile terminal 10.
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • FIG. 2 It is a flowchart 1 of an audio switching method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 determining the type of the audio process that is turned on
  • Step S204 Switch the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
  • the above types include at least one of the following: a play process, a call flow, and a recording process.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the switch when the corresponding type of audio flow is performed, the switch can be quickly switched to the pin of the Type C interface corresponding to the audio flow, that is, the switch can be quickly switched to
  • the channel corresponding to the type of the audio process greatly reduces the delay time of the handover, that is, solves the problem that the handover process has a large delay and the scene is switched.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
  • the first pin is an A6 pin
  • the second pin is an A7 pin
  • the third pin is a B6 pin
  • the fourth pin is a B7 pin, but is not limited thereto.
  • the first pin is the A7 pin
  • the second pin is the A6.
  • the pin, the third pin is a B7 pin
  • the fourth pin is a B6 pin.
  • the foregoing step S204 may be performed by: switching the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, the terminal is The switch is switched to the third pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin and the sixth pin; wherein the Type C interface includes: the fifth pin and The sixth pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin may be an A8 tube. foot.
  • the method may further include: identifying a type of the Type C device inserted into the terminal; and in the case of identifying that the Type C device is a Type C headset, to the Type C headset. Sending a first indication message indicating that the switch of the Type C headset is switched to the third pin and the fourth pin of the Type C interface in the Type C headset, or to the Type C headset for indicating the switch of the Type C headset The second indication information of the first pin and the second pin of the Type C interface held in the Type C headset.
  • the Type C headset when the Type C headset is inserted into the terminal paired with the Type C headset, the first indication information is sent to the Type C headset, and when the Type C headset is inserted into the terminal that is not paired with the Type C headset, the type C is sent to the Type C.
  • the headset sends the second indication information.
  • the type of the Type C device inserted into the terminal may be expressed as: determining the type of the Type C device by detecting the status of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, at the CC1 pin When the state is the pull-down impedance RD state and the state of the CC2 pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state, the type of the Type C device is Type C headphones.
  • the method may further include: at the CC1 pin When the state of the pull-down impedance RD state and the state of the CC2 pin are the open state, it is determined that the Type C earphone is inserted into the terminal in the forward direction; the switch of the terminal is held or switched to the fifth pin;
  • the Type C interface also includes an A8 pin.
  • execution body of the foregoing steps may be a terminal, such as a mobile terminal or a computer terminal, but is not limited thereto.
  • FIG. 3 is a second flowchart of an audio switching method according to an embodiment of the present invention. As shown in FIG. 3, the process includes the following steps:
  • Step S302 Receive handover information sent by the terminal.
  • Step S304 the switch of the earphone is switched to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; the second pin is defined as D-pin; the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or The B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and is not limited thereto.
  • the first pin is an A6 pin
  • the second pin is an A7 pin
  • the third pin is a B6 pin
  • the fourth pin is a B7 pin, but is not limited thereto.
  • the first pin is an A7 pin
  • the second pin is an A6 pin
  • the third pin is a B7 pin.
  • the four pins are B6 pins.
  • the foregoing switching information may include one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third The second indication information on the pin and the fourth pin; the third indication information used to indicate that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: Five pins and the sixth pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin may be an A8 tube. foot.
  • the foregoing switching information may be first indication information; when the audio process opened by the terminal is a call flow, the switching information may be second indication information; When the audio process opened by the terminal is a recording process, the switching information is the third indication information.
  • the third indication information when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used for The indication switches the switch of the earphone to the sixth pin; the Type C interface further includes: a fifth pin and a sixth pin.
  • execution body of the method shown in FIG. 3 may be an earphone, but is not limited thereto. this.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • module may implement a combination of software and/or hardware of a predetermined function.
  • apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 4 is a structural block diagram 1 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 4, the device includes:
  • the determining module 42 is configured to determine the type of the audio process that is turned on;
  • the switching module 44 is connected to the determining module 42 for switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
  • the above types include at least one of the following: a play process, a call flow, and a recording process.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the first pin, the second pin, the third pin, and the fourth pin in the Type C interface in the terminal are redefined, so that the problem that the earphone does not have versatility can be solved.
  • the foregoing apparatus can quickly switch to the pin of the Type C interface corresponding to the audio flow when the corresponding type of audio flow is performed, that is, the device can be quickly Switching to the channel corresponding to the type of the audio stream greatly reduces the delay time of the handover, that is, solves the problem of large delay in the handover process and scene switching.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
  • the first pin is an A6 pin
  • the second pin is an A7 pin
  • the third pin is a B6 pin
  • the fourth pin is a B7 pin, but is not limited thereto.
  • the first pin is an A7 pin
  • the second pin is an A6 pin
  • the third pin is a B7 pin.
  • the four pins are B6 pins.
  • the foregoing switching module 44 may be used to: switch the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, the terminal is The switch is switched to the third pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes the A8 pin and the B8 Pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin It can be an A8 pin.
  • the apparatus may further include: an identification module connected to the determining module 42 for identifying a type of the Type C device inserted into the terminal; and a sending module connected to the identifying module for When the Type C device is identified as a Type C headset, the first pin and the fourth pin for instructing to switch the switch of the Type C headset to the Type C interface in the Type C headset are sent to the Type C headset.
  • the indication information, or second indication information to the Type C headset for indicating the first pin and the second pin of the Type C interface that holds the switch of the Type C headset in the Type C headset.
  • the foregoing identification module may be further configured to determine the type of the Type C device by detecting the states of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and CC2
  • the type of the Type C device is Type C headphones when the state of the pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state.
  • the switching module is further configured to hold or switch the switch of the terminal to the fifth pin; wherein the Type C interface further includes a fifth pin.
  • the above identification module is further configured to determine that the Type C earphone is inserted into the terminal in reverse when the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state; the switching module is further configured to The switch of the terminal is switched from the fifth pin to the sixth pin.
  • the above device may be located in the terminal, but is not limited thereto.
  • FIG. 5 is a structural block diagram 2 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 5, the device includes:
  • the receiving module 52 is configured to receive the handover information sent by the terminal.
  • the switching module 54 is connected to the receiving module 52, and is configured to switch the switch of the earphone to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; the second pin is defined as D-pin; the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
  • the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the earphone are redefined, which can solve the problem that the earphone does not have versatility.
  • the device can be switched to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information, that is, fast switching can be realized, and the delay time of the switching is greatly reduced.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
  • the first pin is an A6 pin
  • the second pin is an A7 pin
  • the third pin is a B6 pin
  • the fourth pin is a B7 pin, but is not limited thereto.
  • the first pin is an A7 pin
  • the second pin is an A6 pin
  • the third pin is a B7 pin.
  • the four pins are B6 pins.
  • the foregoing switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating for switching the switch of the earphone to the third tube The second indication information on the foot and the fourth pin; the third indication information used to indicate that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: The fifth pin and the sixth pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin It can be an A8 pin.
  • the foregoing switching information is the first indication information
  • the switching information is the second indication information
  • the switching information is the third indication information
  • the third indication information when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used for Instructs to switch the headset's switch to the sixth pin.
  • the device shown in FIG. 5 above may be located in the earphone, but is not limited thereto.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination.
  • the forms are located in different processors.
  • the embodiment provides a terminal, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin.
  • the second pin is the D-pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the problem that the earphone does not have versatility can be solved, and the delay of the switching process can be solved, and the scenario can be solved. Switch the problem of Caton.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
  • the first pin is an A6 pin.
  • the second pin is the A7 pin
  • the third pin is the B6 pin
  • the fourth pin is the B7 pin
  • the second pin is not limited thereto.
  • the first pin is the A7 pin
  • the second The pin is the A6 pin
  • the third pin is the B7 pin
  • the fourth pin is the B6 pin.
  • the pins other than the first pin, the second pin, the third pin, and the fourth pin in the Type C interface are defined by the standard interface of the 24-wire type C interface. However, it is not limited to this. For example, a non-standard non-standard interface definition can also be adopted.
  • Type C interface is a Type C interface on the terminal side.
  • the third pin is docked with the right channel pin of the earphone
  • the fourth pin is docked with the left channel pin of the earphone.
  • the right channel pin of the earphone is the third pin of the Type C interface of the earphone
  • the left channel pin of the earphone is the fourth pin of the Type C interface of the earphone.
  • Type C interface may further include: a fifth pin and a sixth pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin It can be an A8 pin.
  • the embodiment further provides an earphone, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ tube
  • the second pin is the D-pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the problem that the earphone does not have versatility can be solved, and the delay of the switching process can be solved, and the scenario can be solved. Switch the problem of Caton.
  • the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin
  • the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin
  • the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
  • the first pin is an A6 pin
  • the second pin is an A7 pin
  • the third pin is a B6 pin
  • the fourth pin is a B7 pin, but is not limited thereto.
  • the first pin is an A7 pin
  • the second pin is an A6 pin
  • the third pin is a B7 pin.
  • the four pins are B6 pins.
  • the pins other than the first pin, the second pin, the third pin, and the fourth pin are in the Type C interface.
  • the 24-wire standard interface definition but not limited to this, can also be used for non-standard non-standard interface definitions.
  • the third pin in the earphone is docked with the right channel pin of the terminal, and the fourth pin in the earphone is docked with the left channel pin of the terminal.
  • the right channel pin of the terminal is the third pin of the Type C interface of the terminal
  • the left channel pin of the terminal is the fourth pin of the Type C interface of the terminal.
  • Type C interface may further include: a fifth pin and a sixth pin.
  • the fifth pin may be an A8 pin
  • the sixth pin may be a B8 pin, but is not limited thereto.
  • the fifth pin may be a B8 pin
  • the sixth pin It can be an A8 pin.
  • Type C port on the terminal side and the Type C port on the earphone side has been redefined, so that not only the versatility of the earphone but also an enumeration process in the audio flow switching process is required. Less delay time.
  • a preferred embodiment of the present invention provides an apparatus comprising: a main control module, a control module, and a switching module.
  • the main control module responsible for the encoding and decoding of audio data and timing control. Converting the data from the air interface into a PCM code stream; performing echo suppression, noise cancellation, etc. The data is output to the Type-c port by the encoder.
  • the analog voice signal is received, converted into a digital signal, and the digital signal is processed by echo and noise reduction, and is sent out by the air interface.
  • different timing information is issued according to different application scenarios.
  • the auxiliary control module is responsible for judging the insertion of different device types.
  • the auxiliary control module When inserting different device types, the auxiliary control module performs different logical judgments to identify the device type; receives information from the main control module, and issues different control information.
  • the switching module performs the switching function according to different application scenarios and different types of inserted devices to implement matching between application scenarios and device types.
  • main control module is equivalent to the determination module 42 of the embodiment shown in FIG. 4, and the auxiliary control module is equivalent to the identification module in the embodiment shown in FIG. 4, and the switching module is equivalent to the implementation shown in FIG.
  • the preferred embodiment of the present invention further provides a method for a Type-c headset compatible audio application scenario, including the following steps:
  • the call data is outputted by the audio codec to the Type-c port, and the AP outputs the data in the digital format to the Type-c port; the recorded analog signal is transmitted to the audio codec by the Tyep-c port.
  • FIG. 6 is a definition diagram of a Type-c port pin on a main control module side and an earphone side according to a preferred embodiment of the present invention.
  • the A6 pin of the Type-c port on the main control module side is D+ pin;
  • A7 pin is D-pin;
  • B6 pin is right channel pin;
  • B7 pin is left channel pin;
  • A6 pin of Type-c port on earphone side is D+ pin;
  • A7 The pin is D-pin; the B6 pin is the right channel pin; the B7 pin is the left channel pin.
  • the auxiliary control module is based on the Type-c protocol. When the auxiliary control module detects the device insertion, it recognizes that it is a charger, adapter or earphone according to the status of the CC pin. At the same time, the earphone can be identified according to different configuration combinations. The forward insertion or the reverse insertion of the device; after the identification process is completed, the control information is sent to notify the switching module.
  • 7 is a schematic diagram showing states of CC1 and CC2 pins of a secondary control module and corresponding headphone position relationships according to a preferred embodiment of the present invention; Indicates positive interpolation and 2 indicates reverse insertion.
  • FIG. 8 is a schematic structural diagram of an auxiliary control module according to a preferred embodiment of the present invention.
  • the switching module is responsible for switching the data path of the main control module and the peripheral, switching between the USB path, switching between the MIC and the GND, and switching between the forward and reverse insertion of the Type-c plug, and FIG. 9 is a preferred implementation according to the present invention.
  • the schematic diagram of the switching module provided by the example is shown in FIG. 9.
  • the SideA switch can be equivalent to the switch module on the terminal side, and the SideB switch is equivalent to the switch module on the headphone side.
  • An embodiment of the present invention provides another preferred audio switching method, where the method includes:
  • Type-c uses a 24-wire standard interface definition; instead of a low-cost, non-standard interface definition interface.
  • 10 is a schematic diagram of a 24-wire standard interface definition provided in accordance with a preferred embodiment of the present invention
  • FIG. 11 is a schematic diagram of a non-low-cost non-standard interface definition interface provided in accordance with a preferred embodiment of the present invention.
  • A6/7 and B7/6 of the Type-c female side ie, the terminal side
  • B6/7 of the Type-c male side is defined as the left and right channel pins. .
  • FIG. 12 is a schematic diagram of a related specification of a USB protocol according to a preferred embodiment of the present invention. As shown in FIG. 12, the Type-c defined by the present invention satisfies the relevant provisions of the USB protocol, including communication protocols and electrical characteristics.
  • the preferred embodiment of the present invention provides a definition of the initial state for the sake of clarity of the following description; however, it is not limited to the defined state.
  • FIG. 13 is a schematic diagram of a call scenario according to a preferred embodiment of the present invention.
  • a call scenario of a Type-c device when a user initiates a call flow, data is sent from the air interface, and the modem decodes the air interface data into PCM data stream; ADSP processes the data for correlated noise and echo.
  • the main control module sends the command cmd001 to the auxiliary control module from the upper layer.
  • the auxiliary control module monitors the CC1 and CC2 states.
  • the auxiliary control module recognizes the inserted Type-c device as Type- c headset; when CC1 and CC2 are detected as other combined states, the inserted Type-c device will be recognized as a device such as a charger or adapter.
  • the call flow initiated by the main control module is the headset call process. And send the control command cmd002 through USB.
  • the SideA switch is switched to B6/7; when the cmd002 is received, the SideB switch is switched to B6/7; when the cmd003 is received, the SideA is switched from A8 to B8.
  • the call uplink data is transmitted back to the main control module by the Type-c device through the analog channel, and is sent to the air interface through the ADSP noise reduction, echo, and the like.
  • the recording scene is mainly the path of the uplink data, similar to the uplink path in the call scene. No longer detailed.
  • FIG. 14 is a schematic diagram of a playback scenario according to a preferred embodiment of the present invention. As shown in FIG. 14, when the playback process is initiated, the playback data is packaged by the main control module storage unit into a USB data packet and sent to the Type-c port. At this time, the main control module sends the command cmd004 from the upper layer, and the main control module controls the SideA switch control command to be sent to the auxiliary control module.
  • the auxiliary control module identifies the type of the inserted Type-c device according to the configuration information of the inserted device; and sends the switching information of the control switch according to the detection and recognition result.
  • the switching module After the switching module receives the information of the auxiliary control module, switch the SideA switch to A6/7; the SideB switch switches to A6/7; establish a complete physical channel.
  • FIG. 15 is a schematic diagram of a Barge-in scenario according to a preferred embodiment of the present invention. As shown in FIG. 15, the play data is packaged into a USB data packet by the main control module storage unit, and sent to the Type-c. mouth. At this time, the main control module sends the command cmd002 from the upper layer, and the main control module controls the SideA switch control command to be sent to the auxiliary control module.
  • the auxiliary control module identifies the type of the inserted Type-c device according to the configuration information of the inserted device; and controls the switching information of the switch according to the detection and recognition result.
  • the switching module After receiving the information of the auxiliary control module, the switching module switches the SideA switch to A6/7; the SideB switch switches to A6/7; establishes a complete downlink physical channel. Also switch the MIC/GND switch to A8 or B8.
  • FIG. 16 is a flowchart 3 of an audio switching method according to an embodiment of the present invention. As shown in FIG. 16, the method includes:
  • Step S1602 determining the type of the audio process that is turned on
  • Step S1604 determining an insertion direction of the earphone insertion terminal
  • Step S1608 The switch of the terminal is switched to the corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the type of the audio stream may include at least one of the following: a play process, a call flow, and a recording process; the insertion direction includes one of the following: forward insertion and reverse insertion.
  • the universality of the terminal can also be realized, that is, any earphone can be inserted into the terminal to realize the forward, reverse inserted call, play and record functions.
  • step S1608 can be expressed as: when the audio flow is the playback process and the insertion direction is forward insertion, the switch is switched to the first pin and the second pin; in the audio flow, the playback process is inserted and the direction is inserted.
  • switch the switch When inserting in the reverse direction, switch the switch to the third and fourth tubes Foot; when the audio flow is the call flow and the insertion direction is forward insertion, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is reverse insertion, the switch is switched to The first pin and the second pin; when the audio flow is the recording process and the insertion direction is forward insertion, the switch is switched to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, The switch is switched to the sixth pin; wherein the Type C interface includes: a fifth pin and a sixth pin.
  • FIG. 17 is a flowchart 3 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 17, the device includes:
  • the determining module 1702 is configured to determine a type of the audio process that is turned on;
  • a determining module 1704 connected to the determining module 1702, configured to determine an insertion direction of the earphone insertion terminal;
  • the switching module 1706 is connected to the determining module 1704, and is configured to switch the switch of the terminal to a corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow.
  • the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
  • the type of the audio process may include at least one of the following: a play process, a call flow, and a recording process; and the insertion direction may include one of the following: forward insertion and reverse insertion.
  • the foregoing switching module 1706 can also be used for at least one of: switching the switch to the first pin and the second pin when the audio flow is the playback process and the insertion direction is forward insertion; in the audio flow When the playback process is reverse insertion, the switch is switched to the third pin and the fourth pin; when the audio flow is a call flow and the insertion direction is forward insertion, the switch is switched to the third pin and The fourth pin; when the audio flow is a call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; in the audio flow is the recording process and When the insertion direction is forward insertion, the switch is switched to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, the switch is switched to the sixth pin; wherein the Type C interface includes: Pin and sixth pin.
  • FIG. 18 is a schematic diagram of a Type-c interface on a terminal side according to a preferred embodiment of the present invention. The versatility of the Type-C interface on the terminal side is explained in conjunction with FIG. 18:
  • Playback process When the headset is inserted into the terminal, the switch 3 is in the default state, and the data goes to the A6 and A7 pins; at this time, the switch 1 and the switch 2 remain in the default state;
  • switch 2 When the earphone is reversely inserted into the terminal, enable switch 2 to switch the playback physical channel to the A6 and A7 pins; at this time, switch 2 is enabled at the same time, and the switch is switched to the other side.
  • switches 1, 2, and 3 remain in the default state during forward insertion
  • Embodiments of the present invention also provide a storage medium.
  • the above storage medium may be set to store program code for executing the steps of the method in Embodiment 2.
  • the foregoing storage medium may include, but is not limited to: a USB flash drive, only A medium that can store program code, such as a read-only memory (ROM), a random access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
  • ROM read-only memory
  • RAM random access memory
  • removable hard disk such as a hard disk, a magnetic disk, or an optical disk.
  • the processor performs the steps of the method in Embodiment 2 according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the embodiment of the invention discloses an audio switching method and device, a terminal, an earphone and a storage medium, and the Type C interface is improved, and the first pin in the Type C interface is defined as a D+ pin; in the Type C interface The second pin is defined as a D-pin; the third pin in the Type C interface is redefined as a right channel pin; and the fourth pin in the Type C interface is redefined as a left channel pin;
  • the first and third pins of the Type C interface in the terminal side in the related art are both D+ pins, the second and fourth pins are D-pins; the first type C interface on the earphone side
  • the pin is D+ pin, the second pin is D-pin, and the third and fourth pins are compared with the NA pin, which can realize the versatility of the earphone, and solves the problem that the earphone does not have universality in the related art. .

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Stereophonic Arrangements (AREA)
  • Headphones And Earphones (AREA)

Abstract

Provided in the present invention are an audio switching method and device, a terminal, and an earpiece. The method comprises: determining a starting audio process type; the types comprise: a playback process, a talk process, and a recording process; according to the type, switching a terminal switch to a pin of a Type C port of a terminal corresponding to the type; the Type C port comprises: a first pin, a second pin, a third pin, and a fourth pin; the first pin is a D+ pin, the second pin is a D- pin, the third pin is a right audio channel pin, and the fourth pin is a left audio channel pin. The present invention solves the problem in related technology of earpieces not being universal.

Description

音频切换方法、装置、终端、耳机及存储介质Audio switching method, device, terminal, earphone and storage medium 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种音频切换方法及装置、终端、耳机及存储介质。The present invention relates to the field of communications, and in particular to an audio switching method and apparatus, a terminal, an earphone, and a storage medium.
背景技术Background technique
目前市场上智能终端的数字音频崛地而起,3.5mm耳机接口前途渺茫,另外从节省空间和防水的角度考虑,Type-c接口代替3.5mm接口,指日可待。智能终端音频包含很多的场景,简单说主要是通话、播放和录音。无论是在通话、播放还是录音,通过3.5mm耳机传输的数据都是模拟信号;如果实现数字音频,需要走Type-c接口。At present, the digital audio of intelligent terminals on the market has risen, and the 3.5mm headphone jack has a promising future. In addition, from the perspective of space saving and waterproof, the Type-c interface replaces the 3.5mm interface, just around the corner. Smart terminal audio contains a lot of scenes, which are mainly talking, talking, playing and recording. Whether it is in a call, play or recording, the data transmitted through the 3.5mm headphone is an analog signal; if digital audio is implemented, the Type-c interface needs to be taken.
由于延迟和功耗的原因,相关技术上无法实现通话、播放和录音都是数字传输方式。解决的方法是播放是数字模式,通话和录音是模拟模式的混合模式;模数混合方式虽然可以规避通话延迟和功耗的问题,但是引入新的问题,耳机接口不能按照Type-c管脚定义,导致耳机不具有通用性。Due to delay and power consumption, related technologies cannot realize that the call, play and recording are digital transmission methods. The solution is that the playback mode is digital mode, and the call and recording are mixed modes of the analog mode; although the analog-digital hybrid method can avoid the problem of call delay and power consumption, but introduces a new problem, the headphone interface cannot be defined according to the Type-c pin. , resulting in headphones that are not versatile.
具体的,在相关技术中的模数混合的方式,通话为模拟格式,播放为数字格式;手机侧的D+/-连接在一起;数字和模拟数据走的为同一物理通道。耳机侧的B6/7为NA管脚;支持正反切换。在一定程度上解决了通话延迟大和增加较多功耗的短板;但是从播放到通话或者从通话到播放,都需要USB设备的重新发起枚举过程,一共两次枚举过程,延迟加大;并且该耳机只能搭配特定手机才能完成通话功能。耳机不具有通用性,用户体检很差。Specifically, in the related art, the analog-to-digital mixing method, the call is in an analog format, and the playback is in a digital format; the D+/- of the mobile phone side is connected together; the digital and analog data are taken in the same physical channel. The B6/7 on the earphone side is the NA pin; it supports forward and reverse switching. To some extent, it solves the short board with large call delay and increased power consumption; but from playback to call or from call to play, the USB device re-initiation enumeration process is required, and the enumeration process is repeated twice, and the delay is increased. And the headset can only be used with a specific phone to complete the call function. Headphones are not versatile and the user's physical examination is poor.
针对相关技术中的上述技术问题,目前尚未提出有效的解决方案。 In view of the above technical problems in the related art, an effective solution has not yet been proposed.
发明内容Summary of the invention
本发明实施例提供了一种音频切换方法及装置、终端、耳机,以至少解决相关技术中耳机或者终端不具备通用性的问题。The embodiment of the invention provides an audio switching method and device, a terminal, and an earphone, so as to at least solve the problem that the earphone or the terminal in the related art does not have universality.
根据本发明的一个实施例,提供了一种音频切换方法,包括:判断开启的音频流程的类型;根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上。According to an embodiment of the present invention, an audio switching method is provided, including: determining a type of an audio stream that is turned on; and switching a switch of the terminal to a pin corresponding to the type in the Type C interface of the terminal according to the type.
可选地,类型包括:播放流程、通话流程、录音流程;Optionally, the types include: a play process, a call flow, and a recording process;
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin
可选地,根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上包括以下之一:在类型为播放流程时,将终端的开关切换到第一管脚和第二管脚上;在类型为通话流程时,将终端的开关切换到第三管脚和第四管脚上;在类型为录音流程时,将终端的开关切换到第五管脚或第六管脚上;其中,Type C接口包括:第五管脚和第六管脚。Optionally, switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type includes one of the following: when the type is a playback process, switching the switch of the terminal to the first pin and the second On the pin; when the type is the call flow, switch the switch of the terminal to the third pin and the fourth pin; when the type is the recording process, switch the switch of the terminal to the fifth pin or the sixth pin The Type C interface includes: a fifth pin and a sixth pin.
可选地,在判断开启的音频流程的类型之后,方法还包括:识别插入到终端的Type C设备的类型;在识别到Type C设备为Type C耳机的情况下,向Type C耳机发送用于指示将Type C耳机的开关切换到Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向Type C耳机发送用于指示将Type C耳机的开关保持在Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。Optionally, after determining the type of the opened audio stream, the method further includes: identifying a type of the Type C device inserted into the terminal; and sending the Type C headset to the Type C headset if the Type C device is identified as the Type C headset; Instructing to switch the switch of the Type C headset to the first indication of the third and fourth pins of the Type C interface in the Type C headset, or to send a switch to the Type C headset to indicate that the switch of the Type C headset is maintained The second indication of the first pin and the second pin of the Type C interface in the Type C headset.
可选地,识别插入到终端的Type C设备的类型包括:通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型;其中,在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态,或者CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的 情况下,Type C设备的类型为Type C耳机。Optionally, identifying the type of the Type C device inserted into the terminal includes: determining a type of the Type C device by detecting a state of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance The state of the RD state and the CC2 pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state. In this case, the Type C device is of type Type C headset.
可选地,在通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型之后,方法还包括:在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态的情况下,确定Type C耳机为正向插入到了终端中;将终端的开关保持或者切换到第五管脚上;其中,Type C接口还包括第五管脚。Optionally, after determining the type of the Type C device by detecting the states of the CC1 pin and the CC2 pin in the auxiliary control module, the method further includes: the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin state. In the case of disconnecting the open state, it is determined that the Type C headset is inserted into the terminal in the forward direction; the switch of the terminal is held or switched to the fifth pin; wherein the Type C interface further includes the fifth pin.
可选地,在通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型之后,方法还包括:在CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,确定Type C耳机为反向插入到了终端中;将终端的开关从第五管脚切换到第六管脚上;其中,Type C接口还包括第五管脚和第六管脚。Optionally, after determining the type of the Type C device by detecting the status of the CC1 pin and the CC2 pin in the auxiliary control module, the method further includes: the state of the CC1 pin is the disconnected open state and the CC2 pin state. In the case of pulling down the impedance RD state, it is determined that the Type C earphone is inserted into the terminal in the reverse direction; the switch of the terminal is switched from the fifth pin to the sixth pin; wherein the Type C interface further includes the fifth pin and The sixth pin.
根据本发明的一个实施例,提供了一种音频切换方法,包括:接收终端发送的切换信息;根据切换信息将耳机的开关切换到耳机的Type C接口中与切换信息对应的管脚上。According to an embodiment of the present invention, an audio switching method is provided, including: receiving switching information sent by a terminal; and switching a switch of the earphone to a pin corresponding to the switching information in a Type C interface of the earphone according to the switching information.
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚定义为D+管脚;第二管脚定义为D-管脚;第三管脚定义为右声道管脚;第四管脚定义为左声道管脚。Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; and the second pin is defined as a D-tube The third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
可选地,切换信息包括以下之一:用于指示将耳机的开关切换到第一管脚和第二管脚上的第一指示信息;用于指示将耳机的开关切换到第三管脚和第四管脚上的第二指示信息;用于指示将所述耳机的开关切换到第五管脚或第六管脚上的第三指示信息;其中,所述Type C接口还包括:所述第五管脚和所述第六管脚。Optionally, the switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third pin and a second indication information on the fourth pin; a third indication information indicating that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: a fifth pin and the sixth pin.
可选地,在终端开启的音频流程为播放流程时,切换信息为第一指示信息;在终端开启的音频流程为通话流程时,切换信息为第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示 信息。Optionally, when the audio process opened by the terminal is a playback process, the switching information is the first indication information; when the audio process opened by the terminal is a call flow, the switching information is the second indication information; and the audio flow opened in the terminal In the recording process, the switching information is the third indication information.
可选地,在耳机正向插入终端时,第三指示信息用于指示将耳机的开关切换到第五管脚上;在耳机负向插入终端时,第三指示信息用于指示将耳机的开关切换到第六管脚上。Optionally, when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used to indicate the switch of the earphone Switch to the sixth pin.
根据本发明的一个实施例,提供了一种音频切换装置,包括:判断模块,用于判断开启的音频流程的类型;切换模块,用于根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上。According to an embodiment of the present invention, an audio switching apparatus is provided, including: a determining module, configured to determine a type of an audio stream that is turned on; and a switching module, configured to switch a switch of the terminal to a Type C interface of the terminal according to a type. On the pin corresponding to the type.
可选地,类型包括:播放流程、通话流程、录音流程。Optionally, the types include: a play process, a call flow, and a recording process.
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
可选地,切换模块用于以下之一:在类型为播放流程时,将终端的开关切换到第一管脚和第二管脚上;在类型为通话流程时,将终端的开关切换到第三管脚和第四管脚上;在类型为录音流程时,将终端的开关切换到第五管脚或第六管脚上;其中,Type C接口还包括A8管脚和B8管脚。Optionally, the switching module is used to: switch the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, switch the switch of the terminal to the first On the three-pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes the A8 pin and the B8 pin.
可选地,装置还包括:识别模块,用于识别插入到终端的Type C设备的类型;发送模块,用于在识别到Type C设备为Type C耳机的情况下,向Type C耳机发送用于指示将Type C耳机的开关切换到Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向Type C耳机用于指示将Type C耳机的开关保持在Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。Optionally, the device further includes: an identification module, configured to identify a type of the Type C device inserted into the terminal; and a sending module, configured to send the Type C headset to the Type C headset if the Type C device is identified as a Type C headset Indicates the first indication of switching the switch of the Type C headset to the third and fourth pins of the Type C interface in the Type C headset, or to the Type C headset to indicate that the switch of the Type C headset is maintained at the Type The second indication information of the first pin and the second pin of the Type C interface in the C headset.
可选地,识别模块还用于通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型;其中,在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态,或者CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,Type C设备的类型 为Type C耳机。Optionally, the identification module is further configured to determine a type of the Type C device by detecting a state of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and a CC2 pin Type C device type when the state is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state. For Type C headphones.
可选地,识别模块还用于在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态的情况下,确定Type C耳机为正向插入到了终端中;切换模块还用于将终端的开关保持或者切换到第五管脚上;其中,Type C接口还包括第五管脚。Optionally, the identification module is further configured to determine that the Type C headset is positively inserted into the terminal when the state of the CC1 pin is the pull-down impedance RD state and the state of the CC2 pin is the open state; the switching module further It is used to hold or switch the switch of the terminal to the fifth pin; wherein the Type C interface further includes a fifth pin.
可选地,识别模块还用于在CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,确定Type C耳机为反向插入到了终端中;切换模块还用于将终端的开关从第五管脚切换到第六管脚上;其中,Type C接口还包括第五管脚和第六管脚。Optionally, the identification module is further configured to determine that the Type C headset is inserted into the terminal in reverse when the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state; The switch for switching the terminal is switched from the fifth pin to the sixth pin; wherein the Type C interface further includes a fifth pin and a sixth pin.
根据本发明的一个实施例,提供了一种音频切换装置,包括:接收模块,用于接收终端发送的切换信息;切换模块,用于根据切换信息将耳机的开关切换到耳机的Type C接口中与切换信息对应的管脚上。According to an embodiment of the present invention, an audio switching apparatus is provided, including: a receiving module, configured to receive switching information sent by a terminal; and a switching module, configured to switch a switch of the earphone to a Type C interface of the earphone according to the switching information. On the pin corresponding to the switching information.
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚定义为D+管脚;第二管脚定义为D-管脚;第三管脚定义为右声道管脚;第四管脚定义为左声道管脚。Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; and the second pin is defined as a D-tube The third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
可选地,切换信息包括以下之一:用于指示将耳机的开关切换到第一管脚和第二管脚上的第一指示信息;用于指示将耳机的开关切换到第三管脚和第四管脚上的第二指示信息;用于指示将所述耳机的开关切换到第五管脚或第六管脚上的第三指示信息;其中,所述Type C接口还包括:所述第五管脚和所述第六管脚。Optionally, the switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third pin and a second indication information on the fourth pin; a third indication information indicating that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: a fifth pin and the sixth pin.
可选地,在终端开启的音频流程为播放流程时,切换信息为第一指示信息;在终端开启的音频流程为通话流程时,切换信息为第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示信息。Optionally, when the audio process opened by the terminal is a playback process, the switching information is the first indication information; when the audio process opened by the terminal is a call flow, the switching information is the second indication information; and the audio flow opened in the terminal In the recording process, the switching information is the third indication information.
可选地,切换信息还包括:用于指示将耳机的开关切换到第五管脚或 第六管脚上的第三指示信息;其中,在耳机正向插入终端时,第三指示信息用于指示将耳机的开关切换到第五管脚上;在耳机负向插入终端时,第三指示信息用于指示将耳机的开关切换到第六管脚上。Optionally, the switching information further includes: indicating to switch the switch of the earphone to the fifth pin or a third indication information on the sixth pin; wherein, when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third The indication information is used to indicate that the switch of the earphone is switched to the sixth pin.
根据本发明的一个实施例,提供了一种终端,包括:Type C接口,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚定为左声道管脚。According to an embodiment of the present invention, a terminal is provided, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein, the first tube The foot is a D+ pin; the second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
可选地,第三管脚与耳机的右声道管脚对接,第四管脚与耳机的左声道管脚对接。Optionally, the third pin is docked with the right channel pin of the earphone, and the fourth pin is docked with the left channel pin of the earphone.
可选地,耳机的右声道管脚为耳机的Type C接口的第三管脚,耳机的左声道管脚为耳机的Type C接口的第四管脚。Optionally, the right channel pin of the earphone is the third pin of the Type C interface of the earphone, and the left channel pin of the earphone is the fourth pin of the Type C interface of the earphone.
根据本发明的一个实施例,提供了一种耳机,包括:Type C接口,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。According to an embodiment of the present invention, an earphone is provided, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein, One pin is a D+ pin; the second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
可选地,第三管脚与终端的右声道管脚对接,第四管脚与终端的左声道管脚对接。Optionally, the third pin is docked with the right channel pin of the terminal, and the fourth pin is docked with the left channel pin of the terminal.
可选地,终端的右声道管脚为终端的Type C接口的第三管脚,终端的左声道管脚为终端的Type C接口的第四管脚。Optionally, the right channel pin of the terminal is the third pin of the Type C interface of the terminal, and the left channel pin of the terminal is the fourth pin of the Type C interface of the terminal.
根据本发明的一个实施例,提供了一种音频切换方法,包括:判断开启的音频流程的类型;确定耳机插入终端的插入方向;根据音频流程的类型和插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。According to an embodiment of the present invention, an audio switching method is provided, including: determining a type of an audio stream that is turned on; determining an insertion direction of the earphone insertion terminal; and switching a switch of the terminal to the terminal according to a type and an insertion direction of the audio flow On the corresponding pin in the Type C interface.
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。 Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
可选地,音频流程的类型包括以下至少之一:播放流程、通话流程、录音流程;插入方向包括以下之一:正向插入和反向插入。Optionally, the type of the audio process includes at least one of the following: a play process, a call flow, and a recording process; and the insertion direction includes one of the following: forward insertion and reverse insertion.
可选地,根据音频流程的类型和插入方向将终端的开关切换到终端的Type C接口中对应的管脚上包括:在音频流程为播放流程且插入方向为正向插入时,将开关切换到第一管脚和第二管脚;在音频流程为播放流程且插入方向为反向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为正向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为反向插入时,将开关切换到第一管脚和第二管脚;在音频流程为录音流程且插入方向为正向插入时,将开关切换到第五管脚;Optionally, switching the switch of the terminal to the corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow includes: switching the switch to when the audio flow is the playback process and the insertion direction is forward insertion. The first pin and the second pin; when the audio flow is the playback process and the insertion direction is reverse insertion, the switch is switched to the third pin and the fourth pin; the audio flow is the call flow and the insertion direction is positive When inserting, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; in the audio flow For the recording process and the insertion direction is forward insertion, switch the switch to the fifth pin;
在音频流程为录音流程且插入方向为反向插入时,将开关切换到第六管脚;其中,Type C接口包括:第五管脚和第六管脚。When the audio flow is the recording process and the insertion direction is reverse insertion, the switch is switched to the sixth pin; wherein the Type C interface includes: a fifth pin and a sixth pin.
根据本发明的一个实施例,提供了一种音频切换装置,包括:判断模块,用于判断开启的音频流程的类型;确定模块,用于确定耳机插入终端的插入方向;切换模块,用于根据音频流程的类型和插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。According to an embodiment of the present invention, an audio switching apparatus is provided, including: a determining module, configured to determine a type of an audio stream that is turned on; a determining module, configured to determine an insertion direction of the earphone insertion terminal; and a switching module, configured to The type and insertion direction of the audio stream switches the switch of the terminal to the corresponding pin in the Type C interface of the terminal.
可选地,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。Optionally, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D-pin; The third pin is the right channel pin; the fourth pin is the left channel pin.
可选地,音频流程的类型包括以下至少之一:播放流程、通话流程、录音流程;插入方向包括以下之一:正向插入和反向插入。Optionally, the type of the audio process includes at least one of the following: a play process, a call flow, and a recording process; and the insertion direction includes one of the following: forward insertion and reverse insertion.
可选地,切换模块还用于以下至少之一:在音频流程为播放流程且插入方向为正向插入时,将开关切换到第一管脚和第二管脚;在音频流程为播放流程且插入方向为反向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为正向插入时,将开关切换到第三管脚 和第四管脚;在音频流程为通话流程且插入方向为反向插入时,将开关切换到第一管脚和第二管脚;在音频流程为录音流程且插入方向为正向插入时,将开关切换到第五管脚;在音频流程为录音流程且插入方向为反向插入时,将开关切换到第六管脚;其中,Type C接口包括:第五管脚和第六管脚。Optionally, the switching module is further configured to: at least one of: switching the switch to the first pin and the second pin when the audio flow is a playback process and the insertion direction is forward insertion; the audio flow is a playback process and When the insertion direction is reverse insertion, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is forward insertion, switch the switch to the third pin And the fourth pin; when the audio flow is a call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; when the audio flow is a recording process and the insertion direction is forward insertion, Switch the switch to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, the switch is switched to the sixth pin; wherein the Type C interface includes: the fifth pin and the sixth pin.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:判断开启的音频流程的类型;其中,类型包括:播放流程、通话流程、录音流程;根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上;其中,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is configured to store program code for performing the following steps: determining the type of the audio process that is turned on; wherein the type includes: a play process, a call flow, a recording process; and switching the switch of the terminal to the Type C interface of the terminal according to the type The type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; the second tube The foot is a D-pin; the third pin is a right channel pin; the fourth pin is a left channel pin.
通过本发明,由于将Type C接口进行了改进,将Type C接口中的第一管脚定义为D+管脚;Type C接口中的第二管脚定义为D-管脚;Type C接口中的第三管脚重新定义为右声道管脚;Type C接口中的第四管脚重新定义为左声道管脚;使得与相关技术中的终端侧中的Type C接口的第一和第三管脚都为D+管脚,第二和第四管脚都为D-管脚;耳机侧的Type C接口的第一管脚为D+管脚,第二管脚为D-管脚,第三和第四管脚为NA管脚相比,能够实现耳机的通用性,解决了相关技术中耳机不具备通用性的问题。With the present invention, since the Type C interface is improved, the first pin in the Type C interface is defined as a D+ pin; the second pin in the Type C interface is defined as a D-pin; in the Type C interface The third pin is redefined as the right channel pin; the fourth pin in the Type C interface is redefined as the left channel pin; making the first and third interfaces of the Type C in the terminal side in the related art The pins are D+ pins, the second and fourth pins are D-pins; the first pin of the Type C interface on the earphone side is D+ pin, the second pin is D-pin, and the third Compared with the fourth pin, the fourth pin can realize the versatility of the earphone, and solves the problem that the earphone does not have versatility in the related art.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是本发明实施例的一种音频切换方法的移动终端的硬件结构框图;1 is a block diagram showing the hardware structure of a mobile terminal of an audio switching method according to an embodiment of the present invention;
图2是根据本发明实施例的音频切换方法的流程图一;2 is a flowchart 1 of an audio switching method according to an embodiment of the present invention;
图3是根据本发明实施例的音频切换方法的流程图二; 3 is a second flowchart of an audio switching method according to an embodiment of the present invention;
图4是根据本发明实施例的音频切换装置的结构框图一;4 is a block diagram 1 of a structure of an audio switching device according to an embodiment of the present invention;
图5是根据本发明实施例的音频切换装置的结构框图二;FIG. 5 is a second structural block diagram of an audio switching apparatus according to an embodiment of the present invention; FIG.
图6是根据本发明优选实施例提供的主控模块侧和耳机侧的Type-c口管脚定义图;6 is a definition diagram of a Type-c port pin on a main control module side and an earphone side according to a preferred embodiment of the present invention;
图7是根据本发明优选实施例提供的辅控模块的CC1和CC2管脚的状态及对应耳机位置关系的示意图;7 is a schematic diagram showing states of CC1 and CC2 pins of an auxiliary control module and corresponding headphone position relationships according to a preferred embodiment of the present invention;
图8是根据本发明优选实施例提供的辅控模块的结构示意图;FIG. 8 is a schematic structural diagram of an auxiliary control module according to a preferred embodiment of the present invention; FIG.
图9是根据本发明优选实施例提供的切换模块的结构示意图;9 is a schematic structural diagram of a switching module according to a preferred embodiment of the present invention;
图10是根据本发明优选实施例提供的24线的标准接口定义的示意图;10 is a schematic diagram of a 24-wire standard interface definition provided in accordance with a preferred embodiment of the present invention;
图11是根据本发明优选实施例提供的非低成本的非标准接口定义接口的示意图;11 is a schematic diagram of a non-low cost non-standard interface definition interface provided in accordance with a preferred embodiment of the present invention;
图12是根据本发明优选实施例提供的USB协议的相关规定的示意图;12 is a schematic diagram of related provisions of a USB protocol according to a preferred embodiment of the present invention;
图13是根据本发明优选实施例提供的通话场景下的示意图;FIG. 13 is a schematic diagram of a call scenario according to a preferred embodiment of the present invention; FIG.
图14是根据本发明优选实施例提供的播放场景下的示意图;FIG. 14 is a schematic diagram of a playback scenario according to a preferred embodiment of the present invention; FIG.
图15是根据本发明优选实施例提供的Barge-in场景下的示意图;15 is a schematic diagram of a Barge-in scenario provided in accordance with a preferred embodiment of the present invention;
图16是根据本发明实施例的音频切换方法的流程图三;16 is a flowchart 3 of an audio switching method according to an embodiment of the present invention;
图17是根据本发明实施例的音频切换装置的流程图三;17 is a third flowchart of an audio switching device according to an embodiment of the present invention;
图18是根据本发明优选实施例提供的终端侧的Type-c接口的示意图。FIG. 18 is a schematic diagram of a Type-c interface on a terminal side according to a preferred embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
实施例1 Example 1
本申请实施例1所提供的方法实施例可以在移动终端、计算机终端或者类似的运算装置中执行。以运行在移动终端上为例,图1是本发明实施例的一种音频切换方法的移动终端的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器104、以及用于通信功能的传输装置106。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The method embodiment provided by Embodiment 1 of the present application can be executed in a mobile terminal, a computer terminal or the like. Taking a mobile terminal as an example, FIG. 1 is a hardware structural block diagram of a mobile terminal of an audio switching method according to an embodiment of the present invention. As shown in FIG. 1, the mobile terminal 10 may include one or more (only one shown) processor 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA). A memory 104 for storing data, and a transmission device 106 for communication functions. It will be understood by those skilled in the art that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the above electronic device. For example, the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or have a different configuration than that shown in FIG.
存储器104可用于存储应用软件的软件程序以及模块,如本发明实施例中的音频切换方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的软件程序以及模块,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store software programs and modules of application software, such as program instructions/modules corresponding to the audio switching method in the embodiment of the present invention, and the processor 102 executes various programs by running software programs and modules stored in the memory 104. Functional application and data processing, that is, the above method is implemented. Memory 104 may include high speed random access memory, and may also include non-volatile memory such as one or more magnetic storage devices, flash memory, or other non-volatile solid state memory. In some examples, memory 104 may further include memory remotely located relative to processor 102, which may be connected to mobile terminal 10 over a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。Transmission device 106 is for receiving or transmitting data via a network. The above-described network specific example may include a wireless network provided by a communication provider of the mobile terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module for communicating with the Internet wirelessly.
在本实施例中提供了一种运行于上述移动终端的音频切换方法,图2 是根据本发明实施例的音频切换方法的流程图一,如图2所示,该流程包括如下步骤:In this embodiment, an audio switching method running on the mobile terminal is provided, and FIG. 2 It is a flowchart 1 of an audio switching method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202,判断开启的音频流程的类型;Step S202, determining the type of the audio process that is turned on;
步骤S204,根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上。Step S204: Switch the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
需要说明的是,上述类型包括以下至少之一:播放流程、通话流程、录音流程。It should be noted that the above types include at least one of the following: a play process, a call flow, and a recording process.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
通过上述步骤,通过对终端的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题。Through the above steps, by redefining the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the terminal, it is possible to solve the problem that the earphone does not have versatility.
需要说明的是,通过上述重新定义的终端的Type C接口,使得在进行相应类型的音频流程时,能够快速切换到与该音频流程对应的Type C接口的管脚上,即能够快速切换到与音频流程的类型对应的通道上,大大减少了切换的延迟时间,即解决了切换过程延迟大、场景切换卡顿的问题。It should be noted that, by using the Type C interface of the above-mentioned redefined terminal, when the corresponding type of audio flow is performed, the switch can be quickly switched to the pin of the Type C interface corresponding to the audio flow, that is, the switch can be quickly switched to The channel corresponding to the type of the audio process greatly reduces the delay time of the handover, that is, solves the problem that the handover process has a large delay and the scene is switched.
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin. The third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚,上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6 管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth In the preferred embodiment of the present invention, the first pin is an A6 pin, the second pin is an A7 pin, and the third pin is a B6 pin. The fourth pin is a B7 pin, but is not limited thereto. For example, the first pin is the A7 pin, and the second pin is the A6. The pin, the third pin is a B7 pin, and the fourth pin is a B6 pin.
在本发明的一个实施例中,上述步骤S204可以表现为:在类型为播放流程时,将终端的开关切换到第一管脚和第二管脚上;在类型为通话流程时,将终端的开关切换到第三管脚和第四管脚上;在类型为录音流程时,将终端的开关切换到第五管脚和第六管脚上;其中,Type C接口包括:第五管脚和第六管脚。In an embodiment of the present invention, the foregoing step S204 may be performed by: switching the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, the terminal is The switch is switched to the third pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin and the sixth pin; wherein the Type C interface includes: the fifth pin and The sixth pin.
需要说明的是,第五管脚可以是A8管脚,第六管脚可以是B8管脚,但并不限于此,比如第五管脚可以是B8管脚,第六管脚可以是A8管脚。It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin may be an A8 tube. foot.
在本发明的一个实施例中,在上述步骤S202之后,上述方法还可以包括:识别插入到终端的Type C设备的类型;在识别到Type C设备为Type C耳机的情况下,向Type C耳机发送用于指示将Type C耳机的开关切换到Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向Type C耳机用于指示将Type C耳机的开关保持在Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。In an embodiment of the present invention, after the step S202, the method may further include: identifying a type of the Type C device inserted into the terminal; and in the case of identifying that the Type C device is a Type C headset, to the Type C headset. Sending a first indication message indicating that the switch of the Type C headset is switched to the third pin and the fourth pin of the Type C interface in the Type C headset, or to the Type C headset for indicating the switch of the Type C headset The second indication information of the first pin and the second pin of the Type C interface held in the Type C headset.
需要说明的是,在Type C耳机插入到与Type C耳机配对的终端时,向Type C耳机发送第一指示信息,在Type C耳机插入到不与Type C耳机配对的终端时,则向Type C耳机发送第二指示信息,通过上述步骤可以使得Type C耳机不管是插入与Type C耳机配对的终端中还是插入不与Type C耳机配对的终端中,都能够使用,更好地体现了耳机的通用性。It should be noted that when the Type C headset is inserted into the terminal paired with the Type C headset, the first indication information is sent to the Type C headset, and when the Type C headset is inserted into the terminal that is not paired with the Type C headset, the type C is sent to the Type C. The headset sends the second indication information. Through the above steps, the Type C headset can be used regardless of whether it is inserted into the terminal paired with the Type C headset or inserted into the terminal not paired with the Type C headset, which can better reflect the universal use of the headset. Sex.
需要说明的是,上述识别插入到终端的Type C设备的类型可以表现为:通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型;其中,在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态,或者CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,Type C设备的类型为Type C耳机。It should be noted that the type of the Type C device inserted into the terminal may be expressed as: determining the type of the Type C device by detecting the status of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, at the CC1 pin When the state is the pull-down impedance RD state and the state of the CC2 pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state, the type of the Type C device is Type C headphones.
需要说明的是,还需要判断Type C耳机是正向插入了终端中还是反向 插入了终端中,因而在本发明的一个实施例中,在通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型之后,上述方法还可以包括:在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态的情况下,确定Type C耳机为正向插入到了终端中;将终端的开关保持或者切换到第五管脚上;其中,Type C接口还包括A8管脚。在CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,确定Type C耳机为反向插入到了终端中;将终端的开关从第五管脚切换到第六管脚上。It should be noted that it is also necessary to determine whether the Type C headset is inserted into the terminal or vice versa. Inserted into the terminal, in an embodiment of the present invention, after determining the type of the Type C device by detecting the state of the CC1 pin and the CC2 pin in the auxiliary control module, the method may further include: at the CC1 pin When the state of the pull-down impedance RD state and the state of the CC2 pin are the open state, it is determined that the Type C earphone is inserted into the terminal in the forward direction; the switch of the terminal is held or switched to the fifth pin; The Type C interface also includes an A8 pin. When the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state, it is determined that the Type C earphone is inserted into the terminal in the reverse direction; the switch of the terminal is switched from the fifth pin to the first On six pins.
需要说明的是,上述步骤的执行主体可以是终端,比如移动终端,计算机终端,但并不限于此。It should be noted that the execution body of the foregoing steps may be a terminal, such as a mobile terminal or a computer terminal, but is not limited thereto.
在本实施例中还提供了一种音频切换方法,图3是根据本发明实施例的音频切换方法的流程图二,如图3所示,该流程包括如下步骤:An audio switching method is also provided in this embodiment. FIG. 3 is a second flowchart of an audio switching method according to an embodiment of the present invention. As shown in FIG. 3, the process includes the following steps:
步骤S302,接收终端发送的切换信息;Step S302: Receive handover information sent by the terminal.
步骤S304,根据切换信息将耳机的开关切换到耳机的Type C接口中与切换信息对应的管脚上。Step S304, the switch of the earphone is switched to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚定义为D+管脚;第二管脚定义为D-管脚;第三管脚定义为右声道管脚;第四管脚定义为左声道管脚。It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; the second pin is defined as D-pin; the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
通过上述步骤,通过对耳机的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题。Through the above steps, by redefining the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the earphone, it is possible to solve the problem that the earphone does not have versatility.
需要说明的是,通过上述重新定义的耳机的Type C接口,使得可以根据切换信息切换到耳机的Type C接口中与切换信息对应的管脚上,即能够实现快速切换,大大减少了切换的延迟时间。即解决了切换过程延迟大、场景切换卡顿的问题It should be noted that, by using the Type C interface of the above-mentioned redefined headset, it is possible to switch to the pin corresponding to the switching information in the Type C interface of the headset according to the switching information, that is, fast switching can be realized, and the delay of the handover is greatly reduced. time. That is to solve the problem of large delay in the switching process and scene switching
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者 B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or The B7 pin, the second pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin. The fourth pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and is not limited thereto.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚,上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth In the preferred embodiment of the present invention, the first pin is an A6 pin, the second pin is an A7 pin, and the third pin is a B6 pin. The fourth pin is a B7 pin, but is not limited thereto. For example, the first pin is an A7 pin, the second pin is an A6 pin, and the third pin is a B7 pin. The four pins are B6 pins.
需要说明的是,上述切换信息可以包括以下之一:用于指示将耳机的开关切换到第一管脚和第二管脚上的第一指示信息;用于指示将耳机的开关切换到第三管脚和第四管脚上的第二指示信息;用于指示将耳机的开关切换到第五管脚或第六管脚上的第三指示信息;其中,Type C接口还包括:所述第五管脚和所述第六管脚。It should be noted that the foregoing switching information may include one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating to switch the switch of the earphone to the third The second indication information on the pin and the fourth pin; the third indication information used to indicate that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: Five pins and the sixth pin.
需要说明的是,第五管脚可以是A8管脚,第六管脚可以是B8管脚,但并不限于此,比如第五管脚可以是B8管脚,第六管脚可以是A8管脚。It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin may be an A8 tube. foot.
需要说明的是,在终端开启的音频流程为播放流程时,上述切换信息可以为第一指示信息;在终端开启的音频流程为通话流程时,上述切换信息可以为第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示信息。It should be noted that, when the audio process opened by the terminal is a playback process, the foregoing switching information may be first indication information; when the audio process opened by the terminal is a call flow, the switching information may be second indication information; When the audio process opened by the terminal is a recording process, the switching information is the third indication information.
在本发明的一个实施例中,在耳机正向插入终端时,第三指示信息用于指示将耳机的开关切换到第五管脚上;在耳机负向插入终端时,第三指示信息用于指示将耳机的开关切换到第六管脚上;Type C接口还包括:第五管脚和第六管脚。In an embodiment of the present invention, when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used for The indication switches the switch of the earphone to the sixth pin; the Type C interface further includes: a fifth pin and a sixth pin.
需要说明的是,图3所示的方法的执行主体可以是耳机,但并不限于 此。It should be noted that the execution body of the method shown in FIG. 3 may be an earphone, but is not limited thereto. this.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
实施例3Example 3
在本实施例中还提供了一种音频切换装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。An audio switching device is also provided in the embodiment, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图4是根据本发明实施例的音频切换装置的结构框图一,如图4所示,该装置包括:4 is a structural block diagram 1 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 4, the device includes:
判断模块42,用于判断开启的音频流程的类型;The determining module 42 is configured to determine the type of the audio process that is turned on;
切换模块44,与上述判断模块42连接,用于根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上。The switching module 44 is connected to the determining module 42 for switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
需要说明的是,上述类型包括以下至少之一:播放流程、通话流程、录音流程。It should be noted that the above types include at least one of the following: a play process, a call flow, and a recording process.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。 It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
通过上述装置,通过终端中的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题。Through the above device, the first pin, the second pin, the third pin, and the fourth pin in the Type C interface in the terminal are redefined, so that the problem that the earphone does not have versatility can be solved.
需要说明的是,上述装置通过上述判断模块42和切换模块44实现在在进行相应类型的音频流程时,能够快速切换到与该音频流程对应的Type C接口的管脚上,即上述装置能够快速切换到与音频流程的类型对应的通道上,大大减少了切换的延迟时间,即解决了切换过程延迟大、场景切换卡顿的问题。It should be noted that, by using the foregoing determining module 42 and the switching module 44, the foregoing apparatus can quickly switch to the pin of the Type C interface corresponding to the audio flow when the corresponding type of audio flow is performed, that is, the device can be quickly Switching to the channel corresponding to the type of the audio stream greatly reduces the delay time of the handover, that is, solves the problem of large delay in the handover process and scene switching.
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin. The third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚,上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth In the preferred embodiment of the present invention, the first pin is an A6 pin, the second pin is an A7 pin, and the third pin is a B6 pin. The fourth pin is a B7 pin, but is not limited thereto. For example, the first pin is an A7 pin, the second pin is an A6 pin, and the third pin is a B7 pin. The four pins are B6 pins.
需要说明的是,上述切换模块44可以用于以下之一:在类型为播放流程时,将终端的开关切换到第一管脚和第二管脚上;在类型为通话流程时,将终端的开关切换到第三管脚和第四管脚上;在类型为录音流程时,将终端的开关切换到第五管脚或第六管脚上;其中,Type C接口还包括A8管脚和B8管脚。It should be noted that the foregoing switching module 44 may be used to: switch the switch of the terminal to the first pin and the second pin when the type is the playing process; when the type is the call flow, the terminal is The switch is switched to the third pin and the fourth pin; when the type is the recording process, the terminal switch is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes the A8 pin and the B8 Pin.
需要说明的是,上述第五管脚可以是A8管脚,上述第六管脚可以是B8管脚,但并不限于此,比如上述第五管脚可以是B8管脚,上述第六管脚可以是A8管脚。 It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin. It can be an A8 pin.
在本发明的一个实施例中,上述装置还可以包括:识别模块,与上述判断模块42连接,用于识别插入到终端的Type C设备的类型;发送模块,与上述识别模块连接,用于在识别到Type C设备为Type C耳机的情况下,向Type C耳机发送用于指示将Type C耳机的开关切换到Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向Type C耳机用于指示将Type C耳机的开关保持在Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。In an embodiment of the present invention, the apparatus may further include: an identification module connected to the determining module 42 for identifying a type of the Type C device inserted into the terminal; and a sending module connected to the identifying module for When the Type C device is identified as a Type C headset, the first pin and the fourth pin for instructing to switch the switch of the Type C headset to the Type C interface in the Type C headset are sent to the Type C headset. The indication information, or second indication information to the Type C headset for indicating the first pin and the second pin of the Type C interface that holds the switch of the Type C headset in the Type C headset.
需要说明的是,上述识别模块还可以用于通过检测辅控模块中的CC1管脚和CC2管脚的状态判断Type C设备的类型;其中,在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态,或者CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,Type C设备的类型为Type C耳机。It should be noted that the foregoing identification module may be further configured to determine the type of the Type C device by detecting the states of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and CC2 The type of the Type C device is Type C headphones when the state of the pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state.
需要说明的是,上述识别模块还可以用于在CC1管脚的状态为下拉阻抗RD状态和CC2管脚的状态为断开open状态的情况下,确定Type C耳机为正向插入到了终端中;切换模块还用于将终端的开关保持或者切换到第五管脚上;其中,Type C接口还包括第五管脚。上述识别模块还用于在CC1管脚的状态为断开open状态和CC2管脚的状态为下拉阻抗RD状态的情况下,确定Type C耳机为反向插入到了终端中;切换模块还用于将终端的开关从第五管脚切换到第六管脚上。It should be noted that, in the case that the state of the CC1 pin is the pull-down impedance RD state and the state of the CC2 pin is the open state, it is determined that the Type C earphone is positively inserted into the terminal; The switching module is further configured to hold or switch the switch of the terminal to the fifth pin; wherein the Type C interface further includes a fifth pin. The above identification module is further configured to determine that the Type C earphone is inserted into the terminal in reverse when the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state; the switching module is further configured to The switch of the terminal is switched from the fifth pin to the sixth pin.
需要说明的是,上述装置可以位于终端中,但并不限于此。It should be noted that the above device may be located in the terminal, but is not limited thereto.
本发明实施例还提供了一种音频切换装置,图5是根据本发明实施例的音频切换装置的结构框图二,如图5所示,该装置包括:The embodiment of the present invention further provides an audio switching device. FIG. 5 is a structural block diagram 2 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 5, the device includes:
接收模块52,用于接收终端发送的切换信息;The receiving module 52 is configured to receive the handover information sent by the terminal.
切换模块54,与接收模块52连接,用于根据切换信息将耳机的开关切换到耳机的Type C接口中与切换信息对应的管脚上。 The switching module 54 is connected to the receiving module 52, and is configured to switch the switch of the earphone to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚定义为D+管脚;第二管脚定义为D-管脚;第三管脚定义为右声道管脚;第四管脚定义为左声道管脚。It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ pin; the second pin is defined as D-pin; the third pin is defined as the right channel pin; the fourth pin is defined as the left channel pin.
通过上述装置,对耳机的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题。并且,通过上述装置可以根据切换信息切换到耳机的Type C接口中与切换信息对应的管脚上,即能够实现快速切换,大大减少了切换的延迟时间。By the above device, the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the earphone are redefined, which can solve the problem that the earphone does not have versatility. Moreover, the device can be switched to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information, that is, fast switching can be realized, and the delay time of the switching is greatly reduced.
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin. The third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚,上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth In the preferred embodiment of the present invention, the first pin is an A6 pin, the second pin is an A7 pin, and the third pin is a B6 pin. The fourth pin is a B7 pin, but is not limited thereto. For example, the first pin is an A7 pin, the second pin is an A6 pin, and the third pin is a B7 pin. The four pins are B6 pins.
需要说明的是,上述切换信息包括以下之一:用于指示将耳机的开关切换到第一管脚和第二管脚上的第一指示信息;用于指示将耳机的开关切换到第三管脚和第四管脚上的第二指示信息;用于指示将所述耳机的开关切换到第五管脚或第六管脚上的第三指示信息;其中,所述Type C接口还包括:所述第五管脚和所述第六管脚。It should be noted that the foregoing switching information includes one of: first indication information for instructing switching of the switch of the earphone to the first pin and the second pin; and indicating for switching the switch of the earphone to the third tube The second indication information on the foot and the fourth pin; the third indication information used to indicate that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: The fifth pin and the sixth pin.
需要说明的是,上述第五管脚可以是A8管脚,上述第六管脚可以是B8管脚,但并不限于此,比如上述第五管脚可以是B8管脚,上述第六管脚可以是A8管脚。 It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin. It can be an A8 pin.
需要说明的是,在终端开启的音频流程为播放流程时,上述切换信息为第一指示信息;在终端开启的音频流程为通话流程时,上述切换信息为第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示信息。It should be noted that, when the audio flow that is opened by the terminal is the playback process, the foregoing switching information is the first indication information; when the audio flow that is opened by the terminal is the call flow, the switching information is the second indication information; When the audio process is a recording process, the switching information is the third indication information.
在本发明的一个实施例中,在耳机正向插入终端时,第三指示信息用于指示将耳机的开关切换到第五管脚上;在耳机负向插入终端时,第三指示信息用于指示将耳机的开关切换到第六管脚上。In an embodiment of the present invention, when the earphone is forwardly inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the fifth pin; when the earphone is negatively inserted into the terminal, the third indication information is used for Instructs to switch the headset's switch to the sixth pin.
需要说明的是,上述图5所示的装置可以位于耳机中,但并不限于此。It should be noted that the device shown in FIG. 5 above may be located in the earphone, but is not limited thereto.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the above modules are in any combination. The forms are located in different processors.
实施例3Example 3
本实施例提供了一种终端,包括:Type C接口,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚定为左声道管脚。The embodiment provides a terminal, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin. The second pin is the D-pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
通过对终端的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题,同时也能够解决切换过程延迟大、场景切换卡顿的问题。By redefining the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the terminal, the problem that the earphone does not have versatility can be solved, and the delay of the switching process can be solved, and the scenario can be solved. Switch the problem of Caton.
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin. The third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚, 上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth The pins indicated by the pins are different. In a preferred embodiment of the present invention, the first pin is an A6 pin. The second pin is the A7 pin, the third pin is the B6 pin, and the fourth pin is the B7 pin, but the second pin is not limited thereto. For example, the first pin is the A7 pin, and the second The pin is the A6 pin, the third pin is the B7 pin, and the fourth pin is the B6 pin.
需要说明的是,上述Type C接口中除了第一管脚、第二管脚、第三管脚和第四管脚之外的其他管脚采用的是Type C接口中24线的标准接口定义,但并不限于此,比如也可以采用的是非低成本的非标准接口定义。It should be noted that the pins other than the first pin, the second pin, the third pin, and the fourth pin in the Type C interface are defined by the standard interface of the 24-wire type C interface. However, it is not limited to this. For example, a non-standard non-standard interface definition can also be adopted.
需要说明的是,上述Type C接口为终端侧的Type C接口。It should be noted that the Type C interface is a Type C interface on the terminal side.
需要说明的是,上述第三管脚与耳机的右声道管脚对接,上述第四管脚与耳机的左声道管脚对接。It should be noted that the third pin is docked with the right channel pin of the earphone, and the fourth pin is docked with the left channel pin of the earphone.
需要说明的是,上述耳机的右声道管脚为耳机的Type C接口的第三管脚,耳机的左声道管脚为耳机的Type C接口的第四管脚。It should be noted that the right channel pin of the earphone is the third pin of the Type C interface of the earphone, and the left channel pin of the earphone is the fourth pin of the Type C interface of the earphone.
需要说明的是,上述Type C接口还可以包括:第五管脚和第六管脚。It should be noted that the Type C interface may further include: a fifth pin and a sixth pin.
需要说明的是,上述第五管脚可以是A8管脚,上述第六管脚可以是B8管脚,但并不限于此,比如上述第五管脚可以是B8管脚,上述第六管脚可以是A8管脚。It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin. It can be an A8 pin.
本实施例还提供了一种耳机,包括:Type C接口,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。The embodiment further provides an earphone, including: a Type C interface, where the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ tube The second pin is the D-pin; the third pin is the right channel pin; the fourth pin is the left channel pin.
通过对耳机的Type C接口中的第一管脚、第二管脚、第三管脚和第四管脚重新定义,能够解决耳机不具备通用性问题,同时也能够解决切换过程延迟大、场景切换卡顿的问题。By redefining the first pin, the second pin, the third pin, and the fourth pin in the Type C interface of the earphone, the problem that the earphone does not have versatility can be solved, and the delay of the switching process can be solved, and the scenario can be solved. Switch the problem of Caton.
需要说明的是,上述第一管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第二管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第三管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,上述第四管脚可以为A6管脚、A7管脚、B6管脚或者B7管脚,并不限于此。 It should be noted that the first pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin, and the second pin may be an A6 pin, an A7 pin, a B6 pin, or a B7 pin. The third pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and the fourth pin may be an A6 pin, an A7 pin, a B6 pin or a B7 pin, and is not limited thereto. this.
需要说明的是,上述第一管脚、第二管脚、第三管脚和第四管脚的组合方式有很多种,只要第一管脚、第二管脚、第三管脚和第四管脚所表示的管脚不同即可,在本发明的一个优选实施例中,上述第一管脚为A6管脚,上述第二管脚为A7管脚、上述第三管脚为B6管脚,上述第四管脚为B7管脚,但并不限于此,比如上述第一管脚为A7管脚,上述第二管脚为A6管脚、上述第三管脚为B7管脚,上述第四管脚为B6管脚。It should be noted that there are many combinations of the first pin, the second pin, the third pin, and the fourth pin, as long as the first pin, the second pin, the third pin, and the fourth In the preferred embodiment of the present invention, the first pin is an A6 pin, the second pin is an A7 pin, and the third pin is a B6 pin. The fourth pin is a B7 pin, but is not limited thereto. For example, the first pin is an A7 pin, the second pin is an A6 pin, and the third pin is a B7 pin. The four pins are B6 pins.
需要说明的是,本实施例中的耳机上的Type C接口中除了第一管脚、第二管脚、第三管脚和第四管脚之外的其他管脚采用的是Type C接口中24线的标准接口定义,但并不限于此,比如也可以采用的是非低成本的非标准接口定义。It should be noted that, in the Type C interface on the earphone in this embodiment, the pins other than the first pin, the second pin, the third pin, and the fourth pin are in the Type C interface. The 24-wire standard interface definition, but not limited to this, can also be used for non-standard non-standard interface definitions.
需要说明的是,耳机中的第三管脚与终端的右声道管脚对接,耳机中的第四管脚与终端的左声道管脚对接。It should be noted that the third pin in the earphone is docked with the right channel pin of the terminal, and the fourth pin in the earphone is docked with the left channel pin of the terminal.
需要说明的是,终端的右声道管脚为终端的Type C接口的第三管脚,终端的左声道管脚为终端的Type C接口的第四管脚。It should be noted that the right channel pin of the terminal is the third pin of the Type C interface of the terminal, and the left channel pin of the terminal is the fourth pin of the Type C interface of the terminal.
需要说明的是,上述Type C接口还可以包括:第五管脚和第六管脚。It should be noted that the Type C interface may further include: a fifth pin and a sixth pin.
需要说明的是,上述第五管脚可以是A8管脚,上述第六管脚可以是B8管脚,但并不限于此,比如上述第五管脚可以是B8管脚,上述第六管脚可以是A8管脚。It should be noted that the fifth pin may be an A8 pin, and the sixth pin may be a B8 pin, but is not limited thereto. For example, the fifth pin may be a B8 pin, and the sixth pin. It can be an A8 pin.
通过上述对终端侧的Type C口和耳机侧的Type C口的管脚进行了重新定义,使得不仅能够实现耳机的通用性,而且使得在音频流程切换过程中只需要一次枚举过程,大大较少了延迟时间。The above-mentioned definition of the Type C port on the terminal side and the Type C port on the earphone side has been redefined, so that not only the versatility of the earphone but also an enumeration process in the audio flow switching process is required. Less delay time.
为了更好地理解本发明,以下结合优选实施例对本发明做进一步解释。In order to better understand the present invention, the present invention will be further explained in conjunction with the preferred embodiments.
本发明优先实施例提供了一种装置,该装置包括:主控模块、控制模块和切换模块。其中:主控模块,负责音频数据的编解码和时序的控制。将空口下来的数据转换成PCM码流;并进行回声抑制、噪声消除等处理, 通过编码器将数据输出给Type-c端口。接收模拟语音信号,转换成数字信号,将数字信号进行回声和降噪等处理,由空口发出。另外,根据不同的应用场景,发出不同的时序信息。辅控模块,负责判断插入不同设备类型。插入不同的设备类型时,辅控模块进行不同的逻辑判断,识别出设备类型;接收来自主控模块的信息,并发出不同的控制信息。切换模块,根据不同的应用场景和插入设备的不同类型,完成切换功能,实现应用场景和设备类型的匹配。A preferred embodiment of the present invention provides an apparatus comprising: a main control module, a control module, and a switching module. Among them: the main control module, responsible for the encoding and decoding of audio data and timing control. Converting the data from the air interface into a PCM code stream; performing echo suppression, noise cancellation, etc. The data is output to the Type-c port by the encoder. The analog voice signal is received, converted into a digital signal, and the digital signal is processed by echo and noise reduction, and is sent out by the air interface. In addition, different timing information is issued according to different application scenarios. The auxiliary control module is responsible for judging the insertion of different device types. When inserting different device types, the auxiliary control module performs different logical judgments to identify the device type; receives information from the main control module, and issues different control information. The switching module performs the switching function according to different application scenarios and different types of inserted devices to implement matching between application scenarios and device types.
需要说明的是,上述主控模块相当于图4所示实施例的判断模块42,上述辅控模块相当于上述图4所示实施例中的识别模块,上述切换模块相当于图4所示实施例中的切换模块44和图5所示实施例中的切换模块54.It should be noted that the main control module is equivalent to the determination module 42 of the embodiment shown in FIG. 4, and the auxiliary control module is equivalent to the identification module in the embodiment shown in FIG. 4, and the switching module is equivalent to the implementation shown in FIG. The switching module 44 in the example and the switching module 54 in the embodiment shown in FIG.
本发明优选实施例还提供了一种Type-c耳机兼容音频应用场景的方法,包括如下步骤:The preferred embodiment of the present invention further provides a method for a Type-c headset compatible audio application scenario, including the following steps:
A.通话数据由音频编解码器输出模拟数据至Type-c口,AP输出播放数字格式的数据至Type-c口;录音走模拟信号由Tyep-c口传输给音频编解码器。A. The call data is outputted by the audio codec to the Type-c port, and the AP outputs the data in the digital format to the Type-c port; the recorded analog signal is transmitted to the audio codec by the Tyep-c port.
B.图6是根据本发明优选实施例提供的主控模块侧和耳机侧的Type-c口管脚定义图,如图6所示,主控模块侧的Type-c口的A6管脚为D+管脚;A7管脚为D-管脚;B6管脚为右声道管脚;B7管脚为左声道管脚;耳机侧的Type-c口的A6管脚为D+管脚;A7管脚为D-管脚;B6管脚为右声道管脚;B7管脚为左声道管脚。B. FIG. 6 is a definition diagram of a Type-c port pin on a main control module side and an earphone side according to a preferred embodiment of the present invention. As shown in FIG. 6, the A6 pin of the Type-c port on the main control module side is D+ pin; A7 pin is D-pin; B6 pin is right channel pin; B7 pin is left channel pin; A6 pin of Type-c port on earphone side is D+ pin; A7 The pin is D-pin; the B6 pin is the right channel pin; the B7 pin is the left channel pin.
C.辅控模块基于Type-c协议,辅控模块检测到设备插入时,根据CC管脚状态,识别出是充电器、转接头或者耳机等设备;同时可以根据不同的配置组合,识别出耳机等设备的正向插入还是反向插入;完成识别过程后,发送控制信息通知切换模块。图7是根据本发明优选实施例提供的辅控模块的CC1和CC2管脚的状态及对应耳机位置关系的示意图;其中,① 表示正插,②表示反插。图8是根据本发明优选实施例提供的辅控模块的结构示意图。C. The auxiliary control module is based on the Type-c protocol. When the auxiliary control module detects the device insertion, it recognizes that it is a charger, adapter or earphone according to the status of the CC pin. At the same time, the earphone can be identified according to different configuration combinations. The forward insertion or the reverse insertion of the device; after the identification process is completed, the control information is sent to notify the switching module. 7 is a schematic diagram showing states of CC1 and CC2 pins of a secondary control module and corresponding headphone position relationships according to a preferred embodiment of the present invention; Indicates positive interpolation and 2 indicates reverse insertion. FIG. 8 is a schematic structural diagram of an auxiliary control module according to a preferred embodiment of the present invention.
D.切换模块,负责主控模块和外设的数据通路的切换、USB通路的切换、MIC和GND之间的切换;及Type-c插头正反插的切换,图9是根据本发明优选实施例提供的切换模块的结构示意图,如图9所示,SideA切换开关可以相当于终端侧的切换模块,SideB切换开关相当于耳机侧的切换模块。D. The switching module is responsible for switching the data path of the main control module and the peripheral, switching between the USB path, switching between the MIC and the GND, and switching between the forward and reverse insertion of the Type-c plug, and FIG. 9 is a preferred implementation according to the present invention. The schematic diagram of the switching module provided by the example is shown in FIG. 9. The SideA switch can be equivalent to the switch module on the terminal side, and the SideB switch is equivalent to the switch module on the headphone side.
本发明实施例提供了另一种优选的音频切换方法,该方法包括:An embodiment of the present invention provides another preferred audio switching method, where the method includes:
首先,Type-c采用的是24线的标准接口定义;而非低成本的非标准接口定义接口。图10是根据本发明优选实施例提供的24线的标准接口定义的示意图,图11是根据本发明优选实施例提供的非低成本的非标准接口定义接口的示意图。本优选实施例中,Type-c母头侧(即终端侧)的A6/7和B7/6定义断开;Type-c公头侧(耳机侧)的B6/7定义为左右声道管脚。First, Type-c uses a 24-wire standard interface definition; instead of a low-cost, non-standard interface definition interface. 10 is a schematic diagram of a 24-wire standard interface definition provided in accordance with a preferred embodiment of the present invention, and FIG. 11 is a schematic diagram of a non-low-cost non-standard interface definition interface provided in accordance with a preferred embodiment of the present invention. In the preferred embodiment, A6/7 and B7/6 of the Type-c female side (ie, the terminal side) are defined to be broken; B6/7 of the Type-c male side (headphone side) is defined as the left and right channel pins. .
图12是根据本发明优选实施例提供的USB协议的相关规定的示意图,如图12所示,本发明定义的Type-c满足USB协议相关规定,包括通信协议和电气特性等。FIG. 12 is a schematic diagram of a related specification of a USB protocol according to a preferred embodiment of the present invention. As shown in FIG. 12, the Type-c defined by the present invention satisfies the relevant provisions of the USB protocol, including communication protocols and electrical characteristics.
本发明优选实施例为了后面内容的能够描述更清晰,进行初始状态的定义说明;但是不局限于该定义状态。初始状态定义为:辅控模块中的CC1=open;CC2=open;SideA和SideB开关默认为播放侧(即默认通道为播放通路);主控模块根据不同的应用场景会对辅控模块做出相应的状态变更。The preferred embodiment of the present invention provides a definition of the initial state for the sake of clarity of the following description; however, it is not limited to the defined state. The initial state is defined as: CC1=open in the auxiliary control module; CC2=open; the SideA and SideB switches default to the playback side (ie, the default channel is the playback channel); the main control module will make the auxiliary control module according to different application scenarios. The corresponding status change.
图13是根据本发明优选实施例提供的通话场景下的示意图,如图13所示,在Type-c设备通话场景,当发用户发起通话流程时,数据从空口下来,Modem将空口数据解码成PCM数据流;ADSP将数据进行相关噪声和回声处理。此时主控模块从上层下发命令cmd001给辅控模块。 FIG. 13 is a schematic diagram of a call scenario according to a preferred embodiment of the present invention. As shown in FIG. 13, in a call scenario of a Type-c device, when a user initiates a call flow, data is sent from the air interface, and the modem decodes the air interface data into PCM data stream; ADSP processes the data for correlated noise and echo. At this time, the main control module sends the command cmd001 to the auxiliary control module from the upper layer.
同时当插入Type-c设备时,辅控模块会监测CC1和CC2状态,当CC1和CC2的组合状态为Rd/open或Rd/open时,辅控模块将插入的Type-c设备识别为Type-c耳机;当监测到CC1和CC2为其他的组合状态时,会将插入的Type-c设备识别为充电器或转接头等设备。此时,主控模块发起的通话流程就是耳机通话流程。并且通过USB发送控制命令cmd002.At the same time, when the Type-c device is inserted, the auxiliary control module monitors the CC1 and CC2 states. When the combined state of CC1 and CC2 is Rd/open or Rd/open, the auxiliary control module recognizes the inserted Type-c device as Type- c headset; when CC1 and CC2 are detected as other combined states, the inserted Type-c device will be recognized as a device such as a charger or adapter. At this time, the call flow initiated by the main control module is the headset call process. And send the control command cmd002 through USB.
辅控模块检测到切换模块的开关状态非通话侧通路,会发送切换信息给切换模块。同时辅控模块检测CC1和CC2状态,CC1=Rd,CC2=open时,识别出Type-c耳机为正向插入;CC1=open,CC2=Rd时,识别出Type-c耳机为反向插入;此时发送控制命令cmd003给切换模块。The auxiliary control module detects the switching state of the switching module and the non-talking side path, and sends switching information to the switching module. At the same time, the auxiliary control module detects the CC1 and CC2 states, CC1=Rd, and when CC2=open, it recognizes that the Type-c earphone is forward insertion; when CC1=open, CC2=Rd, it recognizes that the Type-c earphone is reverse insertion; At this time, the control command cmd003 is sent to the switching module.
切换模块接收辅控模块的cmd001后,将SideA开关切换到B6/7;收到cmd002时,SideB开关切换到B6/7;收到cmd003时,SideA由A8切换到B8。由此建立完整的物理通道。通话上行数据由Type-c设备端经模拟通路回传到主控模块,经ADSP的降噪、回声等处理,发送至空口。After the switching module receives the cmd001 of the auxiliary control module, the SideA switch is switched to B6/7; when the cmd002 is received, the SideB switch is switched to B6/7; when the cmd003 is received, the SideA is switched from A8 to B8. This establishes a complete physical channel. The call uplink data is transmitted back to the main control module by the Type-c device through the analog channel, and is sent to the air interface through the ADSP noise reduction, echo, and the like.
录音场景主要是上行数据的通路,类似通话场景下的上行通路。不再详述。The recording scene is mainly the path of the uplink data, similar to the uplink path in the call scene. No longer detailed.
图14是根据本发明优选实施例提供的播放场景下的示意图;如图14所示,当发起播放流程时,播放数据由主控模块存储单元打包为USB数据包,发送至Type-c口。此时主控模块由上层下发命令cmd004,主控模块控制SideA开关控制命令下发给辅控模块。FIG. 14 is a schematic diagram of a playback scenario according to a preferred embodiment of the present invention; as shown in FIG. 14, when the playback process is initiated, the playback data is packaged by the main control module storage unit into a USB data packet and sent to the Type-c port. At this time, the main control module sends the command cmd004 from the upper layer, and the main control module controls the SideA switch control command to be sent to the auxiliary control module.
辅控模块根据插入设备的配置信息,识别出插入的Type-c设备类型;根据检测识别结果,并发送控制开关的切换信息。The auxiliary control module identifies the type of the inserted Type-c device according to the configuration information of the inserted device; and sends the switching information of the control switch according to the detection and recognition result.
切换模块接收辅控模块的信息后,将SideA开关切换到A6/7;SideB开关切换到A6/7;建立完整的物理通道。After the switching module receives the information of the auxiliary control module, switch the SideA switch to A6/7; the SideB switch switches to A6/7; establish a complete physical channel.
图15是根据本发明优选实施例提供的Barge-in场景下的示意图;如图15所示,播放数据由主控模块存储单元打包为USB数据包,发送至Type-c 口。此时主控模块由上层下发命令cmd002,主控模块控制SideA开关控制命令下发给辅控模块。15 is a schematic diagram of a Barge-in scenario according to a preferred embodiment of the present invention; as shown in FIG. 15, the play data is packaged into a USB data packet by the main control module storage unit, and sent to the Type-c. mouth. At this time, the main control module sends the command cmd002 from the upper layer, and the main control module controls the SideA switch control command to be sent to the auxiliary control module.
辅控模块根据插入设备的配置信息,识别出插入的Type-c设备类型;根据检测识别结果,控制开关的切换信息。The auxiliary control module identifies the type of the inserted Type-c device according to the configuration information of the inserted device; and controls the switching information of the switch according to the detection and recognition result.
切换模块接收辅控模块的信息后,将SideA开关切换到A6/7;SideB开关切换到A6/7;建立完整的下行物理通道。同时将MIC/GND开关切换到A8或B8。After receiving the information of the auxiliary control module, the switching module switches the SideA switch to A6/7; the SideB switch switches to A6/7; establishes a complete downlink physical channel. Also switch the MIC/GND switch to A8 or B8.
实施例4Example 4
本发明实施例还提供了一种音频切换方法,图16是根据本发明实施例的音频切换方法的流程图三,如图16所示,该方法包括:The embodiment of the present invention further provides an audio switching method, and FIG. 16 is a flowchart 3 of an audio switching method according to an embodiment of the present invention. As shown in FIG. 16, the method includes:
步骤S1602,判断开启的音频流程的类型;Step S1602, determining the type of the audio process that is turned on;
步骤S1604,确定耳机插入终端的插入方向;Step S1604, determining an insertion direction of the earphone insertion terminal;
步骤S1608,根据音频流程的类型和插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。Step S1608: The switch of the terminal is switched to the corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。上述音频流程的类型可以包括以下至少之一:播放流程、通话流程、录音流程;上述插入方向包括以下之一:正向插入和反向插入。It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin. The type of the audio stream may include at least one of the following: a play process, a call flow, and a recording process; the insertion direction includes one of the following: forward insertion and reverse insertion.
通过对终端侧的Type C端口的管脚的改进,也可以实现终端的通用性,即任何耳机都可以插入到该终端中,实现正向、反向插入的通话、播放和录音功能。Through the improvement of the pin of the Type C port on the terminal side, the universality of the terminal can also be realized, that is, any earphone can be inserted into the terminal to realize the forward, reverse inserted call, play and record functions.
需要说明的是,上述步骤S1608可以表现为:在音频流程为播放流程且插入方向为正向插入时,将开关切换到第一管脚和第二管脚;在音频流程为播放流程且插入方向为反向插入时,将开关切换到第三管脚和第四管 脚;在音频流程为通话流程且插入方向为正向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为反向插入时,将开关切换到第一管脚和第二管脚;在音频流程为录音流程且插入方向为正向插入时,将开关切换到第五管脚;在音频流程为录音流程且插入方向为反向插入时,将开关切换到第六管脚;其中,Type C接口包括:第五管脚和第六管脚。It should be noted that the foregoing step S1608 can be expressed as: when the audio flow is the playback process and the insertion direction is forward insertion, the switch is switched to the first pin and the second pin; in the audio flow, the playback process is inserted and the direction is inserted. When inserting in the reverse direction, switch the switch to the third and fourth tubes Foot; when the audio flow is the call flow and the insertion direction is forward insertion, switch the switch to the third pin and the fourth pin; when the audio flow is the call flow and the insertion direction is reverse insertion, the switch is switched to The first pin and the second pin; when the audio flow is the recording process and the insertion direction is forward insertion, the switch is switched to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, The switch is switched to the sixth pin; wherein the Type C interface includes: a fifth pin and a sixth pin.
实施例5Example 5
本发明实施例还提供了一种音频切换装置,图17是根据本发明实施例的音频切换装置的流程图三,如图17所示,该装置包括:The embodiment of the present invention further provides an audio switching device. FIG. 17 is a flowchart 3 of an audio switching device according to an embodiment of the present invention. As shown in FIG. 17, the device includes:
判断模块1702,用于判断开启的音频流程的类型;The determining module 1702 is configured to determine a type of the audio process that is turned on;
确定模块1704,与上述判断模块1702连接,用于确定耳机插入终端的插入方向;a determining module 1704, connected to the determining module 1702, configured to determine an insertion direction of the earphone insertion terminal;
切换模块1706,与上述确定模块1704连接,用于根据音频流程的类型和插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。The switching module 1706 is connected to the determining module 1704, and is configured to switch the switch of the terminal to a corresponding pin in the Type C interface of the terminal according to the type and insertion direction of the audio flow.
需要说明的是,上述Type C接口可以包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。需要说明的是,上述音频流程的类型可以包括以下至少之一:播放流程、通话流程、录音流程;上述插入方向可以包括以下之一:正向插入和反向插入。It should be noted that the Type C interface may include: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; and the second pin is a D- Pin; the third pin is the right channel pin; the fourth pin is the left channel pin. It should be noted that the type of the audio process may include at least one of the following: a play process, a call flow, and a recording process; and the insertion direction may include one of the following: forward insertion and reverse insertion.
需要说明的是,上述切换模块1706还可以用于以下至少之一:在音频流程为播放流程且插入方向为正向插入时,将开关切换到第一管脚和第二管脚;在音频流程为播放流程且插入方向为反向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为正向插入时,将开关切换到第三管脚和第四管脚;在音频流程为通话流程且插入方向为反向插入时,将开关切换到第一管脚和第二管脚;在音频流程为录音流程且 插入方向为正向插入时,将开关切换到第五管脚;在音频流程为录音流程且插入方向为反向插入时,将开关切换到第六管脚;其中,Type C接口包括:第五管脚和第六管脚。It should be noted that the foregoing switching module 1706 can also be used for at least one of: switching the switch to the first pin and the second pin when the audio flow is the playback process and the insertion direction is forward insertion; in the audio flow When the playback process is reverse insertion, the switch is switched to the third pin and the fourth pin; when the audio flow is a call flow and the insertion direction is forward insertion, the switch is switched to the third pin and The fourth pin; when the audio flow is a call flow and the insertion direction is reverse insertion, the switch is switched to the first pin and the second pin; in the audio flow is the recording process and When the insertion direction is forward insertion, the switch is switched to the fifth pin; when the audio flow is the recording process and the insertion direction is reverse insertion, the switch is switched to the sixth pin; wherein the Type C interface includes: Pin and sixth pin.
为了更好地理解本发明,以下结合优选的实施例对本发明做进一步解释。For a better understanding of the invention, the invention is further explained in conjunction with the preferred embodiments.
图18是根据本发明优选实施例提供的终端侧的Type-c接口的示意图,结合图18解释终端侧的Type-C接口的通用性:FIG. 18 is a schematic diagram of a Type-c interface on a terminal side according to a preferred embodiment of the present invention. The versatility of the Type-C interface on the terminal side is explained in conjunction with FIG. 18:
播放流程:当耳机正向插入终端时,开关3处于默认状态,数据走A6、A7管脚;此时开关1和开关2保持默认状态;Playback process: When the headset is inserted into the terminal, the switch 3 is in the default state, and the data goes to the A6 and A7 pins; at this time, the switch 1 and the switch 2 remain in the default state;
当耳机反向插入终端时,使能开关3,将播放物理通道切换到B6、B7管脚;此时开关2同时被使能,将开关切换至另一侧。When the headset is reversely inserted into the terminal, enable switch 3 to switch the playback physical channel to the B6 and B7 pins; at this time, switch 2 is enabled at the same time, and the switch is switched to the other side.
通话流程:当耳机正向插入终端时,开关2处于默认状态,数据走B6、B7管脚;此时开关1和开关3保持默认状态;Call flow: When the headset is plugged into the terminal, switch 2 is in the default state, and the data goes to the B6 and B7 pins; at this time, switch 1 and switch 3 remain in the default state;
当耳机反向插入终端时,使能开关2,将播放物理通道切换到A6、A7管脚;此时开关2同时被使能,将开关切换至另一侧。When the earphone is reversely inserted into the terminal, enable switch 2 to switch the playback physical channel to the A6 and A7 pins; at this time, switch 2 is enabled at the same time, and the switch is switched to the other side.
录音流程,正向插入时,开关1、2、3均保持默认状态;During the recording process, switches 1, 2, and 3 remain in the default state during forward insertion;
反向插入时,使能开关1,将开关1切到另一侧。此时,开关2和3保持默认状态。When inserting in the reverse direction, enable switch 1 and cut switch 1 to the other side. At this time, switches 2 and 3 remain in the default state.
通过上述实施例,任何耳机插入该终端时,经上述逻辑判断和切换,可以实现正向、反向插入的通话、播放和录音功能。Through the above embodiment, when any earphone is inserted into the terminal, the forward, reverse inserted call, play and record functions can be realized through the above logic judgment and switching.
实施例6Example 6
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行实施例2中的方法的步骤的程序代码。Embodiments of the present invention also provide a storage medium. Alternatively, in the present embodiment, the above storage medium may be set to store program code for executing the steps of the method in Embodiment 2.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只 读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but is not limited to: a USB flash drive, only A medium that can store program code, such as a read-only memory (ROM), a random access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行实施例2中的方法的步骤。Optionally, in this embodiment, the processor performs the steps of the method in Embodiment 2 according to the stored program code in the storage medium.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
本发明实施例公开了一种音频切换方法及装置、终端、耳机及存储介质,将Type C接口进行了改进,将Type C接口中的第一管脚定义为D+管脚;Type C接口中的第二管脚定义为D-管脚;Type C接口中的第三管脚重新定义为右声道管脚;Type C接口中的第四管脚重新定义为左声道管脚; 使得与相关技术中的终端侧中的Type C接口的第一和第三管脚都为D+管脚,第二和第四管脚都为D-管脚;耳机侧的Type C接口的第一管脚为D+管脚,第二管脚为D-管脚,第三和第四管脚为NA管脚相比,能够实现耳机的通用性,解决了相关技术中耳机不具备通用性的问题。 The embodiment of the invention discloses an audio switching method and device, a terminal, an earphone and a storage medium, and the Type C interface is improved, and the first pin in the Type C interface is defined as a D+ pin; in the Type C interface The second pin is defined as a D-pin; the third pin in the Type C interface is redefined as a right channel pin; and the fourth pin in the Type C interface is redefined as a left channel pin; The first and third pins of the Type C interface in the terminal side in the related art are both D+ pins, the second and fourth pins are D-pins; the first type C interface on the earphone side The pin is D+ pin, the second pin is D-pin, and the third and fourth pins are compared with the NA pin, which can realize the versatility of the earphone, and solves the problem that the earphone does not have universality in the related art. .

Claims (41)

  1. 一种音频切换方法,包括:An audio switching method includes:
    判断开启的音频流程的类型;Determine the type of audio process that is turned on;
    根据所述类型将终端的开关切换到终端的Type C接口中与所述类型对应的管脚上。Switching the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
  2. 根据权利要求1所述的方法,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚;所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚为左声道管脚。The method of claim 1, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  3. 根据权利要求2所述的方法,其中,所述类型包括以下至少之一:播放流程、通话流程、录音流程。The method of claim 2, wherein the type comprises at least one of: a play flow, a call flow, a recording flow.
  4. 根据权利要求3所述的方法,其中,根据所述类型将终端的开关切换到终端的Type C接口中与所述类型对应的管脚上包括以下之一:The method according to claim 3, wherein switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type includes one of the following:
    在所述类型为播放流程时,将所述终端的开关切换到所述第一管脚和所述第二管脚上;Switching the switch of the terminal to the first pin and the second pin when the type is a play process;
    在所述类型为通话流程时,将所述终端的开关切换到所述第三管脚和所述第四管脚上;Switching the switch of the terminal to the third pin and the fourth pin when the type is a call flow;
    在所述类型为录音流程时,将所述终端的开关切换到第五管脚或第六管脚上;其中,所述Type C接口包括:所述第五管脚和所述第六管脚。Switching the switch of the terminal to the fifth pin or the sixth pin when the type is the recording process; wherein the Type C interface includes: the fifth pin and the sixth pin .
  5. 根据权利要求3所述的方法,其中,在判断开启的音频流程的类型之后,所述方法还包括:The method of claim 3, wherein after determining the type of the audio stream that is turned on, the method further comprises:
    识别插入到所述终端的Type C设备的类型;Identifying the type of Type C device inserted into the terminal;
    在识别到所述Type C设备为Type C耳机的情况下,In the case that the Type C device is identified as a Type C headset,
    向所述Type C耳机发送用于指示将所述Type C耳机的开关切换到所述Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向 所述Type C耳机发送用于指示将所述Type C耳机的开关保持在所述Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。Transmitting, to the Type C headset, first indication information indicating that the switch of the Type C headset is switched to the third pin and the fourth pin of the Type C interface in the Type C headset, or The Type C headset transmits second indication information for indicating a first pin and a second pin of the Type C interface in which the switch of the Type C headset is held.
  6. 根据权利要求5所述的方法,其中,识别插入到所述终端的Type C设备的类型包括:The method of claim 5, wherein identifying the type of Type C device inserted into the terminal comprises:
    通过检测辅控模块中的CC1管脚和CC2管脚的状态判断所述Type C设备的类型;其中,在所述CC1管脚的状态为下拉阻抗RD状态和所述CC2管脚的状态为断开open状态,或者所述CC1管脚的状态为断开open状态和所述CC2管脚的状态为下拉阻抗RD状态的情况下,所述Type C设备的类型为所述Type C耳机。Determining the type of the Type C device by detecting the states of the CC1 pin and the CC2 pin in the auxiliary control module; wherein, the state of the CC1 pin is a pull-down impedance RD state and the state of the CC2 pin is broken In the case where the open state is opened, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state, the type of the Type C device is the Type C earphone.
  7. 根据权利要求6所述的方法,其中,在通过检测辅控模块中的CC1管脚和CC2管脚的状态判断所述Type C设备的类型之后,所述方法还包括:The method according to claim 6, wherein after determining the type of the Type C device by detecting the state of the CC1 pin and the CC2 pin in the auxiliary control module, the method further includes:
    在所述CC1管脚的状态为下拉阻抗RD状态和所述CC2管脚的状态为断开open状态的情况下,确定所述Type C耳机为正向插入到所述终端中;In a case where the state of the CC1 pin is a pull-down impedance RD state and the state of the CC2 pin is a disconnected open state, determining that the Type C earphone is positively inserted into the terminal;
    将所述终端的开关保持或者切换到第五管脚上;其中,所述Type C接口还包括所述第五管脚。Holding or switching the switch of the terminal to the fifth pin; wherein the Type C interface further includes the fifth pin.
  8. 根据权利要求6所述的方法,其中,在通过检测辅控模块中的CC1管脚和CC2管脚的状态判断所述Type C设备的类型之后,所述方法还包括:The method according to claim 6, wherein after determining the type of the Type C device by detecting the state of the CC1 pin and the CC2 pin in the auxiliary control module, the method further includes:
    在所述CC1管脚的状态为断开open状态和所述CC2管脚的状态为下拉阻抗RD状态的情况下,确定所述Type C耳机为反向插入到所述终端中;In a case where the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state, it is determined that the Type C earphone is inserted into the terminal in reverse;
    将所述终端的开关从第五管脚切换到第六管脚上;其中,所述Type C接口还包括所述第五管脚和所述第六管脚。Switching the switch of the terminal from the fifth pin to the sixth pin; wherein the Type C interface further includes the fifth pin and the sixth pin.
  9. 一种音频切换方法,包括:An audio switching method includes:
    接收终端发送的切换信息;Receiving handover information sent by the terminal;
    根据所述切换信息将耳机的开关切换到所述耳机的Type C接口中与所述切换信息对应的管脚上。 Switching the switch of the earphone to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
  10. 根据权利要求8所述的方法,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚定义为D+管脚;所述第二管脚定义为D-管脚;所述第三管脚定义为右声道管脚;所述第四管脚定义为左声道管脚。The method of claim 8, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ tube The second pin is defined as a D-pin; the third pin is defined as a right channel pin; and the fourth pin is defined as a left channel pin.
  11. 根据权利要求10所述的方法,其中,所述切换信息包括以下之一:The method of claim 10, wherein the switching information comprises one of the following:
    用于指示将所述耳机的开关切换到所述第一管脚和所述第二管脚上的第一指示信息;a first indication information for indicating that a switch of the earphone is switched to the first pin and the second pin;
    用于指示将所述耳机的开关切换到所述第三管脚和所述第四管脚上的第二指示信息;a second indication information for indicating switching of the switch of the earphone to the third pin and the fourth pin;
    用于指示将所述耳机的开关切换到第五管脚或第六管脚上的第三指示信息;其中,所述Type C接口还包括:所述第五管脚和所述第六管脚。a third indication information for indicating that the switch of the earphone is switched to the fifth pin or the sixth pin; wherein the Type C interface further includes: the fifth pin and the sixth pin .
  12. 根据权利要求11所述的方法,其中,在所述终端开启的音频流程为播放流程时,所述切换信息为所述第一指示信息;在所述终端开启的音频流程为通话流程时,所述切换信息为所述第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示信息。The method according to claim 11, wherein the switching information is the first indication information when the audio flow opened by the terminal is a playing process; and the audio flow opened by the terminal is a call flow, The switching information is the second indication information; when the audio flow opened by the terminal is a recording process, the switching information is the third indication information.
  13. 根据权利要求11所述的方法,其中,在所述耳机正向插入所述终端时,所述第三指示信息用于指示将所述耳机的开关切换到所述第五管脚上;在所述耳机负向插入所述终端时,所述第三指示信息用于指示将所述耳机的开关切换到所述第六管脚上。The method according to claim 11, wherein said third indication information is used to instruct switching of a switch of said earphone to said fifth pin when said earphone is forwardly inserted into said terminal; When the earphone is negatively inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the sixth pin.
  14. 一种音频切换装置,包括:An audio switching device includes:
    判断模块,配置为判断开启的音频流程的类型;a judging module configured to determine the type of the audio process that is turned on;
    切换模块,配置为根据所述类型将终端的开关切换到终端的Type C接口中与所述类型对应的管脚上。The switching module is configured to switch the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type.
  15. 根据权利要求14所述的装置,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚; 所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚为左声道管脚。The device of claim 14, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin ; The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  16. 根据权利要求15所述的装置,其中,所述类型包括以下至少之一:播放流程、通话流程、录音流程。The apparatus of claim 15, wherein the type comprises at least one of: a play flow, a call flow, a recording flow.
  17. 根据权利要求16所述的装置,其中,所述切换模块用于以下之一:The apparatus of claim 16 wherein said switching module is for one of:
    在所述类型为播放流程时,将所述终端的开关切换到所述第一管脚和所述第二管脚上;Switching the switch of the terminal to the first pin and the second pin when the type is a play process;
    在所述类型为通话流程时,将所述终端的开关切换到所述第三管脚和所述第四管脚上;Switching the switch of the terminal to the third pin and the fourth pin when the type is a call flow;
    在所述类型为录音流程时,将所述终端的开关切换到第五管脚或第六管脚上;其中,所述Type C接口包括:所述第五管脚和所述第六管脚。Switching the switch of the terminal to the fifth pin or the sixth pin when the type is the recording process; wherein the Type C interface includes: the fifth pin and the sixth pin .
  18. 根据权利要求16所述的装置,其中,所述装置还包括:The apparatus of claim 16 wherein said apparatus further comprises:
    识别模块,配置为识别插入到所述终端的Type C设备的类型;An identification module configured to identify a type of Type C device inserted into the terminal;
    发送模块,配置为在识别到所述Type C设备为Type C耳机的情况下,向所述Type C耳机发送用于指示将所述Type C耳机的开关切换到所述Type C耳机中的Type C接口的第三管脚和第四管脚的第一指示信息,或向所述Type C耳机发送用于指示将所述Type C耳机的开关保持在所述Type C耳机中的Type C接口的第一管脚和第二管脚的第二指示信息。a sending module, configured to: when the Type C device is identified as a Type C headset, send a Type C to the Type C headset to instruct to switch the switch of the Type C headset to the Type C headset First indication information of the third pin and the fourth pin of the interface, or sending a Type C interface to the Type C earphone for indicating that the switch of the Type C earphone is held in the Type C earphone A second indication of a pin and a second pin.
  19. 根据权利要求18所述的装置,其中,所述识别模块还用于通过检测辅控模块中的CC1管脚和CC2管脚的状态判断所述Type C设备的类型;其中,在所述CC1管脚的状态为下拉阻抗RD状态和所述CC2管脚的状态为断开open状态,或者所述CC1管脚的状态为断开open状态和所述CC2管脚的状态为下拉阻抗RD状态的情况下,所述Type C设备的类型为所述Type C耳机。The device according to claim 18, wherein the identification module is further configured to determine a type of the Type C device by detecting a state of a CC1 pin and a CC2 pin in the auxiliary control module; wherein, in the CC1 tube The state of the pin is the pull-down impedance RD state and the state of the CC2 pin is the open state, or the state of the CC1 pin is the open state and the state of the CC2 pin is the pull-down impedance RD state. The type of the Type C device is the Type C headset.
  20. 根据权利要求19所述的装置,其中, The device according to claim 19, wherein
    所述识别模块,配置为在CC1管脚的状态为下拉阻抗RD状态和所述CC2管脚的状态为断开open状态的情况下,确定所述Type C耳机为正向插入到了所述终端中;The identification module is configured to determine that the Type C earphone is positively inserted into the terminal when the state of the CC1 pin is the pull-down impedance RD state and the state of the CC2 pin is the open open state. ;
    所述切换模块,配置为将所述终端的开关保持或者切换到第五管脚上;其中,所述Type C接口还包括所述第五管脚。The switching module is configured to hold or switch the switch of the terminal to the fifth pin; wherein the Type C interface further includes the fifth pin.
  21. 根据权利要求19所述的装置,其中,The device according to claim 19, wherein
    所述识别模块,配置为在所述CC1管脚的状态为断开open状态和所述CC2管脚的状态为下拉阻抗RD状态的情况下,确定所述Type C耳机为反向插入到了所述终端中;The identification module is configured to determine that the Type C earphone is inserted in the reverse direction when the state of the CC1 pin is a disconnected open state and the state of the CC2 pin is a pull-down impedance RD state. In the terminal;
    所述切换模块,配置为将所述终端的开关从第五管脚切换到第六管脚上;其中,所述Type C接口还包括所述第五管脚和所述第六管脚。The switching module is configured to switch the switch of the terminal from the fifth pin to the sixth pin; wherein the Type C interface further includes the fifth pin and the sixth pin.
  22. 一种音频切换装置,包括:An audio switching device includes:
    接收模块,配置为接收终端发送的切换信息;a receiving module, configured to receive switching information sent by the terminal;
    切换模块,配置为根据所述切换信息将耳机的开关切换到所述耳机的Type C接口中与所述切换信息对应的管脚上。And a switching module configured to switch the switch of the earphone to the pin corresponding to the switching information in the Type C interface of the earphone according to the switching information.
  23. 根据权利要求22所述的装置,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚定义为D+管脚;所述第二管脚定义为D-管脚;所述第三管脚定义为右声道管脚;所述第四管脚定义为左声道管脚。The device of claim 22, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is defined as a D+ tube The second pin is defined as a D-pin; the third pin is defined as a right channel pin; and the fourth pin is defined as a left channel pin.
  24. 根据权利要求23所述的装置,其中,所述切换信息包括以下之一:The apparatus of claim 23, wherein the switching information comprises one of the following:
    用于指示将所述耳机的开关切换到所述第一管脚和所述第二管脚上的第一指示信息;a first indication information for indicating that a switch of the earphone is switched to the first pin and the second pin;
    用于指示将所述耳机的开关切换到所述第三管脚和所述第四管脚上的第二指示信息;a second indication information for indicating switching of the switch of the earphone to the third pin and the fourth pin;
    用于指示将所述耳机的开关切换到第五管脚或第六管脚上的第三指示 信息;其中,所述Type C接口还包括:所述第五管脚和所述第六管脚。a third indication for indicating switching of the switch of the earphone to the fifth pin or the sixth pin Information; wherein the Type C interface further includes: the fifth pin and the sixth pin.
  25. 根据权利要求24所述的装置,其中,在所述终端开启的音频流程为播放流程时,所述切换信息为所述第一指示信息;在所述终端开启的音频流程为通话流程时,所述切换信息为所述第二指示信息;在所述终端开启的音频流程为录音流程时,所述切换信息为所述第三指示信息。The device according to claim 24, wherein, when the audio flow opened by the terminal is a playback process, the switching information is the first indication information; when the audio flow opened by the terminal is a call flow, The switching information is the second indication information; when the audio flow opened by the terminal is a recording process, the switching information is the third indication information.
  26. 根据权利要求24所述的装置,其中,在所述耳机正向插入所述终端时,所述第三指示信息用于指示将所述耳机的开关切换到所述第五管脚上;在所述耳机负向插入所述终端时,所述第三指示信息用于指示将所述耳机的开关切换到所述第六管脚上。The apparatus according to claim 24, wherein said third indication information is used to instruct switching of a switch of said earphone to said fifth pin when said earphone is forwardly inserted into said terminal; When the earphone is negatively inserted into the terminal, the third indication information is used to indicate that the switch of the earphone is switched to the sixth pin.
  27. 一种终端,包括:Type C接口,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚;所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚定为左声道管脚。A terminal includes: a Type C interface, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  28. 根据权利要求27所述的终端,其中,所述第三管脚与耳机的右声道管脚对接,所述第四管脚与耳机的左声道管脚对接。The terminal of claim 27, wherein the third pin interfaces with a right channel pin of the earphone, and the fourth pin interfaces with a left channel pin of the earphone.
  29. 根据权利要求28所述的终端,其中,所述耳机的右声道管脚为耳机的Type C接口的第三管脚,所述耳机的左声道管脚为所述耳机的Type C接口的第四管脚。The terminal according to claim 28, wherein the right channel pin of the earphone is a third pin of a Type C interface of the earphone, and the left channel pin of the earphone is a Type C interface of the earphone Fourth pin.
  30. 一种耳机,包括:Type C接口,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚;所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚为左声道管脚。An earphone includes: a Type C interface, the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin; The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  31. 根据权利要求30所述的耳机,其中,所述第三管脚与终端的右声道管脚对接,所述第四管脚与所述终端的左声道管脚对接。The earphone of claim 30, wherein the third pin is docked with a right channel pin of the terminal, and the fourth pin is docked with a left channel pin of the terminal.
  32. 根据权利要求31所述的耳机,其中,所述终端的右声道管脚为所 述终端的Type C接口的第三管脚,所述终端的左声道管脚为所述终端的Type C接口的第四管脚。The earphone of claim 31, wherein the right channel pin of the terminal is The third pin of the Type C interface of the terminal, and the left channel pin of the terminal is the fourth pin of the Type C interface of the terminal.
  33. 一种音频切换方法,包括:An audio switching method includes:
    判断开启的音频流程的类型;Determine the type of audio process that is turned on;
    确定耳机插入终端的插入方向;Determining the insertion direction of the earphone insertion terminal;
    根据所述音频流程的类型和所述插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。Switching the terminal to a corresponding pin in the Type C interface of the terminal according to the type of the audio flow and the insertion direction.
  34. 根据权利要求33所述的方法,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚;所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚为左声道管脚。The method of claim 33, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  35. 根据权利要求34所述的方法,其中,所述音频流程的类型包括以下至少之一:播放流程、通话流程、录音流程;所述插入方向包括以下之一:正向插入和反向插入。The method of claim 34, wherein the type of the audio stream comprises at least one of: a play flow, a call flow, a recording flow; the insertion direction comprises one of: forward insertion and reverse insertion.
  36. 根据权利要求35所述的方法,其中,根据所述音频流程的类型和所述插入方向将终端的开关切换到终端的Type C接口中对应的管脚上包括:The method of claim 35, wherein switching the switch of the terminal to the corresponding pin of the Type C interface of the terminal according to the type of the audio flow and the insertion direction comprises:
    在所述音频流程为所述播放流程且所述插入方向为正向插入时,将所述开关切换到所述第一管脚和第二管脚;Switching the switch to the first pin and the second pin when the audio flow is the play flow and the insertion direction is forward insertion;
    在所述音频流程为所述播放流程且所述插入方向为反向插入时,将所述开关切换到所述第三管脚和第四管脚;Switching the switch to the third pin and the fourth pin when the audio flow is the play flow and the insertion direction is reverse insertion;
    在所述音频流程为所述通话流程且所述插入方向为正向插入时,将所述开关切换到所述第三管脚和第四管脚;Switching the switch to the third pin and the fourth pin when the audio flow is the call flow and the insertion direction is forward insertion;
    在所述音频流程为所述通话流程且所述插入方向为反向插入时,将所述开关切换到所述第一管脚和第二管脚; Switching the switch to the first pin and the second pin when the audio flow is the call flow and the insertion direction is reverse insertion;
    在所述音频流程为所述录音流程且所述插入方向为正向插入时,将所述开关切换到第五管脚;When the audio flow is the recording process and the insertion direction is forward insertion, the switch is switched to the fifth pin;
    在所述音频流程为所述录音流程且所述插入方向为反向插入时,将所述开关切换到第六管脚;其中,所述Type C接口包括:所述第五管脚和所述第六管脚。Switching the switch to a sixth pin when the audio stream is the recording process and the insertion direction is reverse insertion; wherein the Type C interface comprises: the fifth pin and the The sixth pin.
  37. 一种音频切换装置,包括:An audio switching device includes:
    判断模块,配置为判断开启的音频流程的类型;a judging module configured to determine the type of the audio process that is turned on;
    确定模块,配置为确定耳机插入终端的插入方向;Determining a module configured to determine an insertion direction of the earphone insertion terminal;
    切换模块,配置为根据所述音频流程的类型和所述插入方向将终端的开关切换到终端的Type C接口中对应的管脚上。And a switching module configured to switch the switch of the terminal to a corresponding pin in the Type C interface of the terminal according to the type of the audio flow and the insertion direction.
  38. 根据权利要求37所述的装置,其中,所述Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,所述第一管脚为D+管脚;所述第二管脚为D-管脚;所述第三管脚为右声道管脚;所述第四管脚为左声道管脚。The device of claim 37, wherein the Type C interface comprises: a first pin, a second pin, a third pin, and a fourth pin; wherein the first pin is a D+ pin The second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
  39. 根据权利要求38所述的装置,其中,所述音频流程的类型包括以下至少之一:播放流程、通话流程、录音流程;所述插入方向包括以下之一:正向插入和反向插入。The apparatus of claim 38, wherein the type of the audio stream comprises at least one of: a play flow, a call flow, a recording flow; the insertion direction comprises one of: forward insertion and reverse insertion.
  40. 根据权利要求39所述的装置,其中,所述切换模块还用于以下至少之一:The apparatus of claim 39, wherein the switching module is further for at least one of:
    在所述音频流程为所述播放流程且所述插入方向为正向插入时,将所述开关切换到所述第一管脚和第二管脚;Switching the switch to the first pin and the second pin when the audio flow is the play flow and the insertion direction is forward insertion;
    在所述音频流程为所述播放流程且所述插入方向为反向插入时,将所述开关切换到所述第三管脚和第四管脚;Switching the switch to the third pin and the fourth pin when the audio flow is the play flow and the insertion direction is reverse insertion;
    在所述音频流程为所述通话流程且所述插入方向为正向插入时,将所述开关切换到所述第三管脚和第四管脚; Switching the switch to the third pin and the fourth pin when the audio flow is the call flow and the insertion direction is forward insertion;
    在所述音频流程为所述通话流程且所述插入方向为反向插入时,将所述开关切换到所述第一管脚和第二管脚;Switching the switch to the first pin and the second pin when the audio flow is the call flow and the insertion direction is reverse insertion;
    在所述音频流程为所述录音流程且所述插入方向为正向插入时,将所述开关切换到第五管脚;When the audio flow is the recording process and the insertion direction is forward insertion, the switch is switched to the fifth pin;
    在所述音频流程为所述录音流程且所述插入方向为反向插入时,将所述开关切换到第六管脚;其中,所述Type C接口包括:所述第五管脚和所述第六管脚。Switching the switch to a sixth pin when the audio stream is the recording process and the insertion direction is reverse insertion; wherein the Type C interface comprises: the fifth pin and the The sixth pin.
  41. 一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:A storage medium. The storage medium is arranged to store program code for performing the following steps:
    判断开启的音频流程的类型;其中,类型包括:播放流程、通话流程、录音流程;Determining the type of the audio process that is turned on; wherein the types include: a play process, a call flow, and a recording process;
    根据类型将终端的开关切换到终端的Type C接口中与类型对应的管脚上;其中,Type C接口包括:第一管脚、第二管脚、第三管脚和第四管脚;其中,第一管脚为D+管脚;第二管脚为D-管脚;第三管脚为右声道管脚;第四管脚为左声道管脚。 Switching the switch of the terminal to the pin corresponding to the type in the Type C interface of the terminal according to the type; wherein the Type C interface includes: a first pin, a second pin, a third pin, and a fourth pin; The first pin is a D+ pin; the second pin is a D-pin; the third pin is a right channel pin; and the fourth pin is a left channel pin.
PCT/CN2016/106151 2016-07-20 2016-11-16 Audio switching method, device, terminal, earpiece and storage medium WO2018014474A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201610575995 2016-07-20
CN201610575995.3 2016-07-20
CN201610826661.9A CN107645690A (en) 2016-07-20 2016-09-14 Audio switching method and device, Type C interface processing method and processing devices
CN201610826661.9 2016-09-14

Publications (1)

Publication Number Publication Date
WO2018014474A1 true WO2018014474A1 (en) 2018-01-25

Family

ID=60991674

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/106151 WO2018014474A1 (en) 2016-07-20 2016-11-16 Audio switching method, device, terminal, earpiece and storage medium

Country Status (1)

Country Link
WO (1) WO2018014474A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109769174A (en) * 2019-03-27 2019-05-17 上海爻火微电子有限公司 Decision circuitry, method and the electronic equipment of earphone MIC positive and negative terminal

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120404A (en) * 2015-07-31 2015-12-02 华为技术有限公司 Audio equipment, terminal equipment and electronic equipment
CN205071173U (en) * 2015-09-21 2016-03-02 深圳市昂纬科技开发有限公司 Signal conversion system based on USBType -C interface
CN105677602A (en) * 2015-12-30 2016-06-15 努比亚技术有限公司 Terminal port reusing device and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105120404A (en) * 2015-07-31 2015-12-02 华为技术有限公司 Audio equipment, terminal equipment and electronic equipment
CN205071173U (en) * 2015-09-21 2016-03-02 深圳市昂纬科技开发有限公司 Signal conversion system based on USBType -C interface
CN105677602A (en) * 2015-12-30 2016-06-15 努比亚技术有限公司 Terminal port reusing device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109769174A (en) * 2019-03-27 2019-05-17 上海爻火微电子有限公司 Decision circuitry, method and the electronic equipment of earphone MIC positive and negative terminal
CN109769174B (en) * 2019-03-27 2024-04-12 上海爻火微电子有限公司 Judging circuit and method for positive and negative terminals of MIC (microphone) of earphone and electronic equipment

Similar Documents

Publication Publication Date Title
US11438962B2 (en) Method and apparatus for establishing single-line connection, and wireless headset and charging box
EP3629561B1 (en) Data transmission method and system, and bluetooth headphone
WO2021082875A1 (en) Method and apparatus for switching master and slave bluetooth headsets, bluetooth headset, and system
CN112789866B (en) Audio data transmission method and equipment applied to TWS earphone single-ear and double-ear switching
EP3790291A1 (en) Wireless earphones communication method, master earphone, slave earphone, and earphones system
CN101631156B (en) Method and system for controlling orderly connection of Bluetooth headset by using terminal
CN109743654A (en) A kind of bluetooth headset major-minor ear switching method, device, equipment and medium
US8363844B2 (en) Contextual audio switching for a USB controlled audio device
US10950238B2 (en) Bluetooth speaker base, method and system for controlling thereof
RU2666621C1 (en) Communication processor, method of volte implementation, mobile terminal, data card
WO2018082335A1 (en) Method, apparatus, system, and device for connecting bluetooth device
CN112055349B (en) Wireless communication method and Bluetooth device
US20060294262A1 (en) Portable VOIP wireless connector
WO2012003720A1 (en) Device and method for connecting earphones for mobile phone
WO2020063065A1 (en) Audio transmission method and apparatus, electronic device, and storage medium
CN110191389A (en) Mulit-point Connection method, apparatus, bluetooth headset and the TWS earphone of wireless headset
CN107645690A (en) Audio switching method and device, Type C interface processing method and processing devices
CN104767868A (en) Conversation control method and terminal
WO2023061127A1 (en) Communication method and apparatus, earphone set, and computer readable medium
WO2018090680A1 (en) Method and apparatus for controlling usb type c headset, and terminal
CN105679350A (en) Audio playing method and device
CN113038317A (en) Earphone control method and device, Bluetooth earphone and storage medium
WO2021233398A1 (en) Wireless audio system, wireless communication method, and device
WO2018014474A1 (en) Audio switching method, device, terminal, earpiece and storage medium
WO2024119947A1 (en) Bluetooth communication method and apparatus, electronic device, and computer-readable medium

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: 16909401

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: 16909401

Country of ref document: EP

Kind code of ref document: A1