Here is a tvout which turns off internal speakers and enables again if tvout turns off. Thanks BooBoo for the new gpio documentation Binary and source included.