USB Audio 2.0 MC Reference Design and Linux (Ubuntu)

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
pdeoliveira
Junior Member
Posts: 6
Joined: Thu Apr 19, 2012 4:47 pm

USB Audio 2.0 MC Reference Design and Linux (Ubuntu)

Postby pdeoliveira » Thu Apr 19, 2012 4:59 pm

Hello,
I've a problem trying to run an USB Audio 2.0 MC Reference Design with Linux (Ubuntu 11.10).
When I connected it to the computer I've got the following error in dmesg :

[ 112.313730] usbaudio: unit 51: unexpected type 0x09
[ 112.313775] snd-usb-audio: probe of 1-5:1.0 failed with error -5
[ 112.314472] usbcore: registered new interface driver snd-usb-audio

The device is seen in lsusb :
Bus 001 Device 011: ID 20b1:f7d1 XMOS Ltd XTAG2 - JTAG Adapter
Bus 001 Device 012: ID 20b1:0004 XMOS Ltd

but I can't get it working with alsa tools (aplay, etc).

I've tried to look into the "USB-Audio-2.0-XS1-L2-Software-Release(5.3)[11.2.0]" code but it's rather complex !!!!
Is there someone to have some experience of this hardware with Linux ?
Thanks in advance,

Pascal
User avatar
Ross
XCore Expert
Posts: 738
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Fri Apr 20, 2012 11:37 am

Im wondering if the driver is having issues enumerating the rather complex descriptor set.

I would try setting MAX_MIX_COUNT to 0. From memory this should remove the mixer descriptors.
pdeoliveira
Junior Member
Posts: 6
Joined: Thu Apr 19, 2012 4:47 pm

Postby pdeoliveira » Fri Apr 20, 2012 5:08 pm

Thank you for your help, Ross.
I've tried your fix but I still get the error.
So I put back the old value ("8").
Looking into the code, I've found the subtype 9 (extension unit) is used for the mixer. So I "undef" MIXER in customdefines.h and now, it works (still get some warnings in dmesg (ie: "cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4") but they seem to be harmless).
I think the ALSA driver is not able to handle the EXTENSION_UNIT subtype.

I'll continue my investigations, but any help is welcome ;-)

Pascal
spaceharfang
New User
Posts: 2
Joined: Thu Apr 21, 2011 12:48 am

Postby spaceharfang » Mon Apr 23, 2012 3:07 pm

We pretty much came to the same conclusion.

Once the hardware mixer is disabled, the alsa driver works just fine.
We have seen no adverse effects on Mac and Windows as well.

I did some digging and it seems that particular extension is not supported at this point.
User avatar
Ross
XCore Expert
Posts: 738
Joined: Thu Dec 10, 2009 9:20 pm

Postby Ross » Tue Apr 24, 2012 11:20 am

Thanks, this is good to know.
pdeoliveira
Junior Member
Posts: 6
Joined: Thu Apr 19, 2012 4:47 pm

Postby pdeoliveira » Sun Apr 29, 2012 10:38 am

Some news ...
I confirm that the current version of the ALSA driver doesn't support the UAC2_EXTENSION_UNIT_V2 value for interface descriptor.
What I've done : 1/ I use the standard XMOS firmware 2/. I updated the alsa source (simple modification of mixer.c) and recompiled it. Now, I get some warnings when I plug the xmos device (ie: "ALSA mixer.c:352 cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4") but it works !

Next: understand what the extension unit is used for and how to update ALSA driver to make it compatible.
langalang
Newbie
Posts: 1
Joined: Wed Aug 29, 2012 11:00 pm

Postby langalang » Wed Aug 29, 2012 11:11 pm

Hi Pascal,

Are you able to provide the changes you made to mixer.c to get the development board running with the alsa drivers?

Thanks,

Michael
User avatar
feniksa
Member++
Posts: 22
Joined: Tue Apr 03, 2012 1:12 pm
Contact:

Postby feniksa » Sat Oct 13, 2012 10:21 pm

A few notes:
1. Alsa driver fail to init, because XMOS board doesn't support "resume from suspend" device. I commented a few init steps in alsa driver
2. In XMOS board names of mixer are absolutly wrong and alsa will not init mixer names -> pulseaudio unable to init board.
3. Alsa doesn't support "min/max ranges" for ctl... I don't know how to fix it yet :-(

I am still working with xmos and alsa to provide fully supported xmos audio board under linux :-) If someone interesting i will provide modified source :)
faxtrode
Newbie
Posts: 1
Joined: Fri Jan 04, 2013 10:53 pm

Postby faxtrode » Sun Jan 06, 2013 4:34 pm

Hello! Can you help me? I have got the sound device that uses on the board Xmos chip. The device is connected to the pc that running Linux. I use ALSA as the sound subsystem in my OS. The device is detected and subscribed in the OS, but i can`t admine it in either alsamixer or any other sound apllication. When I try to choose it[sound card] in alsa mixer I get the error: "Protocol error". Sometimes I get kernel panic.(kernel 3.6.10/3.7.1) It seems there is no support for this sound chip in the ALSA system, can you help me how can I enable it, may be someone who did it before can share the modificated source code with me?(I use ALSA 1.0.25 from the source)
User avatar
feniksa
Member++
Posts: 22
Joined: Tue Apr 03, 2012 1:12 pm
Contact:

Postby feniksa » Wed Oct 23, 2013 8:11 am

faxtrode wrote:Hello! Can you help me? I have got the sound device that uses on the board Xmos chip. The device is connected to the pc that running Linux. I use ALSA as the sound subsystem in my OS. The device is detected and subscribed in the OS, but i can`t admine it in either alsamixer or any other sound apllication. When I try to choose it[sound card] in alsa mixer I get the error: "Protocol error". Sometimes I get kernel panic.(kernel 3.6.10/3.7.1) It seems there is no support for this sound chip in the ALSA system, can you help me how can I enable it, may be someone who did it before can share the modificated source code with me?(I use ALSA 1.0.25 from the source)


Hehe, welcome to linux. But unfortunately you will not get working this board under linux.
Linux driver snd_usb_audio not fully implemented Usb Audio 2.0 specification (still, kernel 3.11.2-gentoo):
1. Linux doesn't implemented RANGE mixer values
2. Some problem with mixer names.

And other stuff. Only 2 solution:
1. Ignore USB audio 2.0 specification and write your own Linux driver + modification for XMOS firmware
2. Finish implementation of usb audio 2.0 specification for linux driver

I moved in 2 way, but i haven't enough time to finish this work.

Return to “Other XMOS Development Kits”

Who is online

Users browsing this forum: No registered users and 8 guests