matrix-io / matrixio-kernel-modules

MATRIX HAL in kernel space
22 stars 23 forks source link

Rewrite mic driver #44

Closed xyzzy42 closed 4 years ago

xyzzy42 commented 4 years ago

We've had a lot of problems with the microphone array driver. Most noticeable, if there is an buffer overrun it hangs the RPi, because the driver keeps recording after the end of the buffer. But there are additional problems: The design of the work queue resulted in frequent dropped or damaged audio when the device was loaded with other tasks. ALSA did not recover after a buffer overrun and resume recording. Various ALSA device info settings were not correct. One result was the driver was much more prone to buffer overflows than it needed to be.

I have some experience writing kernel and ALSA drivers and have fixed these problems. I also increased the performance and reduced that background CPU load from simply having the driver loaded.

The way debian package was doing DKMS wasn't working well either. The package didn't uninstall and upgrade correctly. I've re-written that too, trying to follow current Debian best practices for DKMS packages.

samreenislam commented 4 years ago

Wow, this is amazing!

Our team will be reviewing soon, might take a bit with all the changes :sweat_smile: thank you for this big push!

eljuguetero commented 4 years ago

it works perfectly, thanks!

eljuguetero commented 4 years ago

@xyzzy42 debian package has been updated. ty