Skip to content
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

Garbled audio on FXS port #3

Open
mbof opened this issue May 23, 2020 · 1 comment
Open

Garbled audio on FXS port #3

mbof opened this issue May 23, 2020 · 1 comment

Comments

@mbof
Copy link

mbof commented May 23, 2020

Setup

  • OAK R2 mounted on Raspberry Pi 3 Model B Rev 1.2

  • Built module for kernel version 4.19.122, patching files oak/pitdm.c and oak/pidma.c into the dahdi source for version 3.1.0 (following a suggestion made on Problem building drivers on 4.19.29 kernel - init_timer issues oak#2 (comment)).

  • Asterisk version 16.2.1

  • Phone A is plugged into the FXS port (the one at the bottom when reading the inscriptions on the card, furtherest away from the bright green LED)

  • Phone B is a SIP softphone connected to asterisk

  • Phone B calls Phone A

Observed:

Phone A rings. When Phone A is picked up, the audio is completely garbled in both directions.

  • Words spoken into phone A play out on phone B as if sped down at least 2x (very low pitch)

  • Words spoken into phone B play out on phone A choppy and unintelligible

Any hints about how to troubleshoot?

@mbof
Copy link
Author

mbof commented May 25, 2020

Additional information: the timing provided by pitdm seems off by a factor 2x:

With only dahdi loaded:

$ sudo dahdi_test -v
Opened pseudo dahdi interface, measuring accuracy...

8192 samples in 8159.256 system clock sample intervals (99.600%)
8192 samples in 8158.424 system clock sample intervals (99.590%)
8192 samples in 8161.639 system clock sample intervals (99.629%)
...

With dahdi and pidma loaded:

$ sudo dahdi_test -v
Opened pseudo dahdi interface, measuring accuracy...

8192 samples in 8159.248 system clock sample intervals (99.600%)
8192 samples in 8158.144 system clock sample intervals (99.587%)
8192 samples in 8239.151 system clock sample intervals (99.424%)
...

With dahdi, pidma and pitdm loaded:

$ sudo dahdi_test -v
Opened pseudo dahdi interface, measuring accuracy...

8192 samples in 4095.592 system clock sample intervals (49.995%)
8192 samples in 4093.680 system clock sample intervals (49.972%)
8192 samples in 4094.960 system clock sample intervals (49.987%)
...

In other words, once pitdm is loaded, the 8192 samples of the test are being read in about half the expected time. That would explain why the sound is played slowed down in one direction and choppy in the other direction. In case it matters, the FXO port is not connected.

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

No branches or pull requests

1 participant