Hot plug method and system for automobile audio bus equipment and electronic equipment

By carrying out link engineering conversion and initialization of node arrays of car audio bus equipment, it solves the problem of audio playback fluency caused by hot insertion of automotive audio bus equipment, and realizes efficient and orderly heat -inserting management. System stability and reliability.

CN119357100APending Publication Date: 2025-01-24CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411610351.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-12
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

Car audio bus devices do not support hot swap, which affects the smoothness of audio playback and causes pauses and stuttering.

Method used

By creating a link project that conforms to the car audio bus format, the link project is converted into register data in a preset format, and the register data is classified and processed according to nodes to form a sequentially arranged node array to determine the playback state during hot swapping. The node name, traverse the node array to determine the sequence identifier, initialize the node array and write the register data, start the thread loop to read the node register data to complete the hot plug operation.

Benefits of technology

It achieves efficient and orderly management of automotive audio bus equipment during the hot-swapping process, avoids lagging and noise, improves the stability and reliability of the system, and ensures the smoothness of audio playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357100A_ABST
    Figure CN119357100A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of vehicle-mounted systems, and discloses a hot plug method and system for automobile audio bus equipment and electronic equipment. The method comprises the following steps: creating a link project of which the format is an automobile audio bus, converting the link project into a register number of a preset format, writing data belonging to the same node into the same array, and forming a node array arranged in sequence; determining a node name in a playing state when the automobile audio bus equipment is hot-plugged, and traversing each node array to determine a sequence identifier of the node name; determining the total node number of the corresponding node array after the sequence identification, initializing the node array in the total node number, and writing the initialized register data; and starting a thread, and circularly reading the register data of each node to complete the hot plug operation. By accurately identifying the change of the total number of the nodes, the audio equipment can be quickly mounted and started without blockage or noise during hot plugging, so that the stability and the reliability of the system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle-mounted systems, and in particular to a method and system for hot-plugging automobile audio bus equipment and electronic equipment. Background Art

[0002] As cars enter the era of intelligence, smart cockpits are required to have more advanced and richer infotainment functions to meet consumers' user experience. Audio is the core function of smart cockpits, covering applications such as car audio, voice recognition, noise cancellation and echo cancellation. Among them, the A2B (Automotive Audio Bus) bus is the current digital audio bus in the car, and all audio devices are connected in series to this bus in a daisy chain manner.

[0003] However, in the related art, the car audio chip (i.e., the car audio bus) does not support hot plugging and requires middleware for conversion. If a car audio bus device with hot plugging is triggered during audio file playback, it will inevitably affect the smoothness of audio playback, that is, cause the audio playback to pause. When the interruption cannot be eliminated in time, it will cause a jam, thereby reducing the user experience. In view of this, a car audio bus device hot plugging solution is needed that does not affect the smoothness of audio playback. Summary of the invention

[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical components or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.

[0005] In view of the above-mentioned shortcomings of the prior art, the present application provides a method, system and electronic device for hot plugging of a car audio bus device to solve the problem that the car audio bus device does not support hot plugging and affects the smoothness of audio playback.

[0006] The first aspect of the present application provides a method for hot-plugging an automobile audio bus device, comprising: creating a link project in the format of an automobile audio bus, converting the link project into register data in a preset format; classifying the register data according to nodes, writing data belonging to the same node into the same array to form an array of nodes arranged in sequence; determining the node name in a playing state when the automobile audio bus device is hot-plugged, traversing each of the node arrays to determine the sequence identifier of the node name; determining the total number of nodes in the node array corresponding to the sequence identifier, initializing the node array in the total number of nodes, and writing the initialized register data; starting a thread, looping the total number of nodes to read the register data of each node to complete the hot-plug operation.

[0007] In some possible embodiments of the present application, determining the total number of nodes of the node array corresponding to the sequence identifier includes: initializing the node address of the node array corresponding to the car audio bus device, starting from the starting node address, traversing the node address corresponding to each node, and reading the vendor version number corresponding to each node in turn; if the vendor version number is not currently read, determining that the current node is not inserted or is abnormal, and the total number of nodes is the previous number of nodes of the current node; if the vendor version number is currently read, determining that the current node is successfully inserted, and increasing the total number of nodes by one to determine the total number of nodes of the node array.

[0008] In some possible embodiments of the present application, the total number of nodes is looped to read the register data of each node to complete the hot plug operation, including: obtaining the total number of nodes currently inserted; if the current total number of nodes increases, the total number of nodes in the increasing state is used as an index, and the loop is run until the register data of all increased total numbers of nodes are read; if the current total number of nodes decreases or remains unchanged, the current total number of nodes is updated.

[0009] In some possible embodiments of the present application, after initializing the node array in the total number of nodes, it also includes: if the A2B connection between the car audio bus device and the in-vehicle infotainment system is unsuccessful, a warning CAN signal is generated, and the CAN signal is sent to the in-vehicle infotainment system to prompt that the connection status of the car audio bus device is abnormal; the CAN signal is parsed to obtain the node position where the car audio bus device is inserted, and the node of the sequence identifier corresponding to the node position is reinitialized to restore the car audio connection status.

[0010] In some possible embodiments of the present application, it also includes: if a short circuit is detected in any of the nodes, the abnormal information of the node that is currently short-circuited is read through the serial communication bus, and the abnormal information is sent to the in-vehicle infotainment system for reporting, and the abnormal information includes INTSTAT register data representing the current interrupt status and INTSRC register data of the interrupt source; in response to the abnormal information, the abnormal information is parsed, and if the fault type in the parsing result is determined to be a short circuit, the fault information of the current node is generated; if it is detected that the fault of the current node has been restored, the register data after the current node is initialized to restore sound playback.

[0011] In some possible embodiments of the present application, determining the node name in the playing state when the car audio bus device is hot plugged, traversing each of the node arrays to determine the sequence identifier of the node name, includes: counting the number of all current nodes according to a preset time, and determining the insertion or removal of the car audio bus device when hot plugged according to the number change state of all current nodes; if the car audio bus device is in the unplugging operation when hot plugged, generating a first interrupt signal, interrupting by cutting off the communication connection of the car audio bus device to safely eject the car audio bus device; if the car audio bus device is in the insertion operation when hot plugged, generating a second interrupt signal, determining the node name in the playing state when the car audio bus device is hot plugged by matching, and traversing each of the node arrays to determine the sequence identifier corresponding to the node name.

[0012] In some possible embodiments of the present application, in response to the second interrupt signal, the playback status of the current node is maintained, and the node name in the playback status is determined through a matching query, and each of the node arrays is traversed to determine the sequence identifier corresponding to the node name, and the second interrupt signal has the highest priority.

[0013] In some possible embodiments of the present application, a link project in a car audio format is created, and the link project is converted into register data in a preset format, including: using the Sigma Studio graphical development tool to create a link project in a car audio format, and exporting the link project into a code-recognizable header file; reading the header file, obtaining register data of all nodes, and converting it into preset format register data.

[0014] The second aspect of the present application also provides a car audio bus device hot plug system, including: a creation module, used to create a link project in the format of a car audio bus, and convert the link project into register data in a preset format; a classification processing module, used to classify the register data according to the node, and write the data belonging to the same node into the same array to form a node array arranged in sequence; a node determination module, used to determine the node name in the playing state when the car audio bus device is hot plugged, and traverse each of the node arrays to determine the sequence identifier of the node name; a data writing module, used to determine the total number of nodes in the node array corresponding to the sequence identifier, initialize the node array in the total number of nodes, and write the initialized register data; an execution module, used to start a thread, loop the total number of nodes to read the register data of each node, so as to complete the hot plug operation.

[0015] The third aspect of the present application also provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the above method.

[0016] The beneficial effects of the present application are as follows: by creating a link project that conforms to the format of a car audio bus, converting the link project into register data in a preset format, classifying and processing the register data according to nodes, and writing data belonging to the same node into the same array, and by arranging the exported register data into multiple node arrays in sequence, the reconnection logic can be decoupled from the register data, which greatly reduces the complexity of the code and is conducive to sequential processing; determining the node name that is in the playing state when the car audio bus device is hot-plugged, traversing each of the node arrays to determine the sequence identifier of the node name; determining the corresponding node after the sequence identifier The total number of nodes in the node array is obtained, the node array in the total number of nodes is initialized, and the initialized register data is written; the thread is started, the total number of nodes is looped to read the register data of each node to complete the hot plug operation. On the one hand, by accurately identifying the change in the total number of nodes, when the car audio bus device (audio node) is hot plugged, the node array corresponding to the sequence identifier is directly initialized, thereby avoiding jamming and no noise is generated, and the audio device can be quickly mounted and enabled; on the other hand, efficient and orderly management of the car audio bus device during the hot plug process is achieved, greatly improving the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of a method for hot plugging a car audio bus device in an embodiment of the present application;

[0018] Figure 2 It is a structural schematic diagram of a hot-swap system for an automotive audio bus device in an embodiment of the present application;

[0019] Figure 3 It is a flowchart of a method for hot plugging a car audio bus device in an embodiment of the present application;

[0020] Figure 4 A schematic structural diagram of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and sub-samples in the embodiments can be combined with each other without conflict.

[0022] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0023] In the following description, a large number of details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0024] The terms "first", "second", etc. in the specification and claims of the embodiments of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.

[0025] Unless otherwise stated, the term "plurality" means two or more.

[0026] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.

[0027] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.

[0028] Combination Figure 1 As shown, it is a flow chart of a hot plugging method of a car audio bus device provided by the present application, including:

[0029] Step S101, creating a link project in the format of a car audio bus, and converting the link project into register data in a preset format;

[0030] Among them, the automotive audio bus (A2B, full name Automotive Audio Bus) is a high-bandwidth, two-way digital audio communication technology designed for vehicle audio systems. The automotive audio bus (A2B) technology plays an important role in the development of intelligent networking of automobiles with its advantages of high bandwidth, two-way communication, low cost and flexibility. With the continuous popularization of technology and the growth of market demand, it has become the mainstream solution for automotive audio systems.

[0031] For example, the vehicles that can be equipped with the car audio bus include but are not limited to fuel vehicles, pure electric vehicles, hybrid vehicles, etc. according to the driving energy. The vehicles can also be divided into ordinary passenger vehicles and large vehicles such as trucks or buses according to their uses.

[0032] Optionally, in some embodiments, creating a link project in a car audio format, and converting the link project into register data in a preset format includes:

[0033] Using Sigma Studio graphical development tool to create a link project in a car audio format, and exporting the link project into a header file recognizable by code;

[0034] The header file is read to obtain register data of all nodes and convert the data into register data in a preset format.

[0035] Exemplarily, a complete A2B link project is established in the A2B Sigma Studio software, and then exported as a .h file that can be recognized by the code, such as register data.

[0036] Specifically, open the Sigma Studio software, enter the graphical development environment, and use the graphical tools provided by Sigma Studio to design a link project that conforms to the car audio format, including but not limited to selecting appropriate audio input / output modules and audio processing modules (such as filters, equalizers, etc.). According to specific needs, configure the parameters of each module to ensure that the audio link can meet the requirements of the car audio system; use the export function of Sigma Studio to export the link project to a header file that can be recognized by the code (such as a C / C++ header file), which usually contains a series of structures or macro definitions for describing the register configuration of each node in the audio link.

[0037] Use programming languages ​​(such as C / C++) to write code, read header files exported by Sigma Studio, write parsing code, extract register data of all nodes from the header files, including but not limited to register address, name, type, initial value and other information, and convert the extracted register data into register data in a preset format according to the specific hardware platform and application requirements. The preset format includes specific data structures, arrays or binary files, etc.

[0038] Step S102, classifying the register data according to the nodes, and writing the data belonging to the same node into the same array to form an array of nodes arranged in order;

[0039] Among them, a node usually refers to a connection point or a data processing unit; and an array is a data structure used to store a series of related data elements, which are stored in consecutive positions in the memory.

[0040] Exemplarily, data from all registers are first obtained, then the data is classified according to its node identifier (or node ID), data belonging to the same node is extracted, written into the same array, and these arrays are sorted to ensure that they are arranged in a certain logical order (such as node ID order), for example, arranged in order from low to high according to node ID order.

[0041] Step S103, determining the node name in the playing state when the car audio bus device is hot-plugged, and traversing each of the node arrays to determine the sequence identifier of the node name;

[0042] Exemplarily, when a hot plug event occurs on a car audio bus device, detect which nodes are in the play state; then, traverse all node arrays to find arrays corresponding to the nodes in the play state, and in these arrays, find and determine the sequence identifiers of the nodes in the play state (i.e., the position or index of the node in the array).

[0043] Optionally, in some embodiments, determining the node name in the playing state when the car audio bus device is hot-plugged, and traversing each of the node arrays to determine the sequence identifier of the node name includes:

[0044] Counting the number of all current nodes at a preset time, and determining the insertion or removal of the car audio bus device when it is in hot plugging according to the change state of the number of all current nodes;

[0045] If the car audio bus device is in a hot-plug unplugging operation, a first interrupt signal is generated, and the communication connection of the car audio bus device is cut off to interrupt the device, so as to eject the car audio bus device safely;

[0046] If the car audio bus device is in an insertion operation when hot plugged, a second interrupt signal is generated, and the node name in the playing state when the car audio bus device is hot plugged is determined by matching, and each node array is traversed to determine the sequence identifier corresponding to the node name.

[0047] Exemplarily, in a car audio bus system, a timer is set to count the number of all nodes (such as audio devices, speakers, etc.) currently connected to the bus at preset time intervals (such as 200 milliseconds, 500 milliseconds, etc.), and compare the currently counted number of nodes with the number of nodes counted last time. If the number increases, it is judged as an insertion operation; if the number decreases, especially when the number decreases to a preset number, it is judged as an unplugging operation; when an unplugging operation is detected, a first interrupt signal is generated to cut off the communication connection between the device and the audio bus to ensure that the device can be safely removed from the system to avoid data loss or damage; when an insertion operation is detected, a second interrupt signal is generated, and it is immediately checked which nodes (devices) are in the playing state, and by matching the node name in the playing state, the node array is traversed to find the unique sequence identifier (such as device ID, serial number, etc.) corresponding to the node name.

[0048] In some of the above-mentioned embodiments, in response to the second interrupt signal, the playback state of the current node is maintained, and the node name in the playback state is determined through a matching query, and each of the node arrays is traversed to determine the sequence identifier corresponding to the node name, and the second interrupt signal has the highest priority.

[0049] Exemplarily, the priority of the second interrupt signal is set higher than other interrupt signals to ensure that it can be responded to and processed immediately when a new device is inserted; when responding to the second interrupt signal, the play status of all current nodes is kept unchanged, and it is queried which nodes are in the play status.

[0050] Through the above method, by setting the second interrupt signal to the highest priority, it is ensured that when a new device is inserted, it can be responded and processed quickly, thereby improving the response speed of the system; when the device is unplugged, the device is safely ejected by cutting off the communication connection, avoiding the risk of data loss or damage; when a new device is inserted, it can be immediately identified and processed while keeping the playback status of the existing device unchanged, thereby optimizing the user experience.

[0051] Step S104, determining the total number of nodes in the node array corresponding to the sequence identifier, initializing the node array in the total number of nodes, and writing the initialized register data;

[0052] Exemplarily, first determine the sequence identifier and find the node array corresponding to the sequence identifier; then calculate the total number of nodes in the node array; then, initialize the array (such as clearing the array, setting default values, etc.); finally, write the initialized register data into the array.

[0053] Step S105, start the thread, loop the total number of nodes to read the register data of each node to complete the hot plug operation.

[0054] Exemplarily, a new thread is started to handle the hot-swap operation. In this thread, all node arrays (or arrays of specific nodes) are looped through, and the number of loops is determined based on the total number of nodes. In each loop, the register data of the corresponding node is read. When the data of all nodes are read and processed, the hot-swap operation is completed.

[0055] Through the above method, by classifying and processing the register data according to the node, determining the sequence identifier of the play status node during hot plugging, and then initializing and writing data to the corresponding node array, and finally reading the data of each node through a thread loop, it is possible to more effectively manage the data flow and node status changes during the hot plugging process; on the one hand, the complexity and time of data processing are reduced through classification processing and initialization of the node array; on the other hand, the integrity and accuracy of the data during the hot plugging process are ensured by reading the data through a thread loop; on the other hand, the impact of the hot plugging operation on the user is reduced, and the availability and reliability of the system are improved.

[0056] See also Figure 3 , is a flow chart of a method for hot-swapping a car audio bus device in an embodiment of the present application, which is described in detail as follows:

[0057] 1) Create a complete A2B link project in the A2B Sigma Studio software, and then export it as a .h file that can be recognized by the code. As can be seen from the following figure, it is all register data:

[0058] 1.1) Since the exported data is initialized all nodes at once by default, the sound will be disconnected when the connected nodes are initialized again, affecting the user experience. Therefore, you need to organize the exported data before importing the code project, and put the organized data into an array. The first one in the array is the data starting from the first node; the second one in the array is the data starting from the second node, and so on.

[0059] 1.2) When arranging data, follow the A2B chip manual, first switch the node address through A2B_NODEADR.NODE, then write the necessary register data such as DNSLOTS, UPSLOTS, I2CCFG, PDMCTL, GPIODAT, GPIOOEN, PINCFG, CLK2CFG INTMSK0, BECCTL, SWCTL to the node. The data arrangement exported in A2B Sigma Studio already contains all the necessary data, which is copied and placed in the corresponding array after arrangement. When inserting the first node, write all the data, and when inserting the second node, write all the data after the second one.

[0060] 2) All initialization is performed at startup. By default, the total number of current nodes is 0 (beginNodeId=0). All initialization data is written and a thread is started to run in a loop without exiting.

[0061]

[0062] 2.1) In some embodiments, determining the total number of nodes in the node array corresponding to the sequence identifier includes:

[0063] Initialize the node address of the node array corresponding to the car audio bus device, starting from the starting node address, and traverse the node address corresponding to each node,

[0064] Read the vendor version number corresponding to each of the nodes in turn;

[0065] If the vendor version number is not currently read, it is determined that the current node is not inserted or is abnormal, and the total number of nodes is the previous node number of the current node;

[0066] If the vendor version number is currently read, it is determined that the current node is successfully inserted, and the total number of nodes is increased by one to determine the total number of nodes in the node array.

[0067] For example, the node address is switched through A2B_NODEADR.NODE, and the VENDOR ID of the node register is read. If the reading is successful, it means that the node has been inserted. Similarly, the number of currently inserted nodes is obtained. The key code is as follows:

[0068]

[0069] Specifically, during the initialization phase of the automotive audio bus system, a unique node address is assigned to each node that may be connected (such as an audio device, a speaker, etc.). These node addresses are stored in a node array for subsequent access and operation of these nodes. The initialization process includes setting the starting address of the node array and the initial state of each node (such as unconnected, unknown, etc.). Starting from the starting address of the node array, the address of each node is accessed one by one. This is achieved through a loop structure, which loops through the entire node array until the end of the array is reached. During the traversal process, the vendor version number is read from the address of each node. The vendor version number is specific information stored in the node, which is used to identify the manufacturer and version of the node. If the node is correctly connected and responds to the read request, the vendor version number can be successfully read; if the vendor version number fails to be read (for example, because the node is not connected or the connection is abnormal), the node is marked as uninserted or abnormal. At the same time, the current node is not counted in the total number of nodes. Instead, the total number of nodes is kept as the number of nodes that successfully read the vendor version number last time. If the vendor version number is successfully read, the node is marked as inserted successfully and the total number of nodes is increased by one, which indicates that the system has recognized and accepted a new node connection.

[0070] Through the above method, by checking the vendor version number of the nodes one by one, it is possible to accurately identify which nodes have been successfully connected, which nodes have not been connected or have been abnormally connected, which helps to promptly discover and deal with potential connection problems and improve system reliability; dynamically adjust resource allocation according to the total number of nodes to ensure that each connected node can obtain the necessary resources, which helps to optimize system performance and avoid waste of resources; by providing accurate node connection status information, it is possible to provide users with feedback on which devices have been successfully connected, which devices have not been connected or have been abnormally connected, which is conducive to users quickly understanding the system status and enhancing user experience.

[0071] 2.2) In some embodiments, looping through the total number of nodes to read register data of each node to complete the hot-swap operation includes:

[0072] Get the total number of nodes currently inserted;

[0073] If the total number of nodes currently increases, the total number of nodes in the increasing state is used as an index, and the operation is cyclically executed until the register data of all the increased total numbers of nodes are read;

[0074] If the current total number of nodes decreases or remains unchanged, the current total number of nodes is updated.

[0075] For example, in the thread loop body, the number of nodes currently inserted is obtained. If the number of nodes increases, the first added node is set as index, the register data to be written is obtained from the node array, and the subsequent nodes are reinitialized; if the number of nodes decreases or remains unchanged, the total number of the latest nodes is updated. For example, the thread sleeps for a specified time (200ms) before the next loop. The key code is as follows:

[0076]

[0077]

[0078] Specifically, first, the total number of nodes currently inserted into the system is obtained through a hardware interface or software query method. This total number of nodes represents the number of all nodes currently connected to the system; the current total number of nodes is compared with the total number of nodes previously recorded. If the total number increases, it means that new nodes have been inserted into the system. At this time, the total number of increased nodes is used as an index (or starting point) to start a loop process for reading and processing the register data corresponding to these newly added nodes. The loop will run until the register data of all newly added nodes has been read. If it is detected that the total number of nodes has not increased (that is, the total number has decreased or remained unchanged), there is no need to perform the operation of reading the register data of the new node, but to ensure the accuracy of the system status, the total number of nodes currently recorded is updated to reflect the latest system status.

[0079] Through the above method, the change of the total number of nodes is detected in real time, and its register data is read immediately when the node is added, which can respond to the insertion of new devices more quickly, thereby improving the response speed of the system; when the total number of nodes does not change, unnecessary read operations will not be performed, thereby saving system resources and improving resource utilization efficiency; by timely updating the total number of nodes and processing the newly added node data, it is possible to maintain accurate perception of the system status, thereby enhancing the stability of the system.

[0080] 3) In some embodiments, after initializing the node array in the total number of nodes, the method further includes:

[0081] If the A2B connection between the car audio bus device and the in-vehicle infotainment system is unsuccessful, a warning CAN signal is generated, and the CAN signal is sent to the in-vehicle infotainment system to prompt that the connection status of the car audio bus device is abnormal;

[0082] The CAN signal is parsed to obtain the node position where the car audio bus device is inserted, and the node with the sequence identifier corresponding to the node position is reinitialized to restore the car audio connection state.

[0083] For example, in special circumstances, after the master end of the IVI (in-vehicle infotainment system) host initializes the node normally, the node fails to establish the A2B connection due to its own abnormality, and actively notifies the IVI through a CAN signal that the A2B connection status is abnormal. Based on this reported CAN signal, the node is reinitialized at the position of the A2B bus.

[0084] Specifically, by monitoring the A2B connection status between the car audio bus device (e.g., audio amplifier, speaker, etc.) and the in-vehicle infotainment system; when the A2B connection establishment failure or interruption is detected, the subsequent process is triggered; if the A2B connection is detected to be unsuccessful, a warning CAN signal is generated, and the generated warning CAN signal is then sent to the IVI system. The IVI system is responsible for processing information from various sensors inside the car and providing feedback to the driver (such as through a display screen, sound prompts, etc.). By sending the warning CAN signal to the IVI system, the driver can be indicated the problem of the A2B connection. After receiving the warning CAN signal, the IVI system will parse the signal to obtain information about the A2B connection failure. The IVI system will provide visual or auditory prompts to the driver through its user interface (such as a display screen, sound system, etc.) to inform the driver that the connection status of the car audio bus device is abnormal. In addition to providing a prompt of the abnormal connection status, the IVI system also parses the warning CAN signal to obtain the specific node location that caused the connection failure. The node location refers to the location of a specific device or component inserted or connected in the car audio bus device. Reinitialize the node. Reinitialization refers to the process of restoring a node to its initial state or configuration, which usually involves resetting the node's settings, reestablishing connections, etc. Reinitialization can be used to try to fix connection problems and restore the car audio connection status. After reinitialization, try to establish an A2B connection again; if reinitialization is successful and the node can correctly respond to the system's request, the A2B connection will be restored and the car audio system will be able to work normally.

[0085] In the above manner, by monitoring the A2B connection status and generating a warning CAN signal when the connection fails, the connection problem can be discovered and handled in time, thereby improving the reliability of the system; by providing the driver with a prompt of abnormal connection status, the user experience can be enhanced, so that the driver can understand the status of the car audio system in time and take corresponding measures; by reinitializing the failed node, trying to repair the connection problem, avoiding unnecessary waste of resources, and optimizing resource allocation.

[0086] Optionally, in some embodiments, the automobile audio bus device hot plug method further includes:

[0087] If a short circuit is detected in any of the nodes, abnormal information of the currently short-circuited node is read through the serial communication bus, and the abnormal information is sent to the in-vehicle infotainment system for reporting, wherein the abnormal information includes INTSTAT register data representing the current interrupt status and INTSRC register data representing the interrupt source;

[0088] In response to the abnormal information, the abnormal information is parsed, and if the fault type is determined to be a short circuit in the parsing result, the fault information of the current node is generated;

[0089] If it is detected that the fault of the current node has been restored, the register data after the current node is initialized to restore the sound playing.

[0090] For example, when a node encounters a BNBP short circuit or a short circuit to GND, the I2C reading of the node will be abnormal. Therefore, when a node reports a node abnormality through the master node's A2B_INTSTAT and A2B_INTSRC, and the abnormality type is a short circuit, the node fault is recorded. When the fault no longer exists, the register data of the subsequent nodes after the fault node is reinitialized, so that the bus can quickly resume sounding or recording after the fault disappears.

[0091] Specifically, in the vehicle audio system, the electrical status of each node is continuously monitored. When a short circuit is detected in any node, the subsequent process will be triggered. If a short circuit is detected, the abnormal information of the current short-circuited node is read using a serial communication bus (such as I2C, SPI, etc.). These abnormal information are usually stored in the node's register, including the INTSTAT register data that represents the current interrupt status and the INTSRC register data that indicates the interrupt source. The read abnormal information is then sent to the vehicle infotainment system. The IVI system is responsible for processing various information from the vehicle audio system and providing feedback to the driver. By sending abnormal information to the IVI system, the short circuit fault is reported to the driver. After receiving the abnormal information, the IVI system parses it. The parsing process includes identifying the data in the INTSTAT and INTSRC registers, and determining the type and source of the fault based on these data. If the parsing result shows that the fault type is a short circuit, the IVI system will generate fault information for the current node. This information includes the identifier of the faulty node, the time when the fault occurred, the type of fault, etc. After the fault occurs, the node status is continuously monitored. If it is detected that the fault of the current node has been restored (for example, the short circuit is cleared), the register data of the node is initialized. The initialization process includes resetting the register value to ensure that the node can work normally. After the initialization is completed, the sound playback will be restored.

[0092] Through the above method, the electrical status of the node is monitored in real time and abnormal information is read, which can more accurately detect short-circuit faults and reduce false alarms and missed alarms; by reporting short-circuit faults to the driver and providing fault information, the user experience can be enhanced, so that the driver can understand the status of the audio system in time and take corresponding measures; by continuously monitoring the node status and initializing the register data after the fault is recovered, the sound playback can be automatically restored, reducing manual intervention and maintenance costs.

[0093] In summary, the hot-swap method for automobile audio bus devices adopted in this application has the following technical effects:

[0094] First, by silently plugging and unplugging devices, the efficiency of bench testing can be greatly improved. In scenarios such as replacing parts, there is no need to power off and restart, which improves work efficiency. Second, if some parts of the node restart abnormally, they can be quickly reconnected silently, improving the integrity of the vehicle's sound function and optimizing the user experience. Third, the entire vehicle now has a sleep function, and reconnecting after waking up from sleep is a necessary function, especially when some nodes wake up slower than IVI, it is necessary to connect to this node silently.

[0095] See also Figure 2 , is a structural diagram of a hot-swap system for a car audio bus device in an embodiment of the present application, comprising:

[0096] A creation module 201 is used to create a link project in the format of a car audio bus and convert the link project into register data in a preset format;

[0097] The classification processing module 202 is used to classify the register data according to the nodes, and write the data belonging to the same node into the same array to form an array of nodes arranged in order;

[0098] The node determination module 203 is used to determine the node name in the playing state when the car audio bus device is hot-plugged, and traverse each node array to determine the sequence identifier of the node name;

[0099] The data writing module 204 is used to determine the total number of nodes in the node array corresponding to the sequence identifier, initialize the node array in the total number of nodes, and write the initialized register data;

[0100] The execution module 205 is used to start a thread, loop the total number of nodes to read the register data of each node, so as to complete the hot plug operation.

[0101] Among them, the creation module 201 executes step S101, the classification processing module 202 executes step S102, the node determination module 203 executes step S103, the data writing module 204 executes step S104, and the execution module 205 executes step S105. The technical details, technical solutions and technical effects involved in each module refer to the hot plug method of the automobile audio bus device, which will not be repeated here.

[0102] The car audio bus device hot-swap system provided by the embodiment of the present disclosure creates a link project that conforms to the car audio bus format, converts the link project into register data in a preset format, classifies the register data according to nodes, writes data belonging to the same node into the same array, and arranges the exported register data into multiple node arrays in sequence. In this way, the reconnection logic and the register data can be decoupled, which greatly reduces the code complexity and is conducive to sequential processing; determines the node name in the playing state when the car audio bus device is hot-swapped, traverses each of the node arrays to determine the sequence identifier of the node name; determines the sequence identifier The total number of nodes of the node array corresponding to the identification is initialized, and the initialized register data is written; the thread is started, the total number of nodes is looped to read the register data of each node to complete the hot plug operation. On the one hand, by accurately identifying the change of the total number of nodes, when the car audio bus device (audio node) is hot plugged, the node array corresponding to the sequence identifier is directly initialized, thereby avoiding jamming and no noise is generated, and the audio device can be quickly mounted and enabled; on the other hand, efficient and orderly management of the car audio bus device during the hot plug process is achieved, greatly improving the stability and reliability of the system.

[0103] An embodiment of the present disclosure further provides an electronic device, including: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the above method.

[0104] Figure 4 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and application scope of the embodiments of the present application.

[0105] like Figure 4As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, ROM 402 and RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0106] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.

[0107] The electronic device disclosed in this embodiment includes a processor, a memory, a transceiver and a communication interface. The memory and the communication interface are connected to the processor and the transceiver and complete communication with each other. The memory is used to store computer programs, the communication interface is used to communicate, and the processor and the transceiver are used to run the computer program so that the electronic device executes each step of the above method.

[0108] The above description and accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, separate components and functions are optional, and the order of operation may vary. Parts and subsamples of some embodiments may be included in or replace parts and subsamples of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" used in this application refers to any and all possible combinations listed in association with one or more. In addition, when used in the present application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of a stated sub-sample, whole, step, operation, element, and / or component, but do not exclude the presence or addition of one or more other sub-samples, wholes, steps, operations, elements, components and / or groups of these. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the presence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0109] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0110] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some sub-samples can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.

[0111] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A method for hot-swapping a car audio bus device, characterized in that: include: Creating a link project in a format of a car audio bus, and converting the link project into register data in a preset format; Classify the register data according to the nodes, write the data belonging to the same node into the same array, and form an array of nodes arranged in order; Determine the node name in the playing state when the car audio bus device is hot-plugged, and traverse each of the node arrays to determine the sequence identifier of the node name; Determine the total number of nodes in the node array corresponding to the sequence identifier, initialize the node array in the total number of nodes, and write the initialized register data; Start the thread, loop the total number of nodes to read the register data of each node, so as to complete the hot plug operation.

2. The method according to claim 1, characterized in that Determining the total number of nodes in the node array corresponding to the sequence identifier includes: Initialize the node address of the node array corresponding to the car audio bus device, starting from the starting node address, and traverse the node address corresponding to each node, Read the vendor version number corresponding to each of the nodes in turn; If the vendor version number is not currently read, it is determined that the current node is not inserted or is abnormal, and the total number of nodes is the previous node number of the current node; If the vendor version number is currently read, it is determined that the current node is successfully inserted, and the total number of nodes is increased by one to determine the total number of nodes in the node array.

3. The method according to claim 2, characterized in that Looping the total number of nodes to read register data of each node to complete the hot plug operation, including: Get the total number of nodes currently inserted; If the total number of nodes currently increases, the total number of nodes in the increasing state is used as an index, and the operation is cyclically executed until the register data of all the increased total numbers of nodes are read; If the current total number of nodes decreases or remains unchanged, the current total number of nodes is updated.

4. The method according to claim 1, characterized in that: After initializing the node array in the total number of nodes, it also includes: If the A2B connection between the car audio bus device and the in-vehicle infotainment system is unsuccessful, a warning CAN signal is generated, and the CAN signal is sent to the in-vehicle infotainment system to prompt that the connection status of the car audio bus device is abnormal; The CAN signal is parsed to obtain the node position where the car audio bus device is inserted, and the node with the sequence identifier corresponding to the node position is reinitialized to restore the car audio connection state.

5. The method according to claim 1, characterized in that Also includes: If a short circuit is detected in any of the nodes, abnormal information of the currently short-circuited node is read through the serial communication bus, and the abnormal information is sent to the in-vehicle infotainment system for reporting, wherein the abnormal information includes INTSTAT register data representing the current interrupt status and INTSRC register data representing the interrupt source; In response to the abnormal information, the abnormal information is parsed, and if the fault type is determined to be a short circuit in the parsing result, the fault information of the current node is generated; If it is detected that the fault of the current node has been restored, the register data after the current node is initialized to restore the sound playing.

6. The method according to claim 1, characterized in that Determining the node name in the playing state when the car audio bus device is hot plugged, traversing each of the node arrays to determine the sequence identifier of the node name, including: Counting the number of all current nodes at a preset time, and determining the insertion or removal of the car audio bus device when it is in hot plugging according to the change state of the number of all current nodes; If the car audio bus device is in a hot-plug unplugging operation, a first interrupt signal is generated, and the communication connection of the car audio bus device is cut off to interrupt the device, so as to eject the car audio bus device safely; If the car audio bus device is in an insertion operation when hot plugged, a second interrupt signal is generated, and the node name in the playing state when the car audio bus device is hot plugged is determined by matching, and each node array is traversed to determine the sequence identifier corresponding to the node name.

7. The method according to claim 6, characterized in that In response to the second interrupt signal, the playing state of the current node is maintained, and the node name in the playing state is determined through matching query, and each node array is traversed to determine the sequence identifier corresponding to the node name, and the second interrupt signal has the highest priority.

8. The method according to any one of claims 1 to 7, characterized in that: Creating a link project in a car audio format, and converting the link project into register data in a preset format, including: Using Sigma Studio graphical development tool to create a link project in a car audio format, and exporting the link project into a header file recognizable by code; The header file is read to obtain register data of all nodes and convert the data into register data in a preset format.

9. A hot-swap system for automotive audio bus devices, characterized in that: include: A creation module, used for creating a link project in the format of a car audio bus, and converting the link project into register data in a preset format; A classification processing module, used for classifying the register data according to nodes, writing the data belonging to the same node into the same array to form an array of nodes arranged in order; A node determination module, used to determine the node name in the playing state when the car audio bus device is hot-plugged, and traverse each node array to determine the sequence identifier of the node name; A data writing module, used for determining the total number of nodes of the node array corresponding to the sequence identifier, initializing the node array in the total number of nodes, and writing the initialized register data; The execution module is used to start a thread, loop the total number of nodes to read the register data of each node, so as to complete the hot plug operation.

10. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 8.

Citation Information

Cited By

  • Systems and methods for audio bus management

    GB2704888A