Linux gaming: switching video and sound

I use my Linux box with a long cable to play games on my TV. When I plug in the TV I want to change resolutions and change sound output devices for the TV. (The display is mirrored from my desktop). This is the kind of thing I d only do manually in Windows but in [ ]