xref: /haiku/src/add-ons/accelerants/radeon/theatre_out.c (revision 758b1d0e05fe1042cce6e00d194a147802d4f9be)
1e02e12deSAxel Dörfler /*
2e02e12deSAxel Dörfler 	Copyright (c) 2002/03, Thomas Kurschel
3e02e12deSAxel Dörfler 
4e02e12deSAxel Dörfler 
5e02e12deSAxel Dörfler 	Part of Radeon accelerant
6e02e12deSAxel Dörfler 
7e02e12deSAxel Dörfler 	Programming of TV-out via Rage Theatre
8e02e12deSAxel Dörfler */
9e02e12deSAxel Dörfler 
10e02e12deSAxel Dörfler 
11e02e12deSAxel Dörfler #include "radeon_interface.h"
12e02e12deSAxel Dörfler #include "radeon_accelerant.h"
13e02e12deSAxel Dörfler 
14e02e12deSAxel Dörfler #include "theatre_regs.h"
15e02e12deSAxel Dörfler #include "tv_out_regs.h"
16e02e12deSAxel Dörfler #include "set_mode.h"
17e02e12deSAxel Dörfler 
18e02e12deSAxel Dörfler #include <stdlib.h>
19e02e12deSAxel Dörfler 
20e02e12deSAxel Dörfler 
21e02e12deSAxel Dörfler // mapping of offset in impactv_regs to register address
22e02e12deSAxel Dörfler typedef struct register_mapping {
23e02e12deSAxel Dörfler 	uint16		address;			// register address
24e02e12deSAxel Dörfler 	uint16		offset;				// offset in impactv_regs
25e02e12deSAxel Dörfler } register_mapping;
26e02e12deSAxel Dörfler 
27e02e12deSAxel Dörfler 
28e02e12deSAxel Dörfler // Rage Theatre TV-Out:
29e02e12deSAxel Dörfler 
30e02e12deSAxel Dörfler // registers to write at first
31e02e12deSAxel Dörfler static const register_mapping theatre_reg_mapping_start[] = {
32e02e12deSAxel Dörfler 	{ THEATRE_VIP_MASTER_CNTL,		offsetof( impactv_regs, tv_master_cntl ) },
33e02e12deSAxel Dörfler 	{ THEATRE_VIP_TVO_DATA_DELAY_A,	offsetof( impactv_regs, tv_data_delay_a ) },
34e02e12deSAxel Dörfler 	{ THEATRE_VIP_TVO_DATA_DELAY_B,	offsetof( impactv_regs, tv_data_delay_b ) },
35e02e12deSAxel Dörfler 
36e02e12deSAxel Dörfler 	{ THEATRE_VIP_CLKOUT_CNTL,		offsetof( impactv_regs, tv_clkout_cntl ) },
37e02e12deSAxel Dörfler 	{ THEATRE_VIP_PLL_CNTL0,		offsetof( impactv_regs, tv_pll_cntl1 ) },
38e02e12deSAxel Dörfler 
39e02e12deSAxel Dörfler 	{ THEATRE_VIP_HRESTART,			offsetof( impactv_regs, tv_hrestart ) },
40e02e12deSAxel Dörfler 	{ THEATRE_VIP_VRESTART,			offsetof( impactv_regs, tv_vrestart ) },
41e02e12deSAxel Dörfler 	{ THEATRE_VIP_FRESTART,			offsetof( impactv_regs, tv_frestart ) },
42e02e12deSAxel Dörfler 	{ THEATRE_VIP_FTOTAL,			offsetof( impactv_regs, tv_ftotal ) },
43e02e12deSAxel Dörfler 
44e02e12deSAxel Dörfler 	{ THEATRE_VIP_CLOCK_SEL_CNTL, 	offsetof( impactv_regs, tv_clock_sel_cntl ) },
45e02e12deSAxel Dörfler 	{ THEATRE_VIP_TV_PLL_CNTL,		offsetof( impactv_regs, tv_tv_pll_cntl ) },
46e02e12deSAxel Dörfler 	{ THEATRE_VIP_CRT_PLL_CNTL,		offsetof( impactv_regs, tv_crt_pll_cntl ) },
47e02e12deSAxel Dörfler 
48e02e12deSAxel Dörfler 	{ THEATRE_VIP_HTOTAL,			offsetof( impactv_regs, tv_htotal ) },
49e02e12deSAxel Dörfler 	{ THEATRE_VIP_HSIZE,			offsetof( impactv_regs, tv_hsize ) },
50e02e12deSAxel Dörfler 	{ THEATRE_VIP_HDISP,			offsetof( impactv_regs, tv_hdisp ) },
51e02e12deSAxel Dörfler 	{ THEATRE_VIP_HSTART,			offsetof( impactv_regs, tv_hstart ) },
52e02e12deSAxel Dörfler 	{ THEATRE_VIP_VTOTAL,			offsetof( impactv_regs, tv_vtotal ) },
53e02e12deSAxel Dörfler 	{ THEATRE_VIP_VDISP,			offsetof( impactv_regs, tv_vdisp ) },
54e02e12deSAxel Dörfler 
55e02e12deSAxel Dörfler 	{ THEATRE_VIP_TIMING_CNTL,		offsetof( impactv_regs, tv_timing_cntl ) },
56e02e12deSAxel Dörfler 
57e02e12deSAxel Dörfler 	{ THEATRE_VIP_VSCALER_CNTL,		offsetof( impactv_regs, tv_vscaler_cntl1 ) },
58e02e12deSAxel Dörfler 	{ THEATRE_VIP_VSCALER_CNTL2,	offsetof( impactv_regs, tv_vscaler_cntl2 ) },
59e02e12deSAxel Dörfler 	{ THEATRE_VIP_SYNC_SIZE,		offsetof( impactv_regs, tv_sync_size ) },
60e02e12deSAxel Dörfler 	{ THEATRE_VIP_Y_SAW_TOOTH_CNTL, offsetof( impactv_regs, tv_y_saw_tooth_cntl ) },
61e02e12deSAxel Dörfler 	{ THEATRE_VIP_Y_RISE_CNTL,		offsetof( impactv_regs, tv_y_rise_cntl ) },
62e02e12deSAxel Dörfler 	{ THEATRE_VIP_Y_FALL_CNTL,		offsetof( impactv_regs, tv_y_fall_cntl ) },
63e02e12deSAxel Dörfler 
64e02e12deSAxel Dörfler 	{ THEATRE_VIP_MODULATOR_CNTL1,	offsetof( impactv_regs, tv_modulator_cntl1 ) },
65e02e12deSAxel Dörfler 	{ THEATRE_VIP_MODULATOR_CNTL2,	offsetof( impactv_regs, tv_modulator_cntl2 ) },
66e02e12deSAxel Dörfler 
67e02e12deSAxel Dörfler 	{ THEATRE_VIP_RGB_CNTL,			offsetof( impactv_regs, tv_rgb_cntl ) },
68e02e12deSAxel Dörfler 
69e02e12deSAxel Dörfler 	{ THEATRE_VIP_UV_ADR,			offsetof( impactv_regs, tv_uv_adr ) },
70e02e12deSAxel Dörfler 
71e02e12deSAxel Dörfler 	{ THEATRE_VIP_PRE_DAC_MUX_CNTL, offsetof( impactv_regs, tv_pre_dac_mux_cntl ) },
72e02e12deSAxel Dörfler 	{ THEATRE_VIP_FRAME_LOCK_CNTL,	offsetof( impactv_regs, tv_frame_lock_cntl ) },
73e02e12deSAxel Dörfler 	{ THEATRE_VIP_CRC_CNTL,			offsetof( impactv_regs, tv_crc_cntl ) },
74e02e12deSAxel Dörfler 	{ 0, 0 }
75e02e12deSAxel Dörfler };
76e02e12deSAxel Dörfler 
77e02e12deSAxel Dörfler // registers to write when things settled down
78e02e12deSAxel Dörfler static const register_mapping theatre_reg_mapping_finish[] = {
79e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF0_0,	offsetof( impactv_regs, tv_upsample_filter_coeff[0*3+0] ) },
80e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF0_1,	offsetof( impactv_regs, tv_upsample_filter_coeff[0*3+1] ) },
81e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF0_2,	offsetof( impactv_regs, tv_upsample_filter_coeff[0*3+2] ) },
82e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF1_0,	offsetof( impactv_regs, tv_upsample_filter_coeff[1*3+0] ) },
83e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF1_1,	offsetof( impactv_regs, tv_upsample_filter_coeff[1*3+1] ) },
84e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF1_2,	offsetof( impactv_regs, tv_upsample_filter_coeff[1*3+2] ) },
85e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF2_0,	offsetof( impactv_regs, tv_upsample_filter_coeff[2*3+0] ) },
86e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF2_1,	offsetof( impactv_regs, tv_upsample_filter_coeff[2*3+1] ) },
87e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF2_2,	offsetof( impactv_regs, tv_upsample_filter_coeff[2*3+2] ) },
88e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF3_0,	offsetof( impactv_regs, tv_upsample_filter_coeff[3*3+0] ) },
89e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF3_1,	offsetof( impactv_regs, tv_upsample_filter_coeff[3*3+1] ) },
90e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF3_2,	offsetof( impactv_regs, tv_upsample_filter_coeff[3*3+2] ) },
91e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF4_0,	offsetof( impactv_regs, tv_upsample_filter_coeff[4*3+0] ) },
92e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF4_1,	offsetof( impactv_regs, tv_upsample_filter_coeff[4*3+1] ) },
93e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_COEFF4_2,	offsetof( impactv_regs, tv_upsample_filter_coeff[4*3+2] ) },
94e02e12deSAxel Dörfler 
95e02e12deSAxel Dörfler 	{ THEATRE_VIP_GAIN_LIMIT_SETTINGS,  offsetof( impactv_regs, tv_gain_limit_settings ) },
96e02e12deSAxel Dörfler 	{ THEATRE_VIP_LINEAR_GAIN_SETTINGS, offsetof( impactv_regs, tv_linear_gain_settings ) },
97e02e12deSAxel Dörfler 	{ THEATRE_VIP_UPSAMP_AND_GAIN_CNTL, offsetof( impactv_regs, tv_upsamp_and_gain_cntl ) },
98e02e12deSAxel Dörfler 
99e02e12deSAxel Dörfler 	{ THEATRE_VIP_TV_DAC_CNTL,		offsetof( impactv_regs, tv_dac_cntl ) },
100e02e12deSAxel Dörfler 	{ THEATRE_VIP_MASTER_CNTL,		offsetof( impactv_regs, tv_master_cntl ) },
101e02e12deSAxel Dörfler 	{ 0, 0 }
102e02e12deSAxel Dörfler };
103e02e12deSAxel Dörfler 
104e02e12deSAxel Dörfler 
105e02e12deSAxel Dörfler // write list of Rage Theatre registers
writeTheatreRegList(accelerator_info * ai,impactv_regs * values,const register_mapping * mapping)106e02e12deSAxel Dörfler static void writeTheatreRegList(
107e02e12deSAxel Dörfler 	accelerator_info *ai, impactv_regs *values, const register_mapping *mapping )
108e02e12deSAxel Dörfler {
109e02e12deSAxel Dörfler 	for( ; mapping->address != 0 || mapping->offset != 0; ++mapping ) {
110e02e12deSAxel Dörfler 		Radeon_VIPWrite( ai, ai->si->theatre_channel, mapping->address,
111e02e12deSAxel Dörfler 			*(uint32 *)((char *)(values) + mapping->offset) );
112e02e12deSAxel Dörfler 
113e02e12deSAxel Dörfler /*		SHOW_FLOW( 2, "%x=%x", mapping->address,
114e02e12deSAxel Dörfler 			*(uint32 *)((char *)(values) + mapping->offset) );*/
115e02e12deSAxel Dörfler 	}
116e02e12deSAxel Dörfler }
117e02e12deSAxel Dörfler 
118e02e12deSAxel Dörfler 
119e02e12deSAxel Dörfler // read timing FIFO
Radeon_TheatreReadFIFO(accelerator_info * ai,uint16 addr)120e02e12deSAxel Dörfler uint32 Radeon_TheatreReadFIFO(
121e02e12deSAxel Dörfler 	accelerator_info *ai, uint16 addr )
122e02e12deSAxel Dörfler {
123e02e12deSAxel Dörfler 	bigtime_t start_time;
124e02e12deSAxel Dörfler 	uint32 res = ~0;
125e02e12deSAxel Dörfler 
126e02e12deSAxel Dörfler 	//SHOW_FLOW( 2, "addr=%d", addr );
127e02e12deSAxel Dörfler 
128e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel,
129e02e12deSAxel Dörfler 		THEATRE_VIP_HOST_RD_WT_CNTL, addr | RADEON_TV_HOST_RD_WT_CNTL_RD );
130e02e12deSAxel Dörfler 
131e02e12deSAxel Dörfler 	start_time = system_time();
132e02e12deSAxel Dörfler 
133e02e12deSAxel Dörfler 	do {
134e02e12deSAxel Dörfler 		uint32 status;
135e02e12deSAxel Dörfler 
136e02e12deSAxel Dörfler 		Radeon_VIPRead( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_RD_WT_CNTL, &status );
137e02e12deSAxel Dörfler 
138e02e12deSAxel Dörfler 		if( (status & RADEON_TV_HOST_RD_WT_CNTL_RD_ACK) != 0 )
139e02e12deSAxel Dörfler 			break;
140e02e12deSAxel Dörfler 	} while( system_time() - start_time < 2000000 );
141e02e12deSAxel Dörfler 
142e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_RD_WT_CNTL, 0);
143e02e12deSAxel Dörfler 	Radeon_VIPRead( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_READ_DATA, &res );
144e02e12deSAxel Dörfler 
145e02e12deSAxel Dörfler 	return res;
146e02e12deSAxel Dörfler }
147e02e12deSAxel Dörfler 
148e02e12deSAxel Dörfler 
149e02e12deSAxel Dörfler // write to timing FIFO
Radeon_TheatreWriteFIFO(accelerator_info * ai,uint16 addr,uint32 value)150e02e12deSAxel Dörfler void Radeon_TheatreWriteFIFO(
151e02e12deSAxel Dörfler 	accelerator_info *ai, uint16 addr, uint32 value )
152e02e12deSAxel Dörfler {
153e02e12deSAxel Dörfler 	bigtime_t start_time;
154e02e12deSAxel Dörfler 
155e02e12deSAxel Dörfler 	//readFIFO( ai, addr, internal_encoder );
156e02e12deSAxel Dörfler 
157e02e12deSAxel Dörfler 	//SHOW_FLOW( 2, "addr=%d, value=%x %x", addr, value >> 14, value & 0x3fff );
158e02e12deSAxel Dörfler 
159e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_WRITE_DATA, value);
160e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel,
161e02e12deSAxel Dörfler 		THEATRE_VIP_HOST_RD_WT_CNTL, addr | RADEON_TV_HOST_RD_WT_CNTL_WT);
162e02e12deSAxel Dörfler 
163e02e12deSAxel Dörfler 	start_time = system_time();
164e02e12deSAxel Dörfler 
165e02e12deSAxel Dörfler 	do {
166e02e12deSAxel Dörfler 		uint32 status;
167e02e12deSAxel Dörfler 
168e02e12deSAxel Dörfler 		Radeon_VIPRead( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_RD_WT_CNTL, &status );
169e02e12deSAxel Dörfler 
170e02e12deSAxel Dörfler 		if( (status & RADEON_TV_HOST_RD_WT_CNTL_WT_ACK) != 0 )
171e02e12deSAxel Dörfler 			break;
172e02e12deSAxel Dörfler 	} while( system_time() - start_time < 2000000 );
173e02e12deSAxel Dörfler 
174e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel, THEATRE_VIP_HOST_RD_WT_CNTL, 0 );
175e02e12deSAxel Dörfler }
176e02e12deSAxel Dörfler 
177e02e12deSAxel Dörfler 
178e02e12deSAxel Dörfler // program TV-Out registers
Radeon_TheatreProgramTVRegisters(accelerator_info * ai,impactv_regs * values)179e02e12deSAxel Dörfler void Radeon_TheatreProgramTVRegisters(
180e02e12deSAxel Dörfler 	accelerator_info *ai, impactv_regs *values )
181e02e12deSAxel Dörfler {
182e02e12deSAxel Dörfler 	uint32 orig_tv_master_cntl = values->tv_master_cntl;
183e02e12deSAxel Dörfler 
184e02e12deSAxel Dörfler 	SHOW_FLOW0( 2, "" );
185e02e12deSAxel Dörfler 
186e02e12deSAxel Dörfler 	// disable TV-out when registers are setup
187e02e12deSAxel Dörfler 	// it gets enabled again when things have settled down
188e02e12deSAxel Dörfler 	values->tv_master_cntl |=
189e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_TV_ASYNC_RST |
190e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_CRT_ASYNC_RST |
191e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_TV_FIFO_ASYNC_RST |
192e02e12deSAxel Dörfler 
193e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_VIN_ASYNC_RST |
194e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_AUD_ASYNC_RST |
195e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_DVS_ASYNC_RST;
196e02e12deSAxel Dörfler 
197e02e12deSAxel Dörfler 	writeTheatreRegList( ai, values, theatre_reg_mapping_start );
198e02e12deSAxel Dörfler 
199e02e12deSAxel Dörfler 	// un-reset FIFO to access timing table
200e02e12deSAxel Dörfler 	Radeon_VIPWrite( ai, ai->si->theatre_channel, THEATRE_VIP_MASTER_CNTL,
201e02e12deSAxel Dörfler 		orig_tv_master_cntl |
202e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_TV_ASYNC_RST |
203e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_CRT_ASYNC_RST |
204e02e12deSAxel Dörfler 
205e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_VIN_ASYNC_RST |
206e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_AUD_ASYNC_RST |
207e02e12deSAxel Dörfler 		RADEON_TV_MASTER_CNTL_DVS_ASYNC_RST );
208e02e12deSAxel Dörfler 
209e02e12deSAxel Dörfler 	Radeon_ImpacTVwriteHorTimingTable( ai, Radeon_TheatreWriteFIFO, values, false );
210e02e12deSAxel Dörfler 	Radeon_ImpacTVwriteVertTimingTable( ai, Radeon_TheatreWriteFIFO, values );
211e02e12deSAxel Dörfler 
212e02e12deSAxel Dörfler 	snooze( 50000 );
213e02e12deSAxel Dörfler 
214e02e12deSAxel Dörfler 	values->tv_master_cntl = orig_tv_master_cntl;
215e02e12deSAxel Dörfler 	writeTheatreRegList( ai, values, theatre_reg_mapping_finish );
216e02e12deSAxel Dörfler }
217e02e12deSAxel Dörfler 
218e02e12deSAxel Dörfler 
219e02e12deSAxel Dörfler // read list of Rage Theatre registers
readTheatreRegList(accelerator_info * ai,impactv_regs * values,const register_mapping * mapping)220e02e12deSAxel Dörfler static void readTheatreRegList(
221e02e12deSAxel Dörfler 	accelerator_info *ai, impactv_regs *values, const register_mapping *mapping )
222e02e12deSAxel Dörfler {
223e02e12deSAxel Dörfler 	for( ; mapping->address != 0 || mapping->offset != 0; ++mapping ) {
224e02e12deSAxel Dörfler 		Radeon_VIPRead( ai, ai->si->theatre_channel, mapping->address,
225e02e12deSAxel Dörfler 			(uint32 *)((char *)(values) + mapping->offset) );
226e02e12deSAxel Dörfler 
227e02e12deSAxel Dörfler 		/*SHOW_FLOW( 2, "%x=%x", mapping->address,
228e02e12deSAxel Dörfler 			*(uint32 *)((char *)(values) + mapping->offset) );*/
229e02e12deSAxel Dörfler 	}
230e02e12deSAxel Dörfler 
231e02e12deSAxel Dörfler 	//snooze( 1000000 );
232e02e12deSAxel Dörfler }
233e02e12deSAxel Dörfler 
234e02e12deSAxel Dörfler 
235e02e12deSAxel Dörfler // read TV-Out registers
Radeon_TheatreReadTVRegisters(accelerator_info * ai,impactv_regs * values)236e02e12deSAxel Dörfler void Radeon_TheatreReadTVRegisters(
237e02e12deSAxel Dörfler 	accelerator_info *ai, impactv_regs *values )
238e02e12deSAxel Dörfler {
239e02e12deSAxel Dörfler 	readTheatreRegList( ai, values, theatre_reg_mapping_start );
240e02e12deSAxel Dörfler 	readTheatreRegList( ai, values, theatre_reg_mapping_finish );
241e02e12deSAxel Dörfler 
242e02e12deSAxel Dörfler 	//snooze( 1000000 );
243e02e12deSAxel Dörfler }
244e02e12deSAxel Dörfler 
245e02e12deSAxel Dörfler 
246e02e12deSAxel Dörfler // detect TV-Out encoder
Radeon_DetectTVOut(accelerator_info * ai)247e02e12deSAxel Dörfler void Radeon_DetectTVOut(
248e02e12deSAxel Dörfler 	accelerator_info *ai )
249e02e12deSAxel Dörfler {
250e02e12deSAxel Dörfler 	shared_info *si = ai->si;
251e02e12deSAxel Dörfler 
252e02e12deSAxel Dörfler 	SHOW_FLOW0( 0, "" );
253e02e12deSAxel Dörfler 
254e02e12deSAxel Dörfler 	switch( si->tv_chip ) {
255e02e12deSAxel Dörfler 	case tc_external_rt1: {
256e02e12deSAxel Dörfler 		// for external encoder, we need the VIP channel
257e02e12deSAxel Dörfler 		int channel = Radeon_FindVIPDevice( ai, THEATRE_ID );
258e02e12deSAxel Dörfler 
259e02e12deSAxel Dörfler 		if( channel < 0 ) {
260e02e12deSAxel Dörfler 			SHOW_ERROR0( 2, "This card needs a Rage Theatre for TV-Out, but there is none." );
261e02e12deSAxel Dörfler 			si->tv_chip = tc_none;
262e02e12deSAxel Dörfler 		} else {
263e02e12deSAxel Dörfler 			SHOW_INFO( 2, "Rage Theatre found on VIP channel %d", channel );
264e02e12deSAxel Dörfler 			si->theatre_channel = channel;
265e02e12deSAxel Dörfler 		}
266e02e12deSAxel Dörfler 		break; }
267e02e12deSAxel Dörfler 	default:
268e02e12deSAxel Dörfler 		// for internal encoder, we don't have to look farther - it must be there
269*758b1d0eSIngo Weinhold 		;
270e02e12deSAxel Dörfler 	}
271e02e12deSAxel Dörfler }
272