tdm_output: set the layer_info of the target buffer only when the mode is set.