I had the same problem on my Macbook Pro 6,1 running 10.6.8
I don't use the Digital Output so decided to disable it in the driver.
Here's what I did: (proceed at your own risk !)
Open a Finder window, navigate to /System/Library/Extensions
ctrl-click AppleHDA.kext and select Show Package Contents
Open Contents folder
Open PlugIns folder
ctrl-click AppleHDAHardwareConfigDriver.kext and select Show Package Contents
Copy Info.plist to the Desktop
On the Desktop make another copy and rename it Infooriginal.plist .
Open Info.plist with Property List Editor (if installed)
If you don't have it, open with Pref Setter from:
http://www.nightproductions.net/prefsetter.html
Click the triangle to the left of IOKitPersonalities
Click the triangle to the left of HDA Hardware Config Resource
Click the triangle to the left of HDAConfigDefault
Click the triangle to the left of Item 3 (using Pref Setter)
or Item 2 (using Property List Editor)
You're in the correct place if it says Codec - Cirrus Logic CS4206
Opposite ConfigData, click the (Data Item) in Pref Setter
After the first 32 figures enter 00 87 d0 00
ie 00172000001721000017226B00172300 < here
cmd-S to save the changes, then drag or paste the Info.plist from the Desktop to the Contents folder in AppleHDAHardwareConfigDriver.kext
Select Replace and enter your password when prompted.
After a Restart the Digital Output is no longer an option in Sound Preferences which prevents the Internal Speakers from being disabled when the headphone jack is removed.
I don't know how to re-enable the Digital Output which isn't an issue for me but if you may want to use it in the future, you should research that before attempting this procedure.
Credits to Henry Wong at:
http://www.stuffedcow.net/macbook_audio