Closed BuddyZhang1 closed 8 years ago
Just I reboot my board and run "aplay -l", system can't find soundcard!! I use xfce4 desktop.
orangepi@Orangepi:~$ aplay -l aplay: device_list:268: no soundcards found...
So, fix way:
chmod -R a+rwX /dev/snd
orangepi@Orangepi:~$ aplay -l \ List of PLAYBACK Hardware Devices ** card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw2codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
Now, I found the user can't get sound card information and root user can get sound card. as follow:
user:
aplay -l
orangepi@Orangepi:/dev/snd$ aplay -l aplay: device_list:268: no soundcards found...
root:
aplay -l
root@Orangepi:/dev/snd# aplay -l List of PLAYBACK Hardware Devices card 0: audiocodec [audiocodec], device 0: SUNXI-CODEC sun50iw2codec-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: sndhdmi [sndhdmi], device 0: SUNXI-HDMIAUDIO sndhdmi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0
For this issue, there are different copyright on /dev/snd, so we should set correct configure for /dev/snd, like
chown orangepi:orangepi /dev/snd -R
The issue has solved, it can be closed.
ALSA can' record and play audio For original system, ALSA library has been exited, we only need correctly configure alsa.
Use this patch to set OP PC2 ALSA configure. Patch: https://github.com/OrangePiLibra/OrangePi_H5SDK/commit/494adcca90cd5992c33157c59f6cb67a7aabde56
When I use alsa tools to record sound on OPI PC2, but 'arecord' doesn't work with some errors. System output error information after using "arecord"
arecord -d 5 -f cd -t wav sound.wav
Normally, we should be wait 5's and get wav file "sound.wav", but this command costs 25's with some error.The system information of sound card:
more information about sound card: