Welcome, Guest. Please Login.
YaBB - Yet another Bulletin Board
May 10th, 2025, 2:35pm
News: Welcome to the Cabin! If you want to register send me an e-mail. you can link to my e-mail under the welcome page.


Pages: 1
Raspberry-Pi Enable Sound by Firmware Update (Read 120 times)
Fernando
YaBB Administrator
*****
NY City




Posts: 2380
Gender: male
Raspberry-Pi Enable Sound by Firmware Update
Oct 6th, 2016, 9:12pm
 
I found this in a collected of saved webpages I have as a library of sorts. The actual page is no longer there but it was from a school in South America as it was in 1/2 English 1/2 Spanish. I took out the English portion.
 
This was for some of the older Model A and Model B Raspberry Pi's, mostly with the V1.1 and V1.12 Firmware. It also affected early V1.2 firmware before the release of the Model B+ in September 2014.
 
This (in the second step) updates the older firmware to the newer one in steps 2 and 3. Steps 4 to 9 updated the older Wheezy OS to accept the changes But if you jut update and upgrade the OS, it should fix it in fewer steps. Steps 10 to 16 tests the sound.
 
DANGER!!! Make sure your R-Pi is connected to a power outlet and not a battery. Updating the firmware can BRICK an R-Pi! Brick as in - "It's dead Jim." The R-Pi can be fixed if it is sent to the Raspberry Foundation after you contact them but that is a long 2 to 3 month long process. I'll check the net to see if other are ways to unBRICK an R-Pi and post it up here.
 
With The CHIP, though for $9, you can unBRICK a BRICKED CHIP, but they have a different process of the firmware update than the R-Pi.
 
Here are the process list to update your R-Pi's Firmware. Take your time with it.
 


How to enable sound on Raspberry-Pi HDMI and Analog (Raspbian-Wheezy)
*Before starting startx
 
1) Use SuperUser (After every reboot) or use sudo before any command
sudo su
 
2) Install Firmware Updater
apt-get install ca-certificates git-core binutils
wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update
cp rpi-update /usr/local/bin/rpi-update
chmod +x /usr/local/bin/rpi-update
 
3) Update Firmware
sudo rpi-update
 
4) Uncomment "hdmi_drive=2" on config.txt
nano /boot/config.txt
 
5) Install ALSA, MPlayer and PulseAudio
apt-get install mplayer mplayer-gui alsa-base alsa-utils pulseaudio mpg123
 
6) Add audio module to kernel
modprobe snd_bcm2835
echo 'snd_bcm2835' >> /etc/modules
 
7) Configure ALSA driver for n Analog=1 HDMI=2 (Auto=0 Not recommended)
amixer cset numid=3 n
 
8) Replace asound.conf with:
Code:
   pcm.!default {
   type hw
   card 0
   }

   ctl.!default {
   type hw
   card 0
   } 


nano /etc/asound.conf
 
9) Reboot Raspberry Pi
reboot
 
10) Test audio without ALSA
cd /opt/vc/src/hello_pi/
 ./rebuild.sh
 cd hello_audio
 
11) Test analog output
 ./hello_audio.bin
 
12) Test HDMI
./hello_audio.bin 1
 
13) Test audio with ALSA
Test analog output
amixer cset numid=3 1
speaker-test -t sine -f 600
 
14) Test HDMI output
amixer cset numid=3 2
speaker-test -t sine -f 600
 
15) Download mp3 file Hello.mp3
wget http://semilleroadt.upbbga.edu.co/Raspberry-Pi/Hello.mp3
 
16) Play MP3 file
mpg123 Hello.mp3
Back to top
 
 
View Profile   IP Logged
Hondo I. Sackett
YaBB Administrator
*****
Behind you!




Posts: 1349
Gender: male
Re: Raspberry-Pi Enable Sound by Firmware Update
Reply #1 - Oct 12th, 2016, 7:33pm
 
Helpful stuff.  Thanks
Back to top
 
 

Well the cowboy, like the red man, you had to leave your land
You can't raise your stock and plant your crop in the gumbo and the sand
Greed disguised as progress has put us to the test
They won't be glad until we're gone from our home out in the west
It's sad to see those good old days replaced with greed and doubt
Soon we'll leave the country, the campfire has gone out
Bid 'em all adieu, you can't turn the world about
The cowboy left the country, the campfire has gone out
View Profile WWW   IP Logged
Pages: 1