Jump to content
Sign in to follow this  
lloydhussell

Android/Linux system is audio driver order with usb mic attached on boot.

Recommended Posts

As you can see from the logs below, I used cat for the cards in proc/asound. First without the mic attached, second with the mic attached at runtime, and third with the mic attached at boot. 
you can see that for some strange reason, the order is broken and 0(which I suspect is the mic array) is not shown. All help is greatly appreciated. 

 

127|Tinker_Board_2:/proc/asound $ cat cards
 0 [hdmisound      ]: hdmi-sound - hdmi-sound
                      hdmi-sound
 1 [rockchipcdndpso]: rockchip-cdndp- - rockchip-cdndp-sound
                      rockchip-cdndp-sound
Tinker_Board_2:/proc/asound $ aplay -l
/system/bin/sh: aplay: inaccessible or not found
127|Tinker_Board_2:/proc/asound $ cat cards                                                                                                                                                                                                             
 0 [hdmisound      ]: hdmi-sound - hdmi-sound
                      hdmi-sound
 1 [rockchipcdndpso]: rockchip-cdndp- - rockchip-cdndp-sound
                      rockchip-cdndp-sound
 2 [ArrayUAC10     ]: USB-Audio - ReSpeaker 4 Mic Array (UAC1.0)
                      SEEED ReSpeaker 4 Mic Array (UAC1.0) at usb-xhci-hcd.1.auto-1.1, full speed
Tinker_Board_2:/proc/asound $ %                                                                                                                                                                                                                          lloydhussell@MAC-Y6XGW6XJ0H Dukebox-Android % adb shell
Tinker_Board_2:/ $ cd proc/asound/                                                                                                                                                                                                                      
Tinker_Board_2:/proc/asound $ cat cards
 1 [hdmisound      ]: hdmi-sound - hdmi-sound
                      hdmi-sound
 2 [rockchipcdndpso]: rockchip-cdndp- - rockchip-cdndp-sound
                      rockchip-cdndp-sound

 

Share this post


Link to post
Share on other sites

hello @lloydhussell

what's the result if you sudo aplay -l instead of aplay -l? and what's the version of the linux os you're using?

20 hours ago, lloydhussell said:

Tinker_Board_2:/proc/asound $ aplay -l /system/bin/sh: aplay: inaccessible or not found

Share this post


Link to post
Share on other sites

I can't use aplay because it's the Android 11 image I am using. I saw I could use tinymix and tinyplay and something else, but I couldn't really see much going on there, to be honest. 

Unless I am missing something, both of the aplay -l commands you posted are exactly the same? 

Share this post


Link to post
Share on other sites

My mistake, you used sudo before the other. I will try and use sudo later, yeah. I think I may have tried it already actually. And using tinymix and tinyplay I used su, which afaiu is the sudo on Android.

Edited by lloydhussell

Share this post


Link to post
Share on other sites

hello @lloydhussell

the order of sound cards depends on which driver completes first -- so for tinker board 2s( without any modification): hdmi=0, dp=1, following new device=2, new device2=3 and so on.

for android, the order goes: usb-> hdmi-> dp, so when booting with usb mic inserted it's usb=0, hdmi=1, dp=2; and changes to hdmi=1, dp=2 when usb mic is removed

3LoRAXI.png

Share this post


Link to post
Share on other sites

So the issue was actually in my application code. I was iterating through the interfaces on the USB devices and claiming the interface for communication, as well as iterating the endpoints to use them for direct USB comms. 
I then used the defined interface information provided with the component manufacturer documentation and it worked. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...