You can detect the output of the local oscillator used in the tuner. The frequency the LO is set to depends on what channel you're watching.

Is that the same for digital?