Of course the first thing I wanted to do was to connect the audio directly to the mike jack on the rig, with a simple attenuator to bring the signal down to the much lower level that the mike circuit expects. I used an old small Ethernet transceiver which had an RJ-45 jack in it, and wired it so I could plug it into the rig, and plug the mike into it. A simple SPST switch would let me choose between the line input and the mike.
I was in for a surprise. The audio worked but none of the mike functions worked! The rig is an IC-2100, with the new style HM-133S mike. I was hoping to be able to key the rig with the mike, and to set it to "one push - PTT on, one push off" which is very convenient for longer transmissions, and I think it's only settable using the mike buttons. No go, the whole mike was dead as a doornail.
Icom seems to guard the schematics of some of their stuff as if they were nuclear secrets; but I finally found a diagram of an older HM-98, and the mystery was solved. Both mikes use microprocessors to generate all of the control signals as a stream of multiplexed serial data that are sent to the rig on pin 8 of the modular connector (this pin is not used by older mikes/rigs). That I knew.
But another twist is that the circuit uses one of the DTB123EK "transistors", along with a driver transistor, to essentially turn on and off the power to the whole circuit depending on what it sees on pin 6, mike-to-rig. The rig places about 8 V on that pin to provide this "enable" of the whole circuit in newer models.
When my original simple switch was moved to line in, the connection between pins 6 on the rig and in the mike was severed and the mike would completely shut off - no backlighting, none of the buttons including PTT worked.
To solve this, I used a DPST switch instead, and wired it so that when line in audio was selected, the second part of the switch took around 8 V via a voltage divider from rig's pin 1 (which normally has about 8.8 V) and sent it to pin 6 going to the mike. This provided the necessary "turn on" signal and the mike came back to life. So my HM-133 must be similar to the HM-98 in this regard.
Things are sometimes not as simple as they seem, esp. with the newer gadgets. I have no idea whether any other gear uses a similar arrangement, or whether the above applies only to the newer Icoms, but I thought I'd write it up to save others some head-scratching. The box I made has been working fine, with no apparent ill effects on the mike or the rig, but as usual - I can't guarantee that it does not fry your gear! Here is the diagram in PDF.