Wifi Radio Project Volume Problem
Moderators: adafruit_support_bill, adafruit

Forum rules
Talk about Adafruit Raspberry Pi® accessories! Please do not ask for Linux support, this is for Adafruit products only! For Raspberry Pi help please visit: http://www.raspberrypi.org/phpBB3/

Wifi Radio Project Volume Problem

by MFrantz on Tue May 07, 2013 11:20 am

Hello all,

I've been working on the Wifi Radio Project. Everything is working (code, screen, etc.), but the playback volume is so quiet it is barely audible, even with my speakers on full blast. I have adjusted the volume using the buttons on the LCD Pi Plate, and the volume bar appears and fills or empties based on which button I hit, like it is supposed to, but the volume does not change. Any suggestions on how to fix this?

Thanks,
MFrantz
MFrantz
 
Posts: 12
Joined: Sun Jun 26, 2011 4:07 pm

Re: Wifi Radio Project Volume Problem

by tldr on Tue May 07, 2013 2:49 pm

are your speakers amplified? it is a headphone output.
"If I had known it was harmless, I would have killed it myself." - Phillip K. Dick, A Scanner Darkly
User avatar
tldr
 
Posts: 466
Joined: Thu Aug 30, 2012 1:34 am

Re: Wifi Radio Project Volume Problem

by MFrantz on Tue May 07, 2013 8:01 pm

I've tried both a set of powered computer speakers and a set of headphones. Regardless of what is plugged in the volume doesn't change, and is just barely audible.
MFrantz
 
Posts: 12
Joined: Sun Jun 26, 2011 4:07 pm

Re: Wifi Radio Project Volume Problem

by adafruit_support_mike on Wed May 08, 2013 12:02 am

Post a photo of your hardware and we'll see if we can find anything.

Also, do you happen to have an oscilloscope? It's no problem if you don't, but being able to say, "get a trace at nodes X and Y" is awfully convenient.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10257
Joined: Thu Feb 11, 2010 2:51 pm

Re: Wifi Radio Project Volume Problem

by pburgess on Wed May 08, 2013 2:27 am

Try running pianobar manually from the command line (not using the PiPhi 'wrapper'), then press ')' repeatedly to increase the volume. Does it eventually reach a usable level? If so, good, then this may just be a thing where the two are out of sync with regards to volume (this might happen if PiPhi was run without the special pianobar config file installed). Quit from pianobar, delete the file /home/pi/.config/pianobar/state.p, then run the PiPhi program. Does the volume now work as expected?

If the volume never reaches a usable level even running pianobar from the command line, then something's funky with the sound output or the speakers. Make sure also that the system's been set up to route audio out the headphone jack, not the HDMI output (if your monitor has speakers and the volume level is set low, this might also be the cause).
User avatar
pburgess
 
Posts: 2703
Joined: Sun Oct 26, 2008 2:29 am

Re: Wifi Radio Project Volume Problem

by MFrantz on Wed May 08, 2013 11:38 am

Thanks for your help! I got it almost working now. The only problem that seems to remain is that unless I SSH in and feed it the
Code: Select all | TOGGLE FULL SIZE
sudo amixer cset numid=3 1
statement the volume doesnt change and remains barely audible. Is there somewhere that I can put that statement so it will be ran at boot?

Another question, is there a way that I can change the backlight color and or the scroll rate of the text on the LCD? I have the RGB LCD, I'm just not sure where to put the led.green or led.blue statement within the code
MFrantz
 
Posts: 12
Joined: Sun Jun 26, 2011 4:07 pm

Re: Wifi Radio Project Volume Problem

by pburgess on Wed May 08, 2013 7:12 pm

Weird! The amixer setting 'sticks' on my system; not sure why yours resets. But anyway...you could add the amixer command in /etc/rc.local (the 'sudo' part isn't needed there) to make it run each time.

Regarding scrolling speed, there's a line near the top of PiPhi.py:
Code: Select all | TOGGLE FULL SIZE
MAX_FPS      = 6 if RGB_LCD else 4

That's frames per second. The color LCDs refresh quicker, hence the different values there.

As for color, search for 'backlight' in the code to locate those lines where the color is being set. Legit values are:
lcd.OFF
lcd.RED
lcd.GREEN
lcd.BLUE
lcd.YELLOW
lcd.TEAL
lcd.VIOLET
lcd.WHITE
lcd.ON (same as lcd.WHITE)
User avatar
pburgess
 
Posts: 2703
Joined: Sun Oct 26, 2008 2:29 am

Re: Wifi Radio Project Volume Problem

by notsean on Wed May 15, 2013 2:35 pm

Does anyone know who makes the speaker that is shown in the project?
notsean
 
Posts: 1
Joined: Wed May 15, 2013 2:32 pm

Re: Wifi Radio Project Volume Problem

by propeto13 on Mon Jun 10, 2013 10:46 am

try this:

sudo nano /usr/share/alsa/alsa.conf
scroll down
change the line "pcm.front cards.pcm.front" to "pcm.front cards.pcm.default"

then:
ctrl+x
y
enter

then run:
sudo python PiPhi.py

if u run pianobar to test your volume, dont panic when you dont hear anything, you will always need to tap several times shift+) to increase the volume.
i personally just used regular apple headphones to make sure sound is working. after that any powered speaker should work. i even have used 2.1 speakers with sub woofer and they all work.
hope this works
propeto13
 
Posts: 10
Joined: Mon Jun 10, 2013 10:32 am