Audio Latency Calculation via Interrupt Counters
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for determining audio latency face challenges, particularly on mobile platforms where APIs to obtain audio latency are lacking, and the presence of additional layers between audio drivers and applications complicates accurate calculations, leading to suboptimal performance in acoustic echo cancellation.
Innovation Solution
A computer-implemented method that calculates audio capture and playout delays by using reference times and interrupt counters to determine time differences, allowing for accurate latency measurement and unified API access across platforms.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If platform-specific APIs are used to obtain audio latency, then audio latency can be obtained on platforms that provide such APIs, but the system becomes difficult to maintain across different platforms and cannot obtain audio latency on platforms without such APIs
Solution Approach 1:
The patent implements a universal audio latency measurement mechanism that works across all platforms by directly accessing audio driver interfaces and interrupt counters, eliminating dependence on platform-specific APIs. The same core measurement logic can be deployed on Linux, Android, iOS, and other platforms without requiring platform-specific code branches.
Solution Approach 2:
The patent introduces an intermediary measurement layer that sits between the application and the audio driver, using interrupt counters and reference time stamps to bridge the gap between different platform architectures. This intermediary mechanism translates various platform-specific audio interfaces into a unified latency measurement approach.
2Ease of operation
If additional layers are introduced between audio driver and application, then audio services can be provided, but accurate audio latency calculation becomes more difficult
Solution Approach 1:
The patent extracts the latency measurement function from the complex audio service layer and implements it directly at the audio driver interface level. By obtaining interrupt counters and reference time stamps directly from the audio subsystem, the measurement bypasses the additional service layers that would otherwise obscure the true latency values.
Solution Approach 2:
The patent performs preliminary timing actions by recording reference time stamps at interrupt generation points before audio processing occurs. This preliminary timing capture ensures that the baseline latency measurement is established before any additional processing layers can introduce delays or complications.
3Adaptability or versatility
If acoustic echo suppression is used instead of acoustic echo cancellation, then echo can be suppressed without requiring accurate latency information, but echo removal effectiveness is reduced
Solution Approach 1:
The patent implements a feedback mechanism where accurately measured audio latency values are continuously provided to the acoustic echo cancellation algorithm. This feedback enables the AEC to dynamically adjust its processing based on actual latency conditions, significantly improving echo removal effectiveness compared to fixed or estimated latency approaches.
Data Source
AI summary
Methods and systems are provided for determining audio latency in both audio capture and audio playout processes in a real-time audio processing system by calculating time differences with respect to interrupts. The audio capture and playout latencies may be utilized for improved audio processing, such as AEC. The methods provided address two major problems with existing techniques. First, on platforms where the system does not provide API to obtain audio latency, the methods allow the application to obtain more accurate audio latency. Second, the application may utilize a unified and simplified technique to obtain audio latency instead of using platform-specific APIs on different platforms.


