I2S ADC stops working
As soon as the librpitx accesses the hardware, my I2S ADC stops working and only provides zeros.
I will investigate what happens on the I2S pins.
As I remeber there is a i2s hacking method to have a fixe samplerate ussing it, but weird as the default method is pwm. https://github.com/F5OEO/librpitx/blob/dbb26b33c7630fe4e3690fbabfb6de0b019c05d2/src/gpio.cpp#L935
It seems like the default method isn't pwm, but pcm, at least for fskburst and iqdmasync: https://github.com/F5OEO/librpitx/blob/dbb26b33c7630fe4e3690fbabfb6de0b019c05d2/src/iqdmasync.cpp#L48
compiling with syncwithpwm=true causes the I2S audio to freeze during transmission, and the audio device needs to be reopened afterwards due to an I/O error.
With syncwithpwm=false, PCM_CLK (GPIO 18) drops to 1/100 of the correct frequency, PCM_FS (GPIO 19) gets stuck at low. The audio device keeps running, but only outputs zeros. Reopening the audio device doesn't help.
With syncwithpwm=true, PCM_CLK keeps the correct frequency, PCM_FS gets stuck at low. The audio device stalls, and the application exits with I/O error. Reopening the audio device restores correct behaviour.
It's this constructor: https://github.com/F5OEO/librpitx/blob/dbb26b33c7630fe4e3690fbabfb6de0b019c05d2/src/gpio.cpp#L937 It even gets called with syncwithpwm=true, because it's instantiated here unconditionally: https://github.com/F5OEO/librpitx/blob/dbb26b33c7630fe4e3690fbabfb6de0b019c05d2/src/fskburst.h#L8
https://github.com/hennichodernich/librpitx/commit/6e0d9c6c1afcdd73579188a0c4308bf9d21113ba
Now works with pift8, but produces crackling noises with gr-rpitx.
Solved. https://github.com/hennichodernich/librpitx/commit/abb967a699b540ca949c1c47455755358ec46167
Hesitating to create a PR, since PWM mode might not be a suitable default for all users.