Audio interface automatic verification method and device, electronic equipment and storage medium
Through the audio interface automation verification method, by editing the bin file and importing the vehicle to be tested, the audio underlying interface is automatically detected, which solves the problem of failed interface calls and inability to realize the function in the vehicle audio function development, and improves development efficiency.
Patent Information
- Application Number
- CN202411939292.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-18
Smart Images

Figure CN119847849A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to an audio interface automatic verification method, device, electronic device and storage medium. Background Art
[0002] There are many problems in the development of car audio functions. The existing technology often fails in interface calls, the returned data may be abnormal, and the function cannot be realized. Every time a problem occurs, multiple modules need to be debugged, which seriously affects the development progress. And when a problem occurs, it is impossible to accurately locate the problem, and multiple analysis and investigation are required, and repeated pull-through testing, retesting, stress testing and other operations are performed, wasting a lot of development debugging and problem analysis time. Summary of the invention
[0003] In view of this, the purpose of this application is to provide an audio interface automatic verification method, device, electronic device and storage medium, which can quickly locate problems and improve development efficiency.
[0004] In a first aspect, an embodiment of the present application provides an audio interface automatic verification method, the method comprising the following steps:
[0005] Import the edited bin file into the vehicle to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic;
[0006] Execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results.
[0007] In some embodiments, all interfaces of the audio bottom layer are detected one by one or a specified interface is detected in the following manner, including the following steps:
[0008] Execute the interface parameter setting logic to retrieve the first parameter corresponding to the interface to be detected from the bin file, and set the first parameter to the interface to be detected; wherein the bin file includes parameters edited according to setting rules for each interface of the audio bottom layer;
[0009] Execute the interface parameter acquisition logic to obtain a second parameter from the interface to be detected, and compare the second parameter with the first parameter; if the comparison results are consistent, generate a detection result indicating successful verification; if the comparison results are inconsistent, generate a detection result indicating failed verification.
[0010] In some embodiments, the detection order of all interfaces of the audio bottom layer is set according to the audio function; the detection order is the radio-related function interface, the balanced sound function interface, and various input and output function interfaces.
[0011] In some embodiments, the parameters edited for the radio-related function interface include volume parameters, which include radio volume parameters and mute parameters. The setting range of the radio volume parameters is 0 to 39 levels; the mute parameter represents mute / unmute by 1 / 0.
[0012] In some embodiments, the parameters edited for the balanced sound effect function interface include balance parameters and sound effect parameters. The balance parameters are represented by an array consistent with the number of vehicle body channels, and each value in the array represents the volume setting of a channel, and the setting range is -9 to 9; the sound effect parameters include time parameters of fade-in and fade-out effects and shaping values of reference sound effects.
[0013] In some embodiments, executing the interface parameter setting logic includes the following steps:
[0014] Apply for the AudioControl service of the vehicle to be tested to obtain the HAL layer control interface.
[0015] In some embodiments, the edited bin file is imported into the vehicle computer to be tested through a push instruction.
[0016] In a second aspect, an embodiment of the present application provides an audio interface automatic verification device, the device comprising:
[0017] An import module is used to import the edited bin file into the vehicle computer to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic;
[0018] The verification module is used to execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results.
[0019] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the audio interface automatic verification method as described in any one of the first aspects are performed.
[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the audio interface automatic verification method described in any one of the above-mentioned first aspects are executed.
[0021] The present application describes an audio interface automatic verification method, device, electronic device and storage medium, which imports the edited bin file into the vehicle to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic; the all interface test instruction logic is executed to detect all interfaces of the audio bottom layer one by one according to the set detection order; or the specified interface test instruction logic is executed to detect the specified interface of the audio bottom layer; and the corresponding detection results are generated. Therefore, by automatically checking whether the interface return value meets expectations and whether the interface is correct, it can help developers quickly verify the audio interface function, save time for joint debugging with other modules, and improve development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A flowchart of the audio interface automatic verification method according to an embodiment of the present application is shown;
[0024] Figure 2 A flowchart showing an embodiment of the present application for detecting all interfaces of the audio bottom layer one by one or detecting a specified interface;
[0025] Figure 3 A schematic diagram showing an embodiment of the present application detecting all interfaces of the audio bottom layer one by one and generating corresponding detection results;
[0026] Figure 4 A schematic diagram of the structure of the audio interface automatic verification device according to an embodiment of the present application is shown;
[0027] Figure 5 A structural block diagram of an electronic device described in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0028] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0029] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0030] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0031] In view of the technical problems raised by the background technology, the present application provides an audio interface automatic verification method, device, electronic device and storage medium, which can automatically check whether the interface is correct, help developers quickly verify the audio interface function, save time for joint debugging with other modules, and improve development efficiency.
[0032] See the instruction manual Figure 1 , an audio interface automatic verification method provided by an embodiment of the present application comprises the following steps:
[0033] S1. Import the edited bin file into the vehicle to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic;
[0034] S2. Execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results.
[0035] Specifically, in step S1, the edited bin file can be imported into the vehicle to be tested through the "adb push. / test_control system / bin / test_control" command. Among them, the main function of the "adb push" command is to push local files or folders to the specified directory of the connected Android device (here is the vehicle to be tested); ". / test_control" means the file named "test_control" in the current directory (here is the bin file), this path can be modified accordingly according to the local location of the actual bin file. If the file is in other folders, its relative path or absolute path needs to be accurately specified; "system / bin / test_control" refers to the target storage path of the vehicle, which means that the bin file is to be pushed to the "system / bin" directory of the vehicle. This directory is selected because it is one of the common storage paths for system executable files in the Android system. The executable files placed here (such as this bin file) can be easily called and executed by the vehicle system later, which is convenient for related functional testing or extended application operations.
[0036] It should be noted that when importing the bin file, the car computer needs to turn on the developer mode and enable the USB debugging function.
[0037] In addition, in this application, the compiled bin file contains the interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic. Specifically, the interface test instruction logic contains all interface test instruction logic (execute . / system / bin / test_control-all) that can execute all interface tests and the specified interface test instruction logic (execute . / system / bin / test_control-F "function module") of the specified module interface test. These codes are the core of realizing automated interface testing, and can call the corresponding interface test process according to different instruction parameters.
[0038] The interface parameter setting logic is used to retrieve the code logic of setting the xml parameters to the corresponding interface. When executing the specified module interface test, the parameters can be obtained from the relevant configuration files according to the set rules and correctly set to the corresponding interface. At the same time, the interface parameter acquisition logic is used to call the get method to obtain the parameters and compare them with the set parameters. In this way, it can be determined whether the interface parameter settings are correct, which is crucial for detecting whether the interface is working properly.
[0039] See the instruction manual Figure 2In step S2, all interfaces of the audio bottom layer are detected one by one or a specified interface is detected in the following manner, including the following steps:
[0040] S201, executing the interface parameter setting logic to retrieve a first parameter corresponding to the interface to be detected from the bin file, and setting the first parameter to the interface to be detected; wherein the bin file includes parameters edited according to setting rules for each interface of the audio bottom layer;
[0041] S202, execute the interface parameter acquisition logic to obtain a second parameter from the interface to be detected, and compare the second parameter with the first parameter; if the comparison results are consistent, generate a detection result indicating successful verification; if the comparison results are inconsistent, generate a detection result indicating failed verification.
[0042] The detection order of all the interfaces of the audio bottom layer is set according to the audio function; the detection order is the radio-related function interface, the balanced sound effect function interface, and various input and output function interfaces. In order to clearly explain how to detect all the interfaces of the audio bottom layer one by one or to detect a specific interface, the parameter settings of each interface are explained first.
[0043] In the application, the parameters edited for the radio-related functional interface include volume parameters, which include radio volume parameters and mute parameters, and the setting range of the radio volume parameters is 0 to 39 levels; the mute parameter is represented by 1 / 0 to mute / unmute; the parameters edited for the balanced sound effect functional interface include balance parameters and sound effect parameters, and the balance parameter is represented by an array consistent with the number of vehicle body channels, and each value in the array represents the volume setting of a channel, and the order is generally front left, front right, rear left, and rear right, with a setting range of -9 to 9; the sound effect parameters vary according to different sound effect settings, such as the fade-in and fade-out effect, which has a time parameter, such as fading out within 200ms, then two parameters are required, one representing the rising effect and the other representing the lowering effect, both of which need to be written as 200ms, and there is also a reference sound effect, which needs to be converted into a corresponding integer value based on the db value, generally configured from 0 to 255.
[0044] For example, the parameters of each audio interface are set as follows: #define ALSA_GEQ_PRESET "GEQ Preset", this interface is mainly used to adjust the equalizer effect. According to different mode settings, different scene effects can be achieved, which is helpful to test and verify the integrity of the interface and whether the application function is sound; #define ALSA_GEQ_BAND0_GAIN "GEQ Band0Gain Volume", this interface is used to adjust the gain of each frequency band of the equalizer separately, which is used to optimize and adjust the mode effect; #define ALSA_RADIO_MASTER_MUTE "Dsp Radio Master Unmute / Mute", this interface is used to adjust the master volume of the radio. During the laboratory test, this interface can be used for real-time debugging, improve the laboratory test efficiency, and save the tedious flashing operation; #define ALSA_RADIO_MUTE "Dsp RadioUnmute / Mute", this interface is used to verify whether the radio mute and unmute functions are normal. In the test scenario, it can be used to verify each function separately and perform separate sound source shielding operations; #define ALSA_RADIO_VOLUMN "Dsp RadioVolume", this interface is used to adjust the radio volume. During the test, the output amplitude can be continuously debugged through this interface; #define ALSA_DSPGLOBAL_BASE_VOLUME "Dsp ALL2 Volume", this interface can leave the overall car machine gain empty. When the volume adjustment does not meet the requirements, this interface can be used to flexibly configure the basic gain; #defineALSA_SQBICV_ECALL_VOLUME "Ecall Volume Set", this interface is used to set the ECALL volume. When the test finds that the maximum or minimum volume does not meet the requirements, this interface can be adjusted to achieve a perfect effect. The final parameters can be given to R&D and implemented immediately, eliminating the tedious communication and verification; #define ALSA_REFERENCE_GAIN "AudioReference Gain Volume", this interface is used to adjust the volume of the reference sound. A key action in the project development process is volume calibration. Bluetooth or smart voice needs to adjust the reference volume according to the scene. In order to meet the echo cancellation or international standards, the existence of this interface can save the calibration personnel a lot of flashing actions and can be controlled in real time; #defineALSA_ADC2_INPUT"ADC2 Input", this interface is used to adjust the input of ADC2. When the input source needs to be switched, it can be adjusted through this interface;#define ALSA_DTS_EFFECT_MODE "Dts Effect Mode", this interface is used to adjust the DTS sound effect, which can be used to distinguish whether it is a problem with the upper-layer application settings or a problem with the underlying effects. ;
[0045] In step S201, when executing the interface parameter setting logic, the code sp <iaudiocontrol>pctl=IAudioControl::getService() obtains the AudioControl service; wherein sp is a smart pointer type (such as a custom type alias of std::shared_ptr), which is used to manage the life cycle of IAudioControl type objects; AudioControl::getService() is a static function used to return an instance of the AudioControl service; then the interface is obtained through the code ctl=mixer_get_ctl_by_name(mixer,control), wherein control is the name of the control interface to be obtained, and the mixer_get_ctl_by_name function obtains the corresponding HAL layer control interface according to the given mixer object and interface name control, and assigns it to ctl; finally, the parameter value of the obtained HAL layer control interface ctl is set through the code mixer_ctl_set_value(ctl,θ,value), wherein θ is the index or position identifier of the parameter in the interface, and value is the specific parameter value to be set.
[0046] In step S202, the code value1=pctl->getEffectEnhanceMode() is used to call the getEffectEnhanceMode function on the already acquired AudioControl service instance pctl to obtain data related to the effect enhancement mode; and the code mixer_ctl_get_value(ctl,θ) is used to obtain the data with index θ in the interface of the previously acquired HAL layer control interface ctl using the mixer_ctl_get_value function;
[0047] Furthermore, the first comparison is performed through the code if(pctl->getEffectEnhanceMode()!=value1), where the value of getEffectEnhanceMode obtained through the AudioControl service is compared with the value previously obtained and stored through value1=pctl->getEffectEnhanceMode(); and the second comparison is performed through the code if(pctl->getEffectEnhanceMode()!=value2), where the value of getEffectEnhanceMode obtained through the AudioControl service is compared with value2. These two comparison data operations are to verify the correctness of the interface settings and whether the obtained data meets expectations, thereby ensuring the normal operation of the audio interface. If the comparison results are consistent, a test result OK indicating successful verification is generated. If the comparison results are inconsistent, a test result ERROR indicating failed verification is generated.
[0048] For example, in the navigation function module interface of the vehicle to be tested, the initial value of the navigation voice broadcast sound is set to 5. When ". / system / bin / test_control-F navigation function module" is executed: find the navigation voice broadcast volume parameter in the bin file; set the volume value 5 to the volume parameter variable of the navigation voice interface, and then get the current volume value through the get volume method of the navigation voice interface; compare the obtained volume value with the set volume value 5 to see if they are the same. If they are the same, the parameters of the navigation function module interface are set successfully and the test result is OK; if they are different, the test result is ERROR.
[0049] See the instruction manual Figure 3 In one embodiment, when executing all the interface test command logics, the first step is to test whether the master mute effect of the radio is normal, and then the radio mute effect, radio volume test, radio status test, volume balance function test, fade-in and fade-out effect test, DAC output test, adc input test, reference sound test, amp amplifier effect test and audio effect test.
[0050] This application provides an audio interface automatic verification method, which realizes automatic testing of the audio interface by editing the bin file and importing it into the vehicle to be tested, checks whether the interface is correct, helps developers quickly verify the audio interface function, saves time for joint debugging with other modules, and improves development efficiency.
[0051] Based on the same inventive concept, an audio interface automatic verification device is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to the above-mentioned audio interface automatic verification method, device, electronic device and storage medium in the embodiment of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0052] As the instruction manual Figure 4 As shown, the present application also provides an audio interface automatic verification device, the device comprising:
[0053] The import module 401 is used to import the edited bin file into the vehicle computer to be tested; wherein the bin file includes the interface test instruction logic, the interface parameter setting logic and the interface parameter acquisition logic; the interface test instruction logic includes the all interface test instruction logic and the specified interface test instruction logic;
[0054] Verification module 402 is used to execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results. Among them, the detection order of detecting all interfaces of the audio bottom layer one by one is set according to the audio function; the detection order is the radio-related function interface, the balanced sound effect function interface, and various input and output function interfaces. The parameters edited for the radio-related function interface include volume parameters, which include radio volume parameters and mute parameters, and the setting range of the radio volume parameters is 0 to 39 levels; the mute parameter represents mute / unmute by 1 / 0; the parameters edited for the balanced sound effect function interface include balance parameters and sound effect parameters, and the balance parameters are represented by an array consistent with the number of vehicle body channels, and each value in the array represents the volume setting of a channel, and the setting range is -9 to 9; the sound effect parameters include the time parameters of the fade-in and fade-out effect and the shaping value of the reference sound effect.
[0055] In some embodiments, the verification module 402 detects all interfaces of the audio bottom layer one by one or specifies the interface for detection, including: executing the interface parameter setting logic to retrieve the first parameter corresponding to the interface to be detected from the bin file, and setting the first parameter to the interface to be detected; wherein the bin file includes parameters edited for each interface of the audio bottom layer according to set rules; executing the interface parameter acquisition logic to obtain a second parameter from the interface to be detected, and comparing the second parameter with the first parameter; if the comparison results are consistent, generating a detection result indicating successful verification; if the comparison results are inconsistent, generating a detection result indicating failed verification.
[0056] In some embodiments, the verification module 402 executes the interface parameter setting logic, including: applying for the AudioControl service of the vehicle computer to be tested to obtain the HAL layer control interface.
[0057] In some embodiments, the import module 401 imports the edited bin file into the vehicle computer to be tested through a push instruction.
[0058] The present application provides an audio interface automatic verification device, which imports the edited bin file into the vehicle to be tested through an import module; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic; the verification module executes the all interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or executes the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generates corresponding detection results. Therefore, by automatically checking whether the interface return value meets expectations and whether the interface is correct, it can help developers quickly verify the audio interface function, save time for joint debugging with other modules, and improve development efficiency.
[0059] Based on the same concept of the present invention, the specification is attached Figure 5 As shown, the structure of an electronic device 500 provided in an embodiment of the present application includes: at least one processor 501, at least one network interface 504 or other user interface 503, a memory 505, and at least one communication bus 502. The communication bus 502 is used to realize the connection and communication between these components. The electronic device 500 optionally includes a user interface 503, including a display (for example, a touch screen, LCD, CRT, holographic imaging (Holographic) or projection (Projector), etc.), a keyboard or a pointing device (for example, a mouse, a trackball (trackball), a touch pad or a touch screen, etc.).
[0060] The memory 505 may include a read-only memory and a random access memory, and provides instructions and data to the processor 501. A portion of the memory 505 may also include a non-volatile random access memory (NVRAM).
[0061] In some embodiments, the memory 505 stores the following elements, which may be protected modules or data structures, or subsets thereof, or extended sets thereof:
[0062] Operating system 5051, including various system programs, used to implement various basic services and process hardware-based tasks;
[0063] The application module 5052 includes various application programs, such as a launcher, a media player, a browser, etc., which are used to implement various application services.
[0064] In an embodiment of the present application, by calling the program or instructions stored in the memory 505, the processor 501 is used to execute steps in a method, device, electronic device and storage medium for automatic verification of an audio interface, and can automatically check whether the interface is correct by checking whether the interface return value meets expectations, thereby helping developers to quickly verify the audio interface function, save time for joint debugging with other modules, and improve development efficiency.
[0065] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the audio interface automatic verification method are executed.
[0066] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is run, the above-mentioned audio interface automatic verification method can be executed.
[0067] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0068] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0069] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0070] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0071] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the aforementioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.< / iaudiocontrol>
Claims
1. An audio interface automated verification method, characterized in that: The method comprises the following steps: Import the edited bin file into the vehicle to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic; Execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results.
2. The method for automatic verification of an audio interface according to claim 1, characterized in that: All interfaces of the audio bottom layer are tested one by one or the specified interface is tested in the following way, including the following steps: Execute the interface parameter setting logic to retrieve the first parameter corresponding to the interface to be detected from the bin file, and set the first parameter to the interface to be detected; wherein the bin file includes parameters edited according to setting rules for each interface of the audio bottom layer; Execute the interface parameter acquisition logic to obtain a second parameter from the interface to be detected, and compare the second parameter with the first parameter; if the comparison results are consistent, generate a detection result indicating successful verification; if the comparison results are inconsistent, generate a detection result indicating failed verification.
3. The method for automatic verification of an audio interface according to claim 2, characterized in that: in, The detection order of all the interfaces of the audio bottom layer is set according to the audio function; the detection order is the radio related function interface, the balanced sound function interface, and various input and output function interfaces.
4. The method for automatic verification of an audio interface according to claim 3, characterized in that: in, The parameters edited for the radio-related function interface include volume parameters, which include radio volume parameters and mute parameters. The setting range of the radio volume parameters is 0 to 39 levels; the mute parameter represents mute / unmute through 1 / 0.
5. The method for automatic verification of an audio interface according to claim 4, characterized in that: in, The parameters edited for the balanced sound effect function interface include balance parameters and sound effect parameters. The balance parameters are represented by an array that is consistent with the number of vehicle body channels. Each value in the array represents the volume setting of a channel, and the setting range is -9 to 9; the sound effect parameters include the time parameters of the fade-in and fade-out effects and the shaping values of the reference sound effects.
6. The method for automatic verification of an audio interface according to claim 5, characterized in that: The execution of the interface parameter setting logic comprises the following steps: Apply for the AudioControl service of the vehicle to be tested to obtain the HAL layer control interface.
7. The method for automatic verification of an audio interface according to claim 6, characterized in that: in, Use the push command to import the edited bin file into the vehicle to be tested.
8. An audio interface automatic verification device, characterized in that: The device comprises: An import module is used to import the edited bin file into the vehicle computer to be tested; wherein the bin file includes interface test instruction logic, interface parameter setting logic and interface parameter acquisition logic; the interface test instruction logic includes all interface test instruction logic and specified interface test instruction logic; The verification module is used to execute the all-interface test instruction logic to detect all interfaces of the audio bottom layer one by one according to the set detection order; or execute the specified interface test instruction logic to detect the specified interface of the audio bottom layer; and generate corresponding detection results.
9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the audio interface automatic verification method as described in any one of claims 1 to 7 are performed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the audio interface automatic verification method as described in any one of claims 1 to 7 are executed.
Citation Information
Cited By
ECALL system dynamic configuration method, device and medium
CN120568284A