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.conf`.
```
# have a look at /lib/udev/rules.d/90-pulseaudio.rules
sudo vim /lib/udev/rules.d/90-pulseaudio.rules
# add the following lines at about line 87(behind the setting for some laptops and before the line GOTO="pulseaudio_end")
For example, in Raspberry Pi, we can find `ATTR{id}=="seeed4micvoicec"` and `ATTR{number}=="1"` with command `udevadm info -a -p /sys/class/sound/card1/`:
```
pi@raspberrypi:~ $ udevadm info -a -p /sys/class/sound/card1/
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/platform/soc/soc:sound/sound/card1':
KERNEL=="card1"
SUBSYSTEM=="sound"
DRIVER==""
ATTR{id}=="seeed4micvoicec"
ATTR{number}=="1"
looking at parent device '/devices/platform/soc/soc:sound':
During the system start, when the card "seeed8micvoicec" is detected, the PULSE_PROFILE_SET variable will be set in the udev database, and PulseAudio will be forced to use `seeed-voicecard.conf`.
```
# have a look at /lib/udev/rules.d/90-pulseaudio.rules
sudo vim /lib/udev/rules.d/90-pulseaudio.rules
# add the following lines at about line 87(behind the setting for some laptops and before the line GOTO="pulseaudio_end")
For example, in Raspberry Pi, we can find `ATTR{id}=="seeed8micvoicec"` and `ATTR{number}=="1"` with command `udevadm info -a -p /sys/class/sound/card1/`:
```
pi@raspberrypi:~ $ udevadm info -a -p /sys/class/sound/card1/
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/platform/soc/soc:sound/sound/card1':
KERNEL=="card1"
SUBSYSTEM=="sound"
DRIVER==""
ATTR{id}=="seeed8micvoicec"
ATTR{number}=="1"
looking at parent device '/devices/platform/soc/soc:sound':
KERNELS=="soc:sound"
SUBSYSTEMS=="platform"
DRIVERS=="seeed-voicecard"
ATTRS{driver_override}=="(null)"
looking at parent device '/devices/platform/soc':
KERNELS=="soc"
SUBSYSTEMS=="platform"
DRIVERS==""
ATTRS{driver_override}=="(null)"
looking at parent device '/devices/platform':
KERNELS=="platform"
SUBSYSTEMS==""
DRIVERS==""
```
4. config `default.pa` and `daemon.conf`
```
sudo cp default.pa /etc/pulse/
sudo cp daemon.conf /etc/pulse/
```
5. 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
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](https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Running/).
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.