I am running Ubuntu 12.04 LTS on a lenovo T60 laptop.

I wanted to add a headset and mic to the default built in the laptop.

I did manage to get it working but now, if I remove the heaset microphone from the laptop's jack the laptop starts a high-pitched constant squeal.

How can I stop the squeal and still be able to use the mic/headphones?

I had been in the terminal - currently:
robert@robert:~$ cat /proc/asound/card0/codec#* | grep Codec
Codec: Analog Devices AD1981

robert@robert:~$ arecord -L
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=Intel
HDA Intel, AD198x Analog
Default Audio Device
front:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Front speakers
surround40:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
4.0 Surround output to Front and Rear speakers
surround41:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
dmix:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Direct sample mixing device
dsnoop:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Direct sample snooping device
hw:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Direct hardware device without any conversions
plughw:CARD=Intel,DEV=0
HDA Intel, AD198x Analog
Hardware device with all software conversions


Thanks in advance