CN107145331B - Charging and audio data processing method and terminal - Google Patents

Charging and audio data processing method and terminal Download PDF

Info

Publication number
CN107145331B
CN107145331B CN201710405362.2A CN201710405362A CN107145331B CN 107145331 B CN107145331 B CN 107145331B CN 201710405362 A CN201710405362 A CN 201710405362A CN 107145331 B CN107145331 B CN 107145331B
Authority
CN
China
Prior art keywords
pin
charging
double
pluggable interface
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710405362.2A
Other languages
Chinese (zh)
Other versions
CN107145331A (en
Inventor
贾广琪
刘彦彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201710405362.2A priority Critical patent/CN107145331B/en
Publication of CN107145331A publication Critical patent/CN107145331A/en
Application granted granted Critical
Publication of CN107145331B publication Critical patent/CN107145331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/162Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/00032Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries characterised by data exchange
    • H02J7/00045Authentication, i.e. circuits for checking compatibility between one component, e.g. a battery or a battery charger, and another component, e.g. a power source

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Power Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Telephone Function (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention provides a charging and audio data processing method and a terminal, wherein the charging and audio data processing method comprises the following steps: detecting whether audio external equipment and charging equipment are simultaneously plugged on switching equipment connected with the double-sided pluggable interface or not through a first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface. This scheme can support to carry out the earphone simultaneously and listen to the song and the function of charging, supports Type-C interface and cancels the mobile terminal of 3.5mm earphone interface among the solution prior art, can not charge simultaneously and the earphone listens to the problem of song.

Description

Charging and audio data processing method and terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and a terminal for charging and processing audio data.
Background
The function of audio analog signal transmission has been defined to two-sided pluggable Type-C interface, transmits audio signal through Type-C interface, can cancel 3.5mm earphone interface above the cell-phone like this. The multiplexing of this kind of interface can guarantee the wholeness of structure and reduce the probability of failure to a certain extent, consequently, the Type-C interface replaces 3.5mm earphone interface and becomes a trend.
However, since another main function of the Type-C interface is charging, when the user performs charging, it is impossible to listen to a song through the earphone through the Type-C interface. Therefore, support Type-C interface and cancel the terminal of 3.5mm earphone interface, can not charge simultaneously and the earphone listens to the song.
Disclosure of Invention
The invention aims to provide a charging and audio data processing method and a terminal, and solves the problem that in the prior art, a mobile terminal which supports a Type-C interface and cancels a 3.5mm earphone interface cannot simultaneously perform charging and an earphone can listen to songs.
In order to solve the above technical problem, an embodiment of the present invention provides a method for charging and processing audio data, which is applied to a terminal, and includes:
detecting whether audio playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface through a first pin of the double-sided pluggable interface on the terminal;
if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface;
when the authentication result indicates that the terminal passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface;
the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
An embodiment of the present invention further provides a terminal, including:
the first detection module is used for detecting whether audio external playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface or not through a first pin of the double-sided pluggable interface on the terminal;
the first processing module is used for transmitting audio data to be output to the audio external device through the second pin of the double-sided pluggable interface and authenticating the identity of the charging device through the third pin of the double-sided pluggable interface if the charging device is in the charging state;
the first charging module is used for charging a battery of the terminal through the charging equipment through a fourth pin of the double-sided pluggable interface when the authentication result indicates that the battery passes;
the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
An embodiment of the present invention further provides a terminal, which is characterized by including: the charging and audio data processing method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the charging and audio data processing method.
The embodiment of the present invention further provides a computer program, which is characterized in that when a processor executes the computer program, the method for charging and processing audio data is implemented.
The embodiment of the present invention further provides a computer-readable storage medium, which is characterized by comprising instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the charging and audio data processing method.
The technical scheme of the invention has the following beneficial effects:
in the scheme, the method for charging and processing the audio data detects whether the audio playing device and the charging device are simultaneously plugged on the switching device connected with the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; can support to carry out earphone listening song and the function of charging simultaneously, fine solution support Type-C interface and cancel the mobile terminal of 3.5mm earphone interface among the prior art, can not charge simultaneously and the earphone listens the problem of song.
Drawings
FIG. 1 is a flowchart illustrating a method for charging and audio data processing according to an embodiment of the present invention;
FIG. 2 is a schematic circuit diagram illustrating a charging and audio data processing method according to an embodiment of the present invention;
fig. 3 is a first schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a terminal structure according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
The invention provides a charging and audio data processing method, which aims at the problem that a mobile terminal supporting a Type-C interface and canceling a 3.5mm earphone interface in the prior art cannot simultaneously charge and listen to songs by an earphone, and can be applied to a terminal, as shown in fig. 1, the charging and audio data processing method comprises the following steps:
step 11: and detecting whether audio playing equipment and charging equipment are simultaneously inserted on the switching equipment connected with the double-sided pluggable interface or not through the first pin of the double-sided pluggable interface on the terminal.
The detection can be performed by inserting the detection pin CC1/2, which is not limited herein. The audio playing device can be a headset or a sound box and the like.
Step 12: if so, transmitting the audio data to be output to the audio external playing device through the second pin of the double-sided pluggable interface, and authenticating the identity of the charging device through the third pin of the double-sided pluggable interface.
Namely, the identity authentication of the audio playing and charging operations is performed simultaneously.
Step 13: and when the authentication result indicates that the terminal passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface.
The first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
The method for charging and processing audio data provided by this embodiment detects whether an audio playing device and a charging device are simultaneously plugged into a switching device connected to a double-sided pluggable interface through a first pin of the double-sided pluggable interface on a terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; can support to carry out earphone listening song and the function of charging simultaneously, fine solution support Type-C interface and cancel the mobile terminal of 3.5mm earphone interface among the prior art, can not charge simultaneously and the earphone listens the problem of song.
Specifically, the step of transmitting the audio data to be output to the audio playing device through the second pin of the dual-sided pluggable interface includes: transmitting audio data to be output to the audio external equipment in a form of digital signals through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
The digital signal may be an integrated circuit built-in audio bus I2S signal.
More specifically, the step of supplying power to the audio playback device through the fourth pin of the dual-sided pluggable interface includes: before the charging equipment is connected with the terminal through the switching equipment, in the process of transmitting audio data to the audio play-out equipment, the battery of the terminal is utilized to supply power to the audio play-out equipment through the fourth pin of the double-sided pluggable interface; when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal, the charging equipment is utilized to supply power to the audio frequency external playing equipment through the fourth pin of the double-sided pluggable interface.
Further, after the step of powering the audio play-out device by using the battery of the terminal, the method further includes: detecting whether the charging equipment is connected with the terminal through the switching equipment or not; when the charging equipment is detected to be connected with the terminal through the switching equipment and can supply power to a battery of the terminal, the transmission of audio data is suspended; and after the charging equipment is utilized to supply power to the audio play-out equipment, the transmission of audio data is recovered.
Further, the method further comprises the following steps: when the power supply source of the audio external equipment is switched, the transmission of audio data is suspended; and after the switching is successful, resuming the transmission of the audio data.
Specifically, through the second pin of the double-sided pluggable interface, the audio data to be output is transmitted to the audio external device, and through the third pin of the double-sided pluggable interface, the step of authenticating the charging device includes: performing identity authentication on the charging equipment through a third pin of the double-sided pluggable interface; and after the authentication result is obtained, transmitting the audio data to be output to the audio playing device through the second pin of the double-sided pluggable interface.
Preferably, the second pin is a pin other than the charging communication pin, the insertion detection pin and the microphone pin on the double-sided pluggable interface.
The charging and audio data processing method provided by the embodiment of the invention is further described below.
In view of the above technical problems, an embodiment of the present invention provides a scheme for simultaneously performing large-current charging and playing music through a type-C interface, and simultaneously supports an earphone mic, so that the function of making a call with an earphone can be completed during charging. This scheme is preferred to use Type-C interface transmission digital audio signal, decodes in the audio frequency peripheral hardware, and the contrast Type-C interface transmission analog signal can effectively reduce interference such as charging. This scheme uses standard Type-C interface.
The implementation of the scheme of the embodiment of the invention can adopt the circuit shown in fig. 2, wherein, when only charging or only plugging in an audio peripheral (audio external device) to play music, the circuit is directly connected with the mobile phone; when charging is needed and the audio peripheral is used, an adapter is needed; mclk (Master Clock, system Master Clock unit) selects whether to be generated by the system output or additionally by adding a crystal oscillator in the audio peripheral according to the requirements of the digital-to-analog converter DAC.
Switch: the function of multiplexing I2S/MCLK by TX/RX (transmitting/receiving) signals is completed at the mobile phone end;
controller: controlling and switching the connection mode of the TX/RX signals according to a working scene;
a high speed physical serial bus USB-PHY; the TX/RX carries out USB data transmission; detecting the insertion of the pin CC; d +/D-completes the charge handshake function.
Audio codec: processing the mic input signal;
converter Adapter: when charging is needed, the audio peripheral is used at the same time, and a converter is needed; a double-sided pluggable plug Type-C plug is plugged into the terminal, and charging and audio signals are respectively switched to two sockets.
The scheme provided by the embodiment can be embodied as follows:
A. by default, the controller controls the switch to switch the TX/RX connection to the USB data transmission.
B. When the CC1/2 signal detects that the audio peripheral is plugged, the following operations are performed:
a) the controller controls the switch to I2S/Mclk;
b) when a user plays music, audio data are transmitted by an I2S signal, and MCLK is output to a DAC (digital-to-analog converter) in the audio peripheral equipment according to the DAC requirement; the mobile phone starts the OTG mode of the host to carry out DAC (digital-to-analog converter) on audio peripherals (earphones and sound boxes), and the amplifier AMP provides power; and then decoding and amplifying the audio signal, transmitting the audio signal to the earphone equipment, and playing music.
c) When the state change of the CC1/2 is detected (for example, the change of the resistance, the terminal can sense a pull-up resistance, a pull-down resistance, parallel connection and the like, which can be understood as monitoring the socket connection condition of the adapter), whether a charger is inserted is judged through the voltage state of the CC1/2, then D +/D-charging handshake is carried out, OTG is closed when the handshake succeeds, the charging Vbus supplies power to the audio peripheral, charging is started simultaneously, and music continues to be played when the handshake fails.
C. When the CC1/2 is detected to be inserted into the charging equipment, charging handshake is carried out through D +/D- (the Type-C interface is directly connected without switch control), and charging voltage and current are configured for charging after the handshake is successful; the voltage of CC1/2 is monitored, when a threshold (resistance parameter value) triggering the simultaneous insertion state of the earphone and the charger is detected, the controller controls the switch to be switched to I2S/MCLK, and when the user plays music, the audio signal is transmitted to the audio peripheral through I2S, and the power supply of the audio peripheral is provided by Vbus of the charger.
D. When the CC1/2 detects that the charger and the audio peripheral are simultaneously inserted (one is changed into two through the adapter), the charging handshake is carried out through D +/D-; the audio signal is output via TX/RX to the audio peripheral, whose power is supplied by Vbus of the charger.
Description of the drawings: when the charger is pulled out when music is played, the music playing is suspended when the charger is detected to be pulled out, and the OTG is turned on to supply power to the audio peripheral when the user restarts playing the music.
The audio peripheral may be a speaker or the like, and is not limited herein.
Therefore, the scheme provided by the embodiment of the invention can realize the high-quality earphone playing effect and improve the user experience; supporting positive and negative insertion; 3.5mm earphone interfaces are replaced; meanwhile, the user can choose peripheral equipment according to the required tone quality level, so that the freedom degree of the user selection is improved; the music playing and charging functions are supported to be simultaneously performed; the earphone mic is supported, and charging and calling can be carried out simultaneously.
In order to solve the above technical problem, an embodiment of the present invention further provides a terminal, as shown in fig. 3, including:
the first detection module 31 is configured to detect whether an audio playing device and a charging device are simultaneously plugged in a switching device connected to a double-sided pluggable interface through a first pin of the double-sided pluggable interface on the terminal;
the first processing module 32 is configured to transmit audio data to be output to the audio playback device through the second pin of the dual-sided pluggable interface if the charging device is a charging device, and perform identity authentication on the charging device through the third pin of the dual-sided pluggable interface;
the first charging module 33 is configured to charge the battery of the terminal through the charging device through the fourth pin of the dual-sided pluggable interface when the authentication result indicates that the battery passes;
the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
The terminal provided by this embodiment detects whether audio playing equipment and charging equipment are simultaneously plugged in the switching equipment connected with the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; can support to carry out earphone listening song and the function of charging simultaneously, fine solution support Type-C interface and cancel the mobile terminal of 3.5mm earphone interface among the prior art, can not charge simultaneously and the earphone listens the problem of song.
Specifically, the first processing module includes: the first processing submodule is used for transmitting audio data to be output to the audio playing device in a digital signal mode through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
The digital signal may be an integrated circuit built-in audio bus I2S signal.
More specifically, the first charging module includes: and the first charging submodule is used for supplying power to the audio play-out equipment through the charging equipment through the fourth pin of the double-sided pluggable interface when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal.
Specifically, the first processing module includes: the first authentication sub-module is used for authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; and the first transmission submodule is used for transmitting the audio data to be output to the audio external equipment through the second pin of the double-sided pluggable interface after the authentication result is obtained.
Preferably, the second pin is a pin other than the charging communication pin, the insertion detection pin and the microphone pin on the double-sided pluggable interface.
The implementation embodiments of the charging and audio data processing method are all applicable to the embodiment of the terminal, and the same technical effects can be achieved.
An embodiment of the present invention further provides a terminal, as shown in fig. 4, where the terminal 400 includes:
at least one processor 401, memory 402, at least one network interface 404, and a user interface 403. The various components in the terminal 400 are coupled together by a bus system 405. It is understood that the bus system 405 is used to enable connection communication between these components. The bus system 405 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 405 in fig. 4.
The user interface 403 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It will be appreciated that memory 402 in embodiments of the invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double Data rate Synchronous Dynamic random access memory (ddr SDRAM ), Enhanced Synchronous SDRAM (ESDRAM), Synchlink DRAM (SLDRAM), and direct memory bus RAM (DRRAM). The memory 402 of the systems and methods described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 402 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 4021 and application programs 4022.
The operating system 4021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is configured to implement various basic services and process hardware-based tasks. The application programs 4022 include various application programs, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 4022.
In this embodiment of the present invention, by calling a program or an instruction stored in the memory 402, specifically, a program or an instruction stored in the application 4022, the processor 401 is configured to: detecting whether audio playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface through a first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the terminal passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
The method disclosed in the above embodiments of the present invention may be applied to the processor 401, or implemented by the processor 401. The processor 401 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 401. The Processor 401 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 402, and the processor 401 reads the information in the memory 402 and completes the steps of the method in combination with the hardware.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the Processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Optionally, the processor 401 is specifically configured to: transmitting audio data to be output to the audio external equipment in a form of digital signals through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
Optionally, the processor 401 is more specifically configured to: when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal, the charging equipment is utilized to supply power to the audio frequency external playing equipment through the fourth pin of the double-sided pluggable interface.
Optionally, the processor 401 is specifically configured to: performing identity authentication on the charging equipment through a third pin of the double-sided pluggable interface; and after the authentication result is obtained, transmitting the audio data to be output to the audio playing device through the second pin of the double-sided pluggable interface.
Optionally, the second pin is another pin on the double-sided pluggable interface except for the charging communication pin, the insertion detection pin and the microphone pin.
The terminal 400 can implement the processes implemented by the terminal in the foregoing embodiments, and in order to avoid repetition, the detailed description is omitted here.
To sum up, the terminal provided in the embodiment of the present invention detects whether an audio playing device and a charging device are simultaneously plugged into a switching device connected to a dual-sided pluggable interface through a first pin of the dual-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; can support to carry out earphone listening song and the function of charging simultaneously, fine solution support Type-C interface and cancel the mobile terminal of 3.5mm earphone interface among the prior art, can not charge simultaneously and the earphone listens the problem of song.
Specifically, as shown in fig. 5, the terminal 500 in the embodiment of the present invention may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The terminal 500 in fig. 5 includes a Radio Frequency (RF) circuit 510, a memory 520, an input unit 530, a display unit 540, a processor 560, an audio circuit 570, a wifi (wireless fidelity) module 580, and a power supply 590.
The input unit 530 may be used to receive numeric or character information input by a user and generate signal inputs related to user settings and function control of the terminal 500, among other things. Specifically, in the embodiment of the present invention, the input unit 530 may include a touch panel 531. The touch panel 531, also called a touch screen, can collect touch operations of a user (for example, operations of the user on the touch panel 531 by using a finger, a stylus pen, or any other suitable object or accessory) thereon or nearby, and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 531 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, sends it to the processor 560, and can receive and execute commands from the processor 560. In addition, the touch panel 531 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 531, the input unit 530 may further include other input devices 532, and the other input devices 532 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 540 may be used to display information input by the user or information provided to the user and various menu interfaces of the terminal 500. The display unit 540 may include a display panel 541, and optionally, the display panel 541 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED), or the like.
It should be noted that the touch panel 531 may cover the display panel 541 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 560 to determine the type of the touch event, and then the processor 560 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 560 is a control center of the terminal 500, connects various parts of the entire cellular phone using various interfaces and lines, and performs various functions of the terminal 500 and processes data by operating or executing software programs and/or modules stored in the first memory 521 and calling data stored in the second memory 522, thereby integrally monitoring the terminal 500. Optionally, processor 560 may include one or more processing units.
In an embodiment of the present invention, the processor 560 is configured to, by calling a software program and/or module stored in the first memory 521 and/or data stored in the second memory 522: detecting whether audio playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface through a first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the terminal passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
Optionally, the processor 560 is specifically configured to: transmitting audio data to be output to the audio external equipment in a form of digital signals through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
Optionally, the processor 560 is more specifically configured to: when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal, the charging equipment is utilized to supply power to the audio frequency external playing equipment through the fourth pin of the double-sided pluggable interface.
Optionally, the processor 560 is specifically configured to: performing identity authentication on the charging equipment through a third pin of the double-sided pluggable interface; and after the authentication result is obtained, transmitting the audio data to be output to the audio playing device through the second pin of the double-sided pluggable interface.
Optionally, the second pin is another pin on the double-sided pluggable interface except for the charging communication pin, the insertion detection pin and the microphone pin.
Therefore, the terminal provided by the embodiment of the invention detects whether the audio playing device and the charging device are simultaneously plugged on the switching device connected with the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal; if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface; when the authentication result indicates that the authentication result passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface; can support to carry out earphone listening song and the function of charging simultaneously, fine solution support Type-C interface and cancel the mobile terminal of 3.5mm earphone interface among the prior art, can not charge simultaneously and the earphone listens the problem of song.
An embodiment of the present invention further provides a terminal, which is characterized by including: the charging and audio data processing method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the steps of the charging and audio data processing method.
The embodiment of the present invention further provides a computer program, which is characterized in that when a processor executes the computer program, the method for charging and processing audio data is implemented.
The embodiment of the present invention further provides a computer-readable storage medium, which is characterized by comprising instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the charging and audio data processing method.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
It is further noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (9)

1. A charging and audio data processing method is applied to a terminal and is characterized by comprising the following steps:
detecting whether audio playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface through a first pin of the double-sided pluggable interface on the terminal;
if so, transmitting the audio data to be output to the audio external playing equipment through a second pin of the double-sided pluggable interface, and authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface;
when the authentication result indicates that the terminal passes, charging the battery of the terminal by using the charging equipment through the fourth pin of the double-sided pluggable interface;
the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface;
when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal, the charging equipment is utilized to supply power to the audio frequency external playing equipment through the fourth pin of the double-sided pluggable interface.
2. The method of claim 1, wherein the step of transmitting the audio data to be output to the audio playback device through the second pin of the dual-sided socketable interface comprises:
transmitting audio data to be output to the audio external equipment in a form of digital signals through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
3. The method of claim 1, wherein the step of transmitting the audio data to be output to the audio peripheral device through the second pin of the dual-side pluggable interface, and the step of authenticating the charging device through the third pin of the dual-side pluggable interface comprises:
performing identity authentication on the charging equipment through a third pin of the double-sided pluggable interface;
and after the authentication result is obtained, transmitting the audio data to be output to the audio playing device through the second pin of the double-sided pluggable interface.
4. The method of claim 1, wherein the second pin is a pin on the dual-sided pluggable interface other than a charging communication pin, an insertion detection pin, and a microphone pin.
5. A terminal, comprising:
the first detection module is used for detecting whether audio external playing equipment and charging equipment are simultaneously plugged on the switching equipment connected with the double-sided pluggable interface or not through a first pin of the double-sided pluggable interface on the terminal;
the first processing module is used for transmitting audio data to be output to the audio external device through the second pin of the double-sided pluggable interface and authenticating the identity of the charging device through the third pin of the double-sided pluggable interface if the charging device is in the charging state;
the first charging module is used for charging a battery of the terminal through the charging equipment through a fourth pin of the double-sided pluggable interface when the authentication result indicates that the battery passes;
the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface;
the first charging module includes:
and the first charging submodule is used for supplying power to the audio play-out equipment through the charging equipment through the fourth pin of the double-sided pluggable interface when the charging equipment is connected with the terminal through the switching equipment and can supply power to the battery of the terminal.
6. The terminal of claim 5, wherein the first processing module comprises:
the first processing submodule is used for transmitting audio data to be output to the audio playing device in a digital signal mode through a second pin of the double-sided pluggable interface; and the fourth pin of the double-sided pluggable interface is used for supplying power to the audio frequency external equipment.
7. The terminal of claim 5, wherein the first processing module comprises:
the first authentication sub-module is used for authenticating the identity of the charging equipment through a third pin of the double-sided pluggable interface;
and the first transmission submodule is used for transmitting the audio data to be output to the audio external equipment through the second pin of the double-sided pluggable interface after the authentication result is obtained.
8. A terminal as claimed in claim 5, wherein the second pin is a pin on the dual-sided pluggable interface other than the charging communication pin, the insertion detection pin and the microphone pin.
9. A terminal, comprising: memory, processor and computer program stored on the memory and executable on the processor, which when executed by the processor implements the steps in the method of charging and audio data processing according to any of claims 1 to 4.
CN201710405362.2A 2017-05-31 2017-05-31 Charging and audio data processing method and terminal Active CN107145331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710405362.2A CN107145331B (en) 2017-05-31 2017-05-31 Charging and audio data processing method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710405362.2A CN107145331B (en) 2017-05-31 2017-05-31 Charging and audio data processing method and terminal

Publications (2)

Publication Number Publication Date
CN107145331A CN107145331A (en) 2017-09-08
CN107145331B true CN107145331B (en) 2020-04-17

Family

ID=59779471

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710405362.2A Active CN107145331B (en) 2017-05-31 2017-05-31 Charging and audio data processing method and terminal

Country Status (1)

Country Link
CN (1) CN107145331B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108054541B (en) 2017-12-05 2020-09-29 捷开通讯(深圳)有限公司 Switching device, multi-equipment detection system and detection method thereof
CN109038720A (en) * 2018-07-27 2018-12-18 维沃移动通信有限公司 A kind of charging unit, terminal device and charging method
CN111987752A (en) * 2019-05-21 2020-11-24 北京小米移动软件有限公司 Switching equipment
CN113949962A (en) * 2021-11-30 2022-01-18 深圳市科奈信科技有限公司 Earphone box, earphone set and earphone in-box detection and charging method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201188444Y (en) * 2008-04-24 2009-01-28 中兴通讯股份有限公司 Data line capable of implementing electrification and earphone function
CN103972955A (en) * 2014-03-24 2014-08-06 西安乾易企业管理咨询有限公司 USB (universal serial bus) interface charge handshaking method and quickly-chargeable power adapter
CN106207687A (en) * 2016-08-30 2016-12-07 硅谷数模半导体(北京)有限公司 The conversion method of data-interface and device
CN106610912A (en) * 2016-12-23 2017-05-03 努比亚技术有限公司 Signal generation method and equipment
CN206147616U (en) * 2016-09-19 2017-05-03 深圳市科秀科技有限公司 Novel USB audio frequency and two transmission circuits that charge

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102393364B1 (en) * 2015-10-29 2022-05-03 삼성전자주식회사 Method for controlling audio signal and electronic device supporting the same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201188444Y (en) * 2008-04-24 2009-01-28 中兴通讯股份有限公司 Data line capable of implementing electrification and earphone function
CN103972955A (en) * 2014-03-24 2014-08-06 西安乾易企业管理咨询有限公司 USB (universal serial bus) interface charge handshaking method and quickly-chargeable power adapter
CN106207687A (en) * 2016-08-30 2016-12-07 硅谷数模半导体(北京)有限公司 The conversion method of data-interface and device
CN206147616U (en) * 2016-09-19 2017-05-03 深圳市科秀科技有限公司 Novel USB audio frequency and two transmission circuits that charge
CN106610912A (en) * 2016-12-23 2017-05-03 努比亚技术有限公司 Signal generation method and equipment

Also Published As

Publication number Publication date
CN107145331A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
KR102217641B1 (en) Electronic device and method for controlling audio input/output
CN107145331B (en) Charging and audio data processing method and terminal
US10949374B2 (en) Type-C interface controlling circuit, controlling method and mobile terminal
US9414174B2 (en) Method and apparatus for controlling audio output
CN105260161A (en) Method for application software volume control and mobile terminal
KR20140027828A (en) Operation method of lock function and electronic device operating the same
WO2017215507A1 (en) Sound effect processing method and mobile terminal
US9411399B2 (en) Portable electronic device and method of providing remaining amount of electric power of battery in portable electronic device
KR20140030372A (en) Method for processing customized page and mobile device
CN107291415B (en) Charging and audio data processing method and terminal
US9954505B2 (en) Audio output control method and electronic device supporting the same
CN108271093B (en) Processing method of access equipment and mobile terminal
EP2706451B1 (en) Method of processing touch input for mobile device
JP2005341111A (en) Information processor
JP7442551B2 (en) Mobile terminal and control method
JP5026556B2 (en) Information processing apparatus, audio output setting method thereof, and computer-executable program
CN108268397B (en) Processing method of access equipment and mobile terminal
CN107257406A (en) A kind of charging and the method and terminal of voice data processing
CN108271092B (en) Processing method of access equipment and mobile terminal
CN108268396B (en) Processing method of access equipment and mobile terminal
KR100879520B1 (en) Terminal and method for playing music thereof
CN103945305B (en) The method and electronic equipment of a kind of information processing
US11363394B2 (en) Electronic device charging via an audio jack
CN108271094B (en) Processing method of access equipment and mobile terminal
CN108268407B (en) Processing method of access equipment and mobile terminal

Legal Events

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