Skip to content

Commit 80e0478

Browse files
committed
Update: doc about limit for doing capture & playback the same time
1 parent 860d38f commit 80e0478

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ plughw:CARD=seeed8micvoicec,DEV=0
193193
[![](https://user-images.githubusercontent.com/3901856/37194106-a0ccebce-23a7-11e8-88c5-ec611e44ec49.png)]()
194194

195195
In contrast to 6-Mics Circular Array Kit for Raspberry Pi,
196-
the difference is only first 4 input channels are valid capturing data.
196+
the difference is only first 4 input channels are valid capture data.
197197

198198
### Usage:
199199
```bash
@@ -217,9 +217,15 @@ arecord -Dac108 -f S32_LE -r 16000 -c 8 a.wav
217217
#It will play sound file a.wav on AC101
218218
aplay -D ac101 a.wav
219219
#Do not use -D plughw:1,0 directly except your wave file is single channel only.
220+
221+
#Doing capture && playback the same time
222+
arecord -D hw:1,0 -f S32_LE -r 16000 -c 8 toberecord.wav &
223+
#mono_toplay.wav is a mono channel wave file to play
224+
aplay -D plughw:1,0 -r 16000 mono_toplay.wav
220225
```
221-
**Note: for developer using 6-Mics Circular Array Kit(or 4-Mics Linear Array Kit) doing capturing & playback the same time,
222-
capturing must be start first, or else the capturing channels will miss order.**
226+
**Note: Limit for developer using 6-Mics Circular Array Kit(or 4-Mics Linear Array Kit) doing capture & playback the same time:
227+
1. capture must be start first, or else the capture channels will miss order randomly.
228+
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.**
223229

224230
### Coherence
225231

ac101.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,9 @@ static int ac101_set_pll(struct snd_soc_dai *codec_dai, int pll_id, int source,
626626

627627
AC101_DBG("%s, line:%d, pll_id:%d\n", __func__, __LINE__, pll_id);
628628

629+
/* clear volatile reserved bits*/
630+
ac101_update_bits(codec, SYSCLK_CTRL, 0xFF & ~(0x1 << SYSCLK_ENA), 0x0);
631+
629632
/* select aif1 clk srouce from mclk1 */
630633
ac101_update_bits(codec, SYSCLK_CTRL, (0x3<<AIF1CLK_SRC), (0x0<<AIF1CLK_SRC));
631634
/* disable pll */

ac108.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ int ac10x_update_bits(u8 reg, u8 mask, u8 val, struct regmap* i2cm) {
191191
int r;
192192

193193
if ((r = regmap_update_bits(i2cm, reg, mask, val)) < 0) {
194-
pr_err("ac10x_update error->[REG-0x%02x,val-0x%02x]\n", reg, val);
194+
pr_err("%s() error->[REG-0x%02x,val-0x%02x]\n", __func__, reg, val);
195195
}
196196
return r;
197197
}
@@ -694,8 +694,6 @@ static int ac108_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_h
694694
return -EINVAL;
695695
}
696696

697-
dev_dbg(dai->dev, "params rate: %d\n", params_rate(params));
698-
699697
for (i = 0; i < ARRAY_SIZE(ac108_sample_rate); i++) {
700698
if (ac108_sample_rate[i].real_val == params_rate(params) / (ac10x->data_protocol + 1UL)) {
701699
rate = i;

0 commit comments

Comments
 (0)