-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More complex approach to the audio "clicks" #149
Conversation
1) ADC bias injection (VanceVagell#148) 2) ADC_ATTEN_DB_12 to be in spec 3) ADC dc removal 4) AudioFormat.ENCODING_PCM_16BIT as some Android devices do not support 8bit PCM
Thanks for the submission Dmitry. Does this fix the clicks for you?
…On Sun, Dec 22, 2024, 8:21 AM Dmitry Kaukov ***@***.***> wrote:
1. ADC bias injection (#148
<#148>)
2. ADC_ATTEN_DB_12 to be in spec
3. ADC dc removal
4. AudioFormat.ENCODING_PCM_16BIT as some Android devices do not
support 8bit PCM
------------------------------
You can view, comment on, or merge this pull request online at:
#149
Commit Summary
- bc41459
<bc41459>
Patch buffers
- 9e2f1cc
<9e2f1cc>
Update RadioAudioService.java
- 018f644
<018f644>
More complex approach to the audio "clicks"
File Changes
(2 files <https://github.com/VanceVagell/kv4p-ht/pull/149/files>)
- *M*
android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java
<https://github.com/VanceVagell/kv4p-ht/pull/149/files#diff-ce2d1bbb3cfacc29b87caa4d46918cc2d80385878e75bcdc745262a2c936c1cf>
(17)
- *M*
microcontroller-src/kv4p_ht_esp32_wroom_32/kv4p_ht_esp32_wroom_32.ino
<https://github.com/VanceVagell/kv4p-ht/pull/149/files#diff-6799832e21816d097662916c5bc8263b21ca0bb5d3af3aec41ac433277bba8a6>
(78)
Patch Links:
- https://github.com/VanceVagell/kv4p-ht/pull/149.patch
- https://github.com/VanceVagell/kv4p-ht/pull/149.diff
—
Reply to this email directly, view it on GitHub
<#149>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCJWETQ7IMKFVU7DIZKVWT2G2VEFAVCNFSM6AAAAABUBTBGLKVHI2DSMVQWIX3LMV43ASLTON2WKOZSG42TINRTGIYTAOA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Yep, no more clicking for me. |
ADC Bias injection:
Discussed #148 |
Thanks for the hard work on this! Your example helped me identify the root cause, which was purely USB related. This is now fixed in commit cc1ee23. Declining this PR, but it was instrumental to fixing this. Thank you! |
If there are elements of this PR that you think are still useful, please break them up into smaller PRs that have limited functionality so I can review them each. Thanks again. |
Hi @VanceVagell , Thanks for the update and for fixing the USB-related issue! I appreciate the recognition of this PR. However, after testing commit cc1ee23, the clicking issue still persists on my end. While reducing the sample rate lowers the click frequency, the issue hasn’t been fully resolved. Initially, high bit rate serial transfer seemed like the primary suspect, so I conducted a series of error rate tests but didn’t detect any problems in my environment. Regarding this PR, I believe it’s already atomic and relatively simple. If you’d like to test specific parts of the PR or need further details, feel free to let me know. I’d be happy to help with additional testing or adjustments. Thanks again for your time and the work on this project! |
If it's easy to do so, could you please attach an audio recording of the
remaining clicking sound you have with v1.5.0? I'd like to compare it to
other audio issues people have reported or I've heard with my test devices.
If GitHub won't let you attach it to a PR, please open an issue and attach
it.
I'm out of the house at the moment so I can't take a close look at the PR
to suggest how to make it more atomic, but from memory it had both USB
serial configuration changes AND new filtering logic.
Also, an initial test of the PR as-is did not work at 44.1kHz audio on my
test devices (audio not at all understandable) but somewhat worked at lower
sampling rates, but then APRS decoding no longer worked (does it work for
you with this PR)?
…On Wed, Dec 25, 2024, 6:55 PM Dmitry Kaukov ***@***.***> wrote:
Hi @VanceVagell <https://github.com/VanceVagell> ,
Thanks for the update and for fixing the USB-related issue! I appreciate
the recognition of this PR. However, after testing commit cc1ee23
<cc1ee23>,
the clicking issue still persists on my end. While reducing the sample rate
lowers the click frequency, the issue hasn’t been fully resolved.
Initially, high bit rate serial transfer seemed like the primary suspect,
so I conducted a series of error rate tests but didn’t detect any problems
in my environment.
Regarding this PR, I believe it’s already atomic and relatively simple. If
you’d like to test specific parts of the PR or need further details, feel
free to let me know. I’d be happy to help with additional testing or
adjustments.
Thanks again for your time and the work on this project!
—
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADCJWEWQYHHNUQQVASBJJID2HNAWJAVCNFSM6AAAAABUBTBGLKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRSGAZDOMZVGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @VanceVagell , Thanks for the detailed feedback. I think the issue you're seeing with 44.1kHz might be due to testing the new firmware with the older Android app. Since the PR changes the wire audio format to ENCODING_PCM_16BIT, the existing app won't handle the audio correctly without corresponding updates (and vice versa). Regarding APRS – you're right, it’s broken with the current PR because of the format change. The fix is straightforward: we just need to replace Also, here's the audio recording you requested (v1.5.0): https://www.youtube.com/shorts/QL5MdgGOt2E. As you can see clicks are happening with open and closed SQ. Thanks again for taking a look at this! BTW: To simplify testing, I've created pre-built binaries https://github.com/dkaukov/kv4p-ht/releases/tag/click-fix-01 |
# Conflicts: # android-src/KV4PHT/app/src/main/java/com/vagell/kv4pht/radio/RadioAudioService.java # microcontroller-src/kv4p_ht_esp32_wroom_32/kv4p_ht_esp32_wroom_32.ino
Hi @VanceVagell, PR 1 – ADC Bias Injection Let me know if you'd like to review or discuss further. |
Thanks so much Dmitry, this will make it easier for me to take a look, and test each part. In the meantime, could you please test the latest build (v1.6.1 of app and v5 of firmware), and confirm if you still have the audio problems? |
Hi @VanceVagell, Thanks for the quick response! Unfortunately, I can't test the released v1.6.1 as I only have UHF modules, and I need to patch both the firmware and the Android app. After building from git, I can confirm the following:
These are the reasons behind the proposed patches. Let me know if you need more details or if I can assist further with testing. |
Reopening now that this is split out. Will test. Dmitry, does this still require the PCB modifications you previously outlined? If so, @SmittyHalibut should take a look at that to confirm if your change is compatible with the new PCB 2.x designs. |
I tested this PR on both a v1.x PCB, and a v2.x PCB, with both the new Android app in this PR and the new firmware installed on the test device. Unfortunately, I'm getting severe audio distortion on both PCB versions. I have not made the hardware modifications you mentioned in the other PR, would that cause these audio issues? We can't expect everyone to change their PCB, so any software change needs to work with the stock kv4p HT hardware. Please let me know what you think is going on so we can move this PR forward. I'd love to merge it if it helps some people with other audio issues, but currently it's a regression for my test devices. PCB v1.x: PCB v2.x: |
Hi @VanceVagell, Thanks for testing on both PCB versions and sharing your feedback. I completely understand your concern – software updates should work with stock kv4p HT hardware whenever possible. That said, we can’t avoid physics – feeding an AC signal directly into the ESP32 ADC isn’t ideal, and staying within spec would require schematic changes. Apologies for that. It looks like the samples you tested may have come from an incorrect merge. Could you try the pre-built binaries here to help narrow things down? Let me know how it goes. I appreciate your time! |
Hi @VanceVagell, In my opinion, it’s better to keep this PR closed, as the code changes here are no longer mergeable (I didn’t expect it to be re-opened). Let’s focus on new discussions, starting with: Thanks for your understanding! |
Code changes here are no longer mergeable |
All of this reduces chances of buffer underruns and when it happens, the click is almost not noticeable.