Hi all. In this topic I will show, how to make work USB sound card with Orange Pi. I did not found similar information, so I decided to put this info into a forum.
At the moment, I have working mocp from root user, which able to play mp3 and online radio.
I am not sure if all steps are necessary. So if You know a shorter version of this, please post a reply.
Lets begin.
1. Insert USB sound card, Boot Orange Pi, and login via SSH.
alsamixer not work without arguments ( It may print something like: cannot open mixer: No such file or directory ). But this works: alsamixer -c 1
2. I am not sure if this step is necessary, but I installed
apt install pulseaudio ( https://wiki.debian.org/PulseAudio )
3. amixer able to find usb sound card
4. lsmod | grep snd_usb_audio ( just making sure that snd_usb_audio is loaded )
5. We need to add our user ( root and other if You want ) to audio group
usermod -a -G audio root
6. Setting the default device
https://www.alsa-project.org/wiki/Setting_the_default_device
and reboot the system. Then login again via SSH.
7. Type in console
modprobe snd-pcm-oss
Then add to /etc/modules ( from new line ) snd-pcm-oss
or to /etc/rc.local
modprobe snd-pcm-oss
8. At this moment You should have /dev/dsp or /dev/dsp1
You can type
ln -s /dev/dsp1 /dev/dsp
to make available sound card for cmus
( otherwise cmus answer with error: opening audio device: No such device ) You can also, if You want, add to /etc/rc.local ln -s /dev/dsp1 /dev/dsp
by doing this, it will add a link from /dev/dsp1 to /dev/dsp during boot process
At this moment, your mocp should play.
9. Next step is copy config from /usr/share/doc/moc/examples/config.example
to ~./.moc/config
and then edit this file to this proposed setting:
Save and close the file.
Now you can run mocp and play some file or radio.
Also, from this moment alsamixer works without arguments.