Hot answers tagged

46 votes
Accepted

How can I use an external USB sound-card and set it as default?

Background It's amazing to see how much effort has been put in to trying to resolve various sound related problems for the Raspberry Pi. Apparently it must be the weakest spot for new users to ...
user avatar
  • 1,277
27 votes
Accepted

How do I configure my sound for Jasper on Raspbian Jessie?

According to the ALSA Wiki, under the title that reads "How to choose a particular order for multiple installed cards", it states the following: Which card is card number 0, 1 and so is by default ...
user avatar
  • 573
15 votes
Accepted

alsa-base conf file missing

Turns out the file is now called alsa.conf and is found in /usr/share/alsa. Changed the lines defaults.ctl.card 0 defaults.pcm.card 0 to card 1 and that's me up and running. Looks like others have ...
user avatar
9 votes
Accepted

Setup output and input audio on different cards

To get different definitions for playback and capture, use the asym device: pcm.!default { type asym playback.pcm "plughw:0" capture.pcm "plughw:1" } (Something like this is not ...
user avatar
  • 561
8 votes
Accepted

Difference between "hwplug" and "hw"

hw accesses the hardware device directly. plughw inserts sample rate and format conversion plugins, if needed.
user avatar
  • 561
7 votes
Accepted

Pi 3 B+ no audio device found

Also check the /boot/config.txt file. It should look like this: # Enable audio (loads snd_bcm2835) dtparam=audio=on
user avatar
  • 151
6 votes

Best way to setup USB mic as system default on Raspbian Jessie

Ok, first delete the file /etc/modprobe.d/alsa-base.conf Raspbian Jessie does not use this config file like Wheezy did. Now, to set the USB sound card to your default card you will need to edit the ...
user avatar
  • 6,185
6 votes
Accepted

FFMPEG: Unknown input format: 'alsa'

Short answer run: sudo apt-get install libasound2-dev before attempting to configure and compile ffmpeg or anything where you need alsa support. Process for resolving similar build dependencies: ...
user avatar
6 votes
Accepted

How to stream sound to a bluetooth device from a raspberry pi zero

I did manage to play sound and record using my Marshall MID headphones using a Raspberry Pi Zero W, which has a builtin WiFi + Bluetooth adapter, but no audio jack. Please note that there are ...
user avatar
  • 804
5 votes
Accepted

Possible to route audio directly from usb-audio line-in to same usb audio line-out?

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 ...
user avatar
  • 371
5 votes

Pi 3 B+ no audio device found

I suggest you run raspi-config, look at Advanced Options>Audio and make sure the "1 Force 3.5mm ('headphone') jack" option is selected. Then reboot...
user avatar
  • 354
4 votes
Accepted

pigpio PWM and ALSA

By default pigpio uses the PCM peripheral to time the DMA leaving the PWM peripheral free for standard audio. Perhaps your ALSA device is using high quality audio. If that's the case you need to use ...
user avatar
  • 66.6k
4 votes
Accepted

Change Volume via single command?

Create a Bash file with the following code: amixer scontrols amixer sset 'Master' 50% Make the Bash file executable using chmod +x filename In Python, use the following: import os os.system("...
user avatar
4 votes

arecord: main:722: audio open error: No such file or directory

Here is a solution you might find helpful: arecord -D hw:2,0 -d 5 -f cd test.wav -c 1 D option specifies recording device. Since this specific test mic is on “card 2”, “device 0”, the value is “hw:2,0”...
user avatar
4 votes
Accepted

How to use both USB Mic (in) and on-board sound (out)

adding an 'asymmetrical' ALSA device worked: change the contents of /etc/asound.conf and ~/.asoundrc to the following: pcm.!default { type asym playback.pcm "hw:0,0" capture.pcm "hw:1,1" ...
user avatar
  • 101
4 votes

Possible to route audio directly from usb-audio line-in to same usb audio line-out?

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 ...
user avatar
4 votes
Accepted

Pygame and Alsa lib error

Here's a writeup for the hack we came up with in the comment stream: Most fortunately, we're able to take advantage of the limited scope of this request: I don't care that sound doesn't work on ...
user avatar
  • 2,814
4 votes

How to increase mic input volume?

Hey so I know that this is late but I actually found a good answer! This is my first post too so I am going to try my best. I found this information on the website PiMyLifeUp. The link to the article ...
user avatar
  • 41
3 votes

How to configure and select USB Microphone

You can make these various settings in your asoundrc, discussed here. You need to set the default input and output in your asoundrc file. Note that when the input and output devices are different, ...
user avatar
  • 891
3 votes
Accepted

Controlling a servo and playing sounds

RPIO, like pigpio, servoblaster, piblaster, and possibly others, use DMA to time the servo pulses. In effect the pulses are hardware timed. In contrast to software PWM they suffer little if any ...
user avatar
  • 66.6k
3 votes
Accepted

How to make PocketSphinx use ALSA? (instead of pulseaudio or jack)

Configure looks for the presence of the development libraries of PulseAudio, Jack and ALSA, in that order. That is why in answers like this it is mentioned that "...It also appears that ALSA will not ...
user avatar
3 votes

How to reorder the index for mic on new Raspbian Jessie for PocketSphinx?

I found a workaround. Instead of re-ordering the index for the mic card, I can change the default mic card with this: $sudo vi ~/.asoundrc pcm.usb { type hw card Mic } pcm.internal { ...
user avatar
  • 171
3 votes

arecord: main:722: audio open error: No such file or directory

Use arecord -Dhw:cardID:deviceID test.wav For MIC You can find the card ID and device ID of kinobo USB from arecord -l For Play The aplay -l ---> will display Card Id and Device ID $ aplay -Dhw:...
user avatar
  • 117
3 votes

Configuring audio to produce balanced mono output

Sadly, I don't think this is going to work the way you think it's going to work. Balanced cabling is effective at minimising noise induced along the length of the cable. If there's an almighty ...
user avatar
  • 10.6k
3 votes

Configuring audio to produce balanced mono output

Exactly the same device definition works for playback: pcm.fake_balanced { type route slave.pcm "hw:0" # or whatever ttable [ [ 1 -1 ] ] } Put it into your ~/.asoundrc or into the ...
user avatar
  • 561
3 votes
Accepted

MPD hangs on song change

I had the same problem on my Pi3B but could fix it by uncommenting "device" option in the "audio_output" block (in my case ALSA) in mpd.conf.
user avatar
3 votes
Accepted

I2S DAC device support (kernel drivers?) and noise ("pop", "crackle") on playback

2020-06 update/summary The MAX98357 does not handle the RPi's I2S output well which causes pops/cracks root cause is a short high-level interruption of BCLK before LRCLK starts (oscillograms: actual,...
user avatar
  • 123
3 votes
Accepted

What are those ALSA Subdevices and what are they used for?

The subdevices are for multiple audio services usage that would be mixed to input/output. There are also subdevices that are a part of an input or output device. There must be at least 1 ...
user avatar
  • 4,185
3 votes

bluealsa: Couldn't acquire D-Bus name: org.bluealsa

Section 3 at the bottom of the installation guide Troubleshooting part: Couldn't acquire D-Bus name: org.bluealsa It is not possible to run more than one instance of the BlueALSA ...
user avatar
  • 2,017
2 votes
Accepted

Why am I getting the warning Hardware is initialized using a generic method in alsa setup?

If everything is working ok, I don't think this is anything other than informative. Why do you think it indicates an error? Not every message spit to console at boot indicates a problem -- in fact, ...
user avatar
  • 55.8k

Only top scored, non community-wiki answers of a minimum length are eligible