Update: doc about limit for doing capture & playback the same time
This commit is contained in:
parent
860d38fc47
commit
80e0478c91
3 changed files with 13 additions and 6 deletions
12
README.md
12
README.md
|
@ -193,7 +193,7 @@ plughw:CARD=seeed8micvoicec,DEV=0
|
||||||
[![](https://user-images.githubusercontent.com/3901856/37194106-a0ccebce-23a7-11e8-88c5-ec611e44ec49.png)]()
|
[![](https://user-images.githubusercontent.com/3901856/37194106-a0ccebce-23a7-11e8-88c5-ec611e44ec49.png)]()
|
||||||
|
|
||||||
In contrast to 6-Mics Circular Array Kit for Raspberry Pi,
|
In contrast to 6-Mics Circular Array Kit for Raspberry Pi,
|
||||||
the difference is only first 4 input channels are valid capturing data.
|
the difference is only first 4 input channels are valid capture data.
|
||||||
|
|
||||||
### Usage:
|
### Usage:
|
||||||
```bash
|
```bash
|
||||||
|
@ -217,9 +217,15 @@ arecord -Dac108 -f S32_LE -r 16000 -c 8 a.wav
|
||||||
#It will play sound file a.wav on AC101
|
#It will play sound file a.wav on AC101
|
||||||
aplay -D ac101 a.wav
|
aplay -D ac101 a.wav
|
||||||
#Do not use -D plughw:1,0 directly except your wave file is single channel only.
|
#Do not use -D plughw:1,0 directly except your wave file is single channel only.
|
||||||
|
|
||||||
|
#Doing capture && playback the same time
|
||||||
|
arecord -D hw:1,0 -f S32_LE -r 16000 -c 8 toberecord.wav &
|
||||||
|
#mono_toplay.wav is a mono channel wave file to play
|
||||||
|
aplay -D plughw:1,0 -r 16000 mono_toplay.wav
|
||||||
```
|
```
|
||||||
**Note: for developer using 6-Mics Circular Array Kit(or 4-Mics Linear Array Kit) doing capturing & playback the same time,
|
**Note: Limit for developer using 6-Mics Circular Array Kit(or 4-Mics Linear Array Kit) doing capture & playback the same time:
|
||||||
capturing must be start first, or else the capturing channels will miss order.**
|
1. capture must be start first, or else the capture channels will miss order randomly.
|
||||||
|
2. playback output channels must fill with 8 same channels data or 4 same stero channels dat, or else the speaker or headphone will output nothing randomly.**
|
||||||
|
|
||||||
### Coherence
|
### Coherence
|
||||||
|
|
||||||
|
|
3
ac101.c
3
ac101.c
|
@ -626,6 +626,9 @@ static int ac101_set_pll(struct snd_soc_dai *codec_dai, int pll_id, int source,
|
||||||
|
|
||||||
AC101_DBG("%s, line:%d, pll_id:%d\n", __func__, __LINE__, pll_id);
|
AC101_DBG("%s, line:%d, pll_id:%d\n", __func__, __LINE__, pll_id);
|
||||||
|
|
||||||
|
/* clear volatile reserved bits*/
|
||||||
|
ac101_update_bits(codec, SYSCLK_CTRL, 0xFF & ~(0x1 << SYSCLK_ENA), 0x0);
|
||||||
|
|
||||||
/* select aif1 clk srouce from mclk1 */
|
/* select aif1 clk srouce from mclk1 */
|
||||||
ac101_update_bits(codec, SYSCLK_CTRL, (0x3<<AIF1CLK_SRC), (0x0<<AIF1CLK_SRC));
|
ac101_update_bits(codec, SYSCLK_CTRL, (0x3<<AIF1CLK_SRC), (0x0<<AIF1CLK_SRC));
|
||||||
/* disable pll */
|
/* disable pll */
|
||||||
|
|
4
ac108.c
4
ac108.c
|
@ -191,7 +191,7 @@ int ac10x_update_bits(u8 reg, u8 mask, u8 val, struct regmap* i2cm) {
|
||||||
int r;
|
int r;
|
||||||
|
|
||||||
if ((r = regmap_update_bits(i2cm, reg, mask, val)) < 0) {
|
if ((r = regmap_update_bits(i2cm, reg, mask, val)) < 0) {
|
||||||
pr_err("ac10x_update error->[REG-0x%02x,val-0x%02x]\n", reg, val);
|
pr_err("%s() error->[REG-0x%02x,val-0x%02x]\n", __func__, reg, val);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -694,8 +694,6 @@ static int ac108_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_h
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(dai->dev, "params rate: %d\n", params_rate(params));
|
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(ac108_sample_rate); i++) {
|
for (i = 0; i < ARRAY_SIZE(ac108_sample_rate); i++) {
|
||||||
if (ac108_sample_rate[i].real_val == params_rate(params) / (ac10x->data_protocol + 1UL)) {
|
if (ac108_sample_rate[i].real_val == params_rate(params) / (ac10x->data_protocol + 1UL)) {
|
||||||
rate = i;
|
rate = i;
|
||||||
|
|
Loading…
Reference in a new issue