Universal serial bus audio device analysis method and apparatus
Patent Information
- Application Number
- CN202611058675.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-10-30
AI Technical Summary
该类分析方式操作过程较为复杂,也缺少面向USB音频应用场景的实时参数还原和动态重协商事件输出
上述提供的通用串行总线音频设备分析方法及设备,分析设备通过第一USB接口以USB设备角色与移动终端建立连接,并向移动终端发送第一UAC描述数据,使分析设备作为USB音频类接收端参与移动终端的实际枚举和音频流协商。分析设备接收移动终端发送的UAC控制传输数据,并结合协商指示数据与第一UAC描述数据之间的映射关系,确定移动终端当前选定的UAC音频流参数,从而直接反映USB音频链路中实际采用的音频格式、位深、采样率、通道数量等参数,提高音频流参数分析结果的准确性。
Smart Images

Figure CN123011180A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of Universal Serial Bus (USB) audio device analysis methods, and more particularly to a USB audio device analysis method and device. Background Technology
[0002] As smartphones, tablets, and other mobile devices increasingly adopt USB interfaces for digital audio output, these devices can connect to external sound cards, audio decoders, headphone amplifiers, and other USB audio devices. They can then perform device enumeration, audio stream interface selection, and audio parameter configuration according to the Universal Serial Bus (USB) audio protocol. During audio playback, the mobile device typically selects the appropriate audio format, bit depth, sampling rate, number of channels, audio stream endpoints, and clock source based on the system audio policy, player settings, the encoding parameters of the audio file to be played, and the audio capabilities provided by the USB audio device, thus establishing an audio data transmission link.
[0003] Current mobile operating systems typically expose content to third-party applications primarily as USB device information, audio file parameters, or player settings. The audio format, sampling rate, and bit depth displayed by these third-party applications mainly reflect the original parameters of the audio file or the target output parameters of the player. However, when the operating system performs resampling, bit depth conversion, channel conversion, or clock adjustment on the audio data, the parameters displayed by the application may differ from the actual audio stream parameters used in the USB link. This makes it difficult for users to accurately determine the true output state of the mobile terminal.
[0004] In USB audio protocols, audio stream parameters are typically determined by multiple descriptive data and control transfers. Different interface numbers and alternate interface settings correspond to different audio formats, bit depths, number of channels, and audio stream endpoints. The sampling rate and clock source can also be set via corresponding control transfers. Therefore, the audio stream parameters currently used by a mobile terminal are often scattered across multiple control transfers and their corresponding UAC descriptive data. Reading a single control transfer or only parsing the UAC descriptive data usually only yields partial configuration information, making it difficult to form a complete analysis of the current audio stream state.
[0005] During audio playback, the mobile terminal resends UAC control transmissions and updates the current audio stream configuration based on track switching, playback strategy adjustments, sampling rate changes, backup interface switching, or clock source switching. Existing mobile terminal applications primarily operate at the software interface layer provided by the operating system, lacking the ability to continuously parse USB protocol layer control transmissions and struggle to determine parameter switching processes based on changes in previous and subsequent negotiation states. Consequently, users find it difficult to promptly obtain information about changes in the current audio stream parameters and the negotiation process that caused these changes.
[0006] Existing USB protocol analysis devices can collect USB communication data, but their output typically consists mainly of raw data packets and protocol fields, requiring further analysis by a host computer. Analysts need to sift through a large number of communication records to find interface setting requests, parameter setting requests, and corresponding descriptive data, and then manually determine the current audio stream configuration. This type of analysis is quite complex and lacks real-time parameter reconstruction and dynamic renegotiation event output tailored to USB audio application scenarios. Summary of the Invention
[0007] In view of this, it is necessary to provide a universal serial bus audio device analysis method and device to solve the above problems.
[0008] Embodiments of this application provide a method for analyzing a universal serial bus audio device, applied to an analysis device including a first USB interface for connecting a mobile terminal, characterized in that it includes: The device establishes a connection with the mobile terminal through the first USB interface as a USB device and sends the first Universal Serial Bus Audio Class (UAC) description data to the mobile terminal, so that the analysis device is enumerated by the mobile terminal as a USB audio class receiver. Receive UAC control transmission data sent by the mobile terminal, and extract negotiation indication data from the UAC control transmission data; Based on the mapping relationship between the negotiation instruction data and the first UAC description data, the currently selected UAC audio stream parameters of the mobile terminal are determined, and the current negotiation status data is generated based on the UAC audio stream parameters. During audio playback, updated negotiation state data is generated based on the re-received UAC control transmission data. A dynamic renegotiation event is determined based on the difference between the updated negotiation state data and the current negotiation state data, and the updated negotiation state data is used as the new current negotiation state data. Output the UAC audio stream parameters in the current negotiation state data, and output the dynamic renegotiation event when the dynamic renegotiation event is determined.
[0009] In at least one embodiment of this application, determining the currently selected UAC audio stream parameters of the mobile terminal based on the mapping relationship between the negotiation indication data and the first UAC description data includes: Establish a configuration mapping relationship between audio stream configuration identifiers and audio parameters based on the first UAC description data; Extract the currently selected audio stream configuration identifier of the mobile terminal from the negotiation instruction data; The configuration mapping relationship is queried based on the audio stream configuration identifier to obtain the audio format, bit depth, number of channels and / or audio stream endpoints corresponding to the audio stream configuration identifier.
[0010] In at least one embodiment of this application, the step of extracting negotiation indication data from the UAC control transmission data includes: Multiple control transmission records are recorded according to the receiving timing sequence of the UAC control transmission data. The association between each control transmission record is determined based on the interface number, endpoint address, entity identifier and / or control object carried by each control transmission record; Control transmission records corresponding to the same audio stream interface, the same audio stream endpoint, and / or the same clock entity within the preset associated time window will be grouped into a negotiation record group; The negotiation instruction data is generated based on the negotiation record group.
[0011] In at least one embodiment of this application, generating current negotiation state data based on the UAC audio stream parameters includes: Candidate negotiation status data is generated based on the audio stream configuration identifier, audio format, bit depth, sampling rate, number of channels, audio stream endpoints, and / or clock source in the negotiation record group; For the state parameters in the candidate negotiation state data that have not been updated by the negotiation record group, read the corresponding state parameters in the previous negotiation state data. Complete negotiation status data is generated based on the candidate negotiation status data and the corresponding status parameters read. The complete negotiation status data that meets the preset effective conditions is determined as the current negotiation status data.
[0012] In at least one embodiment of this application, the preset activation conditions include the audio stream endpoint corresponding to the complete negotiation state data being in an enabled state and / or the first USB interface receiving isochronous audio data transmitted via the audio stream endpoint; The method further includes: Monitor the interface status of the audio stream endpoint and / or the isochronous audio data reception status; When the audio stream endpoint is enabled and / or receives the isochronous audio data, the complete negotiation state data is marked as effective negotiation state data; The parameters of the UAC audio stream actually enabled by the mobile terminal are determined based on the effective negotiation status data.
[0013] In at least one embodiment of this application, when there are multiple parameter values for the same state parameter in the negotiation record group, the valid parameter value of the state parameter is determined according to the receiving order of the control transmission record corresponding to each parameter value, the control transmission result, and the enabled status of the corresponding audio stream endpoint. Specifically, the parameter values associated with the corresponding control transmission that has been completed and are enabled by the audio stream endpoint are selected, and the selected parameter values are written into the complete negotiation state data.
[0014] In at least one embodiment of this application, determining a dynamic renegotiation event based on the difference between the updated negotiation state data and the current negotiation state data includes: Determine the state parameters that have changed between the updated negotiation state data and the current negotiation state data; Multiple state parameter changes corresponding to the same audio stream interface, the same audio stream endpoint, and / or the same clock entity within a preset event window are grouped into a single dynamic renegotiation event; Generate the parameter combination before renegotiation, the parameter combination after renegotiation, and the control transmission record that triggers the change of the state parameters corresponding to the dynamic renegotiation event. The associated output includes the parameter combination before renegotiation, the parameter combination after renegotiation, and / or the control transmission record.
[0015] In at least one embodiment of this application, the analysis device further includes a second USB interface for connecting a USB audio device to be analyzed, and the method further includes: The second USB interface is controlled to establish a connection with the USB audio device to be analyzed in the role of a USB host, and the second UAC description data of the USB audio device to be analyzed is obtained. Multiple combinations of device capability parameters are generated based on the second UAC description data, and an audio capability dataset is generated based on the multiple combinations of device capability parameters. The current audio parameter combination is generated based on the audio format, bit depth, sampling rate, and number of channels in the current negotiation state data. The current audio parameter combination is matched with multiple device capability parameter combinations; When a match occurs, a parameter support result is generated, and a capability use difference result is generated based on the parameter differences between the current audio parameter combination and the audio capability dataset; when a mismatch occurs, a parameter support result is generated.
[0016] An analysis apparatus for performing a Universal Serial Bus audio device analysis method as described in any of the preceding claims, comprising: The first USB communication unit is used to establish a connection with the mobile terminal as a USB device, provide the mobile terminal with first Universal Serial Bus Audio Class (UAC) description data, and receive UAC control transmission data sent by the mobile terminal. The storage unit is used to store the first UAC description data, the current negotiation state data, and the updated negotiation state data; The processing unit, connected to the first USB communication unit and the storage unit respectively, is used to extract negotiation indication data from the UAC control transmission data, determine the UAC audio stream parameters currently selected by the mobile terminal according to the mapping relationship between the negotiation indication data and the first UAC description data, generate the current negotiation state data according to the UAC audio stream parameters, generate the updated negotiation state data according to the UAC control transmission data re-received during audio playback, determine the dynamic renegotiation event according to the difference between the updated negotiation state data and the current negotiation state data, and use the updated negotiation state data as the new current negotiation state data. An output unit, connected to the processing unit, is used to output the UAC audio stream parameters in the current negotiation state data, and to output the dynamic renegotiation event when the dynamic renegotiation event is determined.
[0017] In at least one embodiment of this application, a recording association unit and a status confirmation unit are also included; The record association unit is connected to the first USB communication unit and the processing unit respectively, and is used to group multiple control transmission records corresponding to the same negotiation process into a negotiation record group according to the interface number, endpoint address, entity identifier and / or reception timing of the UAC control transmission data. The status confirmation unit is connected to the first USB communication unit and the processing unit respectively, and is used to monitor the enable status and / or isochronous audio data reception status of the audio stream endpoint, and when the audio stream endpoint is in the enable status and / or receives isochronous audio data, the negotiation status data generated according to the negotiation record group is determined as effective negotiation status data. The processing unit is also used to determine the UAC audio stream parameters actually enabled by the mobile terminal based on the effective negotiation status data.
[0018] The method and apparatus for analyzing universal serial bus audio devices implemented in this embodiment will have at least the following beneficial effects: The aforementioned Universal Serial Bus (USB) audio device analysis method and apparatus establish a connection with a mobile terminal via a first USB interface, acting as a USB device, and send first UAC description data to the mobile terminal. This allows the analysis device to participate in the mobile terminal's actual enumeration and audio stream negotiation as a USB audio class receiver. The analysis device receives UAC control transmission data sent by the mobile terminal and, based on the mapping relationship between the negotiation instruction data and the first UAC description data, determines the currently selected UAC audio stream parameters of the mobile terminal. This directly reflects the actual audio format, bit depth, sampling rate, number of channels, and other parameters used in the USB audio link, improving the accuracy of the audio stream parameter analysis results.
[0019] During audio playback, the analysis device continuously receives UAC control transmission data, forming current negotiation state data and updated negotiation state data respectively, and determines dynamic renegotiation events based on the difference between the two. Therefore, when the mobile terminal renegates due to track switching, output strategy adjustment, or audio stream configuration changes, it can promptly obtain the changed audio stream parameters and their changes, enabling continuous analysis and online display of the mobile terminal's USB audio output status. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] in: Figure 1 This is a flowchart of a Universal Serial Bus audio device analysis method in one embodiment; Figure 2 This is a detailed flowchart of a Universal Serial Bus audio device analysis method in one embodiment; Figure 3 This is a schematic diagram of the hardware architecture of the analysis device in one embodiment; Figure 4 This is a structural block diagram of the analysis device in one embodiment.
[0022] Explanation of key component symbols: 100. Analytical equipment; 110. First USB communication unit; 120. Storage unit; 130. Processing unit; 140. Output unit. Detailed Implementation
[0023] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] Example 1: This example provides a method for analyzing universal serial bus audio devices, which is applied to analysis device 100.
[0025] Analysis device 100 refers to an electronic device capable of accessing a mobile terminal as a USB audio device and receiving, parsing, and outputting audio stream negotiation information actually sent by the mobile terminal. Analysis device 100 includes a processor, memory, a USB controller, and a first USB interface for connecting to the mobile terminal.
[0026] The first USB interface is a USB communication interface provided by the analysis device 100 for use with mobile terminals. In this embodiment, the first USB interface is a USB Type-C interface. In other embodiments, the first USB interface may also be a USB Type-A interface, a Micro-USB interface, or other interface forms conforming to the USB protocol.
[0027] A mobile terminal refers to an electronic device that has USB host functionality and is capable of outputting USB digital audio, including smartphones, tablets, portable media players, and personal computers. This embodiment uses a smartphone as the mobile terminal for illustration.
[0028] After the analysis device 100 starts up, it controls the first USB interface to establish a connection with the mobile terminal as a USB device. The USB device role means that the analysis device 100 accepts device enumeration, interface configuration and parameter settings initiated by the mobile terminal, and the mobile terminal works as a USB host in this USB communication link.
[0029] Please refer to Figure 1 and Figure 3 The analysis device 100 responds to the description data reading request sent by the mobile terminal and sends the first Universal Serial Bus Audio Class (UAC) description data to the mobile terminal, thereby providing the mobile terminal with the USB audio function, audio stream interface and available audio parameter information of the analysis device 100.
[0030] The first UAC description data is a set of data in which the analysis device 100 declares its own USB audio functions, audio stream interface, and available audio parameters to the mobile terminal. It includes device description data, configuration description data, audio control interface description data, audio stream interface description data, format type description data, and endpoint description data. When using a clock entity protocol structure, the first UAC description data also includes clock source description data and / or clock selector description data.
[0031] The first UAC description data is formed in any of the following ways: In the first method, the first UAC description data is pre-stored in the non-volatile memory of the analysis device 100. In the second method, the analysis device 100 generates the first UAC description data according to a preset audio capability configuration. In the third method, after obtaining the audio capabilities of the USB audio device to be analyzed, the analysis device 100 filters and converts the corresponding description data to generate the first UAC description data to be sent to the mobile terminal. When using this method, the analysis device 100 first controls the second USB interface to enumerate the USB audio device to be analyzed as a USB host, obtains and parses the second UAC description data; after completing the generation of the first UAC description data, it then enables the first USB interface to allow the mobile terminal to complete device enumeration.
[0032] This embodiment adopts a pre-stored method. The first UAC description data defines an audio control interface and an audio stream interface. The audio stream interface has multiple spare interface settings.
[0033] Alternate interface settings refer to interface settings used to represent different audio stream configurations under the same audio stream interface, for example: When the backup interface setting value is 0, the audio stream endpoint is closed; When the spare interface setting value is 1, it corresponds to a dual-channel, 16-bit pulse code modulation audio format; When the spare interface setting value is 2, it corresponds to a dual-channel, 24-bit pulse code modulation audio format. When the spare interface is set to 3, it corresponds to a dual-channel, 32-bit pulse code modulation audio format.
[0034] For the first UAC description data using the UAC1.0 protocol, the format type description data records the discrete sampling rate value or sampling rate range supported by the corresponding audio stream interface. For the first UAC description data using the UAC2.0 protocol, the clock source description data is used to declare the clock frequency control capability, and the analysis device 100 responds to the mobile terminal's requests for current sampling rate value query, range query, and parameter setting for the clock source entity.
[0035] After the mobile terminal sends a description data read request to the analysis device 100, the analysis device 100 responds to the corresponding request and returns the first UAC description data. After completing the enumeration, the mobile terminal enumerates the analysis device 100 as a USB audio receiver.
[0036] USB audio receivers are audio stream receiving devices that can receive USB digital audio data output from mobile terminals.
[0037] Please refer to Figure 1 and Figure 3 After the analysis device 100 completes the enumeration, it receives the UAC control transmission data sent by the mobile terminal.
[0038] The UAC control transmission data referred to in this application refers to the control transmission data sent by the mobile terminal during the process of enumerating USB audio devices, selecting audio stream interfaces, and configuring audio parameters. This includes USB standard control transmission for selecting audio stream interface configuration, and UAC class-specific control transmission for setting sampling rate, clock source, or other audio parameters.
[0039] The analysis device 100 generates a control transmission record for each USB control transmission data. The control transmission record is used to structurally store the content of a control transmission, including the request type, the request recipient, the interface number, the backup interface setting value, the endpoint address, the entity identifier, the control selection value, the control data value, the reception time, and the transmission completion status.
[0040] The transmission completion status is used to characterize whether the control transmission is completed normally. When the establishment phase, data phase and status phase of the control transmission are all completed normally, and the USB controller does not return a STALL, timeout or transmission error status, the control transmission record is marked as transmission complete.
[0041] Analysis device 100 extracts negotiation instruction data from UAC control transmission data.
[0042] Negotiation indication data is data that can characterize the current audio stream configuration selection result of the mobile terminal, including audio stream configuration identifier, sampling rate control value, clock source identifier and / or audio stream endpoint status.
[0043] The audio stream configuration identifier is used to indicate the currently selected audio stream interface configuration of the mobile terminal. In this embodiment, the audio stream configuration identifier consists of an interface number and a backup interface setting value.
[0044] For example, if a mobile terminal sends a setting interface request and specifies the audio stream interface number as 1 and the backup interface setting value as 2 in the request, then the analysis device 100 will combine the interface number 1 and the backup interface setting value 2 to form the current audio stream configuration identifier.
[0045] Please refer to Figure 1 and Figure 3 The analysis device 100 parses the first UAC description data and establishes a configuration mapping relationship between the audio stream configuration identifier and the audio parameters.
[0046] The configuration mapping relationship refers to the correspondence between the audio stream configuration identifier and the corresponding audio format, bit depth, number of channels and audio stream endpoints. The analysis device 100 uses the interface number and the backup interface setting value as query conditions, and uses the corresponding audio parameters in the first UAC description data as query results to form a configuration mapping table.
[0047] For example, the configuration mapping table includes: Interface number 1 and spare interface setting value 1 correspond to dual-channel, 16-bit pulse code modulation format and the first isochronous audio endpoint; Interface number 1 and spare interface setting value 2 correspond to dual-channel, 24-bit pulse code modulation format and the first isochronous audio endpoint; Interface number 1 and spare interface setting value 3 correspond to dual-channel, 32-bit pulse code modulation format and first isochronous audio endpoint.
[0048] When the analysis device 100 extracts interface number 1 and backup interface setting value 2, it determines, according to the configuration mapping table, that the currently selected audio format of the mobile terminal is pulse code modulation format, bit depth is 24 bits, number of channels is 2, and audio stream endpoint is the first isochronous audio endpoint.
[0049] Mobile terminals can also use parameter setting requests to set the sampling rate and / or clock source. A parameter setting request is a class-specific control request that uses an audio stream endpoint, clock source entity, or clock selection entity as the control object to write the current audio parameter value.
[0050] The control object is used to indicate the endpoint or clock entity to which this parameter setting is applied; the control selection value is used to indicate the type of parameter being set; the control data value is used to carry the sampling rate, clock source identifier, or corresponding control value.
[0051] When using the UAC1.0 protocol, the analysis device 100 identifies the sampling frequency setting request for the audio stream endpoint and determines the current sampling rate based on the control data value in the request.
[0052] When using the UAC2.0 protocol, the analysis device 100 determines the clock source entity corresponding to the current audio stream path based on the clock entity description data. When a clock selector is set in the first UAC description data, the analysis device 100 also determines the currently selected clock source based on the control request for the clock selector, and then determines the current sampling rate based on the clock frequency setting request for that clock source entity.
[0053] For example, if the parameter setting request is for the first isochronous audio endpoint, and the control selection value represents the sampling frequency control, and the control data value is 96000Hz, then the analysis device 100 determines that the sampling rate currently selected by the mobile terminal is 96000Hz.
[0054] The analysis device 100 combines the audio format, bit depth, number of channels, and audio stream endpoints determined by the audio stream configuration identifier with the sampling rate and / or clock source determined by the parameter setting request to form the UAC audio stream parameters currently selected by the mobile terminal.
[0055] UAC audio stream parameters refer to the set of parameters currently used by the mobile terminal to establish USB audio data transmission, including audio format, bit depth, sampling rate, number of channels, audio stream endpoints, alternate interface settings, and / or clock source.
[0056] Analysis device 100 generates current negotiation status data based on UAC audio stream parameters. The current negotiation status data is a data object used to record the current USB audio stream negotiation status, including interface number, spare interface setting value, audio format, bit depth, sampling rate, number of channels, audio stream endpoint, clock source, control transmission record corresponding to each parameter, and status generation time.
[0057] When establishing a negotiation state for the first time, the analysis device 100 does not yet have data from the previous negotiation state. At this time, the analysis device 100 generates initial negotiation state data based on the currently received control transmission records and the first UAC description data.
[0058] For parameters that have been determined, the analysis device 100 writes the corresponding parameter value into the initial negotiation state data; for parameters for which a valid control value has not yet been obtained, the corresponding field is marked as pending confirmation.
[0059] Once the interface number, backup interface settings, audio format, bit depth, number of channels, and audio stream endpoints used to identify the current audio stream have been determined, and the sampling rate and clock source have been determined according to the corresponding protocol structure, the analysis device 100 uses the initial negotiation state data as the current negotiation state data.
[0060] For example, the mobile terminal sequentially sends a setting interface request with a backup interface setting value of 2 and a parameter setting request with a sampling rate of 96000Hz. The current negotiation status data generated by the analysis device 100 includes: interface number 1, backup interface setting value 2, pulse code modulation format, 24 bits, 96000Hz, dual channels, first isochronous audio endpoint, and current clock source.
[0061] Please refer to Figure 1 and Figure 3 The analysis device 100 further determines whether the current negotiation status data has taken effect. A configuration taking effect status means that the mobile terminal has successfully completed the corresponding interface and parameter configuration. The analysis device 100 determines whether the configuration has taken effect based on the transmission completion status of the setting interface request and the backup interface setting value. When the setting interface request is completed normally, and the backup interface setting value corresponds to an audio stream configuration with isochronous audio endpoints, the current negotiation status data is marked as a configuration taking effect status.
[0062] The transmission active status means that the mobile terminal has sent isochronous audio data to the audio stream endpoint according to the corresponding parameters. The analysis device 100 monitors the isochronous audio data reception status of the first USB interface. When it receives isochronous audio data sent through the current audio stream endpoint, it further marks the configuration active status as the transmission active status.
[0063] When outputting the actual playback parameters of the mobile terminal, the analysis device 100 prioritizes using the UAC audio stream parameters corresponding to the transmission activation status. If isochronous audio transmission has not yet started, the analysis device 100 outputs the configuration activation status and marks that the current configuration has not yet entered the audio transmission stage.
[0064] Please refer to Figure 1 and Figure 3 During audio playback, the analysis device 100 continuously receives UAC control transmission data resent by the mobile terminal. The resent control transmission data refers to the control transmission that the mobile terminal resends after the current negotiation state is formed due to track switching, playback strategy adjustment, sampling rate change, audio format change, or clock source switching.
[0065] The analysis device 100 generates updated negotiation status data according to the aforementioned processing method. Updated negotiation status data refers to a data object formed based on newly received control transmissions and used for comparison with the current negotiation status data. Its field structure is consistent with the current negotiation status data.
[0066] For example, after the mobile terminal switches tracks, it adjusts the backup interface setting value to 3 and the sampling rate to 192000Hz. The updated negotiation status data includes: interface number 1, backup interface setting value 3, pulse code modulation format, 32-bit, 192000Hz, dual channels, first isochronous audio endpoint, and current clock source.
[0067] The analysis device 100 compares the updated negotiation status data with the corresponding parameters in the current negotiation status data. When a difference exists, a dynamic renegotiation event is determined to have occurred.
[0068] Dynamic renegotiation events refer to events in which a mobile terminal, after completing the initial audio stream configuration, uses USB control transmission to change the current audio stream configuration again. These events include backup interface switching events, audio format switching events, bit depth switching events, sampling rate switching events, channel configuration switching events, audio stream endpoint switching events, and / or clock source switching events.
[0069] In the example above, the bit depth was adjusted from 24 bits to 32 bits, and the sampling rate was adjusted from 96000Hz to 192000Hz. The analysis device 100 determined that this dynamic renegotiation event included bit depth switching and sampling rate switching.
[0070] Analyze the parameter combinations and corresponding event types before and after the output change of device 100. After completing the event output, update the negotiation state data as the new current negotiation state data for subsequent state comparison.
[0071] Example 2: Please refer to Figures 1-3 Based on Example 1, this embodiment further explains the merging of multiple control transmissions, completion of negotiation status, confirmation of effective status, reconstruction of renegotiation events, analysis of downstream device capabilities, and forwarding of audio streams.
[0072] The audio stream path refers to the audio data transmission relationship in the first UAC description data, which consists of the audio stream interface, the backup interface settings, the audio stream endpoints, and the associated clock entity.
[0073] Analysis device 100 parses the first UAC description data and establishes the path mapping relationship between the audio stream interface, the backup interface setting value, the audio stream endpoint, and the clock entity.
[0074] When a control transmission record involves a certain interface, endpoint, or clock entity, the analysis device 100 associates the control transmission record with the corresponding audio stream path according to the path mapping relationship.
[0075] Using the same clock source alone is insufficient to determine that two control transmissions belong to the same negotiation. When multiple audio stream interfaces share the same clock source, the analysis device 100 also combines the interface number, endpoint address, and entity connection relationships in the description data to determine the corresponding audio stream path.
[0076] A negotiation record group is a data set consisting of multiple control transmission records that are interconnected during the same audio stream negotiation process. When the analysis device 100 receives the first control transmission that can cause a change in the audio stream configuration, it starts the association timer. Each time a control transmission that can be associated with the same audio stream path is received, the analysis device 100 adds the control transmission record to the current negotiation record group and restarts the association timer.
[0077] After the association timer expires, analysis device 100 terminates the current negotiation record group. The time range corresponding to the association timer is the association time window.
[0078] The associated time window is determined based on the maximum allowable interval between adjacent control transmissions when the mobile terminal completes one audio stream configuration. This embodiment uses 100 milliseconds as an example value. In other embodiments, the associated time window is determined based on the mobile terminal's control transmission cycle, the USB controller's processing capability, and actual test results.
[0079] For example, the analysis device 100 sequentially receives a setting interface request for interface number 1 and backup interface setting value 2, a 96000Hz sampling rate setting request for endpoint address 0x01, and a clock control request for clock entity 10. The first UAC description data indicates that audio stream interface 1 uses endpoint 0x01 and corresponds to clock entity 10, and that the above control transmissions are located within the same associated time window. The analysis device 100 groups the three control transmission records into the same negotiation record group.
[0080] Candidate negotiation status data is a temporary state formed by directly extracting parameters from the current negotiation record group. It only records the parameters that have been updated during the current negotiation process. The analysis device 100 generates candidate negotiation status data based on the audio stream configuration identifier, audio format, bit depth, sampling rate, number of channels, audio stream endpoints and / or clock source in the negotiation record group.
[0081] When previous negotiation status data already exists, the analysis device 100 reads the parameters in the previous negotiation status data that have not been updated by the current negotiation record group and adds them to the candidate negotiation status data, thereby forming complete negotiation status data.
[0082] Complete negotiation state data is a data object containing the state parameters required for the current audio stream. For parameters that have been updated in this negotiation, the values parsed from the current negotiation record group are used; for parameters that have not been updated in this negotiation, valid values from the previous negotiation state data are used.
[0083] When there is no previous negotiation state data, the analysis device 100 generates initial complete negotiation state data according to the method of establishing the first negotiation state in Embodiment 1.
[0084] When multiple parameter values exist for the same status parameter in the same negotiation record group, the analysis device 100 determines the valid parameter value in the following order: Exclude parameter values where control transmission is incomplete or returns an error status, retain parameter values associated with the current audio stream path, and retain parameter values associated with the currently enabled audio stream endpoint; when multiple parameter values meet the aforementioned conditions, use the parameter value corresponding to the control transmission record with the later reception time; verify the valid parameter values based on the actual reception status of subsequent isochronous audio data. For example, if the mobile terminal sends two sampling rate setting requests, 48000Hz and 96000Hz, and both requests are completed normally, and the corresponding audio stream endpoint subsequently enters the transmission effective state according to the 96000Hz configuration, then the analysis device 100 determines 96000Hz as the current valid sampling rate.
[0085] An event window is a time range used to group multiple parameter changes in the same dynamic renegotiation into a single event. When the analysis device 100 receives the first control transmission that causes a change in the current audio stream configuration, it determines that the dynamic renegotiation event has started and starts the event timer. The event timer is restarted each time a relevant control transmission that can be associated with the same audio stream path is received.
[0086] The dynamic renegotiation event is considered complete when the event timer expires or the corresponding audio stream endpoint enters the transmission active state according to the updated parameters.
[0087] Analysis device 100 groups multiple parameter changes corresponding to the same audio stream path within the event window into a single dynamic renegotiation event and generates: The parameter combination before renegotiation, the parameter combination after renegotiation, the parameter fields that have changed, the control transmission record that triggered the parameter change, the event start time and completion time, and the basis for the configuration to take effect or the transmission to take effect.
[0088] For example, the mobile terminal first adjusts the backup interface setting from 2 to 3, then adjusts the sampling rate from 96000Hz to 192000Hz, and then restarts the isochronous audio endpoint. The above control process is within the same event window, and the analysis device 100 combines the bit depth change and the sampling rate change into a single dynamic renegotiation event.
[0089] The analysis device 100 also includes a second USB interface, which is a USB communication interface provided by the analysis device 100 for the USB audio device to be analyzed. The USB audio device to be analyzed includes an audio decoder, an external sound card, a digital headphone amplifier, and a USB headset.
[0090] The analysis device 100 controls the second USB interface to establish a connection with the USB audio device to be analyzed in the role of a USB host, completes device enumeration, and obtains the second UAC description data.
[0091] The second UAC description data is the USB audio class description data returned by the USB audio device to be analyzed to the analysis device 100, including configuration description data, interface description data, endpoint description data, audio stream interface description data, format type description data, and clock entity description data.
[0092] The analysis device 100 extracts the audio stream interface, backup interface settings, audio format, bit depth, number of channels, audio stream endpoints and corresponding clock entities from the second UAC description data, and obtains the sampling rate information supported by each audio stream interface.
[0093] For UAC1.0 devices, the analysis device 100 obtains discrete sampling rate values or sampling rate ranges from the format type description data, and obtains sampling rate information as needed by combining class-specific control transmissions oriented towards the audio stream endpoint.
[0094] For UAC2.0 devices, the analysis device 100 determines the clock source entity based on the clock entity description data and obtains the supported sampling rate range through class-specific control transmissions oriented towards the clock source entity.
[0095] The analysis device 100 generates device capability parameter combinations according to the original correspondence in the second UAC description data. Each device capability parameter combination retains its corresponding audio stream interface, backup interface setting value, audio stream endpoint, and description data source, and does not cross-combine parameters from different interfaces or different backup interface settings.
[0096] Multiple device capability parameter combinations together constitute an audio capability dataset. The analysis device 100 generates the current audio parameter combination based on the audio format, bit depth, sampling rate, and number of channels in the negotiation state data that is currently in the transmission active state, and matches it with each device capability parameter combination in the audio capability dataset.
[0097] If a matching combination exists, the generated parameters will support the result. If no matching combination exists, the generated parameters will not support the result.
[0098] The analysis device 100 also compares the current audio parameter combination with other available combinations in the audio capability dataset. When a device capability parameter combination with the same audio format and channel configuration as the current one, but with a higher bit depth or sampling rate, exists, the corresponding difference is written into the capability usage difference result; if no higher configuration exists, a result is generated showing that the current parameter combination has reached the corresponding device capability boundary.
[0099] Audio stream forwarding refers to the process by which the analysis device 100 receives isochronous audio data input from the first USB interface and sends the corresponding audio data to the USB audio device to be analyzed via the second USB interface.
[0100] Analysis device 100 is configured with a circular buffer. The circular buffer includes write position, read position, upper buffer threshold, and lower buffer threshold.
[0101] For each isochronous audio data packet received by the first USB interface, the analysis device 100 writes the complete audio sample frame from the data packet into a circular buffer. When the second USB interface enters a transmission cycle, it reads the corresponding number of complete audio sample frames from the circular buffer and organizes them into downstream isochronous data packets.
[0102] The amount of target audio data per unit time is determined based on the sampling rate, the number of channels, and the number of bytes occupied by each sample in each channel. The amount of data transmitted in each USB frame or microframe is determined based on the amount of target audio data and the USB frame period. When there is a non-integer data amount, the analysis device 100 uses the cumulative remainder method to allocate audio sample frames between adjacent transmission periods.
[0103] When the USB audio device to be analyzed has a feedback endpoint, the analysis device 100 reads the transmission rate information returned by the feedback endpoint, determines the target data volume of each transmission cycle of the second USB interface based on the feedback value, and organizes the output data packets in combination with the buffer capacity of the ring buffer.
[0104] When the USB audio device to be analyzed does not have a feedback endpoint and there is a long-term clock deviation between the first USB interface and the second USB interface, the analysis device 100 performs sampling rate conversion on the input audio data and then organizes the output data packets according to the transmission clock corresponding to the second USB interface.
[0105] In the event of only short-term transmission jitter, the analysis device 100 utilizes a ring buffer to absorb the instantaneous transmission differences between the two USB communication domains. When the amount of buffered data approaches the upper or lower limit threshold of the buffer, the analysis device 100 records the corresponding buffer state and adjusts the data processing according to complete audio sample frames to maintain the integrity of each channel's data and individual samples.
[0106] Example 3: Please refer to Figure 4 This embodiment provides an analysis device 100, including a housing and a processing circuit disposed within the housing. Figure 4 The basic functional structure of the analysis device 100 is shown, but the recording and association unit, status confirmation unit, and, in the extended embodiment, the second USB communication unit, audio stream forwarding unit, and power management unit are not included. Figure 4 As shown in the image.
[0107] The housing is used to install and protect the processing circuitry, and a first USB interface, a second USB interface, and a display window are provided on its outer side. In this embodiment, the first USB interface and the second USB interface are respectively located at opposite ends of the housing, facilitating the connection of the mobile terminal and the USB audio device to be analyzed.
[0108] The processing circuitry includes a first USB communication unit 110, a processing unit 130, a storage unit 120, and an output unit 140. In one specific embodiment, the analysis device 100 further includes a recording association unit and a status confirmation unit. In an extended embodiment, the analysis device 100 further includes a second USB communication unit, an audio stream forwarding unit, and a power management unit.
[0109] The first USB communication unit 110 is used to establish a USB communication link between the analysis device 100 and the mobile terminal, and includes a first USB interface, a USB physical layer and a USB device controller.
[0110] The first USB communication unit 110 operates as a USB device, responds to the enumeration request of the mobile terminal, sends the first UAC description data to the mobile terminal, and receives the UAC control transmission data and isochronous audio data sent by the mobile terminal.
[0111] In one specific embodiment, the analysis device 100 further includes a recording association unit and a status confirmation unit. The recording association unit is connected to the first USB communication unit 110 and the processing unit 130, respectively, and is used to receive UAC control transmission data transmitted by the first USB communication unit 110, and determine the association relationship between each control transmission record according to the interface number, endpoint address, entity identifier and / or reception timing corresponding to the UAC control transmission data, and group multiple control transmission records corresponding to the same negotiation process into a negotiation record group. The recording association unit sends the formed negotiation record group to the processing unit 130, so that the processing unit 130 can generate negotiation instruction data and corresponding negotiation status data.
[0112] The status confirmation unit is connected to both the first USB communication unit 110 and the processing unit 130, and is used to monitor the enable status of the audio stream endpoint and / or the isochronous audio data reception status of the first USB communication unit 110. When the audio stream endpoint is enabled and / or the first USB communication unit 110 receives isochronous audio data, the status confirmation unit sends status confirmation information to the processing unit 130. Based on the status confirmation information, the processing unit 130 determines the negotiation status data generated according to the negotiation record group as effective negotiation status data, and determines the UAC audio stream parameters actually enabled by the mobile terminal based on the effective negotiation status data.
[0113] The recording association unit and the status confirmation unit can be implemented using independent logic circuits or programmable logic units, or they can be formed by the processing unit 130 executing corresponding programs to form mutually independent functional units. When implemented using functional units, the recording association unit, the status confirmation unit, and the processing unit 130 form corresponding connection relationships through data calling relationships, including but not limited to the above-described structures and implementation methods.
[0114] The second USB communication unit is used to establish a USB communication link between the analysis device 100 and the USB audio device to be analyzed, including a second USB interface, a USB physical layer, and a USB host controller.
[0115] The second USB communication unit operates as a USB host, used to enumerate the USB audio devices to be analyzed, read the second UAC description data, configure the audio stream interface and backup interface settings, and send isochronous audio data.
[0116] The processing unit 130 is used to perform USB protocol processing, description data parsing, negotiation parameter restoration, status management, renegotiation event generation, and device capability matching.
[0117] The processing unit 130 is connected to the first USB communication unit 110, the second USB communication unit, the storage unit 120, the output unit 140, and the audio stream forwarding unit, respectively.
[0118] The processing unit 130 includes an enumeration processing module, a control transmission parsing module, a status management module, an event generation module, and a capability matching module. In embodiments where a separate record association unit is not provided, the processing unit 130 further includes a path association module.
[0119] The enumeration processing module is used to control the first USB communication unit 110 to respond to the enumeration request of the mobile terminal, and to control the second USB communication unit to enumerate the USB audio device to be analyzed.
[0120] The control transmission parsing module is used to parse UAC control transmission data and extract interface number, backup interface setting value, endpoint address, entity identifier, control selection value and control data value.
[0121] In embodiments where no separate record association unit is set up, the path association module is used to determine the audio stream path based on the first UAC description data and to group control transmission records belonging to the same audio stream path into the corresponding negotiation record group.
[0122] The status management module is used to generate initial negotiation status data, candidate negotiation status data, complete negotiation status data, and updated negotiation status data, and to generate configuration effective status and / or transmission effective status based on the status confirmation information sent by the status confirmation unit.
[0123] The event generation module is used to group multiple parameter changes belonging to the same audio stream path within the same event window into dynamic renegotiation events, and generate parameter combinations before renegotiation, parameter combinations after renegotiation, and trigger control transmission records.
[0124] The capability matching module is used to generate an audio capability dataset based on the second UAC description data and match the current audio parameter combination with the device capability parameter combination.
[0125] Storage unit 120 is used to store programs, first UAC description data, second UAC description data, configuration mapping relationships, audio stream paths, control transmission records, negotiation status data, audio capability datasets, and dynamic renegotiation events.
[0126] Storage unit 120 includes a non-volatile storage area and a runtime storage area. The non-volatile storage area stores the first UAC description data, program, and preset configuration; the runtime storage area stores control transmission records, negotiation state data, audio capability dataset, and event records.
[0127] The output unit 140 is used to output analysis results to users or external devices, including a display module and / or a communication module.
[0128] The display module is used to display the current audio format, bit depth, sampling rate, number of channels, clock source, configuration status, transmission status, dynamic renegotiation events, and capability matching results.
[0129] The communication module is used to send protocol analysis data to the host computer. The protocol analysis data includes second UAC description data, USB control transmission records, current negotiation status data, dynamic renegotiation events, and capability matching results.
[0130] The audio stream forwarding unit is connected to the first USB communication unit 110, the second USB communication unit, the processing unit 130 and the storage unit 120 respectively. It is used to cache the isochronous audio data received by the first USB interface and send the corresponding audio data to the USB audio device to be analyzed according to the transmission cycle of the second USB interface.
[0131] The audio stream forwarding unit includes a circular buffer, a feedback processing module, and / or a sample rate conversion module.
[0132] The feedback processing module is used to parse the transmission rate information returned by the feedback endpoint of the USB audio device to be analyzed, and to determine the target data volume for each transmission cycle of the second USB interface.
[0133] The sampling rate conversion module is used to perform sampling rate conversion on the input audio data when the first USB interface and the second USB interface use different transmission clocks and cannot use feedback information to complete rate coordination.
[0134] The power management unit is connected to the first USB interface, the second USB interface, and the processing unit 130, respectively.
[0135] When the first USB interface is in the role of a USB device, the analysis device 100 receives bus power from the mobile terminal or is powered by the internal power supply of the analysis device 100.
[0136] When the second USB interface is operating as a USB host, the power management unit provides bus power to the USB audio device being analyzed.
[0137] When using a USB Type-C interface, the first USB interface and the second USB interface are respectively configured with configuration channel circuits that match the corresponding data role and power supply role.
[0138] After the analysis device 100 is powered on, the processing unit 130 loads the first UAC description data and initializes the first USB communication unit 110. After the mobile terminal connects to the first USB interface, the analysis device 100 responds to the enumeration request as a USB device, thus enumerating the analysis device 100 as a USB audio receiver.
[0139] The processing unit 130 receives and parses the UAC control transmission data sent by the mobile terminal, generates the current negotiation state data, and determines the configuration effective state and transmission effective state based on the interface configuration and the isochronous audio data reception state.
[0140] During audio playback, the processing unit 130 continuously receives control transmission records, forms negotiation record groups according to the audio stream path and reception sequence, generates updated negotiation status data, and merges the updated parameter changes into dynamic renegotiation events.
[0141] After the USB audio device to be analyzed is connected to the second USB interface, the second USB communication unit, acting as the USB host, completes device enumeration and reads the second UAC description data. The processing unit 130 generates an audio capability dataset based on the second UAC description data and matches the currently enabled audio parameters of the mobile terminal with the device capability parameters.
[0142] During parameter matching, processing unit 130 configures the audio stream interface, backup interface settings, and isochronous transmission endpoint corresponding to the USB audio device to be analyzed. The audio stream forwarding unit receives the isochronous audio data input from the first USB communication unit 110 and, based on feedback information, buffer status, and / or sampling rate conversion results, sends it to the USB audio device to be analyzed via the second USB communication unit.
[0143] The processor, USB controller, memory, interface type, associated time window, event time window, feedback processing method, cache capacity, and sampling rate conversion method in the above embodiments are determined according to the specific product configuration, including but not limited to the above components, data structures, interface types, and processing methods.
[0144] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A method for analyzing universal serial bus audio devices, applied to an analysis device, the analysis device including a first USB interface for connecting a mobile terminal, characterized in that, include: The device establishes a connection with the mobile terminal through the first USB interface as a USB device and sends the first Universal Serial Bus Audio Class (UAC) description data to the mobile terminal, so that the analysis device is enumerated by the mobile terminal as a USB audio class receiver. Receive UAC control transmission data sent by the mobile terminal, and extract negotiation indication data from the UAC control transmission data; Based on the mapping relationship between the negotiation instruction data and the first UAC description data, the currently selected UAC audio stream parameters of the mobile terminal are determined, and the current negotiation status data is generated based on the UAC audio stream parameters. During audio playback, updated negotiation state data is generated based on the re-received UAC control transmission data. A dynamic renegotiation event is determined based on the difference between the updated negotiation state data and the current negotiation state data, and the updated negotiation state data is used as the new current negotiation state data. Output the UAC audio stream parameters in the current negotiation state data, and output the dynamic renegotiation event when the dynamic renegotiation event is determined.
2. The method for analyzing universal serial bus audio devices according to claim 1, characterized in that, The parameters of the UAC audio stream currently selected by the mobile terminal are determined based on the mapping relationship between the negotiation instruction data and the first UAC description data, including: Establish a configuration mapping relationship between audio stream configuration identifiers and audio parameters based on the first UAC description data; Extract the currently selected audio stream configuration identifier of the mobile terminal from the negotiation instruction data; The configuration mapping relationship is queried based on the audio stream configuration identifier to obtain the audio format, bit depth, number of channels and / or audio stream endpoints corresponding to the audio stream configuration identifier.
3. The method for analyzing universal serial bus audio devices according to claim 2, characterized in that, The step of extracting negotiation indication data from the UAC control transmission data includes: Multiple control transmission records are recorded according to the receiving timing sequence of the UAC control transmission data. The association between each control transmission record is determined based on the interface number, endpoint address, entity identifier and / or control object carried by each control transmission record; Control transmission records corresponding to the same audio stream interface, the same audio stream endpoint, and / or the same clock entity within the preset associated time window will be grouped into a negotiation record group; The negotiation instruction data is generated based on the negotiation record group.
4. The method for analyzing universal serial bus audio devices according to claim 3, characterized in that, The current negotiation state data is generated based on the UAC audio stream parameters, including: Candidate negotiation status data is generated based on the audio stream configuration identifier, audio format, bit depth, sampling rate, number of channels, audio stream endpoints, and / or clock source in the negotiation record group; For the state parameters in the candidate negotiation state data that have not been updated by the negotiation record group, read the corresponding state parameters in the previous negotiation state data. Complete negotiation status data is generated based on the candidate negotiation status data and the corresponding status parameters read. The complete negotiation status data that meets the preset effective conditions is determined as the current negotiation status data.
5. The method for analyzing universal serial bus audio devices according to claim 4, characterized in that, The preset activation conditions include the audio stream endpoint corresponding to the complete negotiation status data being in an enabled state and / or the first USB interface receiving isochronous audio data transmitted through the audio stream endpoint; The method further includes: Monitor the interface status of the audio stream endpoint and / or the isochronous audio data reception status; When the audio stream endpoint is enabled and / or receives the isochronous audio data, the complete negotiation state data is marked as effective negotiation state data; The actual UAC audio stream parameters activated by the mobile terminal are determined based on the effective negotiation status data.
6. The method for analyzing universal serial bus audio devices according to claim 4, characterized in that, When there are multiple parameter values for the same state parameter in the negotiation record group, the valid parameter value of the state parameter is determined according to the receiving order of the control transmission record corresponding to each parameter value, the control transmission result, and the enabled status of the corresponding audio stream endpoint. Specifically, the parameter values associated with the corresponding control transmission that has been completed and are enabled by the audio stream endpoint are selected, and the selected parameter values are written into the complete negotiation state data.
7. The method for analyzing universal serial bus audio devices according to claim 3, characterized in that, Determining dynamic renegotiation events based on the difference between the updated negotiation state data and the current negotiation state data includes: Determine the state parameters that have changed between the updated negotiation state data and the current negotiation state data; Multiple state parameter changes corresponding to the same audio stream interface, the same audio stream endpoint, and / or the same clock entity within a preset event window are grouped into a single dynamic renegotiation event; Generate the parameter combination before renegotiation, the parameter combination after renegotiation, and the control transmission record that triggers the change of the state parameters corresponding to the dynamic renegotiation event. The associated output includes the parameter combination before renegotiation, the parameter combination after renegotiation, and / or the control transmission record.
8. The method for analyzing universal serial bus audio devices according to claim 1, characterized in that, The analysis device also includes a second USB interface for connecting a USB audio device to be analyzed, and the method further includes: The second USB interface is controlled to establish a connection with the USB audio device to be analyzed in the role of a USB host, and the second UAC description data of the USB audio device to be analyzed is obtained. Multiple combinations of device capability parameters are generated based on the second UAC description data, and an audio capability dataset is generated based on the multiple combinations of device capability parameters. The current audio parameter combination is generated based on the audio format, bit depth, sampling rate, and number of channels in the current negotiation state data. The current audio parameter combination is matched with multiple device capability parameter combinations; When a match occurs, a parameter support result is generated, and a capability use difference result is generated based on the parameter differences between the current audio parameter combination and the audio capability dataset; when a mismatch occurs, a parameter support result is generated.
9. An analysis apparatus for performing the Universal Serial Bus audio device analysis method as described in any one of claims 1-8, characterized in that, include: The first USB communication unit is used to establish a connection with the mobile terminal as a USB device, provide the mobile terminal with first Universal Serial Bus Audio Class (UAC) description data, and receive UAC control transmission data sent by the mobile terminal. The storage unit is used to store the first UAC description data, the current negotiation state data, and the updated negotiation state data; The processing unit, connected to the first USB communication unit and the storage unit respectively, is used to extract negotiation indication data from the UAC control transmission data, determine the UAC audio stream parameters currently selected by the mobile terminal according to the mapping relationship between the negotiation indication data and the first UAC description data, generate the current negotiation state data according to the UAC audio stream parameters, generate the updated negotiation state data according to the UAC control transmission data re-received during audio playback, determine the dynamic renegotiation event according to the difference between the updated negotiation state data and the current negotiation state data, and use the updated negotiation state data as the new current negotiation state data. An output unit, connected to the processing unit, is used to output the UAC audio stream parameters in the current negotiation state data, and to output the dynamic renegotiation event when the dynamic renegotiation event is determined.
10. The analytical apparatus according to claim 9, characterized in that, It also includes a record association unit and a status confirmation unit; The record association unit is connected to the first USB communication unit and the processing unit respectively, and is used to group multiple control transmission records corresponding to the same negotiation process into a negotiation record group according to the interface number, endpoint address, entity identifier and / or reception timing of the UAC control transmission data. The status confirmation unit is connected to the first USB communication unit and the processing unit respectively, and is used to monitor the enable status and / or isochronous audio data reception status of the audio stream endpoint, and when the audio stream endpoint is in the enable status and / or receives isochronous audio data, the negotiation status data generated according to the negotiation record group is determined as effective negotiation status data. The processing unit is also used to determine the UAC audio stream parameters actually enabled by the mobile terminal based on the effective negotiation status data.
