Master audio device and audio data transmission method
Patent Information
- Application Number
- CN202310793905.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-06-29
AI Technical Summary
[0003]因此,主音频设备是否具备拓展全景声播放效果的功能由是否内置连接模块决定,主音频设备配置被固定,缺少灵活性
[0010]本申请实施例提供的技术方案与现有技术相比具有如下优点:本申请实施例中,在检测到外设设备通过USB接口接入该音频设备的情况下,确定该外设设备是否为目标无线设备;在确定该外设设备为目标无线设备的情况下,控制将该USB接口扩展为目标I2S接口;对目标音频数据和目标控制类数据进行组包处理,得到目标数据包,该目标音频数据包括N个声道的音频数据,该目标控制类数据包括该N个声道的控制类数据;基于该目标I2S接口,通过该外设设备将该目标数据包发送给N个从音频设备,以使每个从音频设备解析接收到的该目标数据包,并基于解析得到的对应声道的控制类数据,播放解析得到的对应声道的音频数据,该N个从音频设备和该N个声道一一对应。如此,本申请实施例提供的主音频设备无内置连接模块,而是在检测到目标无线设备通过USB接口接入主音频设备的情况下,通过扩展USB接口为I2S接口,通过目标无线设备将包括目标音频数据和目标控制类数据的目标数据包发送至从音频设备,然后从音频设备基于接收到的目标数据包获取对应声道的音频数据和控制类数据,并基于对应声道的控制类数据播放对应声道的音频数据,从而实现主音频设备通过目标无线设备与从音频设备连接,实现主音频设备和从音频设备同时播放不同声道的音频,达到全景声效果,进而主音频设备在不内置连接模块的情况下具备拓展全景声播放效果的功能,提高主音频设备配置的灵活性。
Smart Images

Figure CN116887133B_ABST
Abstract
Description
Technical Field
[0001] This application relates to electroacoustic technology. More specifically, it relates to a main audio device and an audio data transmission method. Background Technology
[0002] Currently, by embedding Bluetooth, Wi-Fi, and other wireless modules (hereinafter collectively referred to as connection modules) into main audio devices (such as main speakers), and then connecting the main audio device to other slave audio devices through these connection modules, the main audio device can simultaneously play audio from different channels with these other slave audio devices, thus enabling the main audio device to extend the immersive sound playback effect. In other words, main audio devices with built-in connection modules have the ability to extend immersive sound playback, while main audio devices without built-in connection modules do not.
[0003] Therefore, whether the main audio device has the function of extending the panoramic sound playback effect depends on whether it has a built-in connection module. The configuration of the main audio device is fixed and lacks flexibility. Summary of the Invention
[0004] To address the aforementioned technical problems, or at least partially address them, embodiments of this application provide a main audio device and an audio data transmission method, enabling the main audio device to extend its panoramic sound playback capabilities without a built-in connection module, thereby improving the flexibility of the main audio device's configuration.
[0005] In a first aspect, embodiments of this application provide a main audio device, including:
[0006] The controller is configured to: upon detecting that a peripheral device is connected to the audio device via a USB interface, determine whether the peripheral device is a target wireless device; if the peripheral device is determined to be a target wireless device, control the expansion of the USB interface to a target I2S interface; perform packet processing on the target audio data and target control data to obtain a target data packet, wherein the target audio data includes audio data of N channels and the target control data includes control data of the N channels; based on the target I2S interface, send the target data packet to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control data of the corresponding channel, wherein the N slave audio devices correspond one-to-one with the N channels.
[0007] Secondly, embodiments of this application provide an audio data transmission method applied to a main audio device, comprising: upon detecting that a peripheral device is connected to the audio device via a USB interface, determining whether the peripheral device is a target wireless device; if the peripheral device is determined to be a target wireless device, controlling the USB interface to be expanded into a target I2S interface; performing packet processing on target audio data and target control data to obtain a target data packet, wherein the target audio data includes audio data of N channels and the target control data includes control data of the N channels; and, based on the target I2S interface, sending the target data packet to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control data of the corresponding channel, wherein the N slave audio devices correspond one-to-one with the N channels.
[0008] Thirdly, embodiments of this application provide a computer-readable storage medium, including: storing a computer program on the computer-readable storage medium, wherein when the computer program is executed by a processor, it implements the audio data transmission method as shown in the second aspect.
[0009] Fourthly, embodiments of this application provide a computer program product, including: when the computer program product is run on a computer, causing the computer to implement the audio data transmission method as shown in the second aspect.
[0010] Compared with the prior art, the technical solution provided in this application has the following advantages: In this application embodiment, when a peripheral device is detected to be connected to the audio device through a USB interface, it is determined whether the peripheral device is a target wireless device; if the peripheral device is determined to be a target wireless device, the USB interface is controlled to be expanded into a target I2S interface; the target audio data and target control data are packetized to obtain a target data packet, the target audio data includes audio data of N channels, and the target control data includes control data of the N channels; based on the target I2S interface, the target data packet is sent to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control data of the corresponding channel, and the N slave audio devices and the N channels correspond one-to-one. Thus, the main audio device provided in this application embodiment does not have a built-in connection module. Instead, when a target wireless device is detected to be connected to the main audio device via a USB interface, the USB interface is expanded to an I2S interface. The target wireless device sends a target data packet, including target audio data and target control data, to the slave audio device. The slave audio device then obtains the audio data and control data of the corresponding channel based on the received target data packet, and plays the audio data of the corresponding channel based on the control data of the corresponding channel. This enables the main audio device to connect with the slave audio device through the target wireless device, allowing the main audio device and the slave audio device to play audio from different channels simultaneously, achieving a panoramic sound effect. Consequently, the main audio device has the function of expanding panoramic sound playback without a built-in connection module, improving the configuration flexibility of the main audio device. Attached Figure Description
[0011] To more clearly illustrate the implementation methods in the embodiments of this application or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0012] Figure 1 This illustrates an operational scenario between a master audio device and a slave audio device according to some embodiments;
[0013] Figure 2 A hardware configuration block diagram of a display device according to some embodiments is shown;
[0014] Figure 3 A hardware configuration block diagram of a main audio device according to some embodiments is shown;
[0015] Figure 4A schematic diagram illustrating a structure in which a master audio device and a slave audio device communicate via a USB Dongle device, according to some embodiments, is shown.
[0016] Figure 5 A pin conversion diagram is shown for extending a USB Type-C interface to an I2S interface according to some embodiments;
[0017] Figure 6 A flow control diagram illustrating the extension of a USB Type-C interface to an I2S interface according to some embodiments is shown;
[0018] Figure 7 One of the schematic flowcharts of an audio data transmission method according to some embodiments is shown;
[0019] Figure 8 A second schematic flowchart of an audio data transmission method according to some embodiments is shown;
[0020] Figure 9 A third schematic flowchart of an audio data transmission method according to some embodiments is shown;
[0021] Figure 10 A fourth schematic flowchart of an audio data transmission method according to some embodiments is shown;
[0022] Figure 11 Fifth of a series of schematic diagrams illustrating an audio data transmission method according to some embodiments;
[0023] Figure 12 A flowchart of an audio data transmission method according to some embodiments is shown in diagram six.
[0024] Figure 13 The seventh schematic diagram illustrates an audio data transmission method according to some embodiments. Detailed Implementation
[0025] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.
[0026] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.
[0027] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.
[0028] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.
[0029] Figure 1 This is a schematic diagram illustrating a scenario involving a display device 100, a main audio device 200, a left surround audio device 300, and a right surround audio device 400. Typically, the main audio device 200, left surround audio device 300, and right surround audio device 400 function as peripheral audio devices for the display device 100, outputting audio to achieve a surround sound effect. The main audio device 200, left surround audio device 300, and right surround audio device 400 can also function independently as audio players, playing audio data downloaded from the network or stored locally to achieve a surround sound effect.
[0030] The display device provided in this application can have various implementation forms, such as a television, a smart television, a laser projection device, a monitor, an electronic bulletin board, an electronic table, a mobile phone, a tablet computer, a laptop computer, a handheld computer, an in-vehicle electronic device, etc.
[0031] like Figure 2 The display device 100 includes at least one of the following: a tuner 110, a communicator 120, a detector 130, an external device interface 140, a controller 150, a display 160, an audio output interface 170, a user interface 180, an external memory, and a power supply.
[0032] In some embodiments, the controller includes a processor, a video processor, an audio processor, a graphics processor, RAM, ROM, and a first interface to an nth interface for input / output.
[0033] The display 160 includes a display screen assembly for presenting images, a driving assembly for driving image display, a component for receiving image signals from the controller output, and a user interface for displaying video content, image content, menu control interface, and user control UI.
[0034] The display 160 may be a liquid crystal display, an OLED display, or a projection display, and may also be a projection device and a projection screen.
[0035] The communicator 120 is a component used to communicate with external devices or servers according to various communication protocol types. For example, the communicator may include at least one of the following: a Wi-Fi module, a Bluetooth module, a wired Ethernet module, other network communication protocol chips or near-field communication protocol chips, and an infrared receiver. The display device 100 can establish the transmission and reception of control signals and data signals with an external control device or server through the communicator 120.
[0036] User interface 180 can be used to receive control signals from control device 100 (such as an infrared remote control). It can also be used to directly receive user input operation commands and convert the operation commands into commands that display device 100 can recognize and respond to; in this case, it can be called user input interface.
[0037] Detector 130 is used to acquire signals from the external environment or to interact with the external environment. For example, detector 130 includes a light receiver, a sensor for acquiring ambient light intensity; or, detector 130 includes an image acquisition device, such as a camera, which can be used to acquire external environmental scenes, user attributes, or user interaction gestures; or, detector 130 includes a sound acquisition device, such as a microphone, for receiving external sounds.
[0038] The external device interface 140 may include, but is not limited to, one or more of the following: High-definition multimedia interface (HDMI), analog or high-definition component input interface (component), composite video input interface (CVBS), USB input interface (USB), RGB port, etc. It may also be a composite input / output interface formed by multiple interfaces mentioned above.
[0039] The tuner / demodulator 110 receives broadcast television signals via wired or wireless means, and demodulates audio and video signals, such as EPG data signals, from multiple wireless or wired broadcast television signals.
[0040] In some embodiments, the controller 150 and the tuner 110 may be located in different separate devices, that is, the tuner 110 may also be located in an external device of the main device where the controller 150 is located, such as an external set-top box.
[0041] The controller 150 controls the operation of the display device and responds to user operations through various software control programs stored in memory (internal or external memory). The controller 150 controls the overall operation of the display device 100. For example, in response to receiving a user command to select a UI object to display on the monitor 160, the controller 150 can perform operations related to the object selected by the user command.
[0042] In some embodiments, the controller includes at least one of a central processing unit (CPU), a video processor, an audio processor, a graphics processing unit (GPU), and random access memory (RAM), read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.
[0043] RAM, also known as main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except during refresh) and is very fast, typically serving as temporary data storage for the operating system or other running programs. Its biggest difference from ROM is data volatility; data stored in RAM is lost when power is off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. ROM operates in a non-destructive read-only manner; information can only be read, not written. Once information is written, it is fixed and will not be lost even if power is cut off; therefore, it is also called fixed-function memory.
[0044] Users can input commands through a graphical user interface (GUI) displayed on the monitor 160, and the user input interface receives the user input commands through the GUI. Alternatively, users can input commands by entering specific sounds or gestures, and the user input interface receives the user input commands by recognizing the sounds or gestures through sensors.
[0045] A "user interface" is the medium through which an application or operating system interacts and exchanges information with the user. It converts information from its internal form to a form that the user can accept. A common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of a display device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0046] like Figure 3 As shown, the main audio device 200 includes a controller 210, a USB interface 220, a user input / output interface 230, an external memory, a power supply, etc. The main audio device 200 can implement the audio data transmission method provided in the embodiments of this application.
[0047] The controller 210 controls the operation of the main audio device and responds to user operations through various software control programs stored in memory (internal or external memory). The controller 210 controls the overall operation of the main audio device 200.
[0048] In some embodiments, the controller includes at least one of an audio processor, random access memory (RAM), read-only memory (ROM), a first to an nth interface for input / output, a communication bus, etc.
[0049] RAM, also known as main memory, is an internal memory that directly exchanges data with the controller. It can be read and written at any time (except during refresh) and is very fast, typically serving as temporary data storage for the operating system or other running programs. Its biggest difference from ROM is data volatility; data stored in RAM is lost when power is off. RAM is used in computers and digital systems to temporarily store programs, data, and intermediate results. ROM operates in a non-destructive read-only manner; information can only be read, not written. Once information is written, it is fixed and will not be lost even if power is cut off; therefore, it is also called fixed-function memory.
[0050] The controller 210 can be a microcontroller unit (MCU), also known as a single-chip microcomputer or microcontroller. It is a chip-level computer formed by appropriately reducing the frequency and specifications of the central processing unit (CPU) and integrating peripheral interfaces such as memory, timer, USB, A / D conversion, UART, PLC, DMA, and even LCD driver circuits onto a single chip.
[0051] User input / output interface 230 includes microphone, touchpad, sensors, buttons, etc.
[0052] USB interface 220 includes USB type-C interface, USB type-B interface, etc.
[0053] To achieve a surround sound effect, a main audio device and multiple slave audio devices need to emit sound simultaneously, each outputting audio from different channels.
[0054] Traditional main audio devices come in two types: those with built-in connection modules and those without. Main audio devices with built-in connection modules have the capability to connect to other slave audio devices and play immersive audio (hereinafter referred to as expansion functionality). Main audio devices without built-in connection modules do not have this capability. Furthermore, main audio devices with built-in connection modules typically have this expansion functionality permanently and cannot be removed (the user cannot manually remove it). Main audio devices without built-in modules usually do not have this expansion functionality and cannot have it added. In other words, the configuration of current main audio devices is fixed and lacks flexibility.
[0055] Currently, there are solutions that use software to disable the audio device from emitting sound, thus removing the expansion functionality of a main audio device with a built-in connection module. However, software control is relatively complex and difficult for users to operate. Furthermore, built-in connection modules are generally expensive, leading to a higher cost for main audio devices with them. Therefore, users typically choose main audio devices without built-in connection modules. While these devices are cheaper, they lack expansion capabilities, failing to meet users' occasional needs for such functionality.
[0056] WiFi offers higher connection bandwidth and generally lower latency, but WiFi modules are expensive. Bluetooth modules are relatively cheaper than WiFi, but Bluetooth has narrower bandwidth and lower speeds, resulting in higher latency when dealing with large amounts of audio data. To address this latency issue, Bluetooth modules typically use lossy compression algorithms to compress audio data. While this effectively reduces the data size, it also introduces distortion, impacting the quality of the audio experience. Ensuring the compressed audio data remains distortion-free requires highly complex compression algorithms, increasing software development costs and computational demands during compression.
[0057] This application provides a main audio device and an audio data transmission method. The main audio device can implement the audio data transmission method provided in this application, or a functional module or entity within the main audio device can implement the audio data transmission method provided in this application. The main audio device includes a controller, corresponding to the above... Figure 3 The controller 210 in the middle.
[0058] Some embodiments of this application provide a master audio device, including: a controller configured to: upon detecting that a peripheral device is connected to the audio device via a USB interface, determine whether the peripheral device is a target wireless device; if the peripheral device is determined to be a target wireless device, control the USB interface to be expanded into a target I2S interface; perform packet processing on target audio data and target control data to obtain a target data packet, wherein the target audio data includes audio data of N channels and the target control data includes control data of the N channels; and based on the target I2S interface, send the target data packet to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control data of the corresponding channel, wherein the N slave audio devices correspond one-to-one with the N channels.
[0059] The USB interface can be a USB Type-C interface, a USB Type-B interface, or other types of USB interfaces; no limitation is made here.
[0060] This involves extending the USB interface to a target I2S interface, that is, converting the USB interface into a target I2S interface.
[0061] The target wireless device can communicate with the slave audio device with an I2S interface and transmit target audio data packets through wireless transmission methods such as 2.4G or 5.8G.
[0062] For example, the target wireless device can be a USB Dongle device, or other devices that can communicate with a slave audio device with an I2S interface to transmit target audio data packets, without limitation here.
[0063] The main audio device can detect whether a hot-plug event has occurred at the USB port, and then determine whether a peripheral device has been connected to the USB port.
[0064] For example, such as Figure 4As shown, the main audio device 200 extends its USB Type-C interface to a target I2S interface, transmitting the target data packet to the USB Dongle device 500. The USB Dongle device 500 then forwards the data to the wireless external device 600 (including the slave audio device 300 and slave audio device 400) with an I2S interface via 5.8G wireless transmission, thus enabling the main audio device to connect with the slave audio device through the USB Dongle device 500. After receiving the target data packet, the slave audio device parses it (including unpacking the target data packet, extracting the audio data of the corresponding channel from the unpacked target audio data, and extracting the control data of the corresponding channel from the unpacked target control data), and plays the audio data of the corresponding channel based on the parsed control data.
[0065] For example, the USB Type-C interface has abundant pins. Through a pin multiplexing mechanism, two pins are selected for I2S communication. When a hot-plug event occurs, I2S communication is triggered to obtain the device identifier, thereby identifying the peripheral device connected to the USB Type-C interface as the target wireless device, and controlling the backend tri-state gate to switch to the I2S interface. Figure 5 As shown, the ordinary USB D+ pin function is converted to Dongle I2S_LRCK (clock signal); the ordinary USB D- pin function is converted to Dongle I2S_BCK, and USB D- is used as the frame clock; USB D+ is very suitable for transmitting left and right channel data, and LRCK and BCK are differential, which reduces noise interference to the data.
[0066] For example, such as Figure 6 As shown, when the USB interface is powered on, the MCU (Integrated Circuit) chip software initializes the peripheral power supply and waits for a hot-plug event. Upon detecting a peripheral device being inserted, it initiates I2S communication to read the peripheral device's identifier and then determines whether the peripheral device is the target wireless device based on the identifier. If the peripheral device is not the target wireless device, it returns to the state of continuing to listen for plug-in / plug-out events. If the peripheral device is the target wireless device, it controls the corresponding tri-state gate port to switch the USB interface to the target I2S interface, and then switches the USB communication link to the I2S communication link, thereby enabling the main audio device to communicate with multiple slave audio devices via the peripheral device using I2S.
[0067] In this embodiment of the application, both the target audio data and the target control data include data from multiple channels. Each channel corresponds to a slave audio device. After a slave audio device unpacks the target data packet to obtain the target audio data, it parses the audio data of the channel corresponding to the slave audio device from the target audio data. After unpacking the target data packet to obtain the target control data, it parses the control data of the channel corresponding to the slave audio device from the target control data. Then, it plays the audio data of the corresponding channel based on the control data of the corresponding channel.
[0068] In this embodiment, the USB Type-C interface is extended to support communication with any external device equipped with an I2S interface, achieving the goal of multiple uses with a single interface and enabling rich interface expansion capabilities.
[0069] In this embodiment, when a peripheral device is detected to be connected to the audio device via a USB interface, it is determined whether the peripheral device is a target wireless device. If the peripheral device is determined to be a target wireless device, the USB interface is expanded to a target I2S interface. The target audio data and target control data are packetized to obtain a target data packet. The target audio data includes audio data from N channels, and the target control data includes control data from the N channels. Based on the target I2S interface, the target data packet is sent to N slave audio devices via the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control data of the corresponding channel. The N slave audio devices correspond one-to-one with the N channels. Thus, the main audio device provided in this application embodiment does not have a built-in connection module. Instead, when a target wireless device is detected to be connected to the main audio device via a USB interface, the USB interface is expanded to an I2S interface. The target wireless device sends a target data packet, including target audio data and target control data, to the slave audio device. The slave audio device then obtains the audio data and control data of the corresponding channel based on the received target data packet, and plays the audio data of the corresponding channel based on the control data of the corresponding channel. This enables the main audio device to connect with the slave audio device through the target wireless device, allowing the main audio device and the slave audio device to play audio from different channels simultaneously, achieving a panoramic sound effect. Consequently, the main audio device has the function of expanding panoramic sound playback without a built-in connection module, improving the configuration flexibility of the main audio device.
[0070] In some embodiments of this application, it can be determined whether the master audio device has established a connection with N slave audio devices before packetizing the target audio data and target control data. If it is determined that the master audio device has established a connection with the N slave audio devices, then the target audio data and target control data corresponding to the N slave audio devices are obtained, and the target audio data and target control data are packetized to obtain a target data packet. If it is determined that the master audio device has not established a connection with the N slave audio devices, then a connection is first established with the N slave audio devices through a peripheral device, and then the target audio data and target control data corresponding to the N slave audio devices are obtained, and the target audio data and target control data are packetized to obtain a target data packet.
[0071] In some embodiments of this application, the controller is further configured to: before performing packet processing on the target audio data and target control data to obtain the target data packet, determine the N slave audio devices that have established a connection with the master audio device through the peripheral device; and acquire the target audio data and target control data corresponding to the N slave audio devices.
[0072] After the system starts working, it detects that the connected peripheral device is the target wireless device. After switching the USB interface to an I2S interface, it detects whether the slave audio device is online through the peripheral device. When the slave audio device is detected to be online, it initiates a handshake verification with the slave audio device (the handshake verification method is not limited in this embodiment). After the handshake verification is successful, the master audio device establishes a connection with the slave audio device through the peripheral device (similarly, the master audio device establishes a connection with N slave audio devices through the peripheral device). The master audio device starts communicating with the slave audio devices through the peripheral device. The master audio device and the slave audio devices negotiate ID information. The ID information includes the manufacturer, device category, etc. After the ID information is determined, the master device obtains the target audio data and target control data corresponding to the N slave audio devices.
[0073] In this embodiment of the application, N slave audio devices that establish a connection with the master audio device through the peripheral device are determined; the target audio data and the target control data corresponding to the N slave audio devices are obtained, which can ensure that the target audio data and the target control data included in the target data packet correspond to the N slave audio devices.
[0074] In some embodiments of this application, the controller is further configured to: acquire audio data to be sent before acquiring the target audio data corresponding to the N slave audio devices; determine whether the audio data to be sent is audio data in a target channel format, wherein the audio data in the target channel format includes N channels; specifically, the controller is configured to: if the audio data to be sent is audio data in the target channel format, determine the audio data to be sent as the target audio data; if the audio data to be sent is not audio data in the target channel format, convert the audio data to be sent into audio data in the target channel format to obtain the target audio data.
[0075] It is understandable that after the master audio device acquires the audio data to be sent, it determines whether the audio data to be sent is audio data in the target channel format (the audio data in the target channel format corresponds to N slave audio devices). If the audio data to be sent is audio data in the target channel format, then the audio data to be sent is determined as the target audio data. If the audio data to be sent is not audio data in the target channel format, then the audio data to be sent needs to be converted into audio data in the target channel format to obtain the target audio data.
[0076] For specific methods of converting audio data channel formats, please refer to relevant technologies; no specific methods are specified here.
[0077] In this embodiment of the application, when the audio data to be sent is not in the target channel format, the audio data to be sent is converted into the target channel format to obtain the target audio data. This ensures that the number of channels included in the target audio data corresponds one-to-one with N slave audio devices, so that each slave audio device can parse the corresponding channel audio data from the target data packet and then play it.
[0078] Similarly, in this embodiment, when the main audio device acquires the control data to be sent, it also needs to determine whether the control data to be sent includes control data for N channels, with each channel corresponding to one control data. If it is determined that the control data to be sent includes control data for N channels, then the control data to be sent is determined as the target control data; if it is determined that the control data to be sent does not include control data for N channels, then the control data to be sent is converted to include control data for N channels. This ensures that each slave audio device can parse the control data for the corresponding channel from the target data packet, and then perform playback control based on the control data for the corresponding channel. The specific conversion method for the control data to be sent can be found in related technologies and is not limited here.
[0079] In some embodiments of this application, the controller is specifically configured to: when the audio data to be transmitted is audio data in a first channel format, perform resampling processing on the audio data to be transmitted to obtain the target audio data; when the audio data to be transmitted is audio data in a second channel format, perform upsampling processing on the audio data to be transmitted to obtain the target audio data; wherein the number of channels of the audio data in the first channel format is greater than N, and the number of channels of the audio data in the second channel format is less than N.
[0080] The resampling process can be a sample rate converter (SRC) resampling process, or other resampling processes, which are not limited in the embodiments of this application.
[0081] The upsampling process can be SRC upsampling or other resampling processes, and this application does not limit the specific methods used.
[0082] SRC resampling processing resamples and encodes audio data according to the target sampling rate; SRC upsampling processing interpolates the original audio data to generate audio data at the target sampling rate.
[0083] Example 1, N is 2, the target channel format audio data is the two-channel format audio data. The audio data to be sent contains the channel information of the audio. If it is determined that the audio data to be sent is 2.1-channel (3 channels) Time Division Multiplexing (TDM) audio data, then the 2.1-channel TDM audio data is converted into two-channel Pulse Code Modulation (PCM) audio data by performing SRC resampling processing on the audio data to be sent; if it is determined that the audio data to be sent is mono PCM audio data, then the audio data is converted into two-channel PCM audio data by performing SRC upsampling processing on the audio data to be sent.
[0084] In this embodiment of the application, by determining the number of channels in the audio data to be transmitted and converting the channel format of the audio data to be transmitted, it is ensured that the number of channels in the target audio data corresponds one-to-one with N slave audio devices.
[0085] In some embodiments of this application, the controller is further configured to: compress the target audio data to obtain compressed target audio data before performing packet processing on the target audio data and target control data to obtain compressed target control data; and compress the target control data to obtain compressed target control data; specifically, the controller is configured to: perform packet processing on the compressed target audio data and the compressed target control data to obtain the target data packet.
[0086] In this embodiment of the application, before the target audio data and target control data are packetized to obtain the target data packet, the target audio data and target control data are compressed respectively, which can effectively reduce the amount of data transmitted, thereby increasing the transmission speed and reducing the transmission latency.
[0087] The specific methods for compression processing can refer to existing related technologies, and are not limited here.
[0088] In some embodiments of this application, compression of the target audio data can be achieved simply by filtering the noise signal in the target audio data (filtering out the noise data in the target audio data reduces the amount of data in the target audio data), or simply by compressing and encoding the target audio data, and then achieving compression of the target audio data. Alternatively, the target audio data can be compressed by first filtering the noise signal in the target audio data, and then by compressing and encoding the filtered target audio data (in this case, the compression rate of the target audio data can be effectively improved); other methods can also be used to compress the target audio data, which are not limited here.
[0089] Among them, noise signals are invalid data in the target audio data, which may include signals that are not related to the audio data in the target audio data, signals that are too loud and affect the user's hearing, and data that are too soft and cannot be heard by the user.
[0090] Compression coding algorithms include lossless compression coding algorithms and lossy compression coding algorithms. The specific compression coding algorithm is not limited in the embodiments of this application.
[0091] In some embodiments of this application, the controller is specifically configured to: filter noise signals in the target audio data to obtain filtered target audio data; and perform lossless compression encoding on the filtered target audio data to obtain compressed target audio data.
[0092] In this embodiment, the compression rate of the target audio data can be effectively improved while ensuring lossless compression of the audio data. After receiving the target data packet from the device, the sound is restored through a lossless audio algorithm, ensuring a high-quality, low-latency, lossless audio experience.
[0093] In some embodiments of this application, the compression of the target control data can be achieved simply by filtering the noise signal in the target control data (filtering out the noise data in the target control data reduces the amount of data in the target control data), or simply by compressing and encoding the target control data, and then achieving the compression of the target control data, or by first filtering the noise signal in the target control data, and then compressing and encoding the filtered target control data (in this case, the compression ratio of the target control data can be effectively improved); other methods can also be used to compress the target control data, which are not limited here.
[0094] Among them, noise signals are invalid data in the target control data, which may include signals that are not related to audio control data such as volume control, status control, indication and other control data, empty signals, etc.
[0095] In some embodiments of this application, the controller is specifically configured to: filter noise signals in the target control data to obtain filtered target control data; and perform lossless compression encoding on the filtered target control data to obtain compressed target control data.
[0096] In this embodiment, the compression rate of the target audio data can be effectively improved, while ensuring lossless compression of control data. After receiving the target data packet from the device, the control data is restored through the lossless compression algorithm, which can enable better playback control of the audio data and ensure a high-quality, low-latency, lossless audio experience.
[0097] Example 2, following Example 1, after acquiring the stereo PCM audio data (target audio data), performs SRC sampling (noise filtering) on the stereo PCM audio data. Then, a stereo audio compression algorithm (lossless compression algorithm, which can be used to compress and encode stereo PCM audio data by calling the SubFrame function) is used to losslessly compress and encode the stereo PCM audio data. Control data, including volume control information, is also compressed using a similar audio compression algorithm (by calling the SubFrame function to compress and encode the control data). Finally, the compressed target audio data and target control data are grouped together using a data packetization algorithm (the `void audioTxEnc_subFrame(void)` function can be called to group the audio data and control data together) to generate a target data packet for wireless transmission. The device receiving this target data packet then uses a data unpacking algorithm to divide the data into target audio data and target control data. It then extracts the audio data for the corresponding channel from the target audio data and the control data for the corresponding channel from the target control data. Finally, based on the control data for the corresponding channel, it plays the audio data for the corresponding channel.
[0098] In this embodiment of the application, the lossless compression algorithm, namely the lossless audio quality algorithm, parses and compresses audio data and control data through audio format parsing, and then groups the compressed target audio data and target control data into data packets to obtain target data packets. The target data packets are then wirelessly transmitted to achieve lossless transmission of audio data.
[0099] To illustrate this solution in more detail, the following will use examples to illustrate it. Figures 7 to 13 To explain, it is understandable that Figures 7 to 13 The steps involved may include more or fewer steps in actual implementation, and the order of these steps may also differ, as long as the audio data transmission method provided in this application embodiment can be achieved. This audio data transmission method is applied to a main audio device controlled by a control device. The executing entity of this audio data transmission method can be the main audio device, or a functional module or entity within the main audio device capable of implementing the audio data transmission method; no limitation is made here. Furthermore, a detailed description of the audio data transmission method provided in this application embodiment can be found in the relevant description of the main audio device described above, and the same or similar technical effects can be achieved; further details are omitted here.
[0100] Figure 7 The flowchart illustrates the steps of an audio data transmission method implemented according to one or more embodiments of this application, applied to a main audio device. The audio data transmission method may include the following steps S701 to S704.
[0101] S701. When a peripheral device is detected to be connected to the audio device via a USB interface, determine whether the peripheral device is the target wireless device.
[0102] S702. If the peripheral device is determined to be a target wireless device, control the expansion of the USB interface to a target I2S interface.
[0103] S703. Perform packet processing on the target audio data and target control data to obtain a target data packet. The target audio data includes audio data of N channels, and the target control data includes control data of the N channels.
[0104] S704. Based on the target I2S interface, the target data packet is sent to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control class data of the corresponding channel. The N slave audio devices and the N channels correspond one-to-one.
[0105] In some embodiments of this application, combined with Figure 7 ,like Figure 8 As shown, prior to S703 above, the audio data transmission method provided in this application embodiment may further include S705 and S706 as described below.
[0106] S705. Determine the N slave audio devices that have established a connection with the master audio device through the peripheral device.
[0107] S706. Obtain the target audio data and the target control data corresponding to the N slave audio devices.
[0108] In some embodiments of this application, combined with Figure 8 ,like Figure 9 As shown, prior to S706 above, the audio data transmission method provided in this application embodiment may further include S707 and S708 below, and S706 above can be specifically implemented by S706a and S706b below.
[0109] S707, Obtain audio data to be sent.
[0110] S708. Determine whether the audio data to be sent is audio data in the target channel format, wherein the number of channels included in the audio data in the target channel format is N.
[0111] 706a. If the audio data to be sent is audio data in the target channel format, then the audio data to be sent shall be identified as the target audio data.
[0112] S706b: If the audio data to be sent is not in the target channel format, convert the audio data to be sent into the target channel format to obtain the target audio data.
[0113] In some embodiments of this application, combined with Figure 9 ,like Figure 10 As shown, the above S706b can be specifically implemented through the following S706b1 and S706b2.
[0114] S706b1. If the audio data to be sent is in the first channel format, the audio data to be sent is resampled to obtain the target audio data.
[0115] S706b2. If the audio data to be sent is in the second channel format, the audio data to be sent is upsampled to obtain the target audio data.
[0116] In this case, the number of channels in the first channel format of audio data is greater than N, and the number of channels in the second channel format of audio data is less than N.
[0117] In some embodiments of this application, combined with Figure 10 ,like Figure 11 As shown, prior to S703 above, the audio data transmission method provided in this application embodiment may also include S709 and S710 below, and S703 above can be specifically implemented by S703a below.
[0118] S709. Compress the target audio data to obtain the compressed target audio data.
[0119] S710. Compress the target control data to obtain compressed target control data.
[0120] S703a: The compressed target audio data and the compressed target control data are packaged together to obtain the target data packet.
[0121] In some embodiments of this application, combined with Figure 11 ,like Figure 12 As shown, the above S709 can be specifically implemented through the following S709a and S709b.
[0122] S709a. Filter the noise signal in the target audio data to obtain the filtered target audio data.
[0123] S709b: Perform lossless compression encoding on the filtered target audio data to obtain the compressed target audio data.
[0124] In some embodiments of this application, combined with Figure 12 ,like Figure 13 As shown, the above S710 can be specifically implemented through the following S710a and S710b.
[0125] S710a. Filter the noise signal in the target control data to obtain the filtered target control data.
[0126] S710b: Perform lossless compression encoding on the filtered target control class data to obtain compressed target control class data.
[0127] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described audio data transmission method and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0128] The computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0129] The present invention provides a computer program product, comprising: when the computer program product is run on a computer, causing the computer to implement the above-described audio data transmission method.
[0130] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0131] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.
Claims
1. A main audio device, characterized in that, include: The controller is configured to determine whether the peripheral device is a target wireless device when it detects that a peripheral device is connected to the audio device via a USB interface; If the peripheral device is determined to be the target wireless device, the corresponding tri-state gate port is controlled to switch the USB interface to the target I2S interface, and then the USB communication link is switched to the I2S communication link. Identify N slave audio devices that establish connections with the master audio device through the peripheral device; Acquire the target audio data and target control class data corresponding to the N audio devices; The target audio data is compressed to obtain compressed target audio data. The target control data is compressed to obtain compressed target control data. The compressed target audio data and the compressed target control data are combined into a packet to obtain a target data packet; The target audio data includes audio data from N channels, and the target control data includes control data from the N channels, where N is a positive integer. Based on the target I2S interface, the target data packet is sent to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control class data of the corresponding channel. The N slave audio devices and the N channels correspond one-to-one.
2. The main audio device according to claim 1, characterized in that, The controller is also configured to: Before acquiring the target audio data corresponding to the N slave audio devices, acquire the audio data to be sent; Determine whether the audio data to be sent is audio data in a target channel format, wherein the audio data in the target channel format includes N channels; The controller is specifically configured to: determine the audio data to be sent as the target audio data when the audio data to be sent is audio data in the target channel format; If the audio data to be sent is not in the target channel format, the audio data to be sent is converted into the target channel format to obtain the target audio data.
3. The main audio device according to claim 2, characterized in that, The controller is specifically configured as follows: If the audio data to be sent is audio data in the first channel format, the audio data to be sent is resampled to obtain the target audio data; If the audio data to be sent is audio data in second channel format, the audio data to be sent is upsampled to obtain the target audio data; Wherein, the number of channels in the audio data of the first channel format is greater than N, and the number of channels in the audio data of the second channel format is less than N.
4. The main audio device according to claim 1, characterized in that, The controller is specifically configured as follows: The noise signal in the target audio data is filtered to obtain the filtered target audio data. The filtered target audio data is then subjected to lossless compression encoding to obtain the compressed target audio data.
5. The main audio device according to claim 1, characterized in that, The controller is specifically configured as follows: The noise signal in the target control data is filtered to obtain the filtered target control data; The filtered target control data is then subjected to lossless compression encoding to obtain the compressed target control data.
6. An audio data transmission method, characterized in that, Applied to main audio devices, including: If a peripheral device is detected to be connected to the audio device via a USB interface, it is determined whether the peripheral device is the target wireless device. If the peripheral device is determined to be the target wireless device, the corresponding tri-state gate port is controlled to switch the USB interface to the target I2S interface, and then the USB communication link is switched to the I2S communication link. Identify N slave audio devices that establish connections with the master audio device through the peripheral device; Acquire the target audio data and target control class data corresponding to the N audio devices; The target audio data is compressed to obtain compressed target audio data. The target control data is compressed to obtain compressed target control data. The compressed target audio data and the compressed target control data are combined into a packet to obtain a target data packet; The target audio data and target control data are packetized to obtain a target data packet. The target audio data includes audio data from N channels, and the target control data includes control data from the N channels. Based on the target I2S interface, the target data packet is sent to N slave audio devices through the peripheral device, so that each slave audio device parses the received target data packet and plays the parsed audio data of the corresponding channel based on the parsed control class data of the corresponding channel. The N slave audio devices and the N channels correspond one-to-one.
7. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the audio data transmission method of claim 6.
Citation Information
Patent Citations
Audio playing system, external extension device, and audio playing method and apparatus
CN107637088A
Wireless transmitting device, control method and display device
CN111970613A