Lines Matching refs:fmdev

23 int fm_tx_set_stereo_mono(struct fmdev *fmdev, u16 mode)  in fm_tx_set_stereo_mono()  argument
28 if (fmdev->tx_data.aud_mode == mode) in fm_tx_set_stereo_mono()
35 ret = fmc_send_cmd(fmdev, MONO_SET, REG_WR, &payload, in fm_tx_set_stereo_mono()
40 fmdev->tx_data.aud_mode = mode; in fm_tx_set_stereo_mono()
45 static int set_rds_text(struct fmdev *fmdev, u8 *rds_text) in set_rds_text() argument
50 ret = fmc_send_cmd(fmdev, RDS_DATA_SET, REG_WR, rds_text, in set_rds_text()
57 ret = fmc_send_cmd(fmdev, DISPLAY_MODE, REG_WR, &payload, in set_rds_text()
65 static int set_rds_data_mode(struct fmdev *fmdev, u8 mode) in set_rds_data_mode() argument
72 ret = fmc_send_cmd(fmdev, PI_SET, REG_WR, &payload, in set_rds_data_mode()
79 ret = fmc_send_cmd(fmdev, DI_SET, REG_WR, &payload, in set_rds_data_mode()
88 static int set_rds_len(struct fmdev *fmdev, u8 type, u16 len) in set_rds_len() argument
95 ret = fmc_send_cmd(fmdev, RDS_CONFIG_DATA_SET, REG_WR, &payload, in set_rds_len()
104 int fm_tx_set_rds_mode(struct fmdev *fmdev, u8 rds_en_dis) in fm_tx_set_rds_mode() argument
115 set_rds_len(fmdev, 0, strlen(rds_text)); in fm_tx_set_rds_mode()
118 set_rds_text(fmdev, rds_text); in fm_tx_set_rds_mode()
121 set_rds_data_mode(fmdev, 0x0); in fm_tx_set_rds_mode()
130 ret = fmc_send_cmd(fmdev, RDS_DATA_ENB, REG_WR, &payload, in fm_tx_set_rds_mode()
137 set_rds_len(fmdev, 0, strlen(rds_text)); in fm_tx_set_rds_mode()
140 set_rds_text(fmdev, rds_text); in fm_tx_set_rds_mode()
142 fmdev->tx_data.rds.flag = rds_en_dis; in fm_tx_set_rds_mode()
147 int fm_tx_set_radio_text(struct fmdev *fmdev, u8 *rds_text, u8 rds_type) in fm_tx_set_radio_text() argument
152 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_radio_text()
155 fm_tx_set_rds_mode(fmdev, 0); in fm_tx_set_radio_text()
158 set_rds_len(fmdev, rds_type, strlen(rds_text)); in fm_tx_set_radio_text()
161 set_rds_text(fmdev, rds_text); in fm_tx_set_radio_text()
164 set_rds_data_mode(fmdev, 0x0); in fm_tx_set_radio_text()
167 ret = fmc_send_cmd(fmdev, RDS_DATA_ENB, REG_WR, &payload, in fm_tx_set_radio_text()
175 int fm_tx_set_af(struct fmdev *fmdev, u32 af) in fm_tx_set_af() argument
180 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_af()
187 ret = fmc_send_cmd(fmdev, TA_SET, REG_WR, &payload, in fm_tx_set_af()
195 int fm_tx_set_region(struct fmdev *fmdev, u8 region) in fm_tx_set_region() argument
207 ret = fmc_send_cmd(fmdev, TX_BAND_SET, REG_WR, &payload, in fm_tx_set_region()
215 int fm_tx_set_mute_mode(struct fmdev *fmdev, u8 mute_mode_toset) in fm_tx_set_mute_mode() argument
223 ret = fmc_send_cmd(fmdev, MUTE, REG_WR, &payload, in fm_tx_set_mute_mode()
232 static int set_audio_io(struct fmdev *fmdev) in set_audio_io() argument
234 struct fmtx_data *tx = &fmdev->tx_data; in set_audio_io()
240 ret = fmc_send_cmd(fmdev, AUDIO_IO_SET, REG_WR, &payload, in set_audio_io()
250 static int enable_xmit(struct fmdev *fmdev, u8 new_xmit_state) in enable_xmit() argument
252 struct fmtx_data *tx = &fmdev->tx_data; in enable_xmit()
259 ret = fmc_send_cmd(fmdev, INT_MASK_SET, REG_WR, &payload, in enable_xmit()
266 ret = fmc_send_cmd(fmdev, POWER_ENB_SET, REG_WR, &payload, in enable_xmit()
272 init_completion(&fmdev->maintask_comp); in enable_xmit()
273 timeleft = wait_for_completion_timeout(&fmdev->maintask_comp, in enable_xmit()
281 set_bit(FM_CORE_TX_XMITING, &fmdev->flag); in enable_xmit()
288 int fm_tx_set_pwr_lvl(struct fmdev *fmdev, u8 new_pwr_lvl) in fm_tx_set_pwr_lvl() argument
291 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_pwr_lvl()
294 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_pwr_lvl()
299 if (!test_bit(FM_CORE_READY, &fmdev->flag)) { in fm_tx_set_pwr_lvl()
312 ret = fmc_send_cmd(fmdev, POWER_LEV_SET, REG_WR, &payload, in fm_tx_set_pwr_lvl()
327 int fm_tx_set_preemph_filter(struct fmdev *fmdev, u32 preemphasis) in fm_tx_set_preemph_filter() argument
329 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_preemph_filter()
333 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_preemph_filter()
348 ret = fmc_send_cmd(fmdev, PREMPH_SET, REG_WR, &payload, in fm_tx_set_preemph_filter()
359 int fm_tx_get_tune_cap_val(struct fmdev *fmdev) in fm_tx_get_tune_cap_val() argument
365 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_get_tune_cap_val()
368 ret = fmc_send_cmd(fmdev, READ_FMANT_TUNE_VALUE, REG_RD, in fm_tx_get_tune_cap_val()
379 int fm_tx_set_freq(struct fmdev *fmdev, u32 freq_to_set) in fm_tx_set_freq() argument
381 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_freq()
385 if (test_bit(FM_CORE_TX_XMITING, &fmdev->flag)) { in fm_tx_set_freq()
386 enable_xmit(fmdev, 0); in fm_tx_set_freq()
387 clear_bit(FM_CORE_TX_XMITING, &fmdev->flag); in fm_tx_set_freq()
392 ret = fmc_send_cmd(fmdev, INT_MASK_SET, REG_WR, &payload, in fm_tx_set_freq()
404 ret = fmc_send_cmd(fmdev, CHANL_SET, REG_WR, &payload, in fm_tx_set_freq()
409 fm_tx_set_pwr_lvl(fmdev, tx->pwr_lvl); in fm_tx_set_freq()
410 fm_tx_set_preemph_filter(fmdev, tx->preemph); in fm_tx_set_freq()
413 set_audio_io(fmdev); in fm_tx_set_freq()
415 enable_xmit(fmdev, 0x01); /* Enable transmission */ in fm_tx_set_freq()