CN107145331A - A kind of charging and the method and terminal of voice data processing - Google Patents
A kind of charging and the method and terminal of voice data processing Download PDFInfo
- Publication number
- CN107145331A CN107145331A CN201710405362.2A CN201710405362A CN107145331A CN 107145331 A CN107145331 A CN 107145331A CN 201710405362 A CN201710405362 A CN 201710405362A CN 107145331 A CN107145331 A CN 107145331A
- Authority
- CN
- China
- Prior art keywords
- pin
- double
- pluggable interface
- charging
- sided pluggable
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—ELECTRIC POWER NETWORKS; CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or discharging batteries or for supplying loads from batteries
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—ELECTRIC POWER NETWORKS; CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or discharging batteries or for supplying loads from batteries
- H02J7/40—Circuit arrangements for charging or discharging batteries or for supplying loads from batteries characterised by the exchange of charge or discharge related data
- H02J7/47—Arrangements for checking compatibility or authentication 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
本发明提供了一种充电及音频数据处理的方法及终端,其中,充电及音频数据处理的方法包括:通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;第一引脚、第二引脚、第三引脚和第四引脚为双面可插接口上的不同引脚。本方案能够支持同时进行耳机听歌和充电功能,解决现有技术中支持Type‑C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。
The present invention provides a charging and audio data processing method and a terminal, wherein the charging and audio data processing method includes: detecting the pin connected to the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal. Whether the audio external device and the charging device are plugged into the adapter device at the same time; if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, The third pin of the plug-in interface is used to authenticate the charging device; when the authentication result indicates that it is passed, the battery of the terminal is charged by the charging device through the fourth pin of the double-sided pluggable interface; the first pin, the second pin The second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface. This solution can support earphone listening to music and charging functions at the same time, and solves the problem that mobile terminals that support Type-C interface and cancel the 3.5mm earphone jack in the prior art cannot perform charging and earphone listening to music at the same time.
Description
技术领域technical field
本发明涉及通信技术领域,特别是指一种充电及音频数据处理的方法及终端。The present invention relates to the field of communication technology, in particular to a charging and audio data processing method and terminal.
背景技术Background technique
双面可插Type-C接口定义了音频audio模拟信号传输的功能,通过type-C接口传输音频信号,这样能够取消手机上面的3.5mm耳机接口。这种接口的复用能够保证结构的整体性和一定程度上降低失效概率,因此,Type-C接口取代3.5mm耳机接口成为一种趋势。The double-sided pluggable Type-C interface defines the function of audio analog signal transmission, and the audio signal is transmitted through the type-C interface, which can cancel the 3.5mm headphone jack on the phone. The multiplexing of this interface can ensure the integrity of the structure and reduce the probability of failure to a certain extent. Therefore, it has become a trend for the Type-C interface to replace the 3.5mm headphone jack.
但是,由于Type-C接口的另一个主要功能是充电,当用户进行充电的时候,不能够通过Type-C接口进行耳机听歌。因此,支持Type-C接口且取消3.5mm耳机接口的终端,不能够同时进行充电和耳机听歌。However, since the other main function of the Type-C interface is charging, when the user is charging, it is not possible to listen to music through the Type-C interface. Therefore, a terminal that supports the Type-C interface and cancels the 3.5mm headphone jack cannot perform charging and earphone listening to music at the same time.
发明内容Contents of the invention
本发明的目的在于提供一种充电及音频数据处理的方法及终端,解决现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。The purpose of the present invention is to provide a method and terminal for charging and audio data processing, so as to solve the problem that mobile terminals in the prior art that support the Type-C interface and cancel the 3.5mm earphone interface cannot perform charging and earphone listening to music at the same time.
为了解决上述技术问题,本发明实施例提供一种充电及音频数据处理的方法,应用于终端,包括:In order to solve the above technical problems, an embodiment of the present invention provides a method for charging and audio data processing, which is applied to a terminal, including:
通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;Through the first pin of the double-sided pluggable interface on the terminal, it is detected whether an external audio playback device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time;
若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;If so, 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 Identity authentication of charging equipment;
在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电;When the authentication result indicates pass, using the charging device to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface;
其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。Wherein, the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
本发明实施例还提供了一种终端,包括:The embodiment of the present invention also provides a terminal, including:
第一检测模块,用于通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;The first detection module is used to detect, through the first pin of the double-sided pluggable interface on the terminal, whether an external audio playback device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time ;
第一处理模块,用于若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;The first processing module is configured to, if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and transmit the audio data to be output through the second pin of the double-sided pluggable interface Three pins for identity authentication of the charging device;
第一充电模块,用于在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电;The first charging module is configured to use the charging device to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface when the authentication result indicates pass;
其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。Wherein, 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 also provides a terminal, which is characterized in that it includes: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, the above-mentioned Steps in methods of charging and audio data processing.
本发明实施例还提供了一种计算机程序,其特征在于,处理器执行所述计算机程序时实现上述的充电及音频数据处理的方法。An embodiment of the present invention also provides a computer program, characterized in that, when the processor executes the computer program, the above-mentioned charging and audio data processing methods are implemented.
本发明实施例还提供了一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行上述的充电及音频数据处理的方法。An embodiment of the present invention also provides a computer-readable storage medium, which is characterized by comprising instructions, and when the instructions are run on a computer, the computer is made to execute the above-mentioned charging and audio data processing methods.
本发明的上述技术方案的有益效果如下:The beneficial effects of above-mentioned technical scheme of the present invention are as follows:
上述方案中,所述充电及音频数据处理的方法通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;能够支持同时进行耳机听歌和充电功能,很好的解决了现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。In the above solution, the charging and audio data processing method detects whether an external audio playback device and Charging device; if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and authenticate the charging device through the third pin of the double-sided pluggable interface ; When the authentication result indicates that the battery of the terminal is charged through the fourth pin of the double-sided pluggable interface, the battery of the terminal can be charged by the charging device; Mobile terminals that support the Type-C interface and cancel the 3.5mm headphone jack cannot simultaneously charge and listen to music through headphones.
附图说明Description of drawings
图1为本发明实施例的充电及音频数据处理的方法流程示意图;FIG. 1 is a schematic flow chart of a method for charging and audio data processing according to an embodiment of the present invention;
图2为本发明实施例的充电及音频数据处理的方法实现电路示意图;2 is a schematic diagram of a circuit for implementing a charging and audio data processing method according to an embodiment of the present invention;
图3为本发明实施例的终端结构示意图一;FIG. 3 is a schematic diagram of a terminal structure according to an embodiment of the present invention;
图4为本发明实施例的终端结构示意图二;FIG. 4 is a second structural schematic diagram of a terminal according to an embodiment of the present invention;
图5为本发明实施例的终端结构示意图三。FIG. 5 is a third structural schematic diagram of a terminal according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明要解决的技术问题、技术方案和优点更加清楚,下面将结合附图及具体实施例进行详细描述。In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, the following will describe in detail with reference to the drawings and specific embodiments.
本发明针对现有的技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题,提供一种充电及音频数据处理的方法,可应用于终端,如图1所示,包括:The present invention aims at the problem that mobile terminals that support the Type-C interface and cancel the 3.5mm earphone interface in the existing technology cannot perform charging and earphone listening to music at the same time, and provide a method for charging and audio data processing, which can be applied to the terminal , as shown in Figure 1, including:
步骤11:通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备。Step 11: Through the first pin of the double-sided pluggable interface on the terminal, detect whether an external audio playback device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time.
具体可以通过插入检测引脚CC1/2进行检测,在此不作限定。音频外放设备可为耳机或音箱等设备。Specifically, the detection can be performed by inserting the detection pin CC1/2, which is not limited herein. The audio output device can be a device such as an earphone or a speaker.
步骤12:若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证。Step 12: If yes, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and through the third pin of the double-sided pluggable interface, Perform identity authentication on the charging device.
也就是同时进行音频播放和充电操作的身份认证。That is, identity authentication for audio playback and charging operations at the same time.
步骤13:在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电。Step 13: When the authentication result indicates that it is passed, use the charging device to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface.
其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。Wherein, the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
本实施例提供的所述充电及音频数据处理的方法通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;能够支持同时进行耳机听歌和充电功能,很好的解决了现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。The charging and audio data processing method provided in this embodiment detects whether an external audio playback device is plugged into the adapter device connected to the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal. and the charging device; if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and identify the charging device through the third pin of the double-sided pluggable interface Certification; when the certification result indicates that the battery of the terminal is charged through the fourth pin of the double-sided pluggable interface, the battery of the terminal can be charged by the charging device; it can support the functions of earphone listening to music and charging at the same time, which is a good solution to the existing technology Mobile terminals that support the Type-C interface and cancel the 3.5mm headphone jack cannot simultaneously charge and listen to music.
具体的,所述通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备的步骤包括:通过所述双面可插接口的第二引脚,将待输出的音频数据以数字信号的形式传输给所述音频外放设备;并通过所述双面可插接口的第四引脚对所述音频外放设备进行供电。Specifically, the step of transmitting the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface includes: passing the second pin of the double-sided pluggable interface , transmitting the audio data to be output to the audio external device in the form of a digital signal; and supplying power to the audio external device through the fourth pin of the double-sided pluggable interface.
数字信号可以是集成电路内置音频总线I2S信号。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 double-sided pluggable interface includes: before the charging device is connected to the terminal through the adapter device, In the process of transmitting audio data to the audio external device, the battery of the terminal is used to supply power to the audio external device through the fourth pin of the double-sided pluggable interface; When the switching device is connected to the terminal and can supply power to the battery of the terminal, the charging device is used to supply power to the audio external device through the fourth pin of the double-sided pluggable interface .
进一步的,在利用所述终端的电池对所述音频外放设备进行供电的步骤之后,所述方法还包括:检测所述充电设备是否通过所述转接设备与所述终端相连;在检测到所述充电设备通过所述转接设备与所述终端相连,且能够对所述终端的电池供电时,暂停音频数据的传输;在利用所述充电设备对所述音频外放设备进行供电后,恢复音频数据的传输。Further, after the step of using the battery of the terminal to supply power to the audio playback device, the method further includes: detecting whether the charging device is connected to the terminal through the adapter device; When the charging device is connected to the terminal through the adapter device and can supply power to the battery of the terminal, the transmission of audio data is suspended; after the charging device is used to supply power to the audio playback device, Resume transmission of audio data.
更进一步的,所述的方法还包括:在对所述音频外放设备的供电源进行切换时,暂停音频数据的传输;在切换成功后,恢复音频数据的传输。Furthermore, the method further includes: when switching the power supply of the audio playback device, suspending the transmission of audio data; after the switching is successful, resuming the transmission of 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 The step of performing identity authentication on the charging device includes: performing identity authentication on the charging device through the third pin of the double-sided pluggable interface; The second pin transmits the audio data to be output to the audio external device.
优选的,所述第二引脚为所述双面可插接口上除充电通信引脚、插入检测引脚和麦克引脚外的其他引脚。Preferably, the second pin is other pins on the double-sided pluggable interface except the charging communication pin, insertion detection pin and microphone pin.
下面对本发明实施例提供的所述充电及音频数据处理的方法进行进一步说明。The method for charging and audio data processing provided by the embodiment of the present invention will be further described below.
针对上述技术问题,本发明实施例提出一种通过type-C接口来同时进行大电流充电和播放音乐的方案,同时支持耳机mic,在充电的时候能够完成耳机打电话功能。本方案优选使用Type-C接口传输数字音频信号,在音频外设中进行解码,对比Type-C接口传输模拟信号,能够有效降低充电等干扰。本方案使用标准的Type-C接口。In view of the above-mentioned technical problems, the embodiment of the present invention proposes a solution for simultaneous high-current charging and music playback through the type-C interface, and supports the earphone mic at the same time, and can complete the earphone calling function while charging. In this solution, it is preferable to use the Type-C interface to transmit digital audio signals and decode them in the audio peripherals. Compared with the Type-C interface to transmit analog signals, it can effectively reduce interference such as charging. This solution uses a standard Type-C interface.
本发明实施例方案的实现可采用如图2所示的电路,其中,当只充电或者只插音频外设(音频外放设备)播放音乐的时候,直接连接手机;当需要充电且使用音频外设的时候,需要用到转接头;Mclk(Master Clock,系统主时钟单元)根据数模转换器DAC的需求选择是由系统输出还是另外在音频外设中加晶振产生。The realization of the scheme of the embodiment of the present invention can adopt the circuit shown in Figure 2, wherein, when only charging or only plugging in the audio peripheral (audio external device) to play music, directly connect the mobile phone; When setting, you need to use an adapter; Mclk (Master Clock, the main clock unit of the system) can be selected according to the needs of the digital-to-analog converter DAC, whether it is output by the system or generated by adding a crystal oscillator to the audio peripherals.
开关Switch:在手机端完成TX/RX(发射/接收)信号复用I2S/MCLK的功能;Switch Switch: Complete the function of TX/RX (transmission/reception) signal multiplexing I2S/MCLK on the mobile phone;
控制器Controller:依据工作场景控制切换TX/RX信号的连接方式;Controller: Control and switch the connection mode of TX/RX signal according to the working scene;
高速物理串行总线USB-PHY;TX/RX进行USB数据传输;检测引脚CC完成插入检测;D+/D-完成充电握手功能。High-speed physical serial bus USB-PHY; TX/RX for USB data transmission; detection pin CC completes insertion detection; D+/D- completes the charging handshake function.
音频编解码器Audio codec:处理mic输入信号;Audio codec Audio codec: processing mic input signal;
转换器Adapter:当需要边充电,边使用音频外设的使用,需要使用转换器;由一个双面可插接插头Type-C plug插入终端,将充电和音频信号分别转接到两个插座receptacle。Converter Adapter: When you need to charge while using audio peripherals, you need to use a converter; a double-sided plug Type-C plug is inserted into the terminal, and the charging and audio signals are respectively transferred to two socket receptacle .
本实施例提供的方案可具体如下:The scheme provided in this embodiment can be specifically as follows:
A.默认状态,控制器控制开关切换连接到USB数据传输的TX/RX。A. In the default state, the controller controls the switch to switch the TX/RX connected to the USB data transmission.
B.当检测引脚CC1/2信号检测到插入音频外设audio accessory时,执行以下几个操作:B. When the detection pin CC1/2 signal detects that the audio accessory is inserted, perform the following operations:
a)控制器控制开关切换到I2S/Mclk;a) The controller controls the switch to switch to I2S/Mclk;
b)当用户播放音乐时,由I2S信号传输音频数据,依据DAC需求输出MCLK到音频外设中的DAC;由手机开启主机OTG模式来进行给音频外设(耳机、音箱)的DAC,放大器AMP提供power(电能);之后进行音频信号的解码,放大,再传输到耳机设备,播放音乐。b) When the user plays music, the audio data is transmitted by the I2S signal, and the MCLK is output to the DAC in the audio peripheral according to the DAC demand; the mobile phone turns on the OTG mode of the host to carry out the DAC for the audio peripheral (headphone, speaker), and the amplifier AMP Provide power (electric energy); after that, the audio signal is decoded, amplified, and then transmitted to the earphone device to play music.
c)当检测到CC1/2的状态变化(比如电阻的变换,终端可感知-上拉电阻、下拉电阻、并联等,可以理解为监测转接头的插口连接状况)时,通过CC1/2的电压状态判断是否有充电器插入,然后进行D+/D-的充电握手,握手成功则关闭OTG,由充电Vbus来对音频外设供电,同时开始进行充电,握手失败则继续播放音乐。c) When the state change of CC1/2 is detected (such as the transformation of resistance, the terminal can sense - pull-up resistor, pull-down resistor, parallel connection, etc., which can be understood as monitoring the socket connection status of the adapter), the voltage of CC1/2 The state judges whether there is a charger plugged in, and then performs a D+/D- charging handshake. If the handshake is successful, the OTG will be turned off. The charging Vbus will supply power to the audio peripherals and start charging at the same time. If the handshake fails, continue to play music.
C.当CC1/2检测插入充电设备时,通过D+/D-进行充电握手(不需要开关控制,直接与Type-C接口相连),握手成功后配置充电电压电流进行充电;监测CC1/2的电压,当检测到触发耳机和充电器同时插入状态的门限(电阻参数值)时,控制器控制开关切换至I2S/MCLK,用户播放音乐的时候音频信号通过I2S传输至音频外设,这种状态下音频外设的电源由充电器的Vbus来提供。C. When CC1/2 detects that the charging device is inserted, the charging handshake is performed through D+/D- (no switch control is required, it is directly connected to the Type-C interface), and after the handshake is successful, the charging voltage and current are configured for charging; monitoring CC1/2 Voltage, when the threshold (resistance parameter value) that triggers the simultaneous insertion of the earphone and the charger is detected, the controller controls the switch to switch to I2S/MCLK, and the audio signal is transmitted to the audio peripheral through I2S when the user plays music. The power of the audio peripherals is provided by the Vbus of the charger.
D.当CC1/2检测到同时插入了充电器和音频外设的时候(通过转接口,一转二),通过D+/D-来进行充电握手;通过TX/RX输出音频信号给音频外设,音频外设的电源由充电器的Vbus提供。D. When CC1/2 detects that the charger and audio peripherals are plugged in at the same time (through the transfer interface, one to two), the charging handshake is performed through D+/D-; the audio signal is output to the audio peripheral through TX/RX , the power of the audio peripherals is provided by the Vbus of the charger.
说明:当播放音乐的时候充电器拔出时,检测到充电器拔出则暂停播放音乐,用户重新开始播放音乐的时候打开OTG给音频外设供电。Note: When the charger is unplugged while playing music, the music will be paused when the charger is detected to be unplugged, and the user will turn on the OTG to supply power to the audio peripherals when the user restarts to play music.
音频外设可为喇叭等设备,在此不作限定。The audio peripherals may be devices such as speakers, which are not limited here.
由上可知,本发明实施例提供的方案能够实现高质量的耳机播放效果,提升用户体验;支持正反插;取代3.5mm耳机接口;同时,用户可以根据自己所需的音质水平来选购外设,提升用户选择的自由度;支持同时进行播放音乐和充电功能;支持耳机mic,能够进行边充电,边打电话。It can be seen from the above that the solution provided by the embodiment of the present invention can achieve high-quality earphone playback effect and improve user experience; support forward and reverse insertion; replace 3.5mm earphone jack; at the same time, users can choose external earphones according to their desired sound quality level Design, enhance the freedom of user choice; support simultaneous music playback and charging functions; support earphone mic, can charge and make calls at the same time.
为了解决上述技术问题,本发明实施例还提供了一种终端,如图3所示,包括:In order to solve the above technical problems, an embodiment of the present invention also provides a terminal, as shown in FIG. 3 , including:
第一检测模块31,用于通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;The first detection module 31 is used to detect whether an external audio playback device and a charging device are simultaneously plugged into the adapter device connected to the double-sided pluggable interface through the first pin of the double-sided pluggable interface on the terminal. equipment;
第一处理模块32,用于若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;The first processing module 32 is configured to, if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and pass the second pin of the double-sided pluggable interface The third pin is for identity authentication of the charging device;
第一充电模块33,用于在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电;The first charging module 33 is configured to use the charging device to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface when the authentication result indicates pass;
其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。Wherein, the first pin, the second pin, the third pin and the fourth pin are different pins on the double-sided pluggable interface.
本实施例提供的所述终端通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;能够支持同时进行耳机听歌和充电功能,很好的解决了现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。The terminal provided in this embodiment uses the first pin of the double-sided pluggable interface on the terminal to detect whether an external audio playback device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time; if so, The audio data to be output is transmitted to the audio external device through the second pin of the double-sided pluggable interface, and the identity authentication of the charging device is carried out through the third pin of the double-sided pluggable interface; when the authentication result indicates When passing through, use the charging device to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface; it can support simultaneous earphone listening and charging functions, which is a good solution to the existing technology that supports Type-C interface Moreover, the mobile terminal that cancels the 3.5mm headphone jack cannot simultaneously charge and listen to music through the headphone.
具体的,所述第一处理模块包括:第一处理子模块,用于通过所述双面可插接口的第二引脚,将待输出的音频数据以数字信号的形式传输给所述音频外放设备;并通过所述双面可插接口的第四引脚对所述音频外放设备进行供电。Specifically, the first processing module includes: a first processing sub-module, configured to transmit the audio data to be output to the audio external device in the form of a digital signal through the second pin of the double-sided pluggable interface. and the audio playback device is powered through the fourth pin of the double-sided pluggable interface.
数字信号可以是集成电路内置音频总线I2S信号。The digital signal may be an integrated circuit built-in audio bus I2S signal.
更具体的,所述第一充电模块包括:第一充电子模块,用于在所述充电设备通过所述转接设备与所述终端相连,且能够对所述终端的电池供电时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述音频外放设备进行供电。More specifically, the first charging module includes: a first charging sub-module configured to, when the charging device is connected to the terminal through the adapter device and capable of supplying power to the battery of the terminal, The fourth pin of the double-sided pluggable interface, using the charging device to supply power to the audio playback device.
具体的,所述第一处理模块包括:第一认证子模块,用于通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;第一传输子模块,用于在得到认证结果后,通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备。Specifically, the first processing module includes: a first authentication submodule, configured to authenticate the charging device through the third pin of the double-sided pluggable interface; a first transmission submodule, configured to After the authentication result is obtained, the audio data to be output is transmitted to the audio playback device through the second pin of the double-sided pluggable interface.
优选的,所述第二引脚为所述双面可插接口上除充电通信引脚、插入检测引脚和麦克引脚外的其他引脚。Preferably, the second pin is other pins on the double-sided pluggable interface except the charging communication pin, insertion detection pin and microphone pin.
其中,上述充电及音频数据处理的方法的所述实现实施例均适用于该终端的实施例中,也能达到相同的技术效果。Wherein, the implementation embodiments of the above charging and audio data processing methods are all applicable to the embodiment of the terminal, and can also achieve the same technical effect.
本发明实施例还提供了一种终端,如图4所示,所述终端400包括:The embodiment of the present invention also provides a terminal. As shown in FIG. 4, the terminal 400 includes:
至少一个处理器401、存储器402、至少一个网络接口404和用户接口403。终端400中的各个组件通过总线系统405耦合在一起。可理解,总线系统405用于实现这些组件之间的连接通信。总线系统405除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图4中将各种总线都标为总线系统405。At least one processor 401 , memory 402 , at least one network interface 404 and user interface 403 . Various components in the terminal 400 are coupled together through a bus system 405 . It can be understood that the bus system 405 is used to realize connection and communication between these components. In addition to the data bus, the bus system 405 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 405 in FIG. 4 .
其中,用户接口403可以包括显示器、键盘或者点击设备(例如,鼠标,轨迹球(trackball)、触感板或者触摸屏等。Wherein, the user interface 403 may include a display, a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch panel or a touch screen, and the like.
可以理解,本发明实施例中的存储器402可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data RateSDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(DirectRambus RAM,DRRAM)。本文描述的系统和方法的存储器402旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 402 in the embodiment of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Wherein, the non-volatile memory may be a read-only memory (Read-Only Memory, ROM), a programmable read-only memory (Programmable ROM, PROM), an erasable programmable read-only memory (Erasable PROM, EPROM), an electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash. The volatile memory can be Random Access Memory (RAM), which acts as an external cache. By way of illustration and not limitation, many forms of RAM are available such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (Synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (Double Data RateSDRAM, DDRSDRAM), enhanced synchronous dynamic random access memory (Enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (Synchlink DRAM, SLDRAM) and Direct memory bus random access memory (DirectRambus RAM, DRRAM). Memory 402 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
在一些实施方式中,存储器402存储了如下的元素,可执行模块或者数据结构,或者他们的子集,或者他们的扩展集:操作系统4021和应用程序4022。In some implementations, the memory 402 stores the following elements, executable modules or data structures, or their subsets, or their extended sets: an operating system 4021 and an application program 4022 .
其中,操作系统4021,包含各种系统程序,例如框架层、核心库层、驱动层等,用于实现各种基础业务以及处理基于硬件的任务。应用程序4022,包含各种应用程序,例如媒体播放器(Media Player)、浏览器(Browser)等,用于实现各种应用业务。实现本发明实施例方法的程序可以包含在应用程序4022中。Among them, the operating system 4021 includes various system programs, such as framework layer, core library layer, driver layer, etc., for realizing various basic services and processing hardware-based tasks. The application program 4022 includes various application programs, such as a media player (Media Player), a browser (Browser), etc., and is used to implement various application services. The program for realizing the method of the embodiment of the present invention may be included in the application program 4022 .
在本发明实施例中,通过调用存储器402存储的程序或指令,具体的,可以是应用程序4022中存储的程序或指令,处理器401用于:通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电;其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。In this embodiment of the present invention, by calling the program or instruction stored in the memory 402, specifically, the program or instruction stored in the application program 4022, the processor 401 is configured to: One pin detects whether an external audio device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time; if so, through the second pin of the double-sided pluggable interface, the The audio data to be output is transmitted to the audio external device, and the identity authentication of the charging device is carried out through the third pin of the double-sided pluggable interface; The fourth pin of the pluggable interface uses the charging device to charge the battery of the terminal; wherein, the first pin, the second pin, the third pin and the fourth pin are the dual different pins on the pluggable interface.
上述本发明实施例揭示的方法可以应用于处理器401中,或者由处理器401实现。处理器401可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器401中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器401可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(FieldProgrammable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本发明实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本发明实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器402,处理器401读取存储器402中的信息,结合其硬件完成上述方法的步骤。The methods disclosed in the foregoing 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 and has signal processing capabilities. In the implementation process, each step of the above method may be completed by an integrated logic circuit of hardware in the processor 401 or instructions in the form of software. The above-mentioned processor 401 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other available Program logic devices, discrete gate or transistor logic devices, discrete hardware components. Various methods, steps and logic block diagrams disclosed in the embodiments of the present invention may be implemented or executed. A general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like. The steps of the methods disclosed in 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 can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register. 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 above method in combination with its hardware.
可以理解的是,本文描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,处理单元可以实现在一个或多个专用集成电路(ApplicationSpecific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable LogicDevice,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本申请所述功能的其它电子单元或其组合中。It should be understood that the embodiments described herein may be implemented by hardware, software, firmware, middleware, microcode or a combination thereof. For hardware implementation, the processing unit can be implemented in one or more application specific integrated circuits (Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal Processing, DSP), digital signal processing device (DSP Device, DSPD), programmable logic Device (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller, microprocessor, other electronic units for performing the functions described in this application or a combination thereof.
对于软件实现,可通过执行本文所述功能的模块(例如过程、函数等)来实现本文所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For a software implementation, the techniques described herein can be implemented through modules (eg, procedures, functions, and so on) that perform the functions described herein. Software codes can be stored in memory and executed by a processor. Memory can be implemented within the processor or external to the processor.
可选地,处理器401具体用于:通过所述双面可插接口的第二引脚,将待输出的音频数据以数字信号的形式传输给所述音频外放设备;并通过所述双面可插接口的第四引脚对所述音频外放设备进行供电。Optionally, the processor 401 is specifically configured to: transmit the audio data to be output to the audio external device in the form of a digital signal through the second pin of the double-sided pluggable interface; The fourth pin of the pluggable interface on the surface supplies power to the audio external device.
可选地,处理器401更具体用于:在所述充电设备通过所述转接设备与所述终端相连,且能够对所述终端的电池供电时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述音频外放设备进行供电。Optionally, the processor 401 is more specifically configured to: when the charging device is connected to the terminal through the adapter device and is capable of supplying power to the battery of the terminal, through the first charging device of the double-sided pluggable interface Four pins, using the charging device to supply power to the audio external device.
可选地,处理器401具体用于:通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;在得到认证结果后,通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备。Optionally, the processor 401 is specifically configured to: authenticate the charging device through the third pin of the double-sided pluggable interface; after obtaining the authentication result, pass the third pin of the double-sided pluggable interface The second pin transmits the audio data to be output to the audio external device.
可选地,所述第二引脚为所述双面可插接口上除充电通信引脚、插入检测引脚和麦克引脚外的其他引脚。Optionally, the second pin is other pins on the double-sided pluggable interface except the charging communication pin, insertion detection pin and microphone pin.
终端400能够实现前述实施例中终端实现的各个过程,为避免重复,这里不再赘述。The terminal 400 can implement various processes implemented by the terminal in the foregoing embodiments, and to avoid repetition, details are not repeated here.
综上,本发明实施例提供的所述终端通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;能够支持同时进行耳机听歌和充电功能,很好的解决了现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。To sum up, the terminal provided by the embodiment of the present invention uses the first pin of the double-sided pluggable interface on the terminal to detect whether the adapter device connected to the double-sided pluggable interface is plugged with an audio external device and a charging device at the same time. device; if so, transmit the audio data to be output to the audio external device through the second pin of the double-sided pluggable interface, and authenticate the identity of the charging device through the third pin of the double-sided pluggable interface; When the authentication result indicates that the battery of the terminal is charged through the fourth pin of the double-sided pluggable interface, the charging device can be used to charge the battery of the terminal; it can support simultaneous earphone listening to music and charging functions, which is a good solution to the support in the prior art Mobile terminals with a Type-C interface and the cancellation of the 3.5mm headphone jack cannot perform charging and earphone listening to music at the same time.
本发明实施例还提供了一种终端,具体地,如图5所示,本发明实施例中的终端500可以为手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、或车载电脑等。The embodiment of the present invention also provides a terminal. 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 (Personal Digital Assistant, PDA), or a vehicle-mounted computer, etc. .
图5中的终端500包括射频(Radio Frequency,RF)电路510、存储器520、输入单元530、显示单元540、处理器560、音频电路570、WiFi(Wireless Fidelity)模块580和电源590。The terminal 500 in FIG. 5 includes a radio frequency (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.
其中,输入单元530可用于接收用户输入的数字或字符信息,以及产生与终端500的用户设置以及功能控制有关的信号输入。具体地,本发明实施例中,该输入单元530可以包括触控面板531。触控面板531,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板531上的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板531可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给该处理器560,并能接收处理器560发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板531。除了触控面板531,输入单元530还可以包括其他输入设备532,其他输入设备532可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。Wherein, the input unit 530 can be used to receive digital or character information input by the user, and generate signal input related to the user setting and function control of the terminal 500 . Specifically, in the embodiment of the present invention, the input unit 530 may include a touch panel 531 . The touch panel 531, also referred to as a touch screen, can collect user's touch operations on or near it (such as the user's operation on the touch panel 531 using any suitable object or accessory such as a finger and a stylus), and The specified program drives the corresponding connected device. Optionally, the touch panel 531 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and sends it to the to the processor 560, and can receive and execute commands sent by the processor 560. In addition, the touch panel 531 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 531, the input unit 530 may also include other input devices 532, which may include but not limited to physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, joysticks, etc. one or more of.
其中,显示单元540可用于显示由用户输入的信息或提供给用户的信息以及终端500的各种菜单界面。显示单元540可包括显示面板541,可选的,可以采用LCD或有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板541。Wherein, the display unit 540 can 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 (Organic Light-Emitting Diode, OLED).
应注意,触控面板531可以覆盖显示面板541,形成触摸显示屏,当该触摸显示屏检测到在其上或附近的触摸操作后,传送给处理器560以确定触摸事件的类型,随后处理器560根据触摸事件的类型在触摸显示屏上提供相应的视觉输出。It should be noted that the touch panel 531 can cover the display panel 541 to form a touch display screen. When the touch display screen detects a touch operation on or near it, it is sent to the processor 560 to determine the type of the touch event, and then the processor The 560 provides corresponding visual output on the touch display screen according to the type of the touch event.
触摸显示屏包括应用程序界面显示区及常用控件显示区。该应用程序界面显示区及该常用控件显示区的排列方式并不限定,可以为上下排列、左右排列等可以区分两个显示区的排列方式。该应用程序界面显示区可以用于显示应用程序的界面。每一个界面可以包含至少一个应用程序的图标和/或widget桌面控件等界面元素。该应用程序界面显示区也可以为不包含任何内容的空界面。该常用控件显示区用于显示使用率较高的控件,例如,设置按钮、界面编号、滚动条、电话本图标等应用程序图标等。The touch display screen includes an application program interface display area and a common control display area. The arrangement of the display area of the application program interface and the display area of the commonly used controls is not limited, and may be an arrangement in which the two display areas can be distinguished, such as vertical arrangement, left-right arrangement, and the like. The application program interface display area can be used to display the interface of the application program. Each interface may include at least one interface element such as an icon of an application program and/or a widget desktop control. The application program interface display area can also be an empty interface without any content. The commonly used control display area is used to display controls with a high usage rate, for example, application icons such as setting buttons, interface numbers, scroll bars, and phonebook icons.
其中处理器560是终端500的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在第一存储器521内的软件程序和/或模块,以及调用存储在第二存储器522内的数据,执行终端500的各种功能和处理数据,从而对终端500进行整体监控。可选的,处理器560可包括一个或多个处理单元。Wherein the processor 560 is the control center of the terminal 500, utilizes various interfaces and lines to connect various parts of the entire mobile phone, and runs or executes software programs and/or modules stored in the first memory 521, and calls stored in the second memory The data in 522 executes various functions of the terminal 500 and processes data, so as to monitor the terminal 500 as a whole. Optionally, the processor 560 may include one or more processing units.
在本发明实施例中,通过调用存储该第一存储器521内的软件程序和/或模块和/或该第二存储器522内的数据,处理器560用于:通过所述终端上双面可插接口的第一引脚,检测与所述双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备,并通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;在认证结果指示通过时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述终端的电池进行充电;其中,所述第一引脚、第二引脚、第三引脚和第四引脚为所述双面可插接口上的不同引脚。In the embodiment of the present invention, by calling the software programs and/or modules stored in the first memory 521 and/or the data in the second memory 522, the processor 560 is used to: The first pin of the interface detects whether an external audio device and a charging device are plugged into the adapter device connected to the double-sided pluggable interface at the same time; pin, transmit the audio data to be output to the audio external device, and authenticate the charging device through the third pin of the double-sided pluggable interface; when the authentication result indicates that it is passed, pass the The fourth pin of the double-sided pluggable interface uses the charging device to charge the battery of the terminal; wherein, the first pin, the second pin, the third pin and the fourth pin are Different pins on the double-sided pluggable interface.
可选地,处理器560具体用于:通过所述双面可插接口的第二引脚,将待输出的音频数据以数字信号的形式传输给所述音频外放设备;并通过所述双面可插接口的第四引脚对所述音频外放设备进行供电。Optionally, the processor 560 is specifically configured to: transmit the audio data to be output to the audio external device in the form of a digital signal through the second pin of the double-sided pluggable interface; The fourth pin of the surface pluggable interface supplies power to the audio external device.
可选地,处理器560更具体用于:在所述充电设备通过所述转接设备与所述终端相连,且能够对所述终端的电池供电时,通过所述双面可插接口的第四引脚,利用所述充电设备对所述音频外放设备进行供电。Optionally, the processor 560 is more specifically configured to: when the charging device is connected to the terminal through the adapter device and is capable of supplying power to the battery of the terminal, through the first charging device of the double-sided pluggable interface Four pins, using the charging device to supply power to the audio external device.
可选地,处理器560具体用于:通过所述双面可插接口的第三引脚,对所述充电设备进行身份认证;在得到认证结果后,通过所述双面可插接口的第二引脚,将待输出的音频数据传输给所述音频外放设备。Optionally, the processor 560 is specifically configured to: authenticate the charging device through the third pin of the double-sided pluggable interface; after obtaining the authentication result, pass the third pin of the double-sided pluggable interface The second pin transmits the audio data to be output to the audio external device.
可选地,所述第二引脚为所述双面可插接口上除充电通信引脚、插入检测引脚和麦克引脚外的其他引脚。Optionally, the second pin is other pins on the double-sided pluggable interface except the charging communication pin, insertion detection pin and microphone pin.
可见,本发明实施例提供的所述终端通过终端上双面可插接口的第一引脚,检测与双面可插接口相连的转接设备上,是否同时插有音频外放设备及充电设备;若是,则通过双面可插接口的第二引脚,将待输出的音频数据传输给音频外放设备,并通过双面可插接口的第三引脚,对充电设备进行身份认证;在认证结果指示通过时,通过双面可插接口的第四引脚,利用充电设备对终端的电池进行充电;能够支持同时进行耳机听歌和充电功能,很好的解决了现有技术中支持Type-C接口且取消3.5mm耳机接口的移动终端,不能够同时进行充电和耳机听歌的问题。It can be seen that the terminal provided by the embodiment of the present invention uses the first pin of the double-sided pluggable interface on the terminal to detect whether the adapter device connected to the double-sided pluggable interface is plugged with an audio external device and a charging device at the same time. ; If so, the audio data to be output is transmitted to the audio external device through the second pin of the double-sided pluggable interface, and the identity authentication of the charging device is carried out through the third pin of the double-sided pluggable interface; When the authentication result indicates that it is passed, the charging device can be used to charge the battery of the terminal through the fourth pin of the double-sided pluggable interface; it can support the functions of earphone listening to music and charging at the same time, which solves the problem of supporting Type 2 in the prior art. -Mobile terminals with C interface and canceled 3.5mm headphone jack cannot charge and listen to music through earphones at the same time.
本发明实施例还提供了一种终端,其特征在于,包括:存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述的充电及音频数据处理的方法中的步骤。An embodiment of the present invention also provides a terminal, which is characterized in that it includes: a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the computer program, the above-mentioned Steps in methods of charging and audio data processing.
本发明实施例还提供了一种计算机程序,其特征在于,处理器执行所述计算机程序时实现上述的充电及音频数据处理的方法。An embodiment of the present invention also provides a computer program, characterized in that, when the processor executes the computer program, the above-mentioned charging and audio data processing methods are implemented.
本发明实施例还提供了一种计算机可读存储介质,其特征在于,包括指令,当所述指令在计算机上运行时,使得计算机执行上述的充电及音频数据处理的方法。An embodiment of the present invention also provides a computer-readable storage medium, which is characterized by comprising instructions, and when the instructions are run on a computer, the computer is made to execute the above-mentioned charging and audio data processing methods.
需要说明的是,本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same and similar parts in each embodiment, refer to each other, that is, Can.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。Those skilled in the art can appreciate that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.
还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。It should also be noted that in this article, relational terms such as first and second etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that these entities or operations Any such actual relationship or order exists between. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or end-equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims (11)
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 true CN107145331A (en) | 2017-09-08 |
| CN107145331B 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) |
Cited By (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109038720A (en) * | 2018-07-27 | 2018-12-18 | 维沃移动通信有限公司 | A kind of charging unit, terminal device and charging method |
| WO2019109933A1 (en) * | 2017-12-05 | 2019-06-13 | 捷开通讯(深圳)有限公司 | Adapter device, multi-device detection system and detection method thereof |
| CN111987752A (en) * | 2019-05-21 | 2020-11-24 | 北京小米移动软件有限公司 | a switching device |
| CN113823971A (en) * | 2021-09-07 | 2021-12-21 | 维沃移动通信有限公司 | Interface conversion system and control method thereof |
| CN113949962A (en) * | 2021-11-30 | 2022-01-18 | 深圳市科奈信科技有限公司 | An earphone box, an earphone kit, and a method for detecting and charging earphones into the box |
| CN115802241A (en) * | 2022-11-29 | 2023-03-14 | 珠海美佳音科技有限公司 | Switching and shunting method, device, equipment and storage medium |
| CN115942189A (en) * | 2021-08-27 | 2023-04-07 | 北京小米移动软件有限公司 | Connection interface, method and device for controlling connection interface, electronic device, storage medium |
| CN115942189B (en) * | 2021-08-27 | 2026-05-08 | 北京小米移动软件有限公司 | Connection interface, control method and device of connection interface, electronic equipment and storage medium |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN201188444Y (en) * | 2008-04-24 | 2009-01-28 | 中兴通讯股份有限公司 | A data cable capable of charging and earphone functions |
| 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 |
| US20170127203A1 (en) * | 2015-10-29 | 2017-05-04 | Samsung Electronics Co., Ltd. | Method for controlling audio signal and electronic device supporting the same |
-
2017
- 2017-05-31 CN CN201710405362.2A patent/CN107145331B/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN201188444Y (en) * | 2008-04-24 | 2009-01-28 | 中兴通讯股份有限公司 | A data cable capable of charging and earphone functions |
| CN103972955A (en) * | 2014-03-24 | 2014-08-06 | 西安乾易企业管理咨询有限公司 | USB (universal serial bus) interface charge handshaking method and quickly-chargeable power adapter |
| US20170127203A1 (en) * | 2015-10-29 | 2017-05-04 | Samsung Electronics Co., Ltd. | Method for controlling audio signal and electronic device supporting the same |
| 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 |
Cited By (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019109933A1 (en) * | 2017-12-05 | 2019-06-13 | 捷开通讯(深圳)有限公司 | Adapter device, multi-device detection system and detection method thereof |
| US11316308B2 (en) | 2017-12-05 | 2022-04-26 | Jrd Communicaton (Shenzhen) Ltd. | Adapter, multi-device 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 | 北京小米移动软件有限公司 | a switching device |
| CN115942189A (en) * | 2021-08-27 | 2023-04-07 | 北京小米移动软件有限公司 | Connection interface, method and device for controlling connection interface, electronic device, storage medium |
| CN115942189B (en) * | 2021-08-27 | 2026-05-08 | 北京小米移动软件有限公司 | Connection interface, control method and device of connection interface, electronic equipment and storage medium |
| CN113823971A (en) * | 2021-09-07 | 2021-12-21 | 维沃移动通信有限公司 | Interface conversion system and control method thereof |
| CN113823971B (en) * | 2021-09-07 | 2024-05-28 | 维沃移动通信有限公司 | Interface conversion system and control method thereof |
| CN113949962A (en) * | 2021-11-30 | 2022-01-18 | 深圳市科奈信科技有限公司 | An earphone box, an earphone kit, and a method for detecting and charging earphones into the box |
| CN115802241A (en) * | 2022-11-29 | 2023-03-14 | 珠海美佳音科技有限公司 | Switching and shunting method, device, equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107145331B (en) | 2020-04-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107145331A (en) | A kind of charging and the method and terminal of voice data processing | |
| CN108604218B (en) | Method and terminal device for establishing connection between devices with universal serial bus USB Type-C interface | |
| CN107770759B (en) | Bluetooth voice link establishing method and device, storage medium and mobile terminal | |
| CN106358127A (en) | Left and right sound channel switching method and mobile terminal | |
| CN106791109A (en) | A kind of sound prompting method and mobile terminal | |
| CN106454588A (en) | Earphone and earphone channel switching method | |
| CN105260161A (en) | Method for application software volume control and mobile terminal | |
| CN106161804A (en) | A kind of audio play control method and mobile terminal | |
| CN105916074A (en) | Play control method for multimedia and terminal | |
| CN106714038B (en) | A kind of control method and mobile terminal of sound intensity | |
| CN108541080A (en) | First electronic equipment and the second electronic equipment carry out the method and Related product of Hui Lian | |
| CN106878915A (en) | Playing device control method, device, playing device, and mobile terminal | |
| CN107257406A (en) | A kind of charging and the method and terminal of voice data processing | |
| CN107291415B (en) | Method and terminal for charging and audio data processing | |
| CN108271093B (en) | Access device processing method and mobile terminal | |
| CN108268395A (en) | A kind of method and mobile terminal of data communication | |
| CN108271092B (en) | Access device processing method and mobile terminal | |
| CN107819931A (en) | A kind of audio frequency playing method and mobile terminal based on wireless headset | |
| CN108268397B (en) | Processing method of access equipment and mobile terminal | |
| CN106484563B (en) | Data migration method and terminal equipment | |
| CN108268396B (en) | Processing method of access equipment and mobile terminal | |
| CN106886388B (en) | Method and terminal for playing audio data | |
| CN206481445U (en) | A kind of mobile terminal and earphone | |
| CN108268399A (en) | A kind of method and mobile terminal of data communication | |
| TW201743520A (en) | Headphone plug and headphone |
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 |