Below is some cute code that I wrote for the OLPC Openfirmware HD Audio driver.
The firmware is allowed to hard-code knowledge of the physical design of the laptop and motherboard. This firmware code tells the audio chip explicit details such as the size and colour of each physical audio jack in the laptop. The operating system can later query the chip for this information and present it to a user, for example in an audio mixer application.
porta config( 1/8" green left hp-out jack )config
porta config( 1/8" green left hp-out jack )config
portb config( 1/8" pink left mic-in jack )config
portc config( builtin internal top mic-in no-detect other-analog )config
portd config( unused line-out no-detect )config