PWM whine near earpiece in low signal phone call and loud sound sent to the other end
#6
Was able to reproduce the issue by calling another phone number, this time someone else's cellphone. So it definitely is not the receiving phone.

I did some digging in the sound system. I started with the schematics for the 1.2b revision and megi's page Audio on PinePhone to understand the system. The CPU's audio unit handles all audio routing and mixing. The microphone essentially connects directly the the CPU (see pages 5 and 8 of the schematic), meaning that the amplifiers in megi's diagram are inside the CPU itself rather than external. Sound is transmitted to the modem from the CPU via its PCM interface (page 15), passing through a TXB0104YZT level shifter (can find the part on the PinePhone component list).

So the pickup is happening between the CPU and the microphone and there is no external amplifier involved, for better or worse.

One good news is that the connection between the CPU and the modem is digital, so short of really really bad noise that connection is immune to pickup.

I am assuming that Mobian at the present time (and likely other distros) are using either the sound routing scheme in megi's page Audio on PinePhone or a similar one where the CPU's audio unit is doing the heavy lifting and the CPU cores are doing nothing since that saves power. A brief look at callaudiod suggests that this is the case since Arnaud Ferraris says in Issue #13

Arnaud Ferraris Wrote:No, as the signal is only routed in hardware, pulseaudio never "sees" the audio data.


Based on how it looks the the CPU's audio unit works, it looks like it should be possible to instead read the microphone into userspace, filter it with a notch/band-stop filter, and then send it back into the audio unit to send to the modem. I still need to record the audio and look at the spectrogram to see what frequency needs to be filtered out and how wide the band would need to be. My guess, from playing around with some Butterworth filters with scipy.signal, is that a 2nd to 5th order notch/band-stop IIR filter would probably be sufficient and would be relatively cheap to compute, though it would need to have small and/or constant lag.

Luckily, it seems like pulseaudio can do lowpass filtering (https://askubuntu.com/questions/869822/h...io-profile), so there might be a notch/band-stop. So it is possible that no pulseaudio filters would have to actually be written.

[EDIT- I mistakenly said that a notch/band-stop filter could be made by combining a lowpass and a highpass filter. This does not actually work. They can be combined to make a bandpass filter. I usually work with bandpass filters rather than notch/band-stop filters, so I spoke before I thought.]

Once I get a spectrogram, I am going to try to see if I can hack a filtering solution together. Though, I am really out of my depth since I would need to figure out both pulseaudio and callaudiod enough to hack the latter to do it.

The filter would obviously cut out some useful audio, but the pickup is overwhelming the useful audio in that frequency range anyways and making it hard to hear other frequencies. Luckily, people's voices' fundamental frequencies are below 1 kHz and vowels stay in the low range. It is consonants that have the high frequency tails that might suffer a bit.

[EDIT- I mistakenly said that a notch/band-stop filter could be made by combining a lowpass and a highpass filter. This does not actually work. They can be combined to make a bandpass filter. I usually work with bandpass filters rather than notch/band-stop filters, so I spoke before I thought.]
  Reply


Messages In This Thread
RE: PWM whine near earpiece in low signal phone call and loud sound sent to the other end - by vortex - 05-23-2021, 11:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Phone powers off with high user demands car46999 7 595 04-11-2024, 09:17 AM
Last Post: zetabeta
  Phone will not turn on (but sometimes will) insidetrip101 10 4,790 08-18-2023, 04:28 AM
Last Post: spha
  Pine phone main board part Generaltuxenburg 1 1,070 07-31-2023, 07:50 PM
Last Post: tllim
  No calls on Pine Phone Beta convergence edition polypode 1 1,179 03-06-2023, 08:04 PM
Last Post: rocket2nfinity
  Pine phone USB keyboard connection CleanEnergyCleanEnvironment 1 1,131 02-20-2023, 12:14 AM
Last Post: Kevin Kofler
  I cannot call or receive calls aka0kuro 6 3,106 01-13-2023, 05:31 PM
Last Post: alaraajavamma
Thumbs Down Phone is unresponsive theneedful 14 7,660 08-12-2022, 08:18 AM
Last Post: theneedful
  Phone Dead Already? MarsColonist 4 2,691 08-11-2022, 11:52 AM
Last Post: auanta
  PPKB with phone; phone dies while charging SwordfishII 1 1,374 06-08-2022, 04:14 AM
Last Post: SwordfishII
  Lost internal earpiece Veraendert 3 2,379 02-14-2022, 07:51 AM
Last Post: Veraendert

Forum Jump:


Users browsing this thread: 2 Guest(s)