I found a simple solution using just ALSA and uses little CPU - around 3-5% on RPi 3 using latest Jessie build and a USB Audio Device
It appears that recent builds all come with ALSA's dmix plugin built-in. This allows you to share and output audio output stream
Create New .asoundrc
pi@raspberrypi:~ $ sudo nano .asoundrc
Copy/Paste this based on USB ...
There are various versions of PiFM. Some use timed DMA to transfer the data. Timed DMA will use either the PWM or PCM peripheral (probably PWM by default). The peripheral will be configured specially for PiFM. Using mplayer or aplay will reset the PWM peripheral so you will need to restart PiFM afterwards.
I had this same problem on my Vizio. There is nothing wrong with your Pi: this is a Smart TV "feature". They call it volume leveling and it is on by default. You should be able to turn it off from your audio menu. On my Vizio, I press the menu button -> audio -> volume leveling (3rd option down). Hope that helps.
I set up my ~/.asoundrc like below and it allowed playback from the USB sound card and input from the separate USB mic.
card 0 #card 0 is USB sound card
card 2 #card 2 is USB microphone
You can use module-loopback functionality of PulseAudio. First identify the names for your sound card's line in and speakers using pactl list sources and pactl list sinks respectively. Then create the loopback:
pactl load-module module-loopback source=src_name sink=sink_name
If your soundcard is detected with correct default source and sink, simply running ...
Actually, both would work and it is up to you. Either the DAC+ into your amp (using the RCA connector, red and white are the left and right channels), or the Digi+ for a digital connection to your DAC. Probably you wouldn't hear a difference, but who knows? If you want to use your DAC and have the input still free, use the Digi+. If you think you might need ...
Yeah, it's possible. I even play movies without startx. I personally use omxplayer but any command-line based player would do it.
Edit as suggested by angussidney:
What package do you need to install?
You need the omxplayer package.
How do you install omxplayer?
sudo apt-get install omxplayer
How do you open media files? What command do you use?
If you want to connect speakers be sure they have their own amplifier and their own power source. The Raspbery Pi USB slots aren't delivering enough power to power speakers (own experience with simple USB speakers lead to the Raspberry Pi freezing up totally).
The Pi's audio output jack can drive headphones/earphones but for a speaker you will need an amplifier.
Headphones or earphones with a 3.5mm jack will work with your
I found the solution:
sudo apt-get install alsa-utils
sudo apt-get install mpg321
sudo apt-get install lame
sudo modprobe snd-bcm2835
Enabling Audio Output
By default, the RPi audio output is set to automatically select the digital HDMI interface if its being used, otherwise the analog audio output. You can force it to use a specific interface via the ...
The Adafruit board you've linked to is just a DAC and amp bundled together. From your linked page:
It takes standard I2S digital audio input and, not only decodes it
into analog, but also amplifies it directly into a speaker.
I've tested most of the audio output options from the Pi, and pretty much everything aside from the analogue output is OK. I've ...
Welcome to the world of RF. You're experiencing what's called "crosstalk". Basically what this means is that the EMI (electromagnetic interference) generated from one wire can influence other wires and cause similarly shaped signals on them even though they are not connected. This normally happens when the two wires are close together and travelling in ...
You will have to purchase an amplifier. I took an old set of computer speakers and grabbed the amplifier out of it. It runs on 12v. This is a snippet from my tutorial on a Pi Arcade:
Power Harness and Audio Amplifier
When you are ready to cram all the components of your Raspberry Pi
arcade into a MAME cabinet, you have the choice of suppling power to
Yes, should be possible
(While I don't understand whether those "displays" are supposed to show some kind of graphics output), it is possible for the Pi to source multiple different audio outputs. One simple approach is to use multiple USB sound cards. alsa is perfectly capable to handle multiple cards (see here). Different software tools or multiple ...
aplay -l lists all hardware devices, i.e., devices handled by an ALSA kernel driver.
These devices, identified by card number x and device number y, can be accessed directly with a device name hw:x,y. Software plugins that are layered on top of hardware device also accept these numbers, e.g., plughw:x,y or dmix:x.
aplay -L lists the ALSA device names of all ...
As per the manual page (which should be installed, read man aplay):
List all soundcards and digital audio devices
List all PCMs defined
PCM is the standard way that uncompressed digital audio is encoded for playback. It may colloquially refer to a source/sink of such a signal ("PCM interface" might be clearer), ...
Here's an alternative
Open up a screen session using the command screen. Install it if you have to.
Run omxplayer -o local sample.mp3 from there.
Press Ctrl+A then press D to send the screen to the background (i.e. Disconnect from the session). To connect, run screen -X.
It should continue playing in the background.
One caveat of this is that I'm not sure ...
There should be a man page (man omxplayer); the options are also explained here. I do not see a "background" or "damonize" (similar concept) option there.
This is probably because omxplayer was written specifically for the pi to exploit hardware acceleration for video playback (it may be less unique now in this sense than it once was); it will play audio ...
There was some bugs in audio firmware in some fairly recent RPIs, make sure you update the firmware to the latest (rpi-update) I had the same problem with stuttering in espeak, and after updating firmware it was gone.
Check out these topics for more info:
I have a new Focusrite Scarlett 2i2 2nd Gen (+ Pi3B with RB Jessie) as well.
the CL alsamixer tells me there are no controls
no changes were made in the file alsa.conf
Darkice (& Alsa) does not seem to be able to recognize the device
the device does work well with the application Audacity (Record and then PlayBack as well). Select in the ...
The Pi Zero doesn't have a built-in Microphone input nor Audio output, therefore, you will need either a USB Sound Card or a pHAT.
In case it helps, I bought a "USB Sound Card for Pi" on ebay for $3, which has two inputs, mic and stereo jack, and I use Audacity on the Pi to record and play audio, and it works great.
If you already have all the necessary ...
I can see that you are using the stereo Audio Injector card and not the Octo 8 channel card. This line :
audioinjector-audio soc:sound: wm8731-hifi <-> 20203000.i2s mapping ok
shows that ALSA has set up your audio injector card correctly.
The "I2S SYNC error!" lines are part of the bcm2835 i2s driver and are standard - nothing to worry about.
Alexa can't play (and isn't even aware of) music stored locally. All music that Alexa can play is processed on the cloud and streamed to the device, so Alexa won't natively support playing music.
That said, if you're willing to store your music on a cloud hosting service (with HTTPS only1), you can build a skill to do that. skill-sample-nodejs-audio-player (...
One way to go is using multiple USB sound cards, though reports about the number of supported sound cards differ.
These posts claim that alsa supports up to 32 devices without much fiddling:
Need more than 32 USB sound cards on my system
Why does Linux have a maximum number of sound cards?
Whereas this discussion at the Raspberry Pi forum reports a number ...
Look for an "audio distribution amplifier". A quick search finds several that support 8 outputs off a single input. I found used 10 output units on eBay. As you note, each output will, in turn, require an amp to drive the speakers. If you're not after quality, you can probably stack them, although there's sure to be a limit. They key point is that the input (...
I feel your pain, I have the same setup and trying to troubleshoot at the moment looking for a solution.
edit: I've tried a bunch of things.
I just did
pi@raspberrypi:~ $ sudo killall bluealsa
pi@raspberrypi:~ $ sudo bluealsa --disable-hfp
then i was able to play a wav that i downloaded
audio started playing, and i was even able to ...
The Raspberry Pi documentation covers three ways to force audio. Try the first two methods:
Desktop volume control
Right-clicking the volume icon on the desktop taskbar brings up the audio output selector;
This command will switch the audio output to HDMI:
amixer cset numid=3 2
Here the output is being set to 2, which is HDMI. Setting the ...
Yes, at least part of what you want to do is possible. Here's a link to a repo on GitHub containing some instructions for installing raspotify, and downloads to get this running.
When you say, "access music through a URL I can share with anyone connected to my wifi"... First, I'm unclear on what exactly you want to do - perhaps you could edit your question ...
OK, I've found out that mpg123 and eSpeak stumble upon each other whilst trying to spit out their sound data through the sound card. Configuring an output mixer in /etc/asound.conf resolved the issue. Here is the complete config file, taken from the ALSA project website and adapted to my needs:
Answered my own question with help from this link
from Mark Hills
Once you have bluealsa working and can connect devices and play, then these additional steps open up dmix capability and allow audio mixing.
Install loop module once only.
Edit /etc/asound.conf for each bluetooth connection - i.e. if you change device, update this file.