Author Topic: Implementing USB Audio / HID  (Read 29921 times)

0 Members and 1 Guest are viewing this topic.

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Implementing USB Audio / HID
« on: June 18, 2013, 02:42:54 am »
I have been interested in making a USB 3.5mm mixer with multiple input/output channels but have not been able to find the starting point or dev board that will be able to accomplish this task. Most of the existing audio mixers cost hundreds of dollars and I am looking for a relatively low cost DIY solution.

I recently got a cheapy USB sound card (ebay search "usb sound card") from China just to see what is going on and they seem to be able to implement this in a tiny, super low cost solution. I am not sure if those cards are classified as a HID or just Audio device or if that is the spec that Windows uses to auto identify a microphone or speaker but that is what I am looking for.

Most of my experience comes from FPGA's (Digilent Basys2 and Atlys) and I think that the Digilent SDK can is only good for transferring bits and not emulating a USB device. This of course would probably be possible through the I/O.

I am going to be using this mixer / interface on a Windows machine but it would be nice if it used some specification of USB to be compatible with all OS without an external driver (Plug and Play).

Relatively recently, I saw the Teensy used in a project to make a custom game controller. I do not see any documentation on implementing an audio device besides the MIDI article but maybe the USB serial feature is able to send the audio stream data.

Also I know for sure that the Teensy 2.0++ can be a HID Keyboard, Mice, Joystick and MIDI,  but I want to know if the Teensy 3.0 has this same capability as well.

The only reason I mention the Teensy so much is that it is the only board I have heard of that can be a custom USB device but I would be willing to go to any other solution.


Here are some resources that I have found:
 

Offline vvanders

  • Regular Contributor
  • *
  • Posts: 124
Re: Implementing USB Audio / HID
« Reply #1 on: June 18, 2013, 03:00:19 am »
TI makes a few USB audio DAC chips that'll output in I2S but they're only a single stereo pair.
 

Offline lgbeno

  • Frequent Contributor
  • **
  • Posts: 349
  • Country: 00
Implementing USB Audio / HID
« Reply #2 on: June 18, 2013, 03:02:04 am »
Have you looked at TI PCM2707?  It's in a lot of semi cheap USB audio cards.
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #3 on: June 18, 2013, 03:06:42 am »
TI makes a few USB audio DAC chips that'll output in I2S but they're only a single stereo pair.
Have you looked at TI PCM2707?  It's in a lot of semi cheap USB audio cards.

As soon as vvanders responded I pulled up that exact data sheet (PCM2707). Looks like there are only outputs on that chip which only works for half the interface.

Thanks for the lead!
« Last Edit: June 18, 2013, 03:11:25 am by MLM »
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #4 on: June 18, 2013, 07:54:59 am »
TI also makes PCM29xx series which are CODECs. I don't think they make any with I2S both in and out, but I'm not 100% sure.

To clarify things a bit, USB has 'device classes' which specify the interface for certain standard types of gizmos. For example HID is the class used for human interface devices, this class provides for keyboards, mice, and is generic enough that it's often used for simple I/O. USB Audio Class devices implement audio transfer, but nothing else. For that reason, many of these controllers implement both Audio and HID classes, usually so you can attach buttons to the DAC and control the volume in the OS via HID. The way USB is designed, a single device can implement several classes simultaneously.

All of these 'standard' classes are defined in the USB specification, which you can download from usb.org. It's not easy reading, but everything you need is there. If you are interested in a more readable, but still fairly technical overview of USB, this one is quite good: http://www.beyondlogic.org/usbnutshell/usb1.shtml

As far as practical applications, there are some real problems with the Audio Class 1.0 spec that make it difficult to use:
  • For some reason most OSs only implement the clock mode which requires the device to synchronize with the PC's clock based on the 1ms USB frame timing. This is tricky to implement correctly on the device side, and results in having to use a pretty shitty clock there too.
  • I don't remember why this limitation surfaces (I think it's due to frame size and the fact that only a single frame can be sent per 1ms USB poll), but it's only capable of full-duplex at 48khz/24bit maximum. 96khz works in half-duplex. Also 24-bit might not actually be 24-bit in Windows, IIRC

Audio Class 2 is much better, but only Linux (and maybe OSX, but I don't use Apple products) has implemented it, and it's quite a lot more complicated so AFAIK there aren't any premade chips or anything for it yet (probably also driven by the lack of OS vendor support). I think there are ways to hack the commercial drivers available into working with your hardware...but meh... There are some projects / parts out there though. I think XMOS has a specific audio devkit with UAC2 code available. If not, I know the DIYAudio community was working on something. There is SDR-Widget/Audio-Widget which I mentioned in another thread, an AVR32 open-source solution (does UAC1 too). If you look around you can find some people making USB->I2S modules that can do UAC2 too, I know there's a company using them as the basis for a modular signal processing solution, but I can't remember the name right now. Somethnig Brick maybe.

If all you want is basic I2S in/out, I have done it with the STM32F105 (I think...whichever is the lowest that has the I2S peripheral). ST's software package include an Audio Class 1.0 example that works well enough out of the box, and with Win7 or Linux/OSX you can configure it to use an external clock and it works fine, which isn't generally possible with the ASICs (WinXP didn't support this mode, IIRC). That makes it a pretty good basis for a decent fidelity system, but you're still limited to 48KHz if you want full-duplex. It should be possible to make a UAC2 firmware for this chip, but I never got around to it. I have a board layout and might still have my hacked up ST firmware for a half-duplex board using this chip, if you're interested. Haven't touched it in a while, but it worked fine.

Finally, I think this would be a serious challenge to implement on a midrange 8-bit micro like the AVR in the Teensy. I2S is a fairly high bandwidth interface, and these chips don't generally have a peripheral to handle it. Getting the timing right would be hard (you'd probably have to abuse both timers and the SPI peripheral to do it), and just consuming the data quickly enough would be a fair challenge also, depending on how the USB peripheral works. Only 8K of RAM also means you don't have much buffer available, and tightens your timing requirements. A single packet on the USB with 1ms of audio data would take up almost 1/4 of your RAM. And forget about trying to send data back at the same time :P.
« Last Edit: June 18, 2013, 08:00:06 am by ve7xen »
73 de VE7XEN
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6541
Re: Implementing USB Audio / HID
« Reply #5 on: June 18, 2013, 10:38:03 am »
The cheap USB ones are based on a single-chip SoC that usually has an 8051 core with a USB controller and DAC, so maybe an AVR isn't that far off.
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1077
  • Country: fi
Re: Implementing USB Audio / HID
« Reply #6 on: June 18, 2013, 12:12:05 pm »
USB Audio Class devices implement audio transfer, but nothing else.
USB Audio does specify some basic controls like mute and volume, which is how the OS's built-in volume control widgets work.

TI's TUSB3200A used to be a common audio streaming solution, it's a 8051 core with a USB codec interface supporting up to 8 channels IIRC. It also has a very capable audio clock generator made it a popular option for low-jitter streaming. On the downsides it's a bit of a pain to program for and the SDK is basically a lightly commented code dump. It's also been downgraded to NRND status with no direct replacement.

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #7 on: June 18, 2013, 03:53:45 pm »
USB Audio does specify some basic controls like mute and volume, which is how the OS's built-in volume control widgets work.
Interesting. It's been a while since I perused that spec. I wonder why all of the TI ones with controls implement HID for it.
73 de VE7XEN
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #8 on: June 18, 2013, 07:42:22 pm »
...

Thanks for the USB HID vs Class clarification.

I am not looking for ultimate fidelity or high bitrate audio just something without noise or whining. I am using Windows 8 but I am sure that anything that working on Windows 7 will work fine on 8. The XMOS article says "Audio Class 2.0 has been fully supported in Apple OSX since version 10.6.4. [...] Audio Class 2.0 is not supported natively by Windows operating systems, a driver is required to be installed." but I think UAC 1.0 will be the way to go in this project.

Just learned what Full and Half duplex means...
Full Duplex: Send AND Recievce Data at the same time
Half Duplex: Send OR Receive Data one at a time

The XMOS setup looks nice but it looks like it only comes in BGA from Digikey - U16A-128-QF124 used in the block diagram for sale but similar XS1-U16A-128 products are available for $21-$28. The dev boards also look pretty pricey in order to use the chips in a nice form factor.


The DIYAudio article: Open-source USB interface: Audio Widget. The hardware seem to be sold out or expensive ($100 or more). The code is openly available on google code so maybe a Atmel AT32UC3A3 dev board with that code could work (not sure on prices of those boards).

The CP2114 Audio Bridge from Silicon labs looks like it would work with lots of Codec and DAC chips so it would be a matter of finding the right one. Here is a nice article explaining the chip. It says it can be used for USB Digital Audio Out (Audio Playback Device) and USB Digital Audio In (Microphone/Recording Device) but can only do 16 bit audio.



"USB Audio Class 1.0" (UAC 1.0) is returning some promising google results. This might be a cool thing to implement or find in VHDL on a FPGA but I am sooo uneducated on this spec.

I am also looking for some chips with a 8051 core with a USB codec as amyk mentioned to see what they can offer.

Other Resources:
« Last Edit: June 20, 2013, 04:33:19 am by MLM »
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #9 on: June 18, 2013, 08:29:30 pm »
I haven't followed this arena for a while, so take my information with a grain of salt. IIRC XMOS include a Windows UAC2 driver in their development kit for the CPUs. There are also a couple private ones that supposedly work by hacking the .inf files. I couldn't get this to work with my SDR-Widget.

SDR-Widget PCB sets are occasionally sold, you get the PCB and the difficult to source ES9023 DAC for around $35. The rest of the parts add up to around $80. This gets you a better than -110dB THD+N DAC/ADC that can do 192KHz/24bit in UAC2 mode. It's not 'audiophile' grade in that it doesn't use fancy capacitors or anything, but specs and testing prove it out as low distortion and low noise. The only hard part of the build is soldering the AVR32.

If you're happy with UAC1 and are going for a simple low-noise output that SiLabs part looks interesting. I wasn't aware of that one. It supports a CODEC, and there are some pretty good ones out there from Wolfson and others, or it can probably be used with a separate DAC and ADC (don't have time to check the datasheet at the moment). Bonus, it's cheap and readily available. Though really the low-effort PCM29xx option does a fine job for basic needs.
73 de VE7XEN
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6541
Re: Implementing USB Audio / HID
« Reply #10 on: June 19, 2013, 11:43:24 am »
I am also looking for some chips with a 8051 core with a USB codec as amyk mentioned to see what they can offer.
There's literally dozens of companies making these, mostly in China... here's some
Nuvoton W681308
http://www.cmedia.com.tw/ProductsIndex.aspx?ClassifySerno=26
http://www.sonix.com.tw/sonix/family.do?f=4
http://www.tenx.com.tw/ <- The cheapest USB sound cards seem to be based on their chips, there are tons of complaints about the sound quality but that's because the manufacturers are so cheap that they omit things like DC blocking caps and any other filtering/decoupling.
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #11 on: June 19, 2013, 09:43:32 pm »
There's literally dozens of companies making these, mostly in China... here's some
...

Thanks for links!

I am still undecided on how I will go about tackling this project. Most of those chips only have a max of 2 ADC and 2 DAC so I would have to use multiple chips in order to get 4 channels. The MAX9880A is an example of this type of codec...

My goal is to create a 4 channel 24 bit(maybe 16 bit) i/o 3.5mm audio interface that is Plug and Play(USB Audio Class 1).

My solution seems to be a microcontroller with USB Audio Class example or support for USB isochronous interface where I can feed the 4 streams and assemble the packets to go in or out of the device.
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #12 on: June 20, 2013, 12:25:45 am »
I don't think you'll get 4 channels out of UAC1, the required frame size is too large for 'CD quality' sample rates and bit depth.

UAC2 can probably do it, just keep in mind you need 2 I2S interfaces then.

You could also do it by integrating a USB hub into your design (you can use UAC1, then), but you might have sync issues.
73 de VE7XEN
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 3839
  • Country: ro
  • .
Re: Implementing USB Audio / HID
« Reply #13 on: June 20, 2013, 01:49:46 am »
In case anyone's curious, here's the insides of one of those $2-3 usb soundcards, based on a C-Media IC (the chip is laser engraved, but really hard to see without some good light and can't be bothered right now)

I bought it with the idea to use it for the microphone, because the tv tuner I have is an old design that uses sound card's line in feature to get the sound from tuner to system, and the sound card can only record from one source at one time. So I couldn't use microphone in games while having the TV tuner running on the second monitor.

Well turns out the recording quality is horrible, really hard to adjust microphone sensitivity, output is hissy (too high amplification maybe preset on usb stick)  and lacks any kind of sensible filtering (isn't smart enough to isolate my voice and remove sound from speakers on desk and so on)

I remember i checked the datasheet for the IC when I opened this thing for the first time  and the layout is based on the application note in the datasheet, nothing different.

Warning, pictures are large 3000x something...

« Last Edit: June 20, 2013, 01:53:20 am by mariush »
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #14 on: June 20, 2013, 03:33:15 am »
Yeah, I tried to find one of these cheap modules with a line-in (rather than mic input) to use for digital ham modes, and didn't have much luck. Most of them are high-gain mic inputs only, and many will only do 8Khz on the input too.

The outputs aren't completely useless though, better than a lot of onboard sound, especially on laptops.
73 de VE7XEN
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #15 on: June 20, 2013, 04:29:37 am »
I don't think you'll get 4 channels out of UAC1, the required frame size is too large for 'CD quality' sample rates and bit depth.

UAC2 can probably do it, just keep in mind you need 2 I2S interfaces then.

You could also do it by integrating a USB hub into your design (you can use UAC1, then), but you might have sync issues.
A hub is just fine as long as the naming scheme of the device can remain the same. I am not sure on how to set the name of the device yet or have read this feature in any datasheets or readings yet (may not be possible)...

In case anyone's curious, here's the insides of one of those $2-3 usb soundcards, based on a C-Media IC (the chip is laser engraved, but really hard to see without some good light and can't be bothered right now)
The cards I got look almost identical except I have some black hard guck on the bottom so I can't see the main chip at all. I have the same problem with hissy, whiny output on speaker line and the volume control on 1 was normal and 100 was ear splitting. Mic seemed reasonable but my testing was limited and I just got a refund on those hunks of crap.

--

I am looking at the PCM3168A audio codec chip at the moment but I am not sure exactly how the whole thing works. I think you can use SPI to change settings, send commands and get all of the data from the lines but I am unsure if it is full-duplex. The features that grab me are 24 Bit, 8 DAC soo that is 4 channel stereo output, and 6 ADC so that will work for 4 mono microphones (which mics usually are mono....) that will only work for 3 stereo inputs (chip out of the picture :( ).

That codec would require a microcontroller or FPGA middle man and then a USB isochronous interface chip to send it off to the PC. ve7xen mentioned that UAC1 probably doesn't have the bandwidth from a single device so I may need to have several USB isochronous  chips connected to a USB hub chip which then goes to the PC.
« Last Edit: June 20, 2013, 01:49:47 pm by MLM »
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #16 on: June 20, 2013, 05:52:06 am »
I think you will have problems trying to use the same CODEC with independent USB chips. All of these chips that I'm aware of only run in master clock mode, which means they will all be recovering their own clock to drive the CODEC with (which expects a single synchronous clock for all channels). I doubt these clocks will sync up well enough that this will actually work properly. They may be out of sync enough that you actually have issues keeping things in sync between them. I know they all sync from USB's 1ms frame timing, which I believe can potentially be generated differently for each device depending on which root port it's on etc. You'd probably need independent stereo CODECs (or DAC/ADC pairs) for each USB channel if you go this route, or at least it would be the easier place to start.  Depending on the details this can also cause real-world problems in that playback to the different devices will run at different speeds and drift out of sync / cause audio glitches. If you plan to implement your own UAC->I2S core and have a microcontroller for each channel you could use slave clock mode to handle this, but there are still the OS-side sync issues. This mode is actually quite a bit simpler to implement on the micro because you don't have to do clock recovery and sync with the PC.

I think this synchronous clocking requirement is the main reason there are not many multichannel USB sound cards out there, and why almost all of them that do exist implement their own protocol so they can generate the clock themselves. UAC2 can handle this, but lack of OS vendor support and uptake means the existing proprietary protocols are still winning out for now anyway.

Unless you're a reasonable firmware developer (and with the SDR-Widget code to examine this is much easier than when I was looking into it) willing to implement UAC2, these clocking issues could be a serious problem in practical use, especially if you actually want the audio coming out to be in sync for e.g. multichannel surround sound. The problems get thornier when you start trying to *actually* synchronize several independent (to the OS) audio devices in the OS.

Anyway good luck, I still have some interest in this stuff and would like to see more experimenting, especially with some of the cheap Chinese USB chips. Maybe they can do some cool stuff, everyone seems stuck on the PCM2xxx series which are quite boring by now.

I pulled my dev board for the STM32->I2S project out of the 'dead projects' box and hooked it up. Works, and sounds great when it's not clipping the output, not sure what's up there but I don't think it's the I2S interface, might be clipping the input to my amp, it doesn't occur if I turn it down from full scale. I need to try it with another DAC. Only 96KHz/16bit, half-duplex, just output. Doesn't support any other clocks in slave mode because of my fixed divider clock arrangement. I managed to find my hackish source (mostly ST's demo source with a few modification) if you want somewhere to start from. I am using STM32F105 and WM8524 (simple, cheap and not horrible) on my demo board.
73 de VE7XEN
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1077
  • Country: fi
Re: Implementing USB Audio / HID
« Reply #17 on: June 20, 2013, 10:26:49 am »
I don't think you'll get 4 channels out of UAC1, the required frame size is too large for 'CD quality' sample rates and bit depth.
The max frame size for full-speed isochronous is 1023 bytes, which allows for 10 channels of 16-bit 48kHz audio.

Offline amyk

  • Super Contributor
  • ***
  • Posts: 6541
Re: Implementing USB Audio / HID
« Reply #18 on: June 20, 2013, 12:40:56 pm »
In case anyone's curious, here's the insides of one of those $2-3 usb soundcards, based on a C-Media IC (the chip is laser engraved, but really hard to see without some good light and can't be bothered right now)

I bought it with the idea to use it for the microphone, because the tv tuner I have is an old design that uses sound card's line in feature to get the sound from tuner to system, and the sound card can only record from one source at one time. So I couldn't use microphone in games while having the TV tuner running on the second monitor.

Well turns out the recording quality is horrible, really hard to adjust microphone sensitivity, output is hissy (too high amplification maybe preset on usb stick)  and lacks any kind of sensible filtering (isn't smart enough to isolate my voice and remove sound from speakers on desk and so on)

I remember i checked the datasheet for the IC when I opened this thing for the first time  and the layout is based on the application note in the datasheet, nothing different.

Warning, pictures are large 3000x something...
Notice the missing output coupling caps that have been bypassed with 0-ohm resistors, and general lack of supply filtering... it'd probably perform a lot better with those parts present.
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #19 on: June 20, 2013, 02:27:27 pm »
I pulled my dev board for the STM32->I2S project out of the 'dead projects' box and hooked it up. Works, and sounds great when it's not clipping the output, not sure what's up there but I don't think it's the I2S interface, might be clipping the input to my amp, it doesn't occur if I turn it down from full scale. I need to try it with another DAC. Only 96KHz/16bit, half-duplex, just output. Doesn't support any other clocks in slave mode because of my fixed divider clock arrangement. I managed to find my hackish source (mostly ST's demo source with a few modification) if you want somewhere to start from. I am using STM32F105 and WM8524 (simple, cheap and not horrible) on my demo board.
I actually do have a STM32F303VCT6 Discovery board (Cortex M4) but I am not sure if your code would be compatible and I am not very versed in this board (I just ran the demo project basically). I am guessing this is the STM32->I2S code projects.

I am not looking for a seperate USB isochronous interface if the board supports isochronous transfer or has a nice demo to work off of. The looking for a chip is just to make USB easier if needed. If anyone knows a list of good boards that support this kind of thing then that would be greatly appreciated.

Also found this Audio Class from mBed which are ARM boards so I think it cold work on the STM32F303 board I have (unsure of transfer type).

The max frame size for full-speed isochronous is 1023 bytes, which allows for 10 channels of 16-bit 48kHz audio.
Here is a cool article I found on Isochonous transfer. It does say full-speed isochronous is 1023 bytes so I can confirm what andersm said. 24 bit is 3 bytes. 3 (byte length) * 48 (each ms, speed) * 4 (channels) = 576 bytes which fits in the 1023 byte limit. Also max of 7 channels at 24 Bit 48KHz. Update: I think that is just a mono channel??? so in order to get stereo it would need to support 8. Looks like the limits force a  USB hub setup or 16 bit audio.

----

Other Resources:
« Last Edit: June 20, 2013, 02:45:43 pm by MLM »
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1345
  • Country: us
Re: Implementing USB Audio / HID
« Reply #20 on: June 20, 2013, 06:35:51 pm »
The ST STM32F4 discovery board has some audio chips on it.

Edit:  has software examples
C
« Last Edit: June 21, 2013, 12:40:29 am by C »
 

Offline ve7xen

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: ca
    • VE7XEN Blog
Re: Implementing USB Audio / HID
« Reply #21 on: June 20, 2013, 10:42:51 pm »
The max frame size for full-speed isochronous is 1023 bytes, which allows for 10 channels of 16-bit 48kHz audio.
Yeah you're right, I was misremembering the limitation. I should've known better, knowing 24-bit 96KHz is possible. You can do 8 channels of 16-bit audio. 24-bit isn't doable at 48khz (1152b).

Quote
I actually do have a STM32F303VCT6 Discovery board (Cortex M4) but I am not sure if your code would be compatible and I am not very versed in this board (I just ran the demo project basically). I am guessing this is the STM32->I2S code projects.

I am not looking for a seperate USB isochronous interface if the board supports isochronous transfer or has a nice demo to work off of. The looking for a chip is just to make USB easier if needed. If anyone knows a list of good boards that support this kind of thing then that would be greatly appreciated.
With the USB library code ST provides (for the Cortex M3 chips anyway) are some examples. One of them is UAC streaming, it works out of the box with a certain DAC they have coded control stuff for. I basically just ripped all of that stuff out and modified it a bit to do asynchronous mode and it works with a simple no-config-interface DAC. My modifications are very minimal, I'm sure if that example exists also for the F3 series you'd have no trouble getting basic stereo output going. Multichannel and full-duplex would be a bit trickier.
73 de VE7XEN
 

Offline joseph.anand

  • Regular Contributor
  • *
  • Posts: 56
  • Country: in
Re: Implementing USB Audio / HID
« Reply #22 on: July 04, 2013, 11:30:04 am »
Well not sure what you're exact requirement is. I have been working on this for quite sometime now and the only suitable way is for you to implement UAC2. A easier solution would be to use two TI 290Xc series chips running of a single USB hub.

I initially tried working with the Microchip development kit (but the firmware is crap, drops packets  and the source code is pathetic). However I've realised of late that the most time-efficient and easiest solution is to use one of the many multi-channel codecs available from TI, AD, etc, and try interfacing to either a Raspberry Pi, or a Beaglebone black over the I2S port. Linux kernel support is available for most of these I2S devices (they normally use TDM) . If you want a device to interface to your PC, then you can try to implement the code to configure the Beaglebone black as an USB Audio device (UAC2).
 

Offline MLM

  • Contributor
  • Posts: 18
  • Country: us
    • Eric Eastwood
Re: Implementing USB Audio / HID
« Reply #23 on: July 04, 2013, 08:04:15 pm »
[...]only suitable way is for you to implement UAC2

I've realised of late that the most time-efficient and easiest solution is to use one of the many multi-channel codecs available from TI, AD, etc, and try interfacing to either a Raspberry Pi, or a Beaglebone black over the I2S port. If you want a device to interface to your PC, then you can try to implement the code to configure the Beaglebone black as an USB Audio device (UAC2).

I've come to the same conclusion (as a plan). I am going to use 4 CS4270 chips and some sort of FPGA or microcontroller to interface the chips to the PC. My problem is that there doesn't seem to be much information on which boards support UAC1, UAC2, isochronous transfers, or USB communication in general...
 

Offline thinlayer

  • Contributor
  • Posts: 35
Re: Implementing USB Audio / HID
« Reply #24 on: July 09, 2013, 01:58:46 pm »
USB on FPGA can be a huge pain in the arse. Suggest an external MCU for the USB, something with a nice canned USB (pref USB Audio) then a parallel or other interface to FPGA.

Have you looked at PSOC. I'm sure there is a USB Audio block in PSOC Creator or app note about it somewhere. I'm pretty sure there is a reference design too, but it's mono with low bitrate.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf