Hondo's Cabin
http://www.hondosackett.com/yabb/YaBB.pl
The Cabin >> Raspberry and Other Pies >> Raspberry-Pi Enable Sound by Firmware Update
http://www.hondosackett.com/yabb/YaBB.pl?num=1475802775

Message started by Fernando on Oct 6th, 2016, 9:12pm

Title: Raspberry-Pi Enable Sound by Firmware Update
Post by Fernando on 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

Title: Re: Raspberry-Pi Enable Sound by Firmware Update
Post by Hondo I. Sackett on Oct 12th, 2016, 7:33pm

Helpful stuff.  Thanks

Hondo's Cabin » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.