I am trying to have a boot sound on my pi robot.
So when the power in on, something comes out from speakers connected to the analog audio output.
So far I have all these lines on the very first rc boot script (rcS)
/usr/bin/omxplayer -o local /home/bootsound.wav
and
/usr/bin/aplay /home/bootsound.wav
and also
/opt/vc/src/pi/hello_audio/hello_audio.bin.
But no audio.
If I try then at rc.local, it works, but then that is too late. It is a monitor-less robot project, we need some boot sound.
WHat am I missing? Maybe I should force the load of the sound module at the very first stage? But I am clueless how to do it.
Any help is very welcome.
Re: Boot Sound
Hmm I have thought about trying to do something like this but i don' know how either. Sorry. 

Re: Boot Sound
I'm in the same boat - except that I want to ensure that there is no sound output until the boot is done and I am ready to output the sounds I want to hear.
What I see is that while the pi is booting static/buzzing audio is generated both to the audio jack and on the USB sound card. I'd like it to be silent as it boots. I have sound amplified to speakers and it's not great that you get noise as you boot.
Any help to prevent this (or to play a sound of "silence") would be appreciated.
What I see is that while the pi is booting static/buzzing audio is generated both to the audio jack and on the USB sound card. I'd like it to be silent as it boots. I have sound amplified to speakers and it's not great that you get noise as you boot.
Any help to prevent this (or to play a sound of "silence") would be appreciated.
Re: Boot Sound
Maybe your only help would be using a DAC, like Hifyberry, that does not suffer electric interference?
Re: Boot Sound
That wouldn't help as those things grab a shedload of GPIOs which I want to use for other things 

Re: Boot Sound
What kind of speakers ?fredfs wrote:So when the power in on, something comes out from speakers connected to the analog audio output.
+"Analog audio problems? post comments here!" : viewtopic.php?f=28&t=95612
Re: Boot Sound
Desktop speakers...
Does it really matter?
Does it really matter?
Re: Boot Sound
When testing some setups, I use a similar idea, although often a video (no sound) but audio works fine too.
Using omxplayer is a good idea, as it doesn't depend on the state of alsa. Alsa often goes into sulk mode on me & I get the silent treatment.
So, in a terminal window, type:
crontab -e
Scroll past all the comment lines that pop up in the terminal edit window, & make a new line thus:
@reboot cd /home/pi/music && /usr/bin/omxplayer -o local Clannad.mp3
Hopefully obvious, change the paths to your file.
Now save the file, & exit back to the terminal prompt.
To ensure that you really did type in that line, type:
crontab -l
& hopefully you'll see what you just entered, & can check you've put in the right path for your sound file, along with omxplayer's path.
Let us know if that is good enough for what you need.
Using omxplayer is a good idea, as it doesn't depend on the state of alsa. Alsa often goes into sulk mode on me & I get the silent treatment.
So, in a terminal window, type:
crontab -e
Scroll past all the comment lines that pop up in the terminal edit window, & make a new line thus:
@reboot cd /home/pi/music && /usr/bin/omxplayer -o local Clannad.mp3
Hopefully obvious, change the paths to your file.
Now save the file, & exit back to the terminal prompt.
To ensure that you really did type in that line, type:
crontab -l
& hopefully you'll see what you just entered, & can check you've put in the right path for your sound file, along with omxplayer's path.
Let us know if that is good enough for what you need.
Re: Boot Sound
Thats is too late, I was looking for something as soon as the initial boot stage. Maybe using hello_audio code?
tvjon wrote:When testing some setups, I use a similar idea, although often a video (no sound) but audio works fine too.
Using omxplayer is a good idea, as it doesn't depend on the state of alsa. Alsa often goes into sulk mode on me & I get the silent treatment.
So, in a terminal window, type:
crontab -e
Scroll past all the comment lines that pop up in the terminal edit window, & make a new line thus:
@reboot cd /home/pi/music && /usr/bin/omxplayer -o local Clannad.mp3
Hopefully obvious, change the paths to your file.
Now save the file, & exit back to the terminal prompt.
To ensure that you really did type in that line, type:
crontab -l
& hopefully you'll see what you just entered, & can check you've put in the right path for your sound file, along with omxplayer's path.
Let us know if that is good enough for what you need.