AnsweredAssumed Answered

i.MX6 solo with Linux : Android phone as USB Sound card : no PCM

Question asked by michael.th on Sep 17, 2015
Latest reply on Sep 22, 2015 by CarlosCasillas

Hello,

 

I'm trying to use an Android device as an external USB sound card. The goal is to be able to read audio coming from the android device.

I use a custom board with i.MX6 with Linux based on BSP 4.0.0.

Linux is in configured in USB host mode. I added the snd_usb_audio driver to the kernel.

My problem is that even if the device is properly recognized and the snd_usb_audio driver actually is starting, the pcmC0D0c device file in /dev/snd/  is missing.

 

The device appears in as a sound card in /proc/asound/cards :

0 [SAMSUNGAndroid ]: USB-Audio - SAMSUNG_Android                      

SAMSUNG SAMSUNG_Android at usb-fsl-ehci.0-1.3, high speed

 

In /dev/snd only a time and a control device file is created :

root@BUI270:/home/appdata# ls /dev/snd/

by-id      by-path    controlC0  timer

 

Same information in /proc/asound/devices :

root@BUI270:/home/appdata# cat /proc/asound/devices  

0: [ 0]   : control 33:        : timer

 

I monitored udev to know what is exactly happening when the device is connected.

I see the same, the device is recognized but no pcm device file is created, only control and mixer :

KERNEL[1711.766285] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3 (usb)

UDEV  [1711.786822] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3 (usb)

KERNEL[1711.793708] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0 (usb)

KERNEL[1711.797750] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1 (usb)

KERNEL[1711.802739] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0 (sound)

KERNEL[1711.806283] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0/controlC0 (sound)

KERNEL[1711.809842] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0/mixer (sound)

KERNEL[1711.820871] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.2 (usb)

KERNEL[1711.823867] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.3 (usb)

KERNEL[1711.827551] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/usb_device/usbdev1.7 (usb_device)

UDEV  [1711.898694] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.2 (usb)

UDEV  [1711.913276] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.0 (usb)

UDEV  [1711.918454] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.3 (usb)

UDEV  [1711.935963] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/usb_device/usbdev1.7 (usb_device)

UDEV  [1711.975344] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1 (usb)

UDEV  [1711.977019] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0 (sound)

KERNEL[1711.979869] change   /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0 (sound)

UDEV  [1712.041063] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0/mixer (sound)

UDEV  [1712.081646] add      /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0/controlC0 (sound)

UDEV  [1712.137611] change   /devices/platform/fsl-ehci.0/usb1/1-1/1-1.3/1-1.3:1.1/sound/card0 (sound)

 

There seems to be something wrong at the kernel level, but I have no idea what because the usb sound driver is there.

Any help would be greatly appreciated !

Outcomes