Conflict i2c-dev and snd-bcm2835 Conflict


1 post
by Rally » Mon Nov 05, 2012 3:34 am
I have a problem that appears to be an odd conflict between i2c-dev and snd-bcm2835
This occurs when trying to play multiple sound files (in this case mp3's) simultaneously using 2 or more terminals with SSH from a Mac across ethernet.

Some background
The final application (a model amusement park for my 11yo son's school project) will require multiple short sound effects being played simultaneously as well as multiple channel control of lighting and motors using the Adafruit 16 ch PWM
He is doing all the SMD soldering (about 1000 resistors and LEDs) and model making, I am doing the background programming (by the seat of my pants) and he will do all the timing and pattern configuring - so its a great project and hopefully will form the basis of some in school RPi sessions

With only "snd-bcm2835" in the /etc/modules config this works fine
With both "snd-bcm2835" and "i2c-dev" there are problems

eg as a first and only command this will work fine and play OK, but as a second or third instance this is what I receive
mpg123 Smooth.mp3
[module.c:142] error: Failed to open module jack: file not found
[module.c:142] error: Failed to open module portaudio: file not found
[pulse.c:84] error: Failed to open pulse audio output: Connection refused
[nas.c:220] error: could not open default NAS server
[module.c:142] error: Failed to open module openal: file not found
[audio.c:180] error: Unable to find a working output module in this list: alsa,oss,jack,portaudio,pulse,nas,openal
[audio.c:532] error: Failed to open audio output module
[mpg123.c:897] error: Failed to initialize output, goodbye.

However if I only have "snd-bcm2835"in /etc/modules and I manually " sudo modprobe i2c-dev" then I can both play multiple mp3 files and also detect my PWM using "sudo i2cdetect -y 1"

I have tried various players mpg123 being the main one and omxplayer and fiddled with 2 others.
This works similarly on the RevB 256mb and 512mb versions
As of yesterday I have updated and upgraded to latest software and firmware revisions
Using Class10, 16GB SD card - fully expanded root partition
Seems to be the same for either HDMI audio out or std audio out.
The files I have tried range from 11khz to 44khz encoded, 20kb to 5mb file size - the problem is always the same seeming to indicate that the encoding and file size arent related.

If the same as above is called from a Python3 script running them as background processes the RPi hangs requiring a power cycle to restore - but I m fairly sure that is the code trying to kill the previous background process.

I should add as a separate problem that I am having trouble using Python3 and controlling the PWM - there doesnt appear to be a smbus module/library !

Hoping someone can help

Thanks

Rally

PS His project has to be handed in this week !
Posts: 1
Joined: Mon Oct 15, 2012 2:09 am