AudioLoop illustrates how to use IOCTLs to control the routing functions of the AC97 audio codec.
This particular example loops the microphone inputs of the BitsyX (and similar products) out to the speakers.
(Although this application does not involve an AM radio, it may remind U.S. customers of a product sold in the late 1970s called Mr. Microphone. )
The Codec Archtecture and Datasheet Interested parties can download the datasheet for the CS4202 codec (PDF 1.2MB) to see how this app works. The analog multiplexers are organized as follows:
Source: Crystal CS4202 codec data sheet, May 2002 (PDF)
Audio signal routing is described in section 2.4 The codec registers are described in chapter 4.