Power & Source of Big Ideas

USB Audio support

Moderators: chensy, FATechsupport

Dear FA support,
I work with Nano Pi2 for several projects. one of them needs audio and I want to play sound with cheap usb audio solution.
Unfortunately the Nano Pi2`s audio is routed to SPDIF transceiver in Debian GNU/Linux which is not mapped to I/O ports :( .
I searched many forums but seems that kernel should be compiled with some new modules.

I have installed most of ALSA libs but still need "snd_usb_audio" module and i can not find a way to add it to the kernel.
ALSAMIXER only detects SPDIF , also alsactl init command returns only SPDIF while a CM108 usb audio controller is plugged and lsusb returns correct hid of the usb card.

Do you have any idea for this problem ? Any guide for this ?

Thank you.
Have not tried this on NanoPi, but USB Audio support is a kernel option. Make menuconfig on the your kernel and turn it on.
Hi the SN_USB_AUDIO should be in our kernel. You can search again. I think you can just add that option in the menuconfig and recompile the kernel.
If you want to use audio for nanopi2 ,you can use USB audio chips
.
You can make debian kernel of nanopi2 ,and configure the kernel
config such as :

make nanopi2_linux_defconfig
make menuconfig
Device Drivers -->
Sound card support -->
--- Sound card support
[*] Preclaim OSS device numbers
<*> Advanced Linux Sound Architecture -->
--- Advanced Linux Sound Architecture
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[ *] OSS PCM (digital audio) API - Include plugin system
[* ] USB sound devices --->
<*> ALSA for SoC audio support --->

After compiling the kernel , you have to make sure your board can be
used internet , and do such steps to install the lib of audio:
#apt-get update
#apt-get install pulse-audio
#apt-get install libasound2
#apt-get install alsa-base
#apt-get install alsa-utils

Now you can play one music :
#aplay music.wav
If you want to use audio for nanopi2 ,you all can use USB audio chips
.
You can make debian kernel of nanopi2 ,and configure the kernel
config such as :

make nanopi2_linux_defconfig
make menuconfig
Device Drivers -->
Sound card support -->
--- Sound card support
[*] Preclaim OSS device numbers
<*> Advanced Linux Sound Architecture -->
--- Advanced Linux Sound Architecture
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[ *] OSS PCM (digital audio) API - Include plugin system
[* ] USB sound devices --->
<*> ALSA for SoC audio support --->

After compiling the kernel , you have to make sure your board can be
used internet , and do such steps to install the lib of audio:
#apt-get update
#apt-get install pulse-audio
#apt-get install libasound2
#apt-get install alsa-base
#apt-get install alsa-utils

Now you can play one music :
#aplay music.wav

Who is online

In total there are 37 users online :: 0 registered, 0 hidden and 37 guests (based on users active over the past 5 minutes)
Most users ever online was 2865 on Sun Nov 10, 2019 5:27 am

Users browsing this forum: No registered users and 37 guests