Support for emulated CM108 sound cards (e.g. AIOC)


I’ve been spending some time working on getting Allstar working with the AIOC processor. This emulates a CM108 HID device (/dev/hidraw0) and is supported in software such as DireWorlf for PTT keying using the CM108 GPIO method.

Along with the popularity of the AIOC GitHub - skuep/AIOC: Ham Radio All-in-one-Cable I am also using this chipset in my Universal Radio Controller (see Introducing the Universal Radio Controller V2 – G1LRO HOMEPAGE). I think we can achieve the support needed for Allstar using DSP squelch but cannot get the PTT working from the emulated CM108.

It appears that the usbradio code is hardwired to recognise the original CM108 device:

ID 0d8c:000c C-Media Electronics, Inc. Audio Adapter

And doesn’t look for the presence of hidraw0 unix device.

The CM108 is now an old chip and may not be around for ever so it would be prudent to support other or clone devices to ensure that users will be able to continue to build Allstar nodes,

My ask here is to have a 3rd USB hardware type in usbradio.conf hdwtype=2 that uses the same CM108 code but does not do the hard check for the exact presence of the C-Media device in the USB device list, maybe just goes directly to the hidraw0 device.

Or perhaps there is a better workaround? I’ve looked at alsaradio which does solve the PTT problem as the AIOC can use serial port DTR PTT emulation, but this is at the expense of the DSP squelch feature in usbradio. Perhaps there is a way to combine both?

I’d be happy to collaborate on the development with testing and hardware resources.


Mark G1LRO

While the sound part of this stuff is past me for most of it,

As far as I know, the cm108 is all that the software is intended for.
Part of that I think has to do with the addresses for makeshift io used for ptt/cos/gpio.
It might be hard to write a bunch of code for many sound fob’s.

So, you might be looking at modifying modules to make what you want and re-compiling.

Also know that not all those packaged as cm108’s are equal. Over the years, this has created some issues I think.

But it would be great to have some other options. Even though I know it may create confusion with users if it is not well documented.

Perhaps someone with deeper insight will speak to it.

Hi Mark,

Looks like a couple of nice products you have there, particularly the small URI that plugs directly into a K1 jack. This could be very popular for use with AllStar, enabling a simple node to be built with a small inexpensive URI with no mods needed. However, because HTs don’t have a discriminator (“flat” unfiltered audio) output, as far as I know, usbradio DSP mode will not work for squelch ie. carrier detect. That’s not really an issue though because usbradio also has a vox mode that works well (not perfectly in all cases but generally pretty well), or HTs such as a Retevis RT85 and similar TYT / Baofeng / etc. models can be modified in about 5 minutes to bring COS to the 2.5mm jack Ring. See this guide for more details on all of the above: AllScan - How To - Build a High-Quality Full-Duplex AllStar Node for Under $150

If the AIOC does a good emulation of the CM1xx, supporting the same PTT and COS I/Os, and if your board can accommodate a COS input (ideally active high but active low would be OK too), and the usbradio code needs only to accept a different device string, this should be easy to do. I could probably get that going in an hour or so if I had the module here to test with. At that point once it had been a bit more thoroughly tested I could also do a pull request to add to the ASL github repo. Email me through my above website if you have any questions. Thanks, David NR9V

Hi David. The AIOC has an incomplete implementation of the CM108, is so far that it supports the PTT GPIO function, but not anything in the other direction for COS.

So in this case we would have to rely on the DSP capability of the usbradio to detect the change from a no-carrier hiss to the quieter carrier situation. I’m assuming that’s how the DSP feature works and CTCSS doesn’t make it through from the radio. This would also mean it would work with any radio.

Another factor I haven’t got to yet is whether a generic soundcard is supported i.e. one not called the name of the CM108, as the AIOC identifies itself as something like ‘AIOC Soundcard’.

If you think these two things are achievable then I’ll contact you about getting an AIOC across for your research.

Let me know what you think. 73 Mark G1LRO

The usbradio carrierfrom=dsp mode as far as I know, and which I have confirmed in testing, will not work for detecting carrier from a bandlimited “speaker” output. It requires “flat” unfiltered audio ie. full frequency response range out to ~20KHz, which newer HTs are unable to provide (due to using single-chip transceiver ICs that do not have an FM discriminator unfiltered audio output). The carrierfrom=vox mode does work with speaker audio though, and will detect the presence of even ~1mV of background noise, which works well in full-duplex nodes where there is some speaker to mic coupling on (cross-band full-duplex) user radios and thus slightly higher background noise levels, though it’s not as ideal in situations that don’t have much background noise or with users who have quieter audio or who often make long pauses when talking. Therefore for use with HTs a COS line is generally much better. For your initial purposes though vox mode will work fine, you can then ideally add COS support to the AIOC when you have time, and setting up chan_usbradio.c to accept other device strings should require only a few lines of code to be changed.

Hopefully the AIOC also supports all the CM1xx mixer settings, as those are a great feature of the C-Media chips, that support a wide range of audio I/O levels without extra trim pots or op-amps needed.

I’ve dropped you an email Dave to your address.

FYI to anyone looking for an inexpensive open-source alternative to C-Media CM1xx URIs, the AIOC works well and looks like a great longer-term platform as more features are added and as the (discontinued) CM1xx/A/AH chips become harder to find (leaving only CM1xxB’s which have reduced performance specs). For more details see my demo video of the AIOC running with ASL 2.0:

1 Like

I have confirmed this method using AIOC firmware version 1.3 rc1 and modifying the chan_usbradio module to have the correct vendor and product id for the AIOC
Brett VK4BEM

Hi Bret @VK3MP
I’m looking to pull together a collaboration on getting the AIOC working on SimpleUSB using the V1.3 AIOC firmware.
I figure setting the correct USB ID’s and using the software COS that Simon has added into the firmware can provide a complete (if a little sub-optimal) node config for any unmodified radio. The SimpleUSB is a much easier experience for most users so would be good to stay with that.
Are you interested in helping to pull a little project together and do you know any other folks with appropriate experience that could help?
73 Mark

Sure, happy to collab.

Success! Here’s my node operating on the Universal Radio Controller that uses the AIOC processor.

This item has been successfully completed and documented on my blog post here: Making an AllStarLink Node with the URC/AIOC – G1LRO HOMEPAGE

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.