![]() |
[PROBLEM] Pi with PhatDac and pigpio - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: [PROBLEM] Pi with PhatDac and pigpio (/showthread.php?tid=1794) |
Pi with PhatDac and pigpio - itsme - 10-08-2019 Hello, I use the my Pi Zero with PHATDAC module and - btw. well done - moode 6.3 and have a problem as soon as I run the pigpiod (http://abyz.me.uk/rpi/pigpio/index.html). Without the pigpiod the sound is fine and everything works, but as soon as I start the daemon, there are two cases: (1) pigpiod start without options: The sound gets very slow and deep, that's very bad. It seems this is a conflict with the used PCM, therefore I tried the next. (2) pigpiod start with option "-t 0": This way it uses PWM and the sound's still fine. But as soon as I send something via IR using the pigpio functionality it sounds like I can hear the transmission and the sound get's a bit crazy then, unrepairable. So in summary it seems like there's a conflict with raspberry sources in both cases ![]() Is there any solution or does someone have an idea how to solve this problem? I want so use moode and also control IR devices with this raspberry... (and no, lirc is not a solution because it always hangs after some commands unfortunately, not very stable) Thanks for all input! Best regards, Matthias RE: Pi with PhatDac and pigpio - Tim Curtis - 10-08-2019 Thats an interesting project. Maybe ask the maintainer what might be happening. moOde uses hw:0 for On-board and I2S audio and hw:1 for USB audio RE: Pi with PhatDac and pigpio - itsme - 10-09-2019 (10-08-2019, 11:27 PM)Tim Curtis Wrote: Thats an interesting project. Hi Tim, thanks for your answer. I assume you want me to contact the pigpio maintainer or do you think that's more related to the PHATDAC module? I think I'll contact both. I know this module uses I2S. Just to double check, moode is using nothing else then hw:0 ? (DMA or similar?) Moode would be my choice for the flat wide http streaming raspberry including the complete control via IR of my TV-Motor and HiFi Tuner. Hope to get this running stable... RE: Pi with PhatDac and pigpio - Tim Curtis - 10-09-2019 Ya, I would ping the pigpio maintainer and mention (1) using a HAT DAC, (2) MPD is configured to output to ALSA hw:0 and (3) Pi On-board audio device is disabled via /boot/config.txt setting "dtparam=audio=off". -Tim RE: Pi with PhatDac and pigpio - TheOldPresbyope - 10-09-2019 I've never explored the PCM/PWM capabilities of the RPi boards at the GPIO-pin level, but is it possible you have a collision in GPIO pin usage here? The pHAT DAC apparently interfaces through the physical* pins 2, 12, and 40, which are +5V, BCM 18, and BCM 21. These BCM pins are mapped into I2S usage through the kernel device-tree overlay invoked in the /boot/config.txt file (e.g., dtparam=i2s=on). I'm wondering if your application might also be exercising BCM 18 and/or BCM 21. (See https://pinout.xyz/pinout/phat_dac and click through the pins to see their alternative uses). Perhaps this could be avoided by using the -x mask option described in http://abyz.me.uk/rpi/pigpio/pigpiod.html? Regards, Kent *not to be confused with WiringPi pin numbers. RE: Pi with PhatDac and pigpio - itsme - 10-10-2019 (10-09-2019, 06:58 PM)TheOldPresbyope Wrote: I've never explored the PCM/PWM capabilities of the RPi boards at the GPIO-pin level, but is it possible you have a collision in GPIO pin usage here? The pHAT DAC apparently interfaces through the physical* pins 2, 12, and 40, which are +5V, BCM 18, and BCM 21. These BCM pins are mapped into I2S usage through the kernel device-tree overlay invoked in the /boot/config.txt file (e.g., dtparam=i2s=on). Thanks, good idea. But I also checked this before posting here. I'm using BCM14 and 15 for IR transmit and receive, shouldn't lead to any collision of GPIOs as far as I see. But nice info from you how the overlay maps the pins! In the meantime I had contact to the pigpio maintainer and the final answer was: Quote:If you are using waves to generate the IR signal you will not be able Even I'm confused about "using waves to generate the IR signal" this means I need an alternative or have to stop the pigpiod if playing sound and vice versa. Does anyone have experience with wiringPi or bcm2835 fir IR? At the moment I have no idea about both (and no time to try the next 2 weeks). Maybe it's better to switch back to my unstable solution with LIRC and try to clarify the issues with the lirc maintainer(s)... ![]() |