Hi
CPU:imx8qx6avlf
SDK:Android Q10.0.0_2.2.0_AUTO
lunch mek_8q_car_userdebug
I don’t know much about alsa, now refer to imx8qxp-lpddr4-val-spdif.dts to modify.
devic-tree
sound-spdif {
compatible = "fsl,imx-audio-spdif";
model = "imx-spdif";
spdif-controller = <&spdif0>;
spdif-in;
spdif-out;
};
driver:vendor/nxp-opensource/kernel_imx/sound/soc/fsl/fsl_spdif.c
Test steps:
mek_8q:/ # cat /proc/asound/cards
0 [imxspdif ]: imx-spdif - imx-spdif
imx-spdif
mek_8q:/ # ls dev/snd -l
total 0
crw-rw---- 1 system audio 116, 4 1970-01-01 00:00 controlC0
crw-rw---- 1 system audio 116, 3 1970-01-01 00:00 pcmC0D0c
crw-rw---- 1 system audio 116, 2 1970-01-01 00:00 pcmC0D0p
crw-rw---- 1 system audio 116, 33 1970-01-01 00:00 timer
mek_8q:/ #
mek_8q:/ # tinypcminfo -D 0 -d 0
Info for card 0, device 0:
PCM out:
Access: 0x000009
Format[0]: 0x000040
Format[1]: 00000000
Format Name: S24_LE
Subformat: 0x000001
Rate: min=32000Hz max=192000Hz
Channels: min=2 max=2
Sample bits: min=32 max=32
Period size: min=32 max=8192
Period count: min=2 max=2048
PCM in:
Access: 0x000009
Format[0]: 0x000040
Format[1]: 00000000
Format Name: S24_LE
Subformat: 0x000001
Rate: min=16000Hz max=192000Hz
Channels: min=2 max=2
Sample bits: min=32 max=32
Period size: min=32 max=8192
Period count: min=2 max=2048
mek_8q:/ #
mek_8q:/ # tinyplay /sdcard/1khz-48000-32-2.wav -p 1024 -r 3
Unable to open PCM device 0 (cannot set hw params: Invalid argument)
mek_8q:/ #
error log
Unable to open PCM device 0 (cannot set hw params: Invalid argument)
Solved! Go to Solution.
Hi relax-wu
supported interfaces are described in Android Release Notes, per this document seems spdif
is not supported, sorry. One can try to test it in linux:
Best regards
igor
Has not yet reached the Android layer
Tinyplay operates the Linux driver directly, this step is a failure.