2019年1月26日 星期六

筆記 LED 燈管

換之前: philips lifemax TLD 36W/54 NS, 配合燈具 38W / 78VA, pfc: 0.49
換之前: 億光 T8/18W/4ft (865CNS-GD), 配合燈具 22W/23VA, pfc 0.94
.
我以為要把那變壓器拆掉會好一點

2019年1月9日 星期三

i.mx6 aplay ssi timeout issue.

Situation: when play a wav file using aplay, got this message:
--
fsl-ssi-dai 202c000.ssi: Timeout waiting TX FIFO filling
aplay: pcm_write:2011: write error: Input/output error
--
In the i.mx6 platform, SSI not work may cause from codec clock not exist (not init.), or dts description not correct, or other, in my case, it cause from SDMA firmware, if SDMA firmware too old, SSI does not work, and HDMI audio not work too.

Ccause from: SDMA firmware version not match or not exist.
#dmesg|grep sdma
[    3.595490] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[    3.596311] imx-sdma 20ec000.sdma: loaded firmware 1.1

SDMA firmware ver 1.1 work in kernel 4.1.15 and early, but not work fine in 4.9.88 and later (4.14.78)

Solution: copy firmware file from kernel 4.9.88
#dmesg|grep sdma
[    3.595611] imx-sdma 20ec000.sdma: no iram assigned, using external mem
[    3.596440] imx-sdma 20ec000.sdma: loaded firmware 3.3

nxp's i.mx6 bsp kernel 4.14.87 (L4.14.87_1.0.0_ga, yocto 2.5.1) does not had firmware file, so i copied from 4.9.88 (L4.9.88_2.0.0_ga, yocto 2.4.2) :

# git clone git://source.codeaurora.org/external/imx/linux-imx.git linux-4.9.88-2.0.0-ga -b imx_4.9.88_2.0.0_ga
# cd linux-4.9.88-2.0.0-ga
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf imx_v6_v7_defconfig
#mkdir rootfs
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf INSTALL_MOD_PATH=rootfs firmware_install
# ls rootfs/lib/firmware/imx/sdma/sdma-imx*