0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef Z0194A
0010 #define Z0194A
0011
0012 static int sharp_z0194a_set_symbol_rate(struct dvb_frontend *fe,
0013 u32 srate, u32 ratio)
0014 {
0015 u8 aclk = 0;
0016 u8 bclk = 0;
0017
0018 if (srate < 1500000) {
0019 aclk = 0xb7; bclk = 0x47; }
0020 else if (srate < 3000000) {
0021 aclk = 0xb7; bclk = 0x4b; }
0022 else if (srate < 7000000) {
0023 aclk = 0xb7; bclk = 0x4f; }
0024 else if (srate < 14000000) {
0025 aclk = 0xb7; bclk = 0x53; }
0026 else if (srate < 30000000) {
0027 aclk = 0xb6; bclk = 0x53; }
0028 else if (srate < 45000000) {
0029 aclk = 0xb4; bclk = 0x51; }
0030
0031 stv0299_writereg(fe, 0x13, aclk);
0032 stv0299_writereg(fe, 0x14, bclk);
0033 stv0299_writereg(fe, 0x1f, (ratio >> 16) & 0xff);
0034 stv0299_writereg(fe, 0x20, (ratio >> 8) & 0xff);
0035 stv0299_writereg(fe, 0x21, (ratio) & 0xf0);
0036
0037 return 0;
0038 }
0039
0040 static u8 sharp_z0194a_inittab[] = {
0041 0x01, 0x15,
0042 0x02, 0x30,
0043 0x03, 0x00,
0044 0x04, 0x7d,
0045 0x05, 0x35,
0046 0x06, 0x40,
0047 0x07, 0x00,
0048 0x08, 0x40,
0049 0x09, 0x00,
0050 0x0c, 0x51,
0051 0x0d, 0x82,
0052 0x0e, 0x23,
0053 0x10, 0x3f,
0054 0x11, 0x84,
0055 0x12, 0xb9,
0056 0x15, 0xc9,
0057 0x16, 0x00,
0058 0x17, 0x00,
0059 0x18, 0x00,
0060 0x19, 0x00,
0061 0x1a, 0x00,
0062 0x1f, 0x50,
0063 0x20, 0x00,
0064 0x21, 0x00,
0065 0x22, 0x00,
0066 0x23, 0x00,
0067 0x28, 0x00,
0068 0x29, 0x1e,
0069 0x2a, 0x14,
0070 0x2b, 0x0f,
0071 0x2c, 0x09,
0072 0x2d, 0x05,
0073 0x2e, 0x01,
0074 0x31, 0x1f,
0075 0x32, 0x19,
0076 0x33, 0xfc,
0077 0x34, 0x93,
0078 0x0f, 0x52,
0079 0xff, 0xff
0080 };
0081
0082 #endif