seeed-voicecard/pulseaudio
2018-10-11 17:54:51 +08:00
..
pulse_config_4mic 4mic doesnt have output interface, delete it 2018-07-24 11:38:38 +08:00
pulse_config_6mic use sound card id 2018-07-24 11:39:01 +08:00
91-seeedvoicecard.rules update: more convenient way to apply udev rules 2018-10-11 17:54:51 +08:00
README.md update: more convenient way to apply udev rules 2018-10-11 17:54:51 +08:00
udev_rules_4mic.png init pulse setting 2018-05-29 19:15:32 +08:00
udev_rules_6mic.png init pulse setting 2018-05-29 19:15:32 +08:00

PulseAudio Configuration for seeed-voicecard

Follow this guide if you want to use your seeed-voicecard as a default source/sink of pulseaudio.

Prerequisites

  1. Download PulseAudio
sudo apt install -y pulseaudio
  1. PulseAudio Profiles
cd seeed-voicecard/pulseaudio
sudo cp pulse_config_4mic/seeed-voicecard.conf /usr/share/pulseaudio/alsa-mixer/profile-sets/seeed-voicecard-4mic.conf
sudo cp pulse_config_6mic/seeed-voicecard.conf /usr/share/pulseaudio/alsa-mixer/profile-sets/seeed-voicecard-8mic.conf
  1. Add udev Rules

During the system start, when the card "seeed4micvoicec" is detected, the PULSE_PROFILE_SET variable will be set in the udev database, and PulseAudio will be forced to use seeed-voicecard-4mic.conf. Similarly, if the card "seeed8micvoicec" is detected, PulseAudio will be forced to use seeed-voicecard-8mic.conf.

sudo cp 91-seeedvoicecard.rules /etc/udev/rules.d/91-seeedvoicecard.rules

ReSpeaker 4 Mic Array

  1. config default.pa and daemon.conf
sudo cp pulse_config_4mic/default.pa /etc/pulse/
sudo cp pulse_config_4mic/daemon.conf /etc/pulse/
  1. reboot raspberry pi and check
sudo reboot
pulseaudio --start  # start pulse at first
pactl info  # check the setting

Server String: /run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 18
Tile Size: 65496
User Name: pi
Host Name: raspberrypi
Server Name: pulseaudio
Server Version: 10.0
Default Sample Specification: s16le 4ch 96000Hz
Default Channel Map: front-left,front-center,front-right,rear-center
Default Sink: alsa_output.platform-soc_audio.analog-stereo
Default Source: alsa_input.platform-soc_sound.seeed-source
Cookie: 3b12:70b3

6-Mics Circular Array Kit and 4-Mics Linear Array

  1. config default.pa and daemon.conf
sudo cp pulse_config_6mic/default.pa /etc/pulse/
sudo cp pulse_config_6mic/daemon.conf /etc/pulse/
  1. reboot raspberry pi and check
sudo reboot
pulseaudio --start  # start pulse at first
pactl info  # check the setting

# The output should be like this
# You could see the default sink is seeed-2ch and default source is seeed-8ch
pi@raspberrypi:~ $ pactl info
Server String: /run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 6
Tile Size: 65496
User Name: pi
Host Name: raspberrypi
Server Name: pulseaudio
Server Version: 10.0
Default Sample Specification: s32le 8ch 96000Hz
Default Channel Map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center,aux0,aux1
Default Sink: alsa_output.platform-soc_sound.seeed-2ch
Default Source: alsa_input.platform-soc_sound.seeed-8ch
Cookie: 3523:e5af

FAQ

  1. Default Sink/Source not right

    Make sure there is no any other daemon or using the audio device. Then check profile and udev rules.

    pacmd list-sinks and pacmd list-sources can be used to show the avaiable sinks/sources, after pulseaudio is started.

  2. Can't start PulseAudio

    Check default.pa and daemon.conf

  3. How to get PulseAudio started automatically

    Normally the PulseAudio server is started automatically. If you want to disable it, you can set autospawn = no in ~/.config/pulse/client.conf or /etc/pulse/client.conf. Click this for more details.

  4. Why the default sample rate is 96000? What if my audio's sample rate is not the same as the default?

    For the other sample rate audio, PulseAudio will resample it into 96K, which means that if your audio's sample rate is lower than 96K, it will get smoothing.