ProstoUser Posted January 28, 2022 Share Posted January 28, 2022 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. Цитата mocp output: Running the server... Trying JACK... Trying ALSA... Trying OSS... FATAL_ERROR: No valid sound driver! FATAL_ERROR: Server exited! 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 Цитата Find your desired card with: cat /proc/asound/cards and then create /etc/asound.conf with following: defaults.pcm.card 1 defaults.ctl.card 1 Replace "1" with number of your card determined above. 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: Цитата OSSDevice = /dev/dsp1 ( or whatever it is, it can be also a /dev/dsp ) InputBuffer = 1024 OutputBuffer = 1024 Prebuffering = 170 Save and close the file. Now you can run mocp and play some file or radio. Also, from this moment alsamixer works without arguments. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.