I've got a StarTech 7.1 USB audio device which currently retails for about £20-35 and uses the CM6206 chipset. It claims it can handle 48K but I haven't been able to get it to reliably operate under JACK at anything above 44.1Khz nor have I got JACK playback and capture to work without xruns at less than 512 frames/period and 3 periods/buffer so latency isn't too hot, at 32ms. Additionally, beware that this device features physical volume controls but they only operate under Windows (and I presume OSX too) after you've installed the driver for it. It worked with JACK with the L and R mic input sockets out of the box but I had to do a fair bit of reading and emailing before I discovered how to record from the SPDIF input instead of the mic.
In addition to separate L and R mic inputs, the Startech 7.1 also features line in and SPDIF input. What threw me initially is that I was expecting to see separate JACK capture ports for the mic, line and SPDIF inputs but thats not how this and supposedly many similar devices work. Instead, you will only ever seen one pair of stereo inputs in JACK and you must use either a mixer app that supports adjusting the PCM capture source - unlike alsamixer or GNOME-alsamixer - or use the amixer command to select the desired input. My fave ALSA mixer is qasmixer and I know that at least both that and kmix have the ability to modify the 'PCM capture source' setting of attached devices although this option is not shown by default under kmix so you may need to add that control in and make sure the recording options are un-hidden under qasmixer or you could miss it.
I'm not going to go into detail here on how to use a graphical or TUI mixer here to record S/PDIF because if you're using a suitable mixer app its simply a case of finding the PCM capture source setting and selecting IEC958 - just be aware not all mixers let you do this. Instead, this mini-HOWTO intends document how to achieve the same from the command line with little other than the standard ALSA tools installed as the below method should work in every situation.
If you're still reading then the first thing you need to know is ALSA's name for your device:
Code: Select all
aplay -l
To see the ALSA controls available for this device:
Code: Select all
amixer -c Device scontrols
Code: Select all
amixer -c Device get 'PCM Capture Source'
Code: Select all
amixer -c Device set 'PCM Capture Source' 'IEC958 In'