Search

CN-115942189-B - Connection interface, control method and device of connection interface, electronic equipment and storage medium

CN115942189BCN 115942189 BCN115942189 BCN 115942189BCN-115942189-B

Abstract

The disclosure relates to a connection interface, a control method and device of the connection interface, electronic equipment and a storage medium. The connecting interface comprises an interface connector and an interface part, wherein the interface connector is provided with a connecting pin, the connecting pin comprises an audio pin and a charging pin, the audio pin is connected with an audio data output end of an audio encoder, the charging pin is used for supporting charging and/or communication functions of a connecting object, the interface part is provided with a first interface which is in butt joint with other interfaces, and the first interface is electrically connected with the connecting pin. According to the method and the device, the audio data processing capacity of the CPU in the electronic equipment is fully utilized, the output audio data is subjected to corresponding coding processing and then is output to the outside through the interface, so that the peripheral does not need to have audio coding and decoding processing capacity and can play audio, the peripheral can be in butt joint with the interface provided by the embodiment of the disclosure through the interface, and the cost of the peripheral is greatly reduced.

Inventors

  • ZHOU LONGLONG

Assignees

  • 北京小米移动软件有限公司

Dates

Publication Date
20260508
Application Date
20210827

Claims (10)

  1. 1. A connection interface, the connection interface comprising: The interface connector is provided with a connecting pin, wherein the connecting pin comprises an audio pin and a charging pin, the audio pin is connected with an audio data output end of the audio encoder, and the charging pin is used for supporting charging and/or communication functions of different connecting objects; the interface part is provided with a first interface which is in butt joint with other interfaces, and the first interface is electrically connected with the connecting pin; the connection pin further comprises a D+ interface and a D-interface which are paired, and the connection interface further comprises: one end of the switch unit is respectively connected with the USB interface and the general purpose input/output GPIO of the processor, and the other end of the switch unit is connected with the paired D+ interface and D-interface; When the switch unit is connected with the GPIO and the paired D+ interfaces and D-interfaces, the paired D+ interfaces and D-interfaces are used as feedback pins to output control information for audio data and/or receive state information of audio data playing.
  2. 2. The connection interface according to claim 1, wherein the first interface supports a USB function when the switching unit communicates the USB interface with the paired d+ interface and D-interface.
  3. 3. The connection interface of claim 1 or 2, wherein the interface connector comprises a TypeC connector; the audio pins comprise SBU1 pins and SBU2 pins; The switch unit is used for respectively connecting a D+ interface and a D-interface in the USB interface of the processor with a first pair of D+ interfaces and D-interfaces of the TypeC connector.
  4. 4. A connection interface according to claim 3, wherein said switching unit communicates said GPIO with said connection pin, comprising: The switch unit is used for respectively connecting the first GPIO and the second GPIO of the processor with the second pair of D+ interfaces and the D-interface of the TypeC connector.
  5. 5. A control method for the connection interface according to any one of claims 1 to 4, characterized in that the method comprises: When the connection interface is detected to be connected with other interfaces and the equipment which is in butt joint with the connection interface through the other interfaces is determined to support an audio output function, the connection interface outputs audio data output by an audio encoder which is connected with the connection interface to the equipment through the other interfaces; Detecting GPIO of a processor connected with a D+ interface and a D-interface which are paired in the connection interface, sending a control instruction of audio data to the equipment through a connection channel between the GPIO and the other interfaces when the GPIO is connected with the equipment through the other interfaces, and receiving information of an audio data playing result sent by the equipment, wherein the control instruction is used for adjusting the output state of the audio data.
  6. 6. The method of claim 5, wherein in the case where the connection interface comprises a TypeC connection interface, the SBU1 pin and the SBU2 pin of the TypeC connection interface are correspondingly connected with an audio clock CLK signal and an audio data DAT signal of the audio encoder.
  7. 7. The method of claim 5, wherein the method further comprises: The device decodes and converts the audio signal, and can realize multi-channel output through external equipment in the process of audio signal transmission after amplification and play.
  8. 8. A control device for a connection interface according to any one of claims 1 to 4, characterized in that the device comprises: the detection unit is used for detecting whether the connection interface is connected with other interfaces or not; The determining unit is used for determining whether equipment which is in butt joint with the connecting interface through the other interfaces supports an audio output function or not when the detecting unit detects that the connecting interface is connected with the other interfaces; The processing unit is used for enabling the connection interface to output the audio data output by the self-connected audio encoder to the equipment through the other interfaces when the determining unit determines that the equipment supports the audio output function; the processing unit is further configured to send a control instruction of audio data to the device through a connection channel between the GPIO and the other interfaces when the detection unit detects that the d+ interface and the D-interface, which are paired in the connection interface, are connected with the GPIO of the processor, and receive information of a playing result of the audio data sent by the device, where the control instruction is used to adjust an output state of the audio data.
  9. 9. An electronic device having a connection interface as claimed in any one of claims 1 to 4, the electronic device further comprising a processor and a memory for storing processor executable instructions, wherein the processor is configured to be able to execute the control method of the connection interface as claimed in any one of claims 5 to 7 when the executable instructions in the memory are invoked.
  10. 10. A non-transitory computer readable storage medium, which when executed by a processor of an electronic device, causes the electronic device to perform the control method of a connection interface as claimed in any one of claims 5 to 7.

Description

Connection interface, control method and device of connection interface, electronic equipment and storage medium Technical Field The present disclosure relates to a connection interface audio output technology in an electronic device, and in particular, to a connection interface, a control method and apparatus of the connection interface, an electronic device, and a storage medium. Background Currently, when audio playing is performed by using a peripheral, there are several schemes for playing by bluetooth, such as a bluetooth speaker, a bluetooth headset, etc. However, bluetooth wireless transmission is easy to be interfered, so that sudden disconnection or noise and the like are caused, in addition, bluetooth cannot support stereo playing and can only play a single sound channel, and audio is played through headphones, including headphones and a sound box. However, the audio output mode has the defects that the signal transmitted by the earphone is an analog signal and the amplitude of the signal is very low, when the audio signal is output through the loudspeaker box, the audio signal is amplified, the noise is inevitably amplified, the audio signal is distorted, the audio transmission is carried out through the USB port, and the audio original signal is transmitted through the USB D+/D-, and the defect that the requirement on the peripheral equipment is relatively high, the peripheral equipment is required to have the functions of USB decoding and audio decoding, and the cost of the peripheral equipment is greatly increased. Disclosure of Invention The disclosure provides a connection interface, a control method and device of the connection interface, electronic equipment and a storage medium. According to a first aspect of embodiments of the present disclosure, there is provided a connection interface comprising: the interface connector is provided with a connecting pin, wherein the connecting pin comprises an audio pin and a charging pin, and the audio pin is connected with an audio data output end of the audio encoder; The interface part is provided with a first interface which is in butt joint with other interfaces, and the first interface is electrically connected with the connecting pin. Optionally, the connection interface further includes: one end of the switch unit is respectively connected with the USB interface of the processor and the general purpose input/output GPIO, and the other end of the switch unit is connected with the connecting pin; When the switch unit is communicated with the USB interface and the connection pin, the first interface supports the USB function; And when the switch unit is communicated with the GPIO and the connection pin, the first interface supports the GPIO function. Optionally, the connection pin further includes: and the feedback pin is used for receiving the state information of the audio data output and/or outputting control information for the audio data. Optionally, the interface connector comprises a TypeC connector; the audio pins comprise SBU1 pins and SBU2 pins; The switch unit connects the D+ and D-interfaces of the processor with the first pair of D+ and D-interfaces of the TypeC connector respectively. Optionally, the switch unit communicates the GPIO with the connection pin, including: The switch unit is used for respectively connecting the first GPIO and the second GPIO of the processor with the second pair of D+ and D-interfaces of the TypeC connector. According to a second aspect of the embodiments of the present disclosure, there is provided a control method of a connection interface, including: When the connection interface is detected to be connected with other interfaces and the equipment which is in butt joint with the connection interface through the other interfaces is determined to support the audio output function, the connection interface outputs the audio data output by the audio encoder which is connected with the connection interface to the equipment through the other interfaces. Optionally, the connection interface includes a TypeC connection interface; And an SBU1 pin and an SBU2 pin of the TypeC connection interface are correspondingly connected with an audio clock CLK signal and an audio data DAT signal of the audio encoder. Optionally, the method further comprises: Detecting GPIO of the connection interface connected with the processor, when the GPIO is connected with the equipment through the other interfaces, sending control instructions of audio data to the equipment through a connection channel between the GPIO and the other interfaces, and receiving information of an audio data playing result sent by the equipment, wherein the control instructions are used for adjusting the output state of the audio data. Optionally, the method further comprises: The device decodes and converts the audio signal, and can realize multi-channel output through external equipment in the process of audio signal transmission after amplification a