Skip to content

Dual frequency test#2378

Merged
HoangHongHieu merged 31 commits into
mainfrom
hieuhh/frequency_dual_test
May 18, 2026
Merged

Dual frequency test#2378
HoangHongHieu merged 31 commits into
mainfrom
hieuhh/frequency_dual_test

Conversation

@HoangHongHieu
Copy link
Copy Markdown
Collaborator

Porting Frequency Unprocessed and Voice Recognition Tests.

CtsVerifer OboeTester
Test case Subtest Test case Preset
AudioFrequencyMicActivity TEST USB BACKGROUND Frequency Background Test
AudioFrequencyLineActivity N/A Frequency Loopback Dongle
AudioFrequencyUnprocessedActivity TEST TONE Frequency Unprocessed Tone test
AudioFrequencyVoiceRecognitionActivity TEST TONE Frequency Voice Recognition Tone test
AudioFrequencyMicActivity TEST NOISE Frequency Built-in Mic and External Speaker
AudioFrequencyMicActivity TEST USB NOISE Frequency External Mic and External Speaker
AudioFrequencySpeakerActivity (Left speaker) Frequency External Mic and Left Built-in Speaker
AudioFrequencySpeakerActivity (Right speaker) Frequency External Mic and Right Built-in Speaker
AudioFrequencyUnprocessedActivity TEST USB NOISE Dual Frequency Unprocessed
AudioFrequencyVoiceRecognitionActivity TEST USB NOISE Dual Frequency Voice Recognition
AudioFrequencyUnprocessedActivity TEST USB NOISE (DUT doesn’t play noise) Dual Frequency Silence Unprocessed
AudioFrequencyVoiceRecognitionActivity TEST USB NOISE (DUT doesn’t play noise) Dual Frequency Silence Voice Recognition

Uncovered tests:

Test case Subtest Note
AudioFrequencySpeakerActivity TEST USB BACKGROUND Similar to the “TEST USB BACKGROUND” in AudioFrequencyMicActivity but have difference thresholds and peripherals
AudioFrequencyUnprocessedActivity TONE_RMS_EXPECTED  
AudioFrequencyUnprocessedActivity TEST USB BACKGROUND Similar to the “TEST USB BACKGROUND” in AudioFrequencyMicActivity but have difference thresholds
AudioFrequencyVoiceRecognitionActivity TONE_RMS_EXPECTED  
AudioFrequencyVoiceRecognitionActivity TEST USB BACKGROUND Similar to the “TEST USB BACKGROUND” in AudioFrequencyMicActivity but have difference thresholds

Calculate the frequency spectrum:
 - Apply Hanning window
 - Execute FFT
 - Normalize the FFT output (https://holometer.fnal.gov/GH\_FFT.pdf)
Partition the spectrum into four bands. Measure the percentage of
inband frequency bin. A frequency bin is consider as inband if the magnitude
at that frequency bin is not higher than top threshold and not lower
than the bottom threshold.
Add band specs for unprocessed and voice recognition
The presets with silence source allow the DUT record the sound from
external speaker without playing it. A auxiliary phone can play the
sound on the external speaker and the DUT will record.
@HoangHongHieu HoangHongHieu requested a review from robertwu1 May 11, 2026 12:36
Comment thread apps/OboeTester/app/src/main/cpp/analyzer/AverageBuffer.h
Comment thread apps/OboeTester/app/src/main/cpp/analyzer/FrequencyAnalyzer.h Outdated
Copy link
Copy Markdown
Collaborator

@robertwu1 robertwu1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this is a bigger change, please test the other tests to make sure there are no regressions. Thanks!

Also wait for Xiaotong's tests before submitting

Currently, the activities have to map the values to [-1,1] range before drawing it. This change moves that computation to the View classes.
Define the preferred input/output device for all presets.
The preferred input will be selected automatically if available. For the preferred output, the app only checks whether the device is available. The output device is always the one with the highest priority.
If the preferred microphone or speaker is not found, raise a Toast.
@HoangHongHieu HoangHongHieu self-assigned this May 12, 2026
Add the line view supporting the following features:
- Add multiple lines
- Draw each line as a line or bars
- Modify a line
- X-axis scale: log or linear
- Grid lines with labels
- Move the axis label out of the graph.
- Use the suffix 'k' to represent 1,000.
@HoangHongHieu HoangHongHieu merged commit 42a5a3f into main May 18, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants