This is an enhancement fork with the explicit aim of supporting current shipping Raspbian/Ubuntu kernels without requiring downgrading. Please donate at https://hintak.github.io/ if it works for you. Use vX.Y branch for kernel version vX.Y
Find a file
2018-01-24 20:18:58 +08:00
ac108_plugin remove debug message, increase ac108 buf size 2017-10-09 14:58:35 +08:00
ac101-ok-20180119.state Add: ac101 dsp_a mode, playing 2 in 8 channels OK 2018-01-19 19:25:15 +08:00
ac101.c Add: ac101 dsp_a mode, tdm enabled, 8 slot, 32bit OK 2018-01-24 20:18:58 +08:00
ac101.h Add: ac101 dsp_a mode, playing 2 in 8 channels OK 2018-01-19 19:25:15 +08:00
ac108.c Add capturing volume controls 2017-11-29 09:17:52 +00:00
ac108.h add respeaker 4mic audio card driver 2017-09-14 08:29:26 +00:00
ac108_8mic.state pcm format 8 channels, using two ac108 chips 2017-11-16 06:57:55 +00:00
ac108_asound.state miss 4 channels, set clock fixed 2017-09-26 15:11:21 +00:00
asound_2mic.conf asound.conf is different between 2mic and 4mic 2017-10-18 15:51:54 +08:00
asound_4mic.conf pcm format 4 channels: no need ac108_plugin 2017-11-10 09:00:23 +00:00
builddtbo.sh pcm format 8 channels, using two ac108 chips 2017-11-16 06:57:55 +00:00
default.pa add pulseaudio default configuration file 2017-09-08 04:12:53 +00:00
dkms.conf Add original RPI simple-card driver 2017-11-10 08:52:24 +00:00
install.sh Copy shared library using install -D 2017-10-24 21:42:24 +08:00
LICENSE Create LICENSE 2017-09-15 10:14:31 +08:00
Makefile add original ac101 reference driver 2018-01-12 16:37:28 +08:00
README.md Update README.md 2017-09-28 21:26:48 -05:00
seeed-2mic-voicecard-overlay.dts add respeaker 4mic audio card driver 2017-09-14 08:29:26 +00:00
seeed-2mic-voicecard.dtbo add respeaker 4mic audio card driver 2017-09-14 08:29:26 +00:00
seeed-4mic-voicecard-overlay.dts Add 2 channels playback stream 2017-11-22 09:05:22 +00:00
seeed-4mic-voicecard.dtbo Fix: pcm playback & capture stream can work together, 2017-11-23 10:15:59 +00:00
seeed-8mic-voicecard-overlay.dts Add: ac101 dsp_a mode, tdm enabled, 8 slot, 32bit OK 2018-01-24 20:18:58 +08:00
seeed-8mic-voicecard.dtbo Add: ac101 dsp_a mode, tdm enabled, 8 slot, 32bit OK 2018-01-24 20:18:58 +08:00
simple-card.c override channels in dts setting 2017-11-22 07:33:59 +00:00
uninstall.sh asound.conf is different between 2mic and 4mic 2017-10-18 15:51:54 +08:00
wm8960.c Fix: API name to DECLARE_TLV_DB_RANGE 2017-12-15 07:47:08 +00:00
wm8960.h add wm8960.h header file 2017-04-27 16:52:22 +08:00
wm8960_asound.state optimize some options 2017-09-15 02:01:53 +00:00

seeed-voicecard

Join the chat at https://gitter.im/seeed-voicecard/Lobby

The drivers of ReSpeaker Mic Hat and ReSpeaker 4 Mic Array for Raspberry Pi.

ReSpeaker Mic Hat

While the upstream wm8960 codec is not currently supported by current Pi kernel builds, upstream wm8960 has some bugs, we had fixed it. we must it build manually.

Get the seeed voice card source code.

git clone https://github.com/respeaker/seeed-voicecard
cd seeed-voicecard
#for ReSpeaker 2-mic
sudo ./install.sh 2mic
sudo reboot

Check that the sound card name matches the source code seeed-voicecard.

#for ReSpeaker 2-mic
pi@raspberrypi:~/seeed-voicecard $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~/seeed-voicecard $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~/seeed-voicecard $ 

Next step

Go to https://github.com/respeaker/mic_hat to build voice enabled projects with Google Assistant SDK or Alexa Voice Service.

ReSpeaker 4 Mic Array

The 4 Mic Array uses ac108 which includes 4 ADCs, we also write ac108 rapberry pi linux kernel driver.

git clone https://github.com/respeaker/seeed-voicecard
cd seeed-voicecard
sudo ./install.sh 4mic

#reboot your Raspbian OS
sudo reboot

Check that the sound card name matches the source code seeed-voicecard.

#for ReSpeaker 4-mic
pi@raspberrypi:~ $ arecord -L
null
    Discard all samples (playback) or generate zero samples (capture)
playback
capture
dmixed
array
ac108
default:CARD=seeed4micvoicec
    seeed-4mic-voicecard, 
    Default Audio Device
sysdefault:CARD=seeed4micvoicec
    seeed-4mic-voicecard, 
    Default Audio Device
dmix:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, 
    Direct sample mixing device
dsnoop:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, 
    Direct sample snooping device
hw:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, 
    Direct hardware device without any conversions
plughw:CARD=seeed4micvoicec,DEV=0
    seeed-4mic-voicecard, 
    Hardware device with all software conversions
pi@raspberrypi:~ $ 

If you want to change the alsa settings, You can use sudo alsactl --file=asound.state store to save it.

Test:

#for ReSpeaker 2-mic
#It will capture sound an playback on hw:1
arecord -f cd -Dhw:1 | aplay -Dhw:1
#for ReSpeaker 4-mic
#It will capture sound on AC108 and save as a.wav
arecord -Dac108 -f S32_LE -r 16000 -c 4 a.wav

uninstall seeed-voicecard

If you want to upgrade the driver , you need uninstall the driver first.

pi@raspberrypi:~/seeed-voicecard $ sudo ./uninstall.sh 4mic
delete dtoverlay=seeed-4mic-voicecard in /boot/config.txt
delete snd-soc-ac108 in /etc/modules
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Thank you!
------------------------------------------------------
pi@raspberrypi:~/seeed-voicecard $ sudo ./uninstall.sh 2mic
delete dtoverlay=seeed-2mic-voicecard in /boot/config.txt
remove seeed-2mic-voicecard.dtbo in /boot/overlays
remove snd-soc-wm8960.ko
delete snd-soc-wm8960 in /etc/modules
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Thank you!
------------------------------------------------------

with Google Assistant

if you run the assistant but the playback is speed up considerably, try to configure alsa:

sudo cp asound.conf /etc/asound.conf

If the alsa configuration doesn't solve the issue, try to use pulseaudio. See #4

Enjoy !