How to use USB Audio cards on Raspberry Pi 3 (jessie)

A few days ago,I bought a USB Audio card.

I used one night to figure out how to configure the device on Raspberry Pi. I searched a lot of material, and I found many of them are outdated. Lots of people said to changed "/etc/modprobe.d/alsa-base.conf", but in jessie , the file dose not exist.

The files I changed are as follows and these settings works for me:

1./usr/share/alsa/alsa.conf

...
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0
...
  1. ~/.asoundrc
pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
  1. /lib/modprobe.d/aliases.conf
...
options snd-usb-audio index=1
...

Change the three files will set the USB audio card as default, then reboot your Raspberry Pi to take effect.
You can use alsamixer to configure your USB audio card.

sudo apt-get install alsamixer

if you don't have it.
Type

alsamixer

to use it.

alsamixer

Connect the speaker and microphone  to your USB audio card.

Then use

speaker-test -Dplughw:CARD=Device -c2 -twav

to test speaker. You will hear sound from the speaker.
And use

arecord -d 3 -Dplughw:CARD=Device -fcd -c2 -twav test.wav

to test your microphone. Type ^C to end recording. This will get a audio file named test.wav, check it to make sure the microphone is worked.

Good luck.

打赏作者
喜欢这篇文章,打赏犒劳下作者,以此激励作者创作更多!

您的支持将鼓励我们继续创作!

[微信] 扫描二维码打赏

[支付宝] 扫描二维码打赏

发表评论

电子邮件地址不会被公开。