Have issues trying to get USB Audio Class version 2.0 working on iMX6SL EVK

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Have issues trying to get USB Audio Class version 2.0 working on iMX6SL EVK

8,045 Views
xuebingwang
Contributor III

Hi Community,

I have issues trying to get USB Audio Class version 2.0 working on iMX6SL EVK.

My environment is:

-- Hardware: iMX6SL EVK, connect EVK OTG port to Ubuntu 12.04 LTS USB Host

-- Software: Freescale's 3.10.17-1.0.0 Yocto BSP (branch imx-3.10.17-1.0.0_ga)

   -- repo init -u git://git.freescale.com/imx/fsl-arm-yocto-bsp.git -b imx-3.10.17-1.0.0_ga

-- How I build:

   -- Enable CONFIG_USB_AUDIO in "arch/arm/configs/imx_v7_defconfig"

   -- export MACHINE=imx6slevk; source setup-environment build

   -- bitbake fsl-image-test

-- Host PC is Ubuntu 12.04 LTS

1) After "modprobe g_audio", I have issue about "request length too big for isochronous", EVK serial console output is:

root@imx6slevk:~# g_audio gadget: high-speed config #1: Linux USB Audio Gadget

ci_hdrc ci_hdrc.0: request length too big for isochronous

snd_uac2 snd_uac2.0: 1116 Error!

ci_hdrc ci_hdrc.0: request length too big for isochronous

snd_uac2 snd_uac2.0: 1116 Error!

ci_hdrc ci_hdrc.0: request length too big for isochronous

snd_uac2 snd_uac2.0: 1116 Error!

ci_hdrc ci_hdrc.0: request length too big for isochronous

snd_uac2 snd_uac2.0: 1116 Error!

2) Above error message is from line 797 of file "driver/usb/chipidea/udc.c"

I add below changes into file f_uac2.c for variable fs_epout_desc and fs_epin_desc

   ".wMaxPacketSize =       cpu_to_le16(1024),"

And I run "bitbake linux-imx -c compile_kernelmodules -f" to rebuild the kernel modules and scp g_audio.ko into /lib/module/.../kernel/driver/usb/gadget.

"modprobe g_audio" does not show any error:

root@imx6slevk:~# modprobe g_audio  

g_audio gadget: Linux USB Audio Gadget, version: Feb 2, 2012

g_audio gadget: g_audio ready

root@imx6slevk:~# g_audio gadget: high-speed config #1: Linux USB Audio Gadget

3) But, there is no sound when I try to play sound from my Ubuntu host PC.

Here is the message in my Ubuntu PC:

xbing@:/usr/share/sounds/alsa$ aplay -l

**** List of PLAYBACK Hardware Devices ****

card 0: PCH [HDA Intel PCH], device 0: ALC3202 Analog [ALC3202 Analog]

  Subdevices: 1/1

  Subdevice #0: subdevice #0

card 1: Gadget [Linux USB Audio Gadget], device 0: USB Audio [USB Audio]

  Subdevices: 0/1

  Subdevice #0: subdevice #0

xbing@:/usr/share/sounds/alsa$ aplay -D plughw:CARD=Gadget,DEV=0 Side_Left.wav

Playing WAVE 'Side_Left.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

xbing@:/usr/share/sounds/alsa$

It seems PCM data is transferred via USB from Ubuntu PC to EVK. Is my understanding correct?

4) If I aplay on EVK, then I can hear voice.

Here is the serial console message on EVK:

root@imx6slevk:~# aplay Side_Right.wav

Playing WAVE 'Side_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

5) When I run "aplay -L" on EVK, I can get below.

root@imx6slevk:~# aplay -L

null

    Discard all samples (playback) or generate zero samples (capture)

sysdefault:CARD=wm8962audio

    wm8962-audio,

    Default Audio Device

sysdefault:CARD=imxspdif

    imx-spdif,

    Default Audio Device

sysdefault:CARD=UAC2Gadget

    UAC2_Gadget, UAC2 PCM

    Default Audio Device

aplay does NOT exit (I have to Ctrl-C to abort aplay) if I run below:

root@imx6slevk:~# aplay -D sysdefault:CARD=UAC2Gadget Side_Right.wav

Playing WAVE 'Side_Right.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono

^CAborted by signal Interrupt...

aplay: pcm_write:1939: write error: Interrupted system call

root@imx6slevk:~#

6) I have the same issue with Wandboard Quad.

Any suggestions?

Thanks very much.

Tags (1)
0 Kudos
Reply
10 Replies

4,497 Views
ise1
Contributor III

Dear All !

Are there any updates in this topic ?

USB Audio Class version 2.0 still doesn't work in 3.10.53 kernel version :/ And the serial console displays "ci_hdrc ci_hdrc.0: request length too big for isochronous"
Are there anyone who has sound getting out with g_audio ? (I'm using micro A/B cables in order to use HNP protocol)

Thanks

0 Kudos
Reply

4,497 Views
dabrain
Contributor I

Dear all,

It seems that UAC2 is not working properly. We can not create the pipe if no usb urb has been received.

So I tried UAC1 but it is not working neither. No sound getting out.

Please advise.

0 Kudos
Reply

2,890 Views
shivasankar
Contributor I

Hi,

I am currently working in IMX8M - EVK board in this board if USB Audio Routine is Supported or not, please give some suggestion for me.

0 Kudos
Reply

4,497 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Wang,

According with "i.MX 6SoloLite EVK Linux Release Notes" document, Linux 3.10.17_1.0.0-ga includes the following USB drivers:

  • Supports USB OTG2.0 port.
  • USB Host mode: MSC, HID, UVC, USB audio.
  • USB device mode: MSC, Ethernet, Serial.
  • USB OTG pin detect.

Have you tried installing the audio gadget driver like is described here?


Hope this will be useful for you.
Best regards!
/Carlos

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

4,497 Views
xuebingwang
Contributor III

Carlos,

I managed to get UAC2 working on EVK by doing below.

root@imx6slevk:~# modprobe g_audio c_srate=48000

g_audio gadget: Linux USB Audio Gadget, version: Feb 2, 2012

g_audio gadget: g_audio ready

root@imx6slevk:~# g_audio gadget: high-speed config #1: Linux USB Audio Gadget

root@imx6slevk:~#

root@imx6slevk:~# arecord -f dat -t wav -D hw:2,0 | aplay -D hw:0,0

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

Thanks.

0 Kudos
Reply

4,497 Views
dabrain
Contributor I

Thank you for your experience.

I have been able to make it work but i'm experiencing some glitches on the audio ouput.

Do you notice the same?

0 Kudos
Reply

4,497 Views
xuebingwang
Contributor III

Carlos,

Yes, I tried installing the audio gadget driver, but it did not work.

Thanks.

0 Kudos
Reply

4,497 Views
jamesbone
NXP TechSupport
NXP TechSupport

CarlosCasillas, Can you please check?

0 Kudos
Reply

4,497 Views
xuebingwang
Contributor III

Carlos, any update? Thank you.

0 Kudos
Reply

4,497 Views
CarlosCasillas
NXP Employee
NXP Employee

Hi Wang,

I'm preparing the environment for run some tests; I sill send you an update soon.

Best regards!

/Carlos.

0 Kudos
Reply