3 onboard, 5 in the sound card, and 2 in the front panel. No, it does not support 7.1 channels, only the sound card that supports 5.1. I don't have Ubuntu installed at the moment, so I hope the other people post it instead.

Confusing. I don't see what rear jacks have to do with this, but they are connected correctly to the motherboard, the same for the front panel (which the bug title specifies as the one with problem). I don't see how your links are relevant, since I neither want 6-channel audio nor multi-streaming playback.

As I already have said, I'm not able to post the output of that script any soon, if it's ever available in Ubuntu (and I don't feel quite excited to try out the schizophrenic innovations Ubuntu has been introducing). Also, as I said, it works just fine under Windows.

How to identify your front panel audio solution codec
To identify your front panel audio solution’s audio codec, refer to the specifications or documentation for your PC chassis or front panel module. Note that AC’97 and Intel® HD Audio front panel solutions are different and may
not be directly compatible or interchangeable.

You can also physically check the audio cable of the front panel audio solution. If there is a cable connected to Pin 4, you have an Intel® HD Audio module; if there is no cable to Pin 4, you have an AC97 module.

1.7 Audio Subsystem Product Description
The onboard audio subsystem consists of the following:
• Intel 82801GB ICH7 • Analog Devices ADI1988A (or Sigmatel STAC9227) audio codec
• Back panel audio connectors
• Component-side audio headers
The audio subsystem supports the following features:
• Advanced jack sense for the back panel audio jacks that enables the audio codec to recognize the device that is connected to an audio port. Within hardware constraints, the back panel audio jacks are capable of retasking according to the user’s definition, or can be automatically switched depending on the recognized device type.
• Stereo input and output for all back panel jacks
• Line out and Mic in functions for front panel audio jacks

if pin cap support impsense, this mean the driver may retask the rear mic jack automatically by measure the impedance since mic has higher impedance

Pincap 0x0000173f: IN OUT HP Detect Trigger ImpSense

refer to 9227 datasheet

3.2. 3.3. Impedance Sense
Impedance Sense is accomplished by on-chip circuitry that measures the impedance at the pin of the chip and compares it to internal reference impedance.
Below is a table that contains the bin information and codes returned when the pin widget impedance field in the Port Pin Sense widget is read.
Please note that even under the best conditions, there is no method to guarantee 100% impedance sensing due to variations in external circuitry and impedance overlap of devices that can be plugged into a jack.
The impedance sense table reflects both standard Line Out and Headphone output drivers.
Please reference the HD Audio Universal Jack Application Note on the SigmaTel Extranet for more information.