A method and system for locating pop and click sounds in an Android system audio

By creating worker threads in the Framework layer and HAL layer and analyzing PCM files, the problem of audio dropouts and pop sounds in the Android system is solved, achieving efficient localization and saving learning costs.

CN115687100BActive Publication Date: 2026-06-12HUIZHOU DESAY SV AUTOMOTIVE

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUIZHOU DESAY SV AUTOMOTIVE
Filing Date
2022-10-19
Publication Date
2026-06-12

Smart Images

  • Figure CN115687100B_ABST
    Figure CN115687100B_ABST
Patent Text Reader

Abstract

The application relates to a positioning method and system for audio pops and clicks of an Android system, which comprises the following steps: creating a work thread in an Audio Track of a Framework framework layer; creating another work thread in an Audio Module of a HAL layer; newly creating a first PCM file for storing dump data of the Framework framework layer; newly creating a second PCM file for storing dump data of the HAL layer; writing data transmitted from an application layer into the first PCM file; writing data transmitted from the Framework framework layer into the second PCM file; respectively exporting the stored first PCM file and the stored second PCM file from the system; and using audio software to listen and analyze whether the first PCM file and the second PCM file have pops and clicks. The scheme saves a large amount of time for positioning pops and clicks, and improves work efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio product technology, and in particular to a method and system for locating audio dropouts and pop sounds in an Android system. Background Technology

[0002] One of the main functions of the Android entertainment system is audio playback. Sometimes, audio playback issues such as cuts and pops occur, making it difficult to pinpoint the exact source of the problem. This issue involves four layers: the application layer, the framework layer, the HAL layer, and the kernel layer. Furthermore, the software engineers responsible for those layers often lack knowledge of the others, resulting in a significant time and effort being spent locating and identifying the source of the problem.

[0003] To quickly locate the source of audio dropouts and pop-up sounds, this solution provides a method and system for pinpointing audio dropouts and pop-up sounds in Android systems. Summary of the Invention

[0004] The purpose of this invention is to solve the problem of occasional audio dropouts and pop-ups during audio playback. This problem involves four parts: the application layer, the framework layer, the HAL layer, and the kernel layer. Software engineers working on the relevant parts often lack understanding of the others, leading to significant time and effort being spent locating and finding the root cause of the problem. The specific solution is as follows:

[0005] A method for locating audio dropouts and pop sounds in an Android system, comprising:

[0006] Create a worker thread in the Audio Track of the Framework layer;

[0007] Create another worker thread in the Audio Module of the HAL layer;

[0008] Create a new first PCM file to store the audio dump data of the Framework layer;

[0009] Create a second PCM file to store the audio dump data of the HAL layer;

[0010] Write the data passed down from the application layer into the first PCM file;

[0011] Write the data passed down from the Framework layer to the second PCM file;

[0012] Export the first PCM file and the second PCM file stored in the system respectively;

[0013] Use audio software to listen to and analyze the first and second PCM files to see if there are any broken or popping sounds;

[0014] If the first PCM file has broken or popped sounds, it indicates a problem at the application layer.

[0015] If the first PCM file does not have any broken or popped sounds, but the second PCM file does, it indicates that there is a problem with the Framework layer.

[0016] If neither the first PCM file nor the second PCM file contains any broken or popped sounds, then the problem lies in the kernel layer.

[0017] Furthermore, both the first PCM file and the second PCM file contain audio files.

[0018] Furthermore, the system is divided into four layers from top to bottom: application layer, framework layer, HAL layer, and kernel layer.

[0019] Furthermore, the audio software can be either audio playback software or audio editing software.

[0020] An Android system audio dropout and pop sound localization system based on the above-mentioned method for locating audio dropouts and pop sounds in an Android system includes an application layer, a Framework layer connected to the application layer, a HAL layer connected to the Framework layer, and a kernel layer connected to the HAL layer. The Framework layer includes a player, an Audio Track connected to the player, a first PCM file storage module connected to the Audio Track, and a resampling and mixing module. The HAL layer includes an Audio Module connected to the resampling and mixing module and a second PCM file storage module connected to the Audio Module.

[0021] Furthermore, the application layer includes an APP, which is connected to the player.

[0022] Furthermore, the kernel layer includes an audio driver, which is connected to the Audio Module.

[0023] Furthermore, the first PCM file storage module stores a first PCM file for saving audio dump data of the Framework layer, and the first PCM file is an audio file.

[0024] Furthermore, the second PCM file storage module contains a second PCM file for saving audio dump data of the HAL layer, and the second PCM file is an audio file.

[0025] Furthermore, the output of the audio driver is connected to a speaker.

[0026] In summary, the technical solution of the present invention has the following beneficial effects:

[0027] This invention solves the problem of occasional audio dropouts and pop-ups during audio playback. This issue involves four layers: the application layer, the framework layer, the HAL layer, and the kernel layer. Software engineers working on these layers often lack understanding of the others, leading to significant time and effort spent locating and troubleshooting the root cause. This solution saves considerable time in locating dropout and pop-up issues, improves work efficiency, reduces the learning curve for software developers, and lightens their workload. Attached Figure Description

[0028] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only a part of the embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0029] Figure 1 This is a block diagram of a positioning system for audio dropouts and pop sounds in an Android system, as described in this invention. Detailed Implementation

[0030] 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. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0031] This manual explains the following English and Chinese terminology: PCM is an audio encoding format. Framework refers to the application framework. HAL is an abbreviation for Hardware Abstraction Layer. Dump means to transfer or save data, generally referring to exporting or saving data to a file or static format; in this solution, it mainly refers to PCM data. Audio Track means audio track, and Audio Module means audio source module.

[0032] A method for locating audio dropouts and pop sounds in an Android system, comprising:

[0033] Create a worker thread in the Audio Track of the Framework layer;

[0034] Create another worker thread in the Audio Module of the HAL layer;

[0035] Create a new first PCM file to store the audio dump data of the Framework layer;

[0036] Create a second PCM file to store the audio dump data of the HAL layer;

[0037] Write the data passed down from the application layer into the first PCM file;

[0038] Write the data passed down from the Framework layer to the second PCM file;

[0039] Export the first PCM file and the second PCM file stored in the system respectively;

[0040] Use audio software to listen to and analyze the first and second PCM files to see if there are any broken or popping sounds;

[0041] If the first PCM file has broken or popped sounds, it indicates a problem at the application layer.

[0042] If the first PCM file does not have any broken or popped sounds, but the second PCM file does, it indicates that there is a problem with the Framework layer.

[0043] If neither the first PCM file nor the second PCM file contains any broken or popped sounds, then the problem lies in the kernel layer.

[0044] Specifically, both the first PCM file and the second PCM file contain audio files.

[0045] Specifically, the system is divided into four layers from top to bottom: application layer, framework layer, HAL layer, and kernel layer.

[0046] Specifically, the audio software can be either an audio playback software (such as the commonly used Windows Media Player) or an audio editing software (such as Cool Edit Pro).

[0047] like Figure 1As shown, an Android system audio dropout and pop sound localization system based on the above-mentioned method for locating audio dropouts and pop sounds in an Android system includes an application layer, a Framework layer connected to the application layer, a HAL layer connected to the Framework layer, and a kernel layer connected to the HAL layer. The Framework layer includes a player, an Audio Track connected to the player, a first PCM file storage module connected to the Audio Track, and a resampling and mixing module. The HAL layer includes an Audio Module connected to the resampling and mixing module and a second PCM file storage module connected to the Audio Module.

[0048] Specifically, the application layer includes the APP, which connects to the player.

[0049] Specifically, the kernel layer includes an audio driver, which is connected to the Audio Module.

[0050] Specifically, the first PCM file storage module contains a first PCM file used to save audio dump data of the Framework layer. The first PCM file is an audio file.

[0051] Specifically, the second PCM file storage module contains a second PCM file used to save the audio dump data of the HAL layer. The second PCM file is an audio file.

[0052] Specifically, the output of the audio driver is connected to the speaker.

[0053] In summary, the technical solution of the present invention has the following beneficial effects:

[0054] This invention solves the problem of occasional audio dropouts and pop-ups during audio playback. This issue involves four layers: the application layer, the framework layer, the HAL layer, and the kernel layer. Software engineers working on these layers often lack understanding of the others, leading to significant time and effort spent locating and troubleshooting the root cause. This solution saves considerable time in locating dropout and pop-up issues, improves work efficiency, reduces the learning curve for software developers, and lightens their workload.

[0055] The embodiments described above do not constitute a limitation on the scope of protection of this technical solution. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the above embodiments should be included within the scope of protection of this technical solution.

Claims

1. A method for locating audio dropouts and pop sounds in an Android system, characterized in that, include: Create a worker thread in the Audio Track of the Framework layer; Create another worker thread in the Audio Module of the HAL layer; Create a new first PCM file to store the audio dump data of the Framework layer; Create a second PCM file to store the audio dump data of the HAL layer; Write the data passed down from the application layer into the first PCM file; Write the data passed down from the Framework layer to the second PCM file; Export the first PCM file and the second PCM file stored in the system respectively; Use audio software to listen to and analyze the first and second PCM files to see if there are any broken or popping sounds; If the first PCM file has broken or popped sounds, it indicates a problem at the application layer. If the first PCM file does not have any broken or popped sounds, but the second PCM file does, it indicates that there is a problem with the Framework layer. If neither the first PCM file nor the second PCM file contains any broken or popped sounds, then the problem lies in the kernel layer.

2. The method for locating audio dropouts and pop sounds in an Android system according to claim 1, characterized in that: Both the first PCM file and the second PCM file contain audio files.

3. The method for locating audio dropouts and pop sounds in an Android system according to claim 1, characterized in that, The system is divided into four layers from top to bottom: application layer, framework layer, HAL layer, and kernel layer.

4. The method for locating audio dropouts and pop sounds in an Android system according to claim 1, characterized in that: The audio software can be either audio playback software or audio editing software.

5. A system for locating audio dropouts and pop-ups in an Android system, based on any one of the methods for locating audio dropouts and pop-ups in an Android system as described in claims 1 to 4, characterized in that: It includes an application layer, a Framework layer connected to the application layer, a HAL layer connected to the Framework layer, and a kernel layer connected to the HAL layer; the Framework layer includes a player, an Audio Track connected to the player, a first PCM file storage module connected to the Audio Track, and a resampling and mixing module; the HAL layer includes an AudioModule connected to the resampling and mixing module and a second PCM file storage module connected to the Audio Module.

6. The positioning system for audio dropouts and pop-up sounds in an Android system according to claim 5, characterized in that: The application layer includes an APP, which is connected to the player.

7. A positioning system for audio dropouts and pop-up sounds in an Android system according to claim 6, characterized in that: The kernel layer includes an audio driver, which is connected to the Audio Module.

8. The positioning system for audio dropouts and pop-up sounds in an Android system according to claim 7, characterized in that: The first PCM file storage module contains a first PCM file used to save audio dump data of the Framework layer. The first PCM file is an audio file.

9. The positioning system for audio dropouts and pop-up sounds in an Android system according to claim 8, characterized in that: The second PCM file storage module contains a second PCM file used to save the audio dump data of the HAL layer. The second PCM file is an audio file.

10. The positioning system for audio dropouts and pop sounds in an Android system according to claim 7, characterized in that: The output of the audio driver is connected to the speaker.