21 #include <linux/kernel.h>
23 #include <linux/module.h>
24 #include <linux/string.h>
25 #include <linux/slab.h>
50 #define dprintk(arg...) do { \
67 "ret == %i)\n", __func__, addr, reg, data, ret);
69 return (ret != 1) ? -1 : 0;
79 {.addr =
addr, .flags = 0, .buf = b0, .len = 1},
96 static int s5h1432_set_channel_bandwidth(
struct dvb_frontend *fe,
161 value = (
u32) (((48000 - (ifFreqHz / 1000)) * 512 *
162 (
u32) 32768) / (48 * 1000));
164 "Default IFFreq %d :reg value = 0x%x\n",
169 (
u8) (value >> 8) & 0xFF);
171 (
u8) (value >> 16) & 0xFF);
181 static int s5h1432_set_frontend(
struct dvb_frontend *fe)
184 u32 dvb_bandwidth = 8;
191 fe->
ops.tuner_ops.set_params(fe);
193 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
217 s5h1432_set_channel_bandwidth(fe, dvb_bandwidth);
310 static int s5h1432_read_signal_strength(
struct dvb_frontend *fe,
311 u16 *signal_strength)
321 static int s5h1432_read_ucblocks(
struct dvb_frontend *fe,
u32 *ucblocks)
332 static int s5h1432_get_tune_settings(
struct dvb_frontend *fe,
376 .name =
"Samsung s5h1432 DVB-T Frontend",
377 .frequency_min = 177000000,
378 .frequency_max = 858000000,
379 .frequency_stepsize = 166666,
386 .init = s5h1432_init,
387 .sleep = s5h1432_sleep,
388 .set_frontend = s5h1432_set_frontend,
389 .get_tune_settings = s5h1432_get_tune_settings,
390 .read_status = s5h1432_read_status,
391 .read_ber = s5h1432_read_ber,
392 .read_signal_strength = s5h1432_read_signal_strength,
393 .read_snr = s5h1432_read_snr,
394 .read_ucblocks = s5h1432_read_ucblocks,
395 .release = s5h1432_release,