How to test the Audio interface

Hello guys,
I intend to test the zero audio interface, se the pan.baidu.com in the mirror for test, but I meet one problem.
root@LicheePi:/home# aplay -l
aplay: device_list:268: no soundcards found…
No matter how to get, Zero always show that the PCM interface is wrong, if I use the wrong mirror?
I tested below:
brmin_dd, brpy_dd, lichee_zero_test_Debian_LXDE, mindb_dd, minmin_dd, minX_dd
Please help me:confused:

the testing log:
root@LicheePi:~/root# ls
bmp.h gpio.sh led.sh rmcsi.sh test_pic.py wifi.sh
cap_a_jpg.sh hp_test.sh mic_test.sh t.sh test_tp.py
disp_png.sh image.jpg minicom.log test.sh test_usb.py
do_cam_cmd.py ins_ko.sh mmap test_csi.sh test_wifi.sh
dump_cam1.sh kill_process.py record.wav test_otg.sh tkzc.mp3
root@LicheePi:~/root# sh mic_test.sh
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
arecord: main:722: audio open error: No such file or directory
root@LicheePi:~/root# chmod +x mic_test.sh
root@LicheePi:~/root# ./mic_test.sh
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
arecord: main:722: audio open error: No such file or directory

recheck the menuconfig from licheepi_zero_defconfig, Its state is selected.

Allwinner SoC Audio support

│ │ <> Allwinner A10 Codec Support │ │
│ │ <
> Allwinner sun8i Codec Analog Controls Support │ │
│ │ < > Allwinner A10 I2S Support │ │
│ │ < > Allwinner A10 SPDIF Support

Hi, I will write audio tutorial today, and here is the simple step to setup audio function:

  1. make sure you are using sun8i-v3s-licheepi-zero-dock.dts. audio interface is enable in this dts.

  2. setup the /etc/asound.conf:

    pcm.!default {
    type hw
    card 1
    device 0
    }
    ctl.!default {
    type hw
    card 1
    }

  3. excute amixer -c 0 cset numid=12 2 to enable mic.
    excute arecord -D hw:0,0 -d 3 -f S16_LE -r 16000 tmp.wav to record sound.

    The right status you can see:
    root@Lichee:~/root# arecord -l
    **** List of CAPTURE Hardware Devices ****
    card 0: Codec [V3s Audio Codec], device 0: CDC PCM Codec-0 []
    Subdevices: 1/1
    Subdevice #0: subdevice #0
    root@Lichee:~/root# ls /dev/snd/
    by-path controlC0 pcmC0D0c pcmC0D0p timer

1 Like

Thanks for your reply. Maybe my dts is wrong, I will check.:slight_smile:

Wow, It works! thank you very much. : )

What ever I do I alwas get the error
Any suggestions?
$ amixer -c 0 cset numid=12 2
numid=12,iface=MIXER,name=‘Mic1 Capture Switch’
; type=BOOLEAN,access=rw------,values=2
: values=on,on
$ arecord -D hw:0,0 -d 3 -f S16_LE -r 16000 tmp.wav
Recording WAVE ‘tmp.wav’ : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
arecord: pcm_read:2145: read error: Input/output error