0bb3ca6c98
commit a00f6d3723f5617222ab8df228228c3c2c84e3ec Author: Stephen Kitt <steve@sk2.org> Date: Wed Oct 12 18:36:47 2022 +0200 drivers/i2c: use simple i2c probe All these drivers have an i2c probe function which doesn't use the "struct i2c_device_id *id" parameter, so they can trivially be converted to the "probe_new" style of probe with a single argument. This is part of an ongoing transition to single-argument i2c probe functions. Old-style probe functions involve a call to i2c_match_id: in drivers/i2c/i2c-core-base.c, /* * When there are no more users of probe(), * rename probe_new to probe. */ if (driver->probe_new) status = driver->probe_new(client); else if (driver->probe) status = driver->probe(client, i2c_match_id(driver->id_table, client)); else status = -EINVAL; Drivers which don't need the second parameter can be declared using probe_new instead, avoiding the call to i2c_match_id. Drivers which do can still be converted to probe_new-style, calling i2c_match_id themselves (as is done currently for of_match_id). This change was done using the following Coccinelle script, and fixed up for whitespace changes: @ rule1 @ identifier fn; identifier client, id; @@ - static int fn(struct i2c_client *client, const struct i2c_device_id *id) + static int fn(struct i2c_client *client) { ...when != id } @ rule2 depends on rule1 @ identifier rule1.fn; identifier driver; @@ struct i2c_driver driver = { - .probe + .probe_new = ( fn | - &fn + fn ) , }; Signed-off-by: Stephen Kitt <steve@sk2.org> Signed-off-by: Wolfram Sang <wsa@kernel.org> |
||
---|---|---|
ac108_plugin | ||
patches | ||
pulseaudio | ||
tools | ||
ac10x.h | ||
ac101.c | ||
ac101_regs.h | ||
ac108.c | ||
ac108.h | ||
ac108_6mic.state | ||
ac108_asound.state | ||
asound_2mic.conf | ||
asound_4mic.conf | ||
asound_6mic.conf | ||
builddtbo.sh | ||
default.pa | ||
dkms.conf | ||
install.sh | ||
LICENSE | ||
Makefile | ||
README.md | ||
seeed-2mic-voicecard-overlay.dts | ||
seeed-2mic-voicecard.dtbo | ||
seeed-4mic-voicecard-overlay.dts | ||
seeed-4mic-voicecard.dtbo | ||
seeed-8mic-voicecard-overlay.dts | ||
seeed-8mic-voicecard.dtbo | ||
seeed-voicecard | ||
seeed-voicecard.c | ||
seeed-voicecard.service | ||
sound-compatible-4.18.h | ||
ubuntu-prerequisite.sh | ||
uninstall.sh | ||
wm8960.c | ||
wm8960.h | ||
wm8960_asound.state |
seeed-voicecard
The drivers for ReSpeaker Mic Hat, ReSpeaker 4 Mic Array, 6-Mics Circular Array Kit, and 4-Mics Linear Array Kit for Raspberry Pi.
Install seeed-voicecard
Get the seeed voice card source code and install all linux kernel drivers
git clone https://github.com/respeaker/seeed-voicecard
cd seeed-voicecard
sudo ./install.sh
sudo reboot
ReSpeaker Documentation
Up to date documentation for reSpeaker products can be found in Seeed Studio Wiki!
Coherence
Estimate the magnitude squared coherence using Welch’s method.
Note: 'CO 1-2' means the coherence between channel 1 and channel 2.
# How to get the coherence of the captured audio(a.wav for example).
sudo apt install python-numpy python-scipy python-matplotlib
python tools/coherence.py a.wav
# Requirement of the input audio file:
- format: WAV(Microsoft) signed 16-bit PCM
- channels: >=2
uninstall seeed-voicecard
If you want to upgrade the driver , you need uninstall the driver first.
pi@raspberrypi:~/seeed-voicecard $ sudo ./uninstall.sh
...
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Thank you!
------------------------------------------------------
Enjoy !
Technical support
For hardware testing purposes we made a Rasperry Pi OS 5.10.17-v7l+ 32-bit image with reSpeaker drivers pre-installed, which you can download by clicking on this link.
We provide official support for using reSpeaker with the following OS:
- 32-bit Raspberry Pi OS
- 64-bit Raspberry Pi OS
And following hardware platforms:
- Raspberry Pi 3 (all models), Raspberry Pi 4 (all models)
Anything beyond the scope of official support is considered to be community supported. Support for other OS/hardware platforms can be added, provided MOQ requirements can be met.
If you have a technical problem when using reSpeaker with one of the officially supported platforms/OS, feel free to create an issue on Github. For general questions or suggestions, please use Seeed forum.