mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 15:42:19 +02:00
There maybe a risk that FRAME sync is not 50% duty cycle
on TRCM mode, which will cause sound noise.
This patch wraps XFER-start with reset to fix this issue.
- Hold reset
- Enable XFER
- Release reset
e.g. RK3308
Enable TRCM:
&i2s_8ch_0 {
assigned-clocks = <&cru SCLK_I2S0_8CH_RX>;
assigned-clock-parents = <&cru SCLK_I2S0_8CH_TX_MUX>;
rockchip,clk-trcm = <1>;
}
StressTest:
/#!/bin/sh
count=0
while true
do
yes `echo -en "\x11\x11\x22\x22"` | tr -d '\n' | \
aplay -D hw:1,0 --period-size=1024 --buffer-size=4096 -r 192000 -c 2 -f s16_le &>/dev/null &
sleep 2
rxd=`io -4 0xff300028 | awk '{print $2}'`
echo "[$count]: $rxd"
if [ "$rxd" != "22221111" ]; then
echo "FAIL: mismatch: $rxd, expected: 22221111"
break
fi
count=$((count + 1))
killall aplay
sleep 1
done
Result:
Before:
[35]: 22221111
[36]: 22221111
[37]: 11110888
FAIL: mismatch: 11110888, expected: 22221111
[253]: 22221111
[254]: 22221111
[255]: 11110888
FAIL: mismatch: 11110888, expected: 22221111
[319]: 22221111
[320]: 22221111
[321]: 11110888
FAIL: mismatch: 11110888, expected: 22221111
After this patch:
PASS on 100000+ loop count.
[ 99998]: 22221111
[ 99999]: 22221111
[100000]: 22221111
[100001]: 22221111
...
Change-Id: I77931c529acb43ef0bf7468e2c74ac9ff419218e
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
|
||
|---|---|---|
| .. | ||
| ac97 | ||
| aoa | ||
| arm | ||
| atmel | ||
| core | ||
| drivers | ||
| firewire | ||
| hda | ||
| i2c | ||
| isa | ||
| mips | ||
| oss | ||
| parisc | ||
| pci | ||
| pcmcia | ||
| ppc | ||
| sh | ||
| soc | ||
| sparc | ||
| spi | ||
| synth | ||
| usb | ||
| x86 | ||
| xen | ||
| ac97_bus.c | ||
| Kconfig | ||
| last.c | ||
| Makefile | ||
| sound_core.c | ||