Data transmission method and apparatus, and electronic device and storage medium

By preset format packaging of audio data and control instructions, and using data slot transmission in the audio bus protocol, the problem that the I2S bus cannot transmit audio data and control instructions at the same time is solved, and cost reduction and efficiency improvement are achieved.

WO2024255033A1PCT designated stage expired Publication Date: 2024-12-19SHANGHAI AWINIC TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/124873
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-16
Filing Date
2023-10-17
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

The existing I2S bus interface cannot transmit audio data and control instructions at the same time, resulting in the need to add additional synchronization ports or pins, which increases the cost of the chip.

Method used

The audio data and control command information are encapsulated in a preset format through the data packaging module, and transmitted simultaneously through the audio bus. The data slots in the audio bus protocol divide the audio data and control commands to realize the mutual communication between audio data and control commands No interference with transmission.

Benefits of technology

It realizes the simultaneously transmitting audio data and control instructions through the I2S bus, reducing the cost of the chip and improving the data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023124873_19122024_PF_FP_ABST
    Figure CN2023124873_19122024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data transmission, and in particular to a data transmission method and apparatus, and an electronic device and a storage medium. Specifically, the electronic device comprises a data encapsulation module, a data sending module and a data interface module. The method comprises: a data encapsulation module acquiring first audio data and control instruction information; the data encapsulation module encapsulating the first audio data and the control instruction information according to a preset format, so as to obtain encapsulated data, wherein the preset format is used for defining relative locations and bit widths of the first audio data and the control instruction information; and a data sending module transmitting the encapsulated data to a data interface module by means of an audio bus. In this way, on the basis of the data transmission method, audio data and control instructions can be simultaneously transmitted by means of an audio bus, and the costs of chips are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Data transmission method, device, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on June 16, 2023, with application number 202310722388.5 and application name “Data transmission method, device, electronic device and storage medium”. The entire contents of the above application are incorporated by reference into this application. Technical Field

[0002] The present invention relates to the technical field of data transmission, and in particular to a data transmission method, device, electronic device and storage medium. Background Art

[0003] The I2S (Inter-IC Sound) bus, also known as the integrated circuit audio bus, is a bus standard developed by Philips for transmitting audio data between digital audio devices. This bus is specifically designed for data transmission between audio devices and is widely used in various multimedia systems. In existing I2S interface data transmission schemes, audio data and control commands are transmitted separately via different buses. For example, the I2S bus is used only to transmit audio data and clock signals, while control commands, such as gain control commands, voltage control commands, and power control commands, are transmitted via other buses.

[0004] It is understandable that transmitting control instructions through other buses requires additional synchronization ports or pins, thereby increasing the cost of the chip.

[0005] Summary of the Invention

[0006] The present application provides a data transmission method, device, electronic device and storage medium, which encapsulate first audio data and control instruction information in a preset format, thereby achieving simultaneous transmission of audio data and control instruction information through an audio bus.

[0007] In the first aspect, the present application provides a data transmission method, which includes: the electronic device includes a data encapsulation module, a data sending module and a data interface module, and the method includes: the data encapsulation module obtains first audio data and control instruction information; the data encapsulation module encapsulates the first audio data and control instruction information according to a preset format to obtain encapsulated data, and the preset format is used to limit the relative position and bit width of the first audio data and the control instruction information; the data sending module transmits the encapsulated data to the data interface module through the audio bus.

[0008] For example, the preset format may be an audio bus protocol, which is as follows: the audio bus may include a serial clock signal Sclk line, a periodic signal WS line, and a data line. Each frame of data transmitted by the data line in the audio bus includes N data slots (i.e., slots), and different positions on each data slot may correspond to the transmission of first audio data, first-category control instruction information, and second-category control instruction information. For example, the lowest 2+X+log2M bits on each data slot are control instruction bits, wherein the lowest 2 bits are used to transmit the first-category control instruction information, and the remaining X+log2M bits are used to transmit the second-category control instruction information.

[0009] It will be appreciated that when transmitting encapsulated data, the first audio data, the second type of control instruction information, and the first type of control instruction information are fixed to different locations in the data slot. Therefore, at the same time, the audio bus can simultaneously transmit audio data, the second type of control instruction information, and the first type of control instruction information without interfering with each other. Furthermore, implementing the above data transmission method can also reduce chip costs.

[0010] In a possible implementation of the first aspect above, the method further includes: the electronic device further includes a parsing module; the method further includes: the data interface module unpacks the encapsulated data to obtain the first audio data and control instruction information; the parsing module parses the control instruction information based on a preset parsing protocol to obtain the control instruction and corresponding control information.

[0011] In a possible implementation of the first aspect above, the above method also includes: the control instruction includes first-category control instruction information and second-category control instruction information; the parsing protocol includes a first sub-parsing protocol and a second sub-parsing protocol; the parsing module parses the first-category control instruction information based on the first sub-parsing protocol, and obtains a first control instruction and first control information, wherein the first control information at least includes a first enable signal and a first register address; the parsing module parses the second-category control instruction information based on the second sub-parsing protocol, and obtains a second control instruction and second control information, wherein the second control information at least includes a first flag bit.

[0012] In a possible implementation of the first aspect above, the method also includes: a data encapsulation module encapsulates the first audio data and control instruction information according to a preset format to obtain encapsulated data, and the preset format is used to limit the relative position and bit width of the first audio data and the control instruction information, including: a data encapsulation module encapsulates the first audio data and control instruction information according to an audio bus protocol to obtain encapsulated data, and the audio bus protocol is used to limit the relative position and bit width of the first audio data and the control instruction information.

[0013] In a possible implementation of the first aspect above, the above method also includes: each frame of encapsulated data in the encapsulated data includes at least one data slot, and the data slot is divided into multiple areas; the bit width of the first audio data and control instruction information in the encapsulated data is determined based on the bit width of multiple areas of the data slot.

[0014] In a possible implementation of the first aspect above, the method further includes: the data sending module transmits the encapsulated data to the data interface module through the audio bus, including: the data sending module sends different encapsulated data to the data interface module through the audio bus based on different transmission signals.

[0015] In a possible implementation of the first aspect above, the method further includes: the data sending module sends different encapsulated data to the data interface module through the audio bus based on different transmission signals, including: the data sending module sends first encapsulated data to the data interface module through the audio bus based on the first transmission signal, wherein the first encapsulated data includes at least first audio data; the data sending module sends second encapsulated data to the data interface module through the audio bus based on the second transmission signal, wherein the second encapsulated data includes at least first audio data and first-class control instructions; the data sending module sends third encapsulated data to the data interface module through the audio bus based on the third transmission signal, wherein the third encapsulated data includes at least first audio data and second-class control instructions; the data sending module sends fourth encapsulated data to the data interface module through the audio bus based on the fourth transmission signal, wherein the fourth encapsulated data includes at least first audio data, first-class control instructions and second-class control instructions.

[0016] In a possible implementation of the first aspect above, the above method also includes: a first transmission signal is used to indicate that the clock signal satisfies a first condition, wherein the first condition is used to indicate that the clock signal is on a falling edge; a second transmission signal is used to indicate that the clock signal satisfies the first condition and the first indication signal satisfies the second condition, wherein the first indication signal is used to control the transmission of the second type of control instruction information, and the second condition is used to indicate that the first indication signal is 1; a third transmission signal is used to indicate that the clock signal satisfies the first condition and the first periodic signal satisfies a third condition, wherein the third condition is that the first periodic signal is 1; a fourth transmission signal is used to indicate that the clock signal satisfies the first condition, the first indication signal satisfies the second condition, and the first periodic signal satisfies the third condition.

[0017] In a possible implementation of the first aspect, the method further includes: the parsing module writing the first control instruction into a first register corresponding to the first register address based on the first enable signal.

[0018] In a possible implementation of the first aspect above, the above method also includes: the parsing module parses that the first flag bit is zero, and determines that the second type of control instruction is an invalid instruction; the parsing module parses that the first flag bit is a non-zero value, and determines the control content corresponding to the second type of control instruction based on the corresponding relationship between the value of the first flag bit and the preset value of the second control instruction, wherein the corresponding relationship is used to indicate the control content of the second type of control instruction corresponding to different first flag bit values.

[0019] In second aspect, the present application provides a data transmission device, which includes: a data encapsulation module, a data interface module and a parsing module; the data encapsulation module is used to obtain first audio data and control instructions; according to a preset format, the first audio data and control instruction information are encapsulated to obtain encapsulated data; a data sending module is used to transmit the encapsulated data to the data interface module via an audio bus; the data interface module is used to receive the encapsulated data transmitted via the audio bus; the parsing module is used to parse the control instruction information according to a preset parsing protocol to obtain control instructions and corresponding control information.

[0020] In a possible implementation of the second aspect, the apparatus further includes: a control module configured to adjust relevant parameters of the first audio data according to the parsed first control instruction and the second control instruction.

[0021] In a third aspect, the present application provides a chip, which includes the above-mentioned data transmission device.

[0022] In a fourth aspect, the present application provides an electronic device comprising one or more processors; one or more memories; and a chip as described above; the one or more memories store one or more programs, and when the one or more programs are executed by one or more processors, the electronic device executes the above-mentioned data transmission method.

[0023] In a fifth aspect, the present application provides a readable medium, in which instructions are stored. When the instructions are executed by an electronic device, the electronic device executes the above-mentioned data transmission method. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] FIG1 is a schematic flow chart showing a data transmission method according to an embodiment of the present application.

[0025] FIG2 a is a schematic diagram showing a method of transmitting packaged data based on an audio bus protocol according to an embodiment of the present application.

[0026] FIG2 b is a schematic diagram showing another method of transmitting packaged data based on the audio bus protocol according to an embodiment of the present application.

[0027] FIG3 a shows a parsing diagram of the first sub-parsing protocol according to an embodiment of the present application.

[0028] FIG3 b is a schematic diagram showing another parsing method of the first sub-parsing protocol according to an embodiment of the present application.

[0029] FIG4 is a schematic diagram showing the parsing of the second sub-parsing protocol according to an embodiment of the present application.

[0030] FIG5 is a module diagram showing a data transmission device according to an embodiment of the present application.

[0031] FIG6 is a schematic structural diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0033] As mentioned above, the existing data transmission scheme of the audio interface cannot transmit audio data and control instructions simultaneously through the I2S (inter-ic sound) bus.

[0034] In order to solve the above problems, the present application provides a data transmission method for use in electronic devices. Specifically, the method obtains first audio data and control instruction information through a data encapsulation module in the above electronic device. The data encapsulation module encapsulates the first audio data and control instruction information according to a preset format to obtain encapsulated data. The preset format is used to limit the relative position and bit width of the first audio data and the control instruction information. The data sending module transmits the encapsulated data to the data interface module via the audio bus.

[0035] In this way, the above-described data transmission method can achieve simultaneous transmission of audio data and control commands via the I2S (inter-IC sound) bus. When transmitting packaged data, the first audio data, the second type of control command information, and the first type of control command information are fixed to different positions in the data slot. Therefore, audio data, the second type of control command information, and the first type of control command information can be transmitted simultaneously at the same time without interfering with each other, reducing chip costs.

[0036] In some embodiments, the audio interface module decapsulates the encapsulated data to obtain the first audio data and the control instruction information, and the parsing module parses the control instruction information to obtain the corresponding control instruction and control information, and sends the corresponding control instruction to each control submodule according to the control information.

[0037] The preset format may be an audio bus protocol, which is as follows: the audio bus may include a serial clock signal Sclk line, a periodic signal WS line, and a data line. Each frame of data transmitted by the data line in the audio bus includes N data slots (i.e., slots), and different positions on each data slot may correspond to the transmission of first audio data, first-category control instruction information, and second-category control instruction information. For example, the lowest 2+X+log2M bits on each data slot are control instruction bits, wherein the lowest 2 bits are used to transmit the first-category control instruction information, and the remaining X+log2M bits are used to transmit the second-category control instruction information.

[0038] It can be understood that when the above-mentioned parsing module receives the second-category control instruction information and the first-category control instruction information, it parses the control instruction information according to the corresponding parsing protocol to obtain the control instruction and the corresponding control information. Among them, the parsing protocol for the first-category control instruction information (i.e., the first-category control instruction information) and the second-category control instruction information (i.e., the second-category control instruction information) is as follows:

[0039] The parsing module parses the first type of control instruction information according to the first sub-parsing protocol and obtains a first control instruction and first control information. The first control information includes a first enable signal and a first register address. When the parsing module parses and determines that the first enable signal is high, the parsing module writes the first control instruction into a first register corresponding to the first register address.

[0040] The parsing module parses the second type of control instruction information according to the second sub-parsing protocol, and obtains a second control instruction and second control information, wherein the second control information includes at least a first flag bit, and determines the control content of the corresponding second control instruction based on the data of the first flag bit.

[0041] The above-mentioned electronic devices can specifically be wearable devices, mobile phones, tablet computers, laptops, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), virtual reality devices and other electronic devices with audio playback functions, and this application does not make specific restrictions on this.

[0042] The specific implementation process of the data transmission method provided in the embodiment of the present application is described in detail below with reference to FIG1 .

[0043] Figure 1 illustrates a flow chart of a data transmission method according to an embodiment of the present application. It is understood that the execution entity of each step in the method may be a data transmission device that implements the data transmission method of the present application. The specific structure of the data transmission device or apparatus will be described in detail below and is not further elaborated here.

[0044] Specifically, the implementation process shown in FIG1 may include the following steps:

[0045] 101: Acquire first audio data and control instruction information.

[0046] Exemplarily, the above-mentioned data transmission device or equipment includes a data encapsulation module, which is used to obtain the first audio data and control instruction information.

[0047] In some embodiments, the first audio data and control instruction information can be obtained by processing a DSP (a digital data processor) or an AP (an application processor) in a data transmission device or equipment. In one embodiment, the data encapsulation module is stored in a host computer, wherein the host computer can be a software module in the data transmission device or equipment for providing encapsulated data to the data interface module, or can be other electronic devices connected to the data transmission device or equipment. In some embodiments, the host computer can be a mobile phone, and the electronic device connected thereto can be, for example, a speaker, etc., which is not limited here.

[0048] 102: Encapsulate the first audio data and the control instruction information according to a preset format to obtain encapsulated data.

[0049] Exemplarily, the data transmission device or apparatus encapsulates the first audio data and the control instruction information according to a preset format to obtain encapsulated data, wherein the preset format is used to define the relative positions and bit widths of the first audio data and the control instruction information.

[0050] It is understood that the above-mentioned preset format can be an audio bus protocol. For example, the audio bus protocol can be: each frame of data includes N data slots, and different positions on each data slot can correspond to transmitting the first audio data, the first type of control instruction information, and the first type of control instruction information. For example, the lowest 2+X+log2M bits of each data slot are the control instruction bits, that is, the lowest 2 bits can be the first type of control instruction information, and the remaining X+log2M bits can be the second type of control instruction information. In other embodiments, the order in which the above-mentioned audio data and control instructions are sent on the data slots can be audio data, second type of control instruction information, and first type of control instruction information, or audio data, first type of control instruction information, and second type of control instruction information, without limitation. The above-mentioned first type of control instruction information can be serial control instruction information, such as C in Figure 2a. The above-mentioned second type of control instruction information can be rapid control instruction information, such as B in Figure 2a. The above-mentioned positions can be the corresponding position order of A, B, and C shown in each data slot in Figure 2a, or can be another corresponding position order such as A, C, and B.

[0051] 103: Transmit the packaged data to the data interface module of the electronic device via the audio bus.

[0052] Exemplarily, encapsulated data is transmitted to the data interface module of the electronic device via the audio bus. As shown in Figure 2a, when the serial clock signal Sclk is at point Q, the data line in the audio bus begins to transmit encapsulated data. For example, when the serial clock signal Sclk is on a falling edge, the data line begins to transmit encapsulated data; when the frame signal Frame is detected to be high and the serial clock signal Sclk is on a falling edge, the data line simultaneously begins to transmit first-type control instruction information with a bit width of 2 bits; when the period signal WS is detected to be high and the serial clock signal Sclk is on a falling edge, the data line also simultaneously transmits second-type control instruction information with a bit width of X+log2Mbits, and so on.

[0053] It can be understood that the data sending module is used to transmit different packaged data according to the serial clock signal Sclk, the first indication signal (ie, the frame signal Frame) and the first period signal WS.

[0054] For example, the data sending module sends the first packaged data to the data interface module via the audio bus based on the first transmission signal, wherein the first packaged data at least includes the first audio data. The first transmission signal is used to indicate when the clock signal is at a falling edge.

[0055] The data sending module sends the second encapsulated data to the data interface module via the audio bus based on the second transmission signal, wherein the second encapsulated data includes at least the first audio data and the first type of control instruction. The second transmission signal is used to indicate when the first indication signal is 1 or high (for example, the frame signal Frame is high) and the clock signal is at a falling edge.

[0056] The data transmission module transmits third packaged data to the data interface module via the audio bus based on the third transmission signal, wherein the third packaged data includes at least the first audio data and the second-type control instruction. The third transmission signal is used to indicate when the first periodic signal is 1 or high and the clock signal is at a falling edge.

[0057] The data transmission module transmits the third encapsulated data to the data interface module via the audio bus based on the fourth transmission signal, wherein the fourth encapsulated data includes at least the first audio data, the first type of control instruction, and the second type of control instruction. The fourth transmission signal is used to indicate that the first indication signal is 1 or high (for example, the frame signal Frame is high), the first periodic signal is 1 or high, and the clock signal is at a falling edge.

[0058] It is understood that during packaged data transmission, the first audio data, the second type of control instruction information, and the first type of control instruction information are fixed at different locations on the data slot in the data line. Therefore, at the same time, the audio data, the second type of control instruction information, and the first type of control instruction information can be transmitted simultaneously without interfering with each other.

[0059] 104: Parse the control instruction in the encapsulated data to obtain the control instruction.

[0060] Exemplarily, the above-mentioned data transmission device further includes a parsing module, which is used to parse the control instruction information according to the corresponding parsing protocol.

[0061] In some embodiments, the first sub-parsing protocol for parsing the first type of control instruction information may be as follows: when the first indication signal satisfies the second condition, i.e., the frame signal Frame is 1 or high and the serial clock signal Sclk is at a falling edge, the first register address (i.e., Internal Reg ID) with a bit width of n bits, the first enable signal (i.e., WE) with a bit width of m bits, and the first control instruction (i.e., Ctrl Signal) with a bit width of p bits are sequentially transmitted in accordance with the audio bus protocol. Since the first type of control instruction information only occupies 2 bits in each data slot, and the first indication signal (i.e., frame signal) needs to occupy 1 bit during transmission, the other bit is used as the data bit (i.e., SD) to transmit the first register address, the first enable signal, and the first control instruction. Therefore, when transmitting the first register address with a bit width of n bits, n WS cycles are required to complete the transmission of the first register address. Then, the first enable signal with a bit width of m bits is transmitted starting from the n+1th cycle, and m WS cycles are required to complete the transmission of the first enable signal. Furthermore, the transmission of the first control instruction with a bit width of p bits begins in the m+1th cycle, requiring p WS cycles to complete the transmission of the first control instruction. When all of the above data is transmitted, the transmission of the first type of control instruction information is complete. For example, as shown in Figure 3a, when the frame signal is high and the serial clock signal is on the falling edge, the data bit SD transmits the first register address with a bit width of 7 bits in the first seven cycles, i.e., D in Figure 3a; in the eighth cycle, the data bit SD transmits the first enable signal with a bit width of 1 bit, i.e., E in Figure 3a; and in the next eight cycles, the data bit SD transmits the first control instruction with a bit width of 8 bits, i.e., F in Figure 3a.

[0062] When the parsing module detects that the first enable signal is high, the received first control instruction can be written into the first register corresponding to the first register address. In other embodiments, the bit width and sending order of the first register address, the first enable signal, and the first control instruction can be reasonably set according to actual needs and are not limited here.

[0063] It is understood that in other embodiments, the number of data bits (i.e., SD) of the first type of control instruction information can be increased to N bits, for example, as shown in FIG3b . The greater the number of data bits, the higher the transmission efficiency of the corresponding control instruction. Therefore, the number of data bits SD can be reasonably set according to actual conditions and is not limited here.

[0064] It is understood that the second sub-parsing protocol for parsing the second type of control instruction information can be: when the first cycle signal WS is 1 or high and the serial clock signal Sclk meets the first condition, the data line in the audio bus transmits the second control instruction (i.e., Ctrl Signal) and the first flag bit (i.e., Flag) in a predetermined order and bit width. The second control instruction has X bits, and the corresponding first flag bit has log2M bits, i.e., the number of built-in control instructions is M. It is understood that one second control instruction can be transmitted in one WS cycle. When the first flag bit = 0, it indicates that the second type of control instruction information is currently idle. When the first flag bit is non-zero, parsing can be performed according to a pre-defined instruction set. For example, when the first flag bit = 1, the transmitted control instruction corresponds to setting the clock frequency; when the first flag bit = 2, the transmitted control instruction corresponds to setting the voltage amplitude, etc. For example, as shown in Figure 4, when WS is 1 or high and the serial clock signal Sclk meets the first condition, the data line begins transmitting the control instruction (G in Figure 4) and the flag bit (H in the figure). The above instruction set can be adjusted and set according to actual conditions and is not limited here.

[0065] It can be understood that the transmission speed of the second type of control instruction information is faster than that of the first type of control instruction information. Therefore, the control data transmitted by the second type of control instruction information and the first type of control instruction information can be adjusted according to actual conditions, without any limitation here. In addition, the transmission speed of the transmission method of the second type of control instruction information is faster than that of the first type of control instruction information. Therefore, the appropriate method for transmitting control instructions can be adjusted according to actual conditions, without any limitation here. In other embodiments, only one of the fast transmission method and the serial transmission method can be selected for the transmission of control instructions, for example, only the fast transmission method can be used to transmit control instructions.

[0066] In an embodiment of the present application, the above-mentioned data transmission method may further include using the parsed control instructions to adjust the audio data in real time.

[0067] It is understood that the above steps 101 to 104 can be implemented by the modules in the following Figure 5. Figure 5 shows a module diagram of a data transmission device according to an embodiment of the present application.

[0068] As shown in Figure 5, the data transmission device includes a data encapsulation module, a data sending module, an audio interface module, a control instruction parsing module, and a control module. The control module includes multiple control word modules, such as a gain control module, a clock module, a power module, and a register control module.

[0069] It is understood that the data encapsulation module and the data transmission module are located in a host computer. The host computer can be a software module in an electronic device that provides encapsulated data to the audio interface module, or it can be another electronic device connected to the electronic device. In some embodiments, the host computer can be a mobile phone, and the electronic device connected thereto can be, for example, a speaker, etc., without limitation herein.

[0070] The data encapsulation module is used to encapsulate the first audio data and the control instruction information according to the audio bus protocol. The audio bus protocol has been described in detail in the above step 102 and will not be described in detail here.

[0071] The data sending module is used to transmit corresponding encapsulated data to the audio interface module through the audio bus according to the transmission signal.

[0072] The data interface module is connected to the host computer via an audio bus to implement communication with the host computer and receive encapsulated data transmitted by the host computer. The audio bus may be an I2S bus or a TDM bus. For example, the audio interface module receives encapsulated data transmitted by the host computer via the I2S bus and is also used to decapsulate the received encapsulated data to obtain the first audio output data and control instruction information.

[0073] The parsing module is used to parse the control instruction information according to the corresponding parsing protocol.

[0074] The control module includes a plurality of control submodules for adjusting relevant parameters of the audio data according to corresponding control instructions.

[0075] The embodiment of the present application further provides an electronic device 100 for executing the data transmission method shown in Figure 1. Figure 6 provides a schematic structural diagram of the electronic device 100 according to the embodiment of the present application.

[0076] As shown in FIG6 , the electronic device 100 includes one or more processors 101, a system memory 102, a non-volatile memory (NVM) 103, an input / output (I / O) device 104, a communication interface 105, and a system control logic 106 for coupling the processor 101, the system memory 102, the non-volatile memory 103, the communication interface 105, and the input / output (I / O) device 104. Specifically:

[0077] The processor 101 may include one or more processing units, for example, a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI), a processor or a programmable logic device (FPGA) (field programmable gate array), a neural network processor (NPU), etc. The data processing unit or processing circuit may include one or more single-core or multi-core processors.

[0078] System memory 102 is a volatile memory, such as random-access memory (RAM) or double data rate synchronous dynamic random access memory (DDR SDRAM). System memory is used to temporarily store data and / or instructions. For example, in some embodiments, system memory 102 may be used to store parsed control instructions.

[0079] The non-volatile memory 103 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, the non-volatile memory 103 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as a hard disk drive (HDD), a compact disc (CD), a digital versatile disc (DVD), a solid-state drive (SSD), etc. In some embodiments, the non-volatile memory 103 may also be a removable storage medium, such as a secure digital (SD) memory card.

[0080] In particular, the system memory 102 and the non-volatile memory 103 may respectively include a temporary copy and a permanent copy of the instruction 107. The instruction 107 may include instructions that, when executed by at least one of the processors 101, enable the electronic device 100 to implement the data transmission method provided in various embodiments of the present application.

[0081] The communication interface 105 may include a transceiver for providing a wired or wireless communication interface for the electronic device 100, thereby communicating with any other suitable device via one or more networks. In some embodiments, the communication interface 105 may be integrated into other components of the electronic device 100, for example, the communication interface 105 may be integrated into the processor 101. In some embodiments, the electronic device 100 can communicate with other devices via the communication interface 105.

[0082] The input / output (I / O) device 104 may include input devices such as a keyboard, a mouse, etc., and output devices such as a display, etc. A user may interact with the electronic device 100 through the input / output (I / O) device 104 .

[0083] System control logic 106 may include any suitable interface controller to provide any suitable interface with other modules of electronic device 100. For example, in some embodiments, system control logic 106 may include one or more memory controllers to provide interfaces to system memory 102 and non-volatile memory 103.

[0084] In some embodiments, at least one of the processors 101 may be packaged together with the logic of one or more controllers for the system control logic 106 to form a system in package (SiP). In other embodiments, at least one of the processors 101 may be integrated with the logic of one or more controllers for the system control logic 106 on the same chip to form a system-on-chip (SOC).

[0085] It will be understood that the structure of the electronic device 100 shown in FIG6 is merely an example. In other embodiments, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or may have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware, without limitation herein.

[0086] An embodiment of the present application further provides a chip, which includes a data transmission device.

[0087] The embodiments of the present application also provide a computer program product for implementing the data transmission methods provided in the above embodiments.

[0088] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as computer modules or module codes executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0089] The module code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0090] Module code can be implemented with high-level modular language or object-oriented programming language to communicate with the processing system. When necessary, module code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.

[0091] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media includes any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

[0092] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not imply that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features. References to "one embodiment" or "embodiment" in the specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one exemplary embodiment or technology disclosed according to the embodiments of the present application. The appearance of the phrase "in one embodiment" in various places in the specification does not necessarily all refer to the same embodiment.

[0093] The disclosure of the embodiments of the present application also relates to an operating device for executing the text. The device can be constructed specifically for the required purpose or it can include a general-purpose computer that is selectively activated or reconfigured by a computer program stored in the computer. Such a computer program can be stored in a computer-readable medium, such as, but not limited to, any type of disk, including a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC) or any type of medium suitable for storing electronic instructions, and each can be coupled to a computer system bus. In addition, the computer mentioned in the specification can include a single processor or can be an architecture involving multiple processors for increased computing power.

[0094] It should also be stated that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is a sequence between the steps, the written description shall prevail.

[0095] In addition, the language used in this specification has been primarily selected for readability and instructional purposes and may not be selected to describe or limit the disclosed subject matter. Therefore, the present disclosure of embodiments is intended to illustrate, not to limit, the scope of the concepts discussed herein.

Claims

1. A data transmission method, characterized in that: Applied to an electronic device, the electronic device includes a data encapsulation module, a data sending module and a data interface module, and the method includes: The data encapsulation module obtains the first audio data and the control instruction information; The data encapsulation module encapsulates the first audio data and the control instruction information according to a preset format to obtain encapsulated data, wherein the preset format is used to limit the relative position and bit width of the first audio data and the control instruction information; The data sending module transmits the encapsulated data to the data interface module through the audio bus.

2. The method according to claim 1, wherein the electronic device further comprises a parsing module; the method further comprises: The data interface module decapsulates the encapsulated data to obtain the first audio data and the control instruction information; The parsing module parses the control instruction information based on a preset parsing protocol to obtain the control instruction and the corresponding control information.

3. The method according to claim 2, characterized in that The control instruction includes first-type control instruction information and second-type control instruction information; the resolution protocol includes a first sub-resolution protocol and a second sub-resolution protocol; The parsing module parses the first type of control instruction information based on the first sub-parsing protocol to obtain a first control instruction and first control information, wherein the first control information at least includes a first enable signal and a first register address; The parsing module parses the second type of control instruction information based on the second sub-parsing protocol to obtain a second control instruction and second control information, wherein the second control information at least includes a first flag bit.

4. The method according to any one of claims 1 to 3, characterized in that: The data encapsulation module encapsulates the first audio data and the control instruction information according to a preset format to obtain encapsulated data, wherein the preset format is used to limit the relative position and bit width of the first audio data and the control instruction information, including: The data encapsulation module encapsulates the first audio data and the control instruction information according to the audio bus protocol to obtain encapsulated data. The audio bus protocol is used to limit the relative position and bit width of the first audio data and the control instruction information.

5. The method according to claim 4, characterized in that Each frame of encapsulated data in the encapsulated data includes at least one data slot, and the data slot is divided into a plurality of areas; The bit widths of the first audio data and the control instruction information in the encapsulated data are determined based on the bit widths of multiple areas of the data slot.

6. The method according to claim 1, characterized in that The data sending module transmits the encapsulated data to the data interface module through the audio bus, including: The data sending module sends different encapsulated data to the data interface module through the audio bus based on different transmission signals.

7. The method according to claim 6, characterized in that The data sending module sends different packaged data to the data interface module through the audio bus based on different transmission signals, including: The data sending module sends the first packaged data to the data interface module through the audio bus based on the first transmission signal, wherein the first packaged data at least includes the first audio data; The data sending module sends the second packaged data to the data interface module through the audio bus based on the second transmission signal, wherein the second packaged data at least includes the first audio data and the first type of control instruction information; The data sending module sends the third packaged data to the data interface module through the audio bus based on the third transmission signal, wherein the third packaged data at least includes the first audio data and the second type of control instruction information; The data sending module sends the fourth encapsulated data to the data interface module through the audio bus based on the fourth transmission signal, The fourth encapsulated data at least includes the first audio data, the first type of control instruction information and the second type of control instruction information.

8. The method according to claim 7, characterized in that The first transmission signal is used to indicate that the clock signal satisfies a first condition, wherein the first condition is used to indicate that the clock signal is at a falling edge; The second transmission signal is used to indicate that the clock signal satisfies a first condition and the first indication signal satisfies a second condition, wherein the first indication signal is used to control the transmission of the second type of control instruction information, and the second condition is used to indicate that the first indication signal is 1; The third transmission signal is used to indicate that the clock signal satisfies the first condition and the first periodic signal satisfies the third condition, wherein the third condition is that the first periodic signal is 1; The fourth transmission signal is used to indicate that the clock signal satisfies the first condition, the first indication signal satisfies the second condition, and the first periodic signal satisfies the third condition.

9. The method according to claim 3, characterized in that: The method further comprises: The parsing module writes the first control instruction into a first register corresponding to the first register address based on the first enable signal.

10. The method according to claim 3, characterized in that: The method further comprises: The parsing module parses that the first flag bit is zero, and determines that the second type of control instruction is an invalid instruction; The parsing module parses the first flag bit as a non-zero value, and determines the control content corresponding to the second type of control instruction based on the numerical value of the first flag bit and the preset correspondence relationship of the second control instruction, wherein the correspondence relationship is used to indicate the control content of the second type of control instruction corresponding to different first flag bit numerical values.

11. A data transmission device, characterized in that: include: Data encapsulation module, data interface module and parsing module; A data encapsulation module, used to obtain first audio data and control instructions; Encapsulating the first audio data and the control instruction information according to a preset format to obtain encapsulated data; A data sending module, used for transmitting the encapsulated data to the data interface module via an audio bus; A data interface module, used for receiving encapsulated data transmitted via an audio bus; The parsing module is used to parse the control instruction information according to a preset parsing protocol to obtain the control instruction and the corresponding control information.

12. The device according to claim 11, characterized in that The data transmission device further includes: The control module is used to adjust the relevant parameters of the first audio data according to the parsed first control instruction and the second control instruction.

13. A chip, characterized in that: The chip comprises a data transmission device as claimed in any one of claims 11 to 12.

14. An electronic device, characterized in that: include: one or more processors; one or more memories; And a chip as claimed in claim 13; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the data transmission method described in any one of claims 1 to 10.

15. A readable medium, characterized in that The readable medium stores instructions, and when the instructions are executed by an electronic device, the electronic device executes the data transmission method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Audio acquisition device, audio receiving device and audio processing method

    CN112639963A

  • Single-channel mode I2S interface MEMS microphone single differential bus transmission method

    CN115835108A

  • Data transmission method and device, electronic equipment and storage medium

    CN116662245A

  • Transmitting / receiving system using watermark ascontrol signal and method thereof

    KR1020030016583A

  • Techniques for Transmitting a Command to Control a Peripheral Device through an Audio Port

    US20150052270A1