CN109976694B - Data transmission device, terminal, method and processor system - Google Patents

Data transmission device, terminal, method and processor system Download PDF

Info

Publication number
CN109976694B
CN109976694B CN201711447978.2A CN201711447978A CN109976694B CN 109976694 B CN109976694 B CN 109976694B CN 201711447978 A CN201711447978 A CN 201711447978A CN 109976694 B CN109976694 B CN 109976694B
Authority
CN
China
Prior art keywords
audio
path
controller
usb
conversion module
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
CN201711447978.2A
Other languages
Chinese (zh)
Other versions
CN109976694A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201711447978.2A priority Critical patent/CN109976694B/en
Publication of CN109976694A publication Critical patent/CN109976694A/en
Application granted granted Critical
Publication of CN109976694B publication Critical patent/CN109976694B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • G06F13/4063Device-to-bus coupling
    • 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/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • 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

Abstract

The embodiment of the invention discloses a data transmission device, a terminal, a method and a processor system. The data transmission equipment is used for a terminal, and comprises the following components: the USB interface, the conversion module, the first USB controller and the second USB controller; the conversion module is respectively connected with the USB interface, the first USB controller and the second USB controller, the first USB controller is connected with the central processing unit of the terminal, and the second USB controller is connected with the audio processor of the terminal; the conversion module, the first USB controller and the processor form a first path, and the conversion module, the second USB controller and the audio processor form a second path; the conversion module is used for enabling the central processing unit to establish communication connection with the external equipment through a first path when the USB interface is connected with the external equipment; and when receiving the switching instruction sent by the central controller, the audio processor is enabled to establish communication connection with the external equipment through the second path.

Description

Data transmission device, terminal, method and processor system
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a device, a terminal, a method, and a processor system for data transmission.
Background
The Type C (Type C) is a connection interface of a Universal Serial Bus (USB) interface, the Type C Type USB interface (Type C interface) may not distinguish between the front and the back, and the Type C interface can support the functions of USB standard such as charging, data transmission, display output, and the like, so the Type C interface is widely applied in the terminal device. At present, the earphone of Type C Type interface has also successfully been used, and the earphone of Type C Type interface can with Type C interface connection in the terminal to make the terminal realize charging, transmission data, show the function such as output and audio transmission through Type C interface.
At present, in a terminal provided with a Type C interface, an accessed external device is processed by a processor. Signals transmitted between the processor and the external device include digital signals and analog signals, so the processor generally controls the accessed external device in a digital-analog hybrid control manner. For example, when the external device is an earphone with a Type C Type interface, the terminal enters an audio service processing mode, and a digital signal is transmitted between the processor and the access device; when the external device is other device, the terminal enters into data service processing mode, and analog signal is transmitted between the processor and the access device.
Since the digital signal and the analog signal are transmitted between the terminal and the access device through the same path, the path between the terminal and the access device needs to realize compatible transmission of the digital signal and the analog signal, which results in longer time delay and higher power consumption of audio data processing, and reduces the efficiency of signal processing.
Disclosure of Invention
The application provides a data transmission device and a data transmission method, which can reduce the time delay and power consumption of audio data processing when an audio device is accessed.
In a first aspect, the present application provides a device for data transmission, including: for a terminal, the data transmission device comprises: a USB (Universal Serial Bus) interface, a conversion module, a first USB controller and a second USB controller;
the USB interface is used for being connected with the external equipment; the conversion module is respectively connected with the USB interface, the first USB controller and the second USB controller, the first USB controller is connected with a central processing unit of the terminal, and the second USB controller is connected with an audio processor of the terminal; the conversion module, the first USB controller and the processor form a first path, and the conversion module, the second USB controller and the audio processor form a second path;
the conversion module is used for enabling the central processing unit to be in communication connection with the external equipment through the first path when the USB interface is connected with the external equipment; and when receiving a switching instruction sent by the central processing unit, the audio processor is enabled to establish communication connection with the external device through the second path, and the audio processor is enabled to transmit audio data with the external device through the second path, wherein the switching instruction is sent when the central processing unit determines that the external device is an audio device.
In the application, a first USB controller is connected with a central processing unit of a terminal, a second USB controller is connected with an audio processor of the terminal, a first path is formed by a conversion module, the first USB controller and the central processing unit, and a second path is formed by the conversion module, the second USB controller and the audio processor; when the USB interface is connected with external equipment, the conversion module firstly conducts the first path to establish connection between the central controller and the external equipment, so that the central controller can judge whether the external equipment is audio equipment; when the central controller judges that the external equipment is the audio equipment, a conversion instruction is sent to the conversion module, and after the conversion module receives the conversion instruction, the first path is conducted, so that the audio processor transmits audio data with the external equipment through the second path. Therefore, in the present application, when the access device is an audio device, the access device is converted into an audio processor for processing, that is, the audio processor transmits audio service data with the audio device through the second path, so as to avoid the problem that the delay and power consumption of signal transmission are high because the terminal and the accessed external device use the same path when transmitting digital signals and analog signals, and need to implement compatibility of digital signals and analog signals.
With reference to the first aspect, in a first implementation manner of the first aspect, the first USB controller is configured to execute a closing operation after receiving a closing instruction sent by the central controller, where the closing instruction is sent by the central controller when the central controller determines that the external device is an audio device.
When the audio processor transmits the audio data with the external device through the second path, the central processor does not need to communicate with the external device any more, and at this time, the central processor can send a closing instruction to the first USB controller, so that the first USB controller executes a flow of closing operation, power consumption of the data transmission device can be reduced, and power consumption of the terminal is further reduced.
With reference to the first aspect or any one of the above implementation manners of the first aspect, in a second implementation manner of the first aspect, the audio processor comprises a High-Fidelity (HI-FI) processor.
In the application, the quality of the output audio service data is improved by processing the audio service data through the HI-FI processor.
With reference to the first aspect or any one of the foregoing implementation manners of the first aspect, in a third implementation manner of the first aspect, the Type of the USB interface is a Type C Type.
With reference to the first aspect or any one of the foregoing implementation manners of the first aspect, in a fourth implementation manner of the first aspect, the first USB controller is a USB3.1 controller, and the second USB controller is a USB2.0 controller.
In a second aspect, the present application provides a terminal comprising the central processor, the audio processor and the device for data transmission as described in the first aspect or any of the embodiments of the first aspect;
the central processing unit is configured to establish a communication connection with the external device through the first path, and send the conversion instruction to the conversion module when the external device is determined to be an audio device.
The audio processor is used for establishing communication connection with the external equipment through the second path and transmitting audio data with the external equipment.
In a third aspect, the present application provides a method for data transmission, which is applied to a terminal, where the terminal includes the central processor, the audio processor, and a device for data transmission as described in the first aspect or any one of the embodiments of the first aspect; the method comprises the following steps:
when the USB interface is accessed to external equipment, the central processor establishes communication connection with the external equipment through the first path;
when the central controller judges that the external equipment is audio equipment, a conversion instruction is sent to the conversion module, so that the audio processor establishes communication connection with the external equipment through the second path;
the audio processor transmits audio data with the external device through the second path.
With reference to the third aspect, in a first implementation manner of the third aspect, before the sending, by the central controller, the conversion instruction to the conversion module when determining that the external device is an audio device, the method further includes:
the central controller acquires the identification of the external equipment from the external equipment through the first path;
the identification of the external device is the identification of the audio device.
With reference to the third aspect or any one of the above embodiments of the third aspect, in a second embodiment of the third aspect, the method further includes:
and when the central controller judges that the external equipment is non-audio equipment, the central controller transmits data with the external equipment through the first path.
With reference to the third aspect or any one of the foregoing embodiments of the third aspect, in a third implementation manner of the third aspect, when the central controller determines that the external device is an audio device, the method further includes:
and the central controller sends a closing instruction to the first USB controller, wherein the closing instruction is used for enabling the first USB controller to execute closing operation.
With reference to the third aspect or any one of the foregoing embodiments of the third aspect, in a fourth implementation of the third aspect, after the audio processor transmits audio data with the external device through the second path, the audio processor includes:
and the central controller controls to send a clock closing instruction to the conversion module, so that the conversion module closes the clock of the conversion module, and the clock of the conversion module is used for signal synchronization in the conversion module.
In a fourth aspect, the present application provides a processor system comprising a central processing unit, an audio processor, a first USB controller, a second USB controller, and a USB interface;
the central processor receives and transmits data from the USB interface through the first USB controller, and the audio processor receives and transmits audio data from the USB interface through the second USB controller;
the processor system further comprises a translation module;
the conversion module is used for controlling the on-off of a data path between the first USB controller and the USB interface, and the conversion module is also used for controlling the on-off of a data path between the second USB controller and the USB interface.
With reference to the fourth aspect, in a first implementation manner of the fourth aspect, when the central processing unit recognizes that the external device connected to the USB interface is an audio playing device, the central processing unit instructs the audio processor to send audio data to the external device through the second USB controller.
With reference to the fourth aspect or any one of the foregoing embodiments of the fourth aspect, in a second implementation manner of the fourth aspect, when the central processing unit recognizes that the external device connected to the USB interface is an audio playing device, the central processing unit instructs the conversion module to turn off a data path between the first USB controller and the USB interface.
With reference to the fourth aspect or any one of the foregoing embodiments of the fourth aspect, in a third embodiment of the fourth aspect, when the central processing unit recognizes that the external device connected to the USB interface is an audio playing device, the central processing unit instructs the conversion module to open a data path between the second USB controller and the USB interface.
With reference to the fourth aspect or any one of the foregoing embodiments of the fourth aspect, in a fourth embodiment of the fourth aspect, the external device is a type C headset.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly described below.
Fig. 1 is a schematic structural diagram of a data transmission apparatus provided in accordance with an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a terminal provided in accordance with an embodiment of the present invention;
FIG. 3 is a schematic flow chart diagram of a method of data transmission provided in accordance with an embodiment of the present invention;
fig. 4 is a schematic block diagram of a processor system provided in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. The embodiments and features of the embodiments in the present application may be combined with each other without conflict.
The embodiment of the invention can be used for the scene of data transmission between the terminal and the accessed external equipment.
An embodiment of the present invention provides a data transmission device 11, which is used for a terminal, and as shown in fig. 1, the data transmission device 11 includes: a first USB controller 111, a second USB controller 112, a conversion module 113 and a USB interface 114.
Among other things, the USB interface 114 may be used to connect with external devices; the conversion module 113 is respectively connected with the USB interface 114, the first USB controller 111 and the second USB controller 112, the first USB controller 111 is connected with the central processing unit of the terminal, and the second USB controller 112 is connected with the audio processor of the terminal; the conversion module 113, the first USB controller 111 and the processor form a first path, and the conversion module 113, the second USB controller 112 and the audio processor form a second path.
As can be seen from fig. 1, the conversion module 113 is connected to the first USB controller 111 and the second USB controller 112, respectively, so as to form two paths that can be connected to external devices. The first USB controller 111 is configured to be connected to a central processing unit of the terminal, and a first path between the central processing unit and the conversion module 113 is formed by combining the first USB controller 111 and the conversion module 113. The second USB controller 112 is used for connecting with the audio processor of the terminal, and a second path between the audio processor and the converting module 113 is formed by combining the second USB controller 112 and the converting module 113.
Because the terminal processes and transmits digital signals when accessing the audio equipment, and processes and transmits analog signals when accessing other equipment, two paths are set in the embodiment of the invention, and when the terminal accesses the audio equipment, the audio processor processes audio data through the second path; when the terminal is accessed to the non-audio equipment, the central processing unit processes the data through the first path, and when the access equipment is the audio equipment, the audio processor processes through the second path, namely, the audio processor transmits audio service data with the audio equipment through the second path, so that the problems that the compatibility of digital signal and analog signal transmission between the terminal and the accessed external equipment needs to be realized, and the time delay and power consumption of signal transmission are high are solved.
In the embodiment of the present invention, the conversion module 113 is configured to enable the central processing unit to be in communication connection with an external device through a first path when the USB interface 114 is connected with the external device; and when receiving a conversion instruction sent by the central controller, enabling the audio processor to establish communication connection with the external equipment through the second path, and enabling the audio processor to transmit audio data with the external equipment through the second path, wherein the conversion instruction is sent when the central controller judges that the external equipment is the audio equipment.
Specifically, the transition module 113 includes two states, an operating state and a standby state. When the USB interface 114 is idle, i.e., the USB interface 114 is not connected to an external device, the USB interface 114 is in a standby state in order to reduce power consumption. When an external device is connected to the USB interface 114, the USB interface 114 is in an operating state because of the need to interact with the external device through the USB interface 114.
When the USB interface 114 is connected to an external device, the state of the conversion module 113 is converted from the low power consumption state to the operating state, and the conversion module 113 firstly conducts the first path, so that the central processing unit can establish a communication connection with the external device through the first path.
The central processing unit can interact with the external equipment through the communication connection between the first path and the external equipment to acquire the information of the external equipment, so that the central processing unit can judge which kind of equipment the accessed external equipment is, and further can determine a processing mode. When the central processing unit determines that the external device is an audio device, a switching instruction may be sent to the switching module 113, so that the switching module 113 switches on the second path, thereby connecting the external device with the audio processor. When the conversion module 113 receives the conversion instruction sent by the central controller, the audio processor can be enabled to establish a communication connection with the external device through the second path, and the audio processor can be enabled to transmit audio data with the external device through the second path.
In the embodiment of the invention, when the central processing unit judges that the external equipment is non-audio equipment, the central processing unit processes the data of the external equipment through the first path and performs analog signal transmission with the accessed equipment through the first path.
Specifically, the second USB controller 112 includes two states, a power-up state and a power-down state. The first USB controller 111 includes two states, an operating state and a low power consumption state, wherein the low power consumption state refers to a state in which only the lowest operation can be maintained.
The transition module is in a low power consumption state, which means that the USB interface 114 is not connected to an external device, and in order to reduce loss, the first USB controller 111 may be in the low power consumption state, and the second USB controller 111 may be in the power-down state.
If the conversion module is in an operating state, it indicates that the USB interface 114 is connected to an external device. When the cpu determines that the external device is an audio device, the conversion module 113 switches on the second path. That is, the conversion module 114 converts the power-down state of the second USB controller 112 into the power-up state. Meanwhile, the first USB controller 111 may be in a low power consumption state in consideration of not requiring the first USB controller 111 to participate in the transmission of audio data and reducing power consumption.
And when the central processing unit judges that the external equipment is non-audio equipment, the central processing unit processes the data of the external equipment through the first path. Namely: the conversion module 114 converts the low power consumption state of the first USB controller 111 into an operating state. Meanwhile, the second USB controller 112 may be in a power-down state in view of not requiring the second USB controller 112 to participate in data processing of external devices and reducing power consumption.
It should be noted that the external device may be an audio device, a storage device, a charging device, or a HUB (HUB). Specifically, the audio device may include a speaker, and may be, for example, a headphone, a sound device, or the like. The Type of the USB interface 114 is not limited, and may be, for example, a Type C Type.
In the embodiment of the invention, a first USB controller 111 is connected with a central processing unit of a terminal, a second USB controller 112 is connected with an audio processor of the terminal, a first path is formed by a conversion module 113, the first USB controller 111 and the central processing unit, and a second path is formed by the conversion module 113, the second USB controller 112 and the audio processor; when the USB interface 114 is connected to the external device, the conversion module 113 firstly switches on the first path to establish a connection between the central controller and the external device, so that the central controller can determine whether the external device is an audio device; when the central controller determines that the external device is an audio device, it sends a conversion instruction to the conversion module 113, and after the conversion module 113 receives the conversion instruction, the second path is turned on, so that the audio processor transmits audio data with the external device through the second path. Therefore, in the embodiment of the present invention, when the access device is an audio device, the access device is converted into an audio processor for processing, that is, the audio processor transmits audio service data with the audio device through the second path, and the second path is a path only used for transmitting audio data, so that when the access device is accessed, the time delay and power consumption of audio data processing are increased.
It should be noted that, after the external device establishes the communication connection with the audio processor, the central controller does not need to communicate with the external device through the USB interface 114, and at this time, the central controller may send a close instruction to the first USB controller 111, so that the first USB controller 111 changes the state.
The first USB controller 111 may change state by: the clock in the first USB controller 111 is first turned off, and then the first USB controller 111 is switched from the operating state to the low power consumption state. Therefore, the power consumption of the data transmission equipment can be reduced, and the power consumption of the terminal can be further reduced.
In addition, in the embodiment of the present invention, the audio processor is a processor that processes audio, and may specifically be a HI-FI processor, for example, a HI-FI digital signal processor, so that the quality of the output audio service data is improved by processing the audio service data through the HI-FI processor.
The conversion module 113 may be a USB interface network card (phy), and may adopt a structure of a photoelectric multiplexing (COMBO) phy to connect with the first USB controller 111 and the second USB controller 112 for multiplexing.
Since the central processing unit processes service data except for audio service, the processed data volume is large, and the processing performance requirement is high, the maximum transmission bandwidth of the USB2.0 is 480 megabits per second (Mbps), while the maximum transmission bandwidth of the USB3.1 is 10000Gbps, and it can be seen that the transmission bandwidth of the USB3.1 is much greater than the transmission bandwidth of the USB2.0, so the first USB controller 111 may be specifically a USB3.1 controller. However, the amount of audio service data in the terminal is usually small, and the performance and bandwidth of the USB2.0 controller can meet the requirement of audio service data transmission, so the second USB controller 112 may be specifically a USB2.0 controller, thereby further reducing the power consumption of data transmission.
An embodiment of the present invention provides a terminal 10, as shown in fig. 2, where the terminal 10 includes the central processing unit 12, the audio processing unit 13, and the data transmission device 11 shown in fig. 1.
The central processing unit 12 is configured to establish a communication connection with an external device through a first path, and send a conversion instruction to the conversion module 113 when the external device is determined to be an audio device.
And an audio processor 13 for establishing a communication connection with the external device through the second path and transmitting audio data.
In an implementation manner of the embodiment of the present invention, the central processing unit 12 is further configured to transmit data with the external device through the first path when the external device is determined to be a non-audio device.
In an implementation manner of the embodiment of the present invention, the central processing unit 12 is further configured to obtain an identifier of the external device from the external device through the first path; and when the identifier of the external device is the identifier of the audio device, determining that the external device is the audio device.
After the central processing unit 12 establishes communication connection with the external device, the identifier of the external device may be obtained. After acquiring the identifier of the external device from the external device, the central processing unit 12 can determine which device the external device is. If the obtained identifier of the external device is the identifier of the audio device, the external device can be determined to be the audio device; if the obtained identification of the external device is not the identification of the audio device, it may be determined that the external device is a non-audio device. The identifier of the external device may specifically be a device descriptor, for example, when the external device is a headset, the device descriptor is AC 3.
In an implementation manner of the embodiment of the present invention, the central processing unit 12 is further configured to send a close instruction to the first USB controller 111, where the close instruction is used to enable the first USB controller 111 to execute a close operation.
In an implementation manner of the embodiment of the present invention, the central processing unit 12 is further configured to send a clock closing instruction to the conversion module 113, so that the conversion module 113 closes the clock of the conversion module, where the clock of the conversion module is used for signal synchronization in the conversion module.
It should be noted that, when the central processing unit 12 determines that the external device is an audio device, the conversion module 113 turns on the second path. That is, the conversion module 114 converts the power-off state of the second USB controller 112 into the power-on state, and converts the power-off state of the audio processor 13 into the power-on state. Meanwhile, in view of not requiring the first USB controller 111 to participate in the transmission of audio data and reducing power consumption, the first USB controller 111 may be in a low power consumption state and the central processor 12 may be in a low power consumption state.
And when the central processing unit judges that the external equipment is non-audio equipment, the central processing unit processes the data of the external equipment through the first path. Namely: the conversion module 114 converts the low power consumption state of the first USB controller 111 into an operating state, and converts the low power consumption state of the central processing unit 12 into an operating state. Meanwhile, in view of not requiring the second USB controller 112 to participate in data processing of external devices and reducing power consumption, the second USB controller 112 may be in a power-down state and the audio processor 13 may be in a power-up state.
An embodiment of the present invention provides a method for data transmission, which can be used in the terminal 10 having the structure shown in fig. 2, as shown in fig. 3, and the method includes the following steps.
201, when the USB interface 114 accesses an external device, the central processor 12 establishes a communication connection with the external device through the first path.
When the terminal 10 accesses the external device through the USB interface 114, the first path is turned on, and the CPU can establish a communication connection with the external device through the first path.
After the external device accesses the terminal 10 through the USB interface 114, the external device may report to the CPU in an interrupt manner. At this time, the conversion module 113 may start to configure a pattern matching with the access device, and report the pattern to the CPU after the pattern matching is completed, so that the CPU executes an enumeration process, that is, a process in which the CPU establishes a communication connection with the external device through the first path.
In the process that the CPU establishes communication connection with the external equipment through the first path, the CPU allocates an address space for the external equipment so as to facilitate subsequent data transmission with the external equipment through the allocated address space.
Before step 201 is executed, the terminal 10 may further initialize the central processor 12, the first USB controller 111, and the conversion module 113, for example, configuring parameters, etc., where the parameters to be configured when the central processor 12 is initialized may include an identifier of an audio device, and the parameters to be configured when the conversion module 113 is initialized may include configuring an operation mode corresponding to a different external device, etc.
202, when the central controller determines that the external device is an audio device, it sends a switching instruction to the switching module 113, so that the audio processor 13 establishes a communication connection with the external device through the second path.
The central processing unit 12 can interact with the external device through the communication connection between the first path and the external device to acquire information of the external device, so that the central processing unit 12 can determine which device is accessed to the external device, and further determine a processing mode of the external device. When the central processing unit 12 determines that the external device is an audio device, it may send a switching instruction to the switching module 113, so that the switching module 113 switches on the second path, thereby connecting the external device with the audio processor 13.
Specifically, after acquiring the identifier of the external device from the external device, the central processing unit 12 can determine which device the external device is. If the obtained identifier of the external device is the identifier of the audio device, the external device can be determined to be the audio device; if the obtained identification of the external device is not the identification of the audio device, it may be determined that the external device is a non-audio device. The identifier of the external device may specifically be a device descriptor, for example, when the external device is a headset, the device descriptor is AC 3.
When the central processing unit 12 determines that the identifier of the external device is the identifier of the audio device, the audio processor 13 is determined to process the identifier, so that the central processing unit 12 controls the conversion module 113 to enable the audio processor 13 to establish a communication connection with the external device through the second path.
The manner in which the first path and the second path are communicated in the conversion module 113 may be controlled by instructions sent by the controller. When an external device is plugged into the USB interface 114, the conversion module 113 switches on the first path by default, receives the conversion instruction sent by the central processing unit 12 when the central processing unit 12 determines that the audio processor 13 is required to process the audio signal, and switches on the second path after receiving the conversion instruction sent by the central processing unit 12.
The switching module 113 may control the conducting path through a logic circuit, and when the first path needs to be conducted, a signal for conducting the first path may be input to the logic circuit, and when the second path needs to be conducted, a signal for conducting the second path may be input to the logic circuit, so as to control the conducting path.
In the process of establishing the communication connection between the audio processor 13 and the external device through the second path, the external device needs to be enumerated again, and an address space is newly allocated to the external device, so that the audio processor 13 can communicate with the external device through the newly allocated address space in the subsequent process.
It should be noted that, when the identifier of the external device is not the identifier of the audio device, the central processing unit 12 may determine that the accessed external device is a non-audio device, and then the central processing unit 12 is required to process the external device, so that the central processing unit 12 may continue to communicate with the external device through the first path and perform the processing of the service data.
203, the audio processor 13 transmits audio data with the external device through the second path.
After the audio processor 13 establishes a communication connection with the external device through the second path, it may process the audio service data and interact with the external device to transmit the audio data.
In the embodiment of the present invention, the first USB controller 111 is connected to the central processing unit 12 of the terminal 10, and the second USB controller 112 is connected to the audio processor 13 of the terminal 10; the conversion module 113, the first USB controller 111 and the central processing unit 12 form a first path; the conversion module 113, the second USB controller 112, and the audio processor 13 form a second path. When the USB interface 114 is connected to the external device, the conversion module 113 firstly switches on the first path to establish a connection between the central controller and the external device, so that the central controller can determine whether the external device is an audio device; when the central controller determines that the external device is an audio device, it sends a conversion instruction to the conversion module 113, and after the conversion module 113 receives the conversion instruction, the second path is turned on, so that the audio processor 13 transmits audio data with the external device through the second path. Therefore, in the embodiment of the present invention, when the access device is an audio device, the access device is converted into the audio processor 13 to perform processing, that is, the audio processor 13 transmits audio service data with the audio device through the second path, and the second path is a path only used for transmitting audio data, so that when the access device is accessed, the time delay and power consumption of audio data processing are increased.
In an implementation manner of the embodiment of the present invention, after the step 202 is executed, the external device communicates with the audio processor 13, and the central processing unit 12 does not need to communicate with the external device any more, at this time, the central processing unit 12 may send a closing instruction to the first USB controller 111, so that the first USB controller 111 executes a closing operation procedure, so as to save power consumption of the terminal 10.
The first USB controller 111 shutdown procedure may be: the clock in the first USB controller 111 is first turned off, and then reset and power down operations are performed.
In another implementation manner of the embodiment of the present invention, after the step 202 is executed, the central processing unit 12 may further send a clock closing instruction to the conversion module 113, so that the conversion module 113 closes the clock of the conversion module 113, and the clock of the conversion module 113 may be used for signal synchronization in the conversion module 113.
The clock of the conversion module 113 is used for signal synchronization in the conversion module 113. After step 202, the central processing unit 12 may further control the clock of the conversion module 113 to be turned off, so as to reduce the power consumption of the conversion module 113, and thus, the power consumption of the terminal 10 device.
It should be noted that, when the audio processor 13 transmits the audio data with the external device through the second path, the data transmission is performed through the conversion module 113, so that the conversion module 113 can only turn off the clock, but cannot perform the reset and power-down operations, thereby avoiding the influence on the data transmission process.
An embodiment of the present invention provides a processor system 30, as shown in fig. 4, the processor system 30 includes the central processing unit 12, the audio processing unit 13, and the data transmission device 11 shown in fig. 1.
The cpu 12 receives and transmits data from the USB interface 114 through the first USB controller 111, and the audio processor 13 receives and transmits audio data from the USB interface 114 through the second USB controller 112.
The conversion module 113 is used for controlling the switching of the data path between the first USB controller 111 and the USB interface 114, and the conversion module 113 is also used for controlling the switching of the data path between the second USB controller 112 and the USB interface 114.
When the central processing unit 12 recognizes that the external device connected to the USB interface 114 is an audio playing device, the central processing unit 12 instructs the audio processor 13 to send audio data to the external device through the second USB controller 112.
When the central processing unit 12 recognizes that the external device connected to the USB interface 114 is an audio playing device, the central processing unit 12 instructs the conversion module 113 to turn off the data path between the first USB controller 111 and the USB interface 114.
When the central processing unit 12 recognizes that the external device connected to the USB interface 114 is an audio playing device, the central processing unit 12 instructs the conversion module 113 to pass through the data path between the second USB controller 112 and the USB interface 114. Wherein, external equipment is type C earphone. In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), among others.

Claims (16)

1. A device for data transmission, wherein the device for data transmission is used for a terminal, and the device for data transmission comprises: the USB interface comprises a Universal Serial Bus (USB) interface, a conversion module, a first USB controller and a second USB controller;
the USB interface is used for connecting with external equipment; the conversion module is respectively connected with the USB interface, the first USB controller and the second USB controller, the first USB controller is connected with a central processing unit of the terminal, and the second USB controller is connected with an audio processor of the terminal; the conversion module, the first USB controller and the processor form a first path, and the conversion module, the second USB controller and the audio processor form a second path;
the conversion module is used for enabling the central processing unit to establish communication connection with the external equipment through the first path when the USB interface is connected with the external equipment; and when receiving a switching instruction sent by the central controller, the audio processor is enabled to establish communication connection with the external device through the second path, and the audio processor is enabled to transmit audio data with the external device through the second path, wherein the switching instruction is sent when the central controller determines that the external device is an audio device.
2. The device according to claim 1, wherein the first USB controller is configured to execute a shutdown operation after receiving a shutdown instruction sent by the central controller, where the shutdown instruction is sent by the central controller when the external device is determined to be an audio device.
3. The device of claim 1 or 2, wherein the audio processor comprises a high fidelity HI-FI processor.
4. The device of claim 3, wherein the Type of the USB interface is a Type C Type C Type.
5. The device of claim 4, wherein the first USB controller is a USB3.1 controller and the second USB controller is a USB2.0 controller.
6. A terminal, characterized in that it comprises said central processor, said audio processor and a device for data transmission according to any one of claims 1-5;
the central processing unit is used for establishing communication connection with the external equipment through the first path and sending the conversion instruction to the conversion module when the external equipment is determined to be audio equipment;
the audio processor is used for establishing communication connection with the external equipment through the second path and transmitting audio data with the external equipment.
7. A method of data transmission, characterized in that it is used in a terminal comprising said central processor, said audio processor and a device for data transmission according to any one of claims 1 to 5; the method comprises the following steps:
when the USB interface is accessed to external equipment, the central processor establishes communication connection with the external equipment through the first path;
when the central controller judges that the external equipment is audio equipment, a conversion instruction is sent to the conversion module, so that the audio processor establishes communication connection with the external equipment through the second path;
the audio processor transmits audio data with the external device through the second path.
8. The method of claim 7, wherein before sending the switching command to the switching module when the central controller determines that the external device is an audio device, the method further comprises:
the central controller acquires the identification of the external equipment from the external equipment through the first path;
the identification of the external device is the identification of the audio device.
9. The method according to claim 7 or 8, characterized in that the method further comprises:
and when the central controller judges that the external equipment is non-audio equipment, the central controller transmits data with the external equipment through the first path.
10. The method of claim 9, wherein when the central controller determines that the external device is an audio device, further comprising:
and the central controller sends a closing instruction to the first USB controller, wherein the closing instruction is used for enabling the first USB controller to execute closing operation.
11. The method of claim 10, wherein after the audio processor transmits audio data with the external device via the second path, comprising:
and the central controller controls to send a clock closing instruction to the conversion module, so that the conversion module closes the clock of the conversion module, and the clock of the conversion module is used for signal synchronization in the conversion module.
12. A processor system is characterized by comprising a central processing unit, an audio processor, a first USB controller, a second USB controller and a USB interface; the USB interface is used for connecting with external equipment;
the central processor receives and transmits data from the USB interface through the first USB controller, and the audio processor receives and transmits audio data from the USB interface through the second USB controller;
the processor system further comprises a translation module;
the conversion module is used for controlling the on-off of a data path between the first USB controller and the USB interface, and the conversion module is also used for controlling the on-off of a data path between the second USB controller and the USB interface.
13. The processor system according to claim 12, wherein when the cpu recognizes that the external device connected to the USB interface is an audio playing device, the cpu instructs the audio processor to send audio data to the external device through the second USB controller.
14. The processor system according to claim 13, wherein when the cpu recognizes that the external device connected to the USB interface is an audio playing device, the cpu instructs the conversion module to turn off the data path between the first USB controller and the USB interface.
15. The processor system according to claim 13, wherein when the cpu recognizes that the external device connected to the USB interface is an audio playing device, the cpu instructs the conversion module to open a data path between the second USB controller and the USB interface.
16. The processor system according to claim 12, wherein the external device is a type C headset.
CN201711447978.2A 2017-12-27 2017-12-27 Data transmission device, terminal, method and processor system Active CN109976694B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711447978.2A CN109976694B (en) 2017-12-27 2017-12-27 Data transmission device, terminal, method and processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711447978.2A CN109976694B (en) 2017-12-27 2017-12-27 Data transmission device, terminal, method and processor system

Publications (2)

Publication Number Publication Date
CN109976694A CN109976694A (en) 2019-07-05
CN109976694B true CN109976694B (en) 2020-11-06

Family

ID=67071281

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711447978.2A Active CN109976694B (en) 2017-12-27 2017-12-27 Data transmission device, terminal, method and processor system

Country Status (1)

Country Link
CN (1) CN109976694B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111143252B (en) * 2019-11-27 2022-06-21 网络通信与安全紫金山实验室 Mimicry control port multiplexing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031715B1 (en) * 2002-06-27 2006-04-18 Bellsouth Intellectual Property Corporation Generating cellsite data transmittals
CN101739374A (en) * 2008-11-20 2010-06-16 纬创资通股份有限公司 Signal transmission path selecting circuit and electronic device applying same
CN103902492A (en) * 2014-04-21 2014-07-02 飞天诚信科技股份有限公司 Working method of card reader

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7031715B1 (en) * 2002-06-27 2006-04-18 Bellsouth Intellectual Property Corporation Generating cellsite data transmittals
CN101739374A (en) * 2008-11-20 2010-06-16 纬创资通股份有限公司 Signal transmission path selecting circuit and electronic device applying same
CN103902492A (en) * 2014-04-21 2014-07-02 飞天诚信科技股份有限公司 Working method of card reader

Also Published As

Publication number Publication date
CN109976694A (en) 2019-07-05

Similar Documents

Publication Publication Date Title
JP5917408B2 (en) Configurable connector for system level communication
US8380243B2 (en) Dual-mode digital mobile communication terminal enabling CDMA and GSM
US9244871B2 (en) Method and apparatus for virtualizing hardware dongle over a wireless connection
CN110300318B (en) USB terminal interface circuit and USB terminal interface circuit control method
CN109660894B (en) Terminal peripheral and audio signal transmission method
US11403245B2 (en) Terminal, terminal peripheral, signal transmission system and signal sending and receiving method
US10380049B2 (en) Multi-host supported universal serial bus hub and automobile head unit using the same
KR20190065101A (en) An electronic device for transmitting and receiving data in a wireless communication system and a method thereof
CN107148649B (en) Audio reproducing apparatus and audio reproducing system
WO2019042421A1 (en) Method, apparatus and device for rate adjustment of usb data transmission, and storage medium
CN109976694B (en) Data transmission device, terminal, method and processor system
CN110350934B (en) Multi-card terminal, communication method thereof and computer equipment
JP6124167B2 (en) Data terminal, data transmission system, and hot swap control method
US11061464B2 (en) Electronic device, method for reducing power consumption, and apparatus
CN108966079B (en) Control method and system of audio device
WO2022041681A1 (en) Wireless earpieces, method for controlling wireless earpieces, and storage medium
WO2019075620A1 (en) Data processing system
US10515025B2 (en) Communication protocol adapter
CN117411992A (en) Conference machine control method and device, storage medium and conference machine
CN117061981A (en) Earphone sound effect regulation and control method, related equipment and storage medium
CN117061982A (en) Earphone sound effect quick setting method, related equipment and storage medium
WO2023024016A1 (en) Multifunctional sound pickup device
CN111045632A (en) Audio playing device and operation method thereof
WO2023024015A1 (en) Multifunctional electronic device
CN117061950A (en) Earphone sound effect control method, related equipment and storage medium

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