PHat DAC install causes Processing to stop working


#1

Howdy all,

I’m running in to a problem when I install the PHat DAC on a Pi 3 and then try an use Processing.

I’ve got a Processing script that will play MP3s and display some nifty graphics. And that all works just fine. The problem that I run in to is that the sound output from the Pi’s built in audio isn’t quite loud enough. So I thought I would use a PHat DAC since they produce more output.

The problem that I run in to is that after I run the PHat DAC install script any processing script I try and run freezes.

Anyone got any thoughts on why this might be happening? Or what I might look for?

This is happens on both a Pi 3 and a Pi 2 with the latest Raspbian install and the latest version of Processing 3.

Please and thank you.


#2

As is often the case I’ve discovered some things after I posted the question.

If I have the following line in /boot/config.txt commented out

dtparam=audio=on

then any Processing script that involves audio will fail to load. However if I don’t have it commented out then the audio is all sent out through the Pi’s audio interface and not the PHat DAC.

Is it possible to still route sound through the PHat DAC with dtparam=audio=on still enabled?


#3

Off the gate I want to make clear I’m not familiar with Processing.

In general it is easier to turn off the on-board audio, so as to ensure the sound card you want to output to is registered in alsa as ‘card 0’, which typically simplifies (and sometimes is the only way) to route audio where you want.

It seems however that Processing expects hardware mixer capabily from the sound card, or so I gathered searching for an answer to your question. This is a problem because the pHAT DAC, like many/most low-cost DAC has no on-board volume control.

I also found your post on the Processing forum while researching the matter, so since you are already using minim, you may be in luck! The following article has a section specifically related to the problem, and provides a solution through minim.

http://m.linuxjournal.com/content/processing-sound

so, I recommend leaving dtparam=audio=on commented out, so the DAC is your primary/default card and try the workaround outlined in the link above. Let us know if that works!


#4

RougeM,

Thanks! I’m going to look at the article you posted and I will update both here and the on the Processing forums.