Lines Matching refs:buffer
134 unsigned char *buffer) in tea5767_status_dump() argument
138 if (TEA5767_READY_FLAG_MASK & buffer[0]) in tea5767_status_dump()
143 if (TEA5767_BAND_LIMIT_MASK & buffer[0]) in tea5767_status_dump()
148 div = ((buffer[0] & 0x3f) << 8) | buffer[1]; in tea5767_status_dump()
165 buffer[0] = (div >> 8) & 0x3f; in tea5767_status_dump()
166 buffer[1] = div & 0xff; in tea5767_status_dump()
171 if (TEA5767_STEREO_MASK & buffer[2]) in tea5767_status_dump()
176 tuner_info("IF Counter = %d\n", buffer[2] & TEA5767_IF_CNTR_MASK); in tea5767_status_dump()
179 (buffer[3] & TEA5767_ADC_LEVEL_MASK) >> 4); in tea5767_status_dump()
181 tuner_info("Chip ID = %d\n", (buffer[3] & TEA5767_CHIP_ID_MASK)); in tea5767_status_dump()
184 (buffer[4] & TEA5767_RESERVED_MASK)); in tea5767_status_dump()
193 unsigned char buffer[5]; in set_radio_freq() local
199 buffer[2] = 0; in set_radio_freq()
202 buffer[2] |= TEA5767_PORT1_HIGH; in set_radio_freq()
206 buffer[2] |= TEA5767_MONO; in set_radio_freq()
212 buffer[3] = 0; in set_radio_freq()
215 buffer[3] |= TEA5767_PORT2_HIGH; in set_radio_freq()
218 buffer[3] |= TEA5767_HIGH_CUT_CTRL; in set_radio_freq()
221 buffer[3] |= TEA5767_ST_NOISE_CTL; in set_radio_freq()
224 buffer[3] |= TEA5767_SOFT_MUTE; in set_radio_freq()
227 buffer[3] |= TEA5767_JAPAN_BAND; in set_radio_freq()
229 buffer[4] = 0; in set_radio_freq()
232 buffer[4] |= TEA5767_DEEMPH_75; in set_radio_freq()
235 buffer[4] |= TEA5767_PLLREF_ENABLE; in set_radio_freq()
244 buffer[2] |= TEA5767_HIGH_LO_INJECT; in set_radio_freq()
254 buffer[3] |= TEA5767_XTAL_32768; in set_radio_freq()
262 buffer[2] |= TEA5767_HIGH_LO_INJECT; in set_radio_freq()
263 buffer[3] |= TEA5767_XTAL_32768; in set_radio_freq()
267 buffer[0] = (div >> 8) & 0x3f; in set_radio_freq()
268 buffer[1] = div & 0xff; in set_radio_freq()
270 if (5 != (rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 5))) in set_radio_freq()
274 if (5 != (rc = tuner_i2c_xfer_recv(&priv->i2c_props, buffer, 5))) in set_radio_freq()
277 tea5767_status_dump(priv, buffer); in set_radio_freq()
285 static int tea5767_read_status(struct dvb_frontend *fe, char *buffer) in tea5767_read_status() argument
290 memset(buffer, 0, 5); in tea5767_read_status()
291 if (5 != (rc = tuner_i2c_xfer_recv(&priv->i2c_props, buffer, 5))) { in tea5767_read_status()
299 static inline int tea5767_signal(struct dvb_frontend *fe, const char *buffer) in tea5767_signal() argument
303 int signal = ((buffer[3] & TEA5767_ADC_LEVEL_MASK) << 8); in tea5767_signal()
310 static inline int tea5767_stereo(struct dvb_frontend *fe, const char *buffer) in tea5767_stereo() argument
314 int stereo = buffer[2] & TEA5767_STEREO_MASK; in tea5767_stereo()
323 unsigned char buffer[5]; in tea5767_get_status() local
327 if (0 == tea5767_read_status(fe, buffer)) { in tea5767_get_status()
328 if (tea5767_signal(fe, buffer)) in tea5767_get_status()
330 if (tea5767_stereo(fe, buffer)) in tea5767_get_status()
339 unsigned char buffer[5]; in tea5767_get_rf_strength() local
343 if (0 == tea5767_read_status(fe, buffer)) in tea5767_get_rf_strength()
344 *strength = tea5767_signal(fe, buffer); in tea5767_get_rf_strength()
351 unsigned char buffer[5]; in tea5767_standby() local
356 buffer[0] = (div >> 8) & 0x3f; in tea5767_standby()
357 buffer[1] = div & 0xff; in tea5767_standby()
358 buffer[2] = TEA5767_PORT1_HIGH; in tea5767_standby()
359 buffer[3] = TEA5767_PORT2_HIGH | TEA5767_HIGH_CUT_CTRL | in tea5767_standby()
361 buffer[4] = 0; in tea5767_standby()
363 if (5 != (rc = tuner_i2c_xfer_send(&priv->i2c_props, buffer, 5))) in tea5767_standby()
372 unsigned char buffer[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; in tea5767_autodetection() local
375 if ((rc = tuner_i2c_xfer_recv(&i2c, buffer, 7))< 5) { in tea5767_autodetection()
381 if (buffer[0] == buffer[1] && buffer[0] == buffer[2] && in tea5767_autodetection()
382 buffer[0] == buffer[3] && buffer[0] == buffer[4]) { in tea5767_autodetection()
392 if (((buffer[3] & 0x0f) != 0x00) || (buffer[4] != 0x00)) { in tea5767_autodetection()