Learning how to interface with USB devs

Derek VerLee dlverlee at mtu.edu
Mon Oct 6 01:57:53 UTC 2008


Hello, 
I'm a little new hardware level programming, but I'm looking to learn.

Here's what I am trying to do: I have a usb audio device, Turtle Beach
Audio Advantage Micro, chip is C-MEDIA CM102.  It has audio out analog
and a digital spdif option (but only one or the other at a time).  I
need to use the spdif.  Instead of buying something else that is
already supported, i did a little digging and it doesn't appear to be
very difficult to toggle the spdif on and off.

Someone has already done the usb driver snooping for me:
http://sandeen.net/tbaam/index.html

From reading the header files and code in the source tree I have gotten
as far as the attached file.  My goal with this program is to see if it
works and to learn to use the bus.  It would also be sufficient for my
needs to have a command line program to simply turn on spdif since I
will not need to switch back and forth.  

As I get time, I will try to learn more and eventually submit a patch
to make this work for others (I think it would be a mixer switch).

However for now can someone give me a pointer on where to go from
here?  Perhaps a good example code or document I may have missed.  I am
in paticular not sure how to address the device properly, and whether I
want to use USB_REQUEST or something else.

Thanks in advance.

_derek


More information about the freebsd-usb mailing list