bschwind / ir-slinger

A small C library for sending infrared packets on the Raspberry Pi
The Unlicense
99 stars 30 forks source link

No way to control pigpio timing source #16

Open ajuniper opened 4 years ago

ajuniper commented 4 years ago

This bug is more to save other the time investigating as I don't think that irslinger can fix it, although it might be useful to document in the code somehow/somewhere.

https://github.com/joan2937/pigpio/issues/87 http://abyz.me.uk/rpi/pigpio/faq.html#Sound_isnt_working

By default gpioInitialise will take control of the PCM clock, which breaks the use of I2S audio (even after the irslinger program exits, only rectified at reboot). You can add a call gpioCfgClock(5, 0, 0); which will tell gpioInitialise to use the PWM clock instead (thus preventing use of PWM). But then the above goes on to mention that if you use the wave functions, pigpio will take over both PWM and PCM, so you can't do audio at all on the same system as using irslinger.

bschwind commented 4 years ago

Noted! I hadn't done any audio work on the Pi concurrently with infrared stuff so I never ran into this. Hopefully we can limit audio interruption to at least the time a signal is being transmitted.

ajuniper commented 4 years ago

Not sure how easy that will be. Even once the program exits cleanly, the I2S bus appears to still be clocked at the wrong rate and remains broken.