Lines Matching refs:fmdev

14 int fm_tx_set_stereo_mono(struct fmdev *fmdev, u16 mode)  in fm_tx_set_stereo_mono()  argument
19 if (fmdev->tx_data.aud_mode == mode) in fm_tx_set_stereo_mono()
26 ret = fmc_send_cmd(fmdev, MONO_SET, REG_WR, &payload, in fm_tx_set_stereo_mono()
31 fmdev->tx_data.aud_mode = mode; in fm_tx_set_stereo_mono()
36 static int set_rds_text(struct fmdev *fmdev, u8 *rds_text) in set_rds_text() argument
41 ret = fmc_send_cmd(fmdev, RDS_DATA_SET, REG_WR, rds_text, in set_rds_text()
48 ret = fmc_send_cmd(fmdev, DISPLAY_MODE, REG_WR, &payload, in set_rds_text()
56 static int set_rds_data_mode(struct fmdev *fmdev, u8 mode) in set_rds_data_mode() argument
63 ret = fmc_send_cmd(fmdev, PI_SET, REG_WR, &payload, in set_rds_data_mode()
70 ret = fmc_send_cmd(fmdev, DI_SET, REG_WR, &payload, in set_rds_data_mode()
79 static int set_rds_len(struct fmdev *fmdev, u8 type, u16 len) in set_rds_len() argument
86 ret = fmc_send_cmd(fmdev, RDS_CONFIG_DATA_SET, REG_WR, &payload, in set_rds_len()
95 int fm_tx_set_rds_mode(struct fmdev *fmdev, u8 rds_en_dis) in fm_tx_set_rds_mode() argument
106 set_rds_len(fmdev, 0, strlen(rds_text)); in fm_tx_set_rds_mode()
109 set_rds_text(fmdev, rds_text); in fm_tx_set_rds_mode()
112 set_rds_data_mode(fmdev, 0x0); in fm_tx_set_rds_mode()
121 ret = fmc_send_cmd(fmdev, RDS_DATA_ENB, REG_WR, &payload, in fm_tx_set_rds_mode()
128 set_rds_len(fmdev, 0, strlen(rds_text)); in fm_tx_set_rds_mode()
131 set_rds_text(fmdev, rds_text); in fm_tx_set_rds_mode()
133 fmdev->tx_data.rds.flag = rds_en_dis; in fm_tx_set_rds_mode()
138 int fm_tx_set_radio_text(struct fmdev *fmdev, u8 *rds_text, u8 rds_type) in fm_tx_set_radio_text() argument
143 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_radio_text()
146 fm_tx_set_rds_mode(fmdev, 0); in fm_tx_set_radio_text()
149 set_rds_len(fmdev, rds_type, strlen(rds_text)); in fm_tx_set_radio_text()
152 set_rds_text(fmdev, rds_text); in fm_tx_set_radio_text()
155 set_rds_data_mode(fmdev, 0x0); in fm_tx_set_radio_text()
158 ret = fmc_send_cmd(fmdev, RDS_DATA_ENB, REG_WR, &payload, in fm_tx_set_radio_text()
166 int fm_tx_set_af(struct fmdev *fmdev, u32 af) in fm_tx_set_af() argument
171 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_af()
178 ret = fmc_send_cmd(fmdev, TA_SET, REG_WR, &payload, in fm_tx_set_af()
186 int fm_tx_set_region(struct fmdev *fmdev, u8 region) in fm_tx_set_region() argument
198 ret = fmc_send_cmd(fmdev, TX_BAND_SET, REG_WR, &payload, in fm_tx_set_region()
206 int fm_tx_set_mute_mode(struct fmdev *fmdev, u8 mute_mode_toset) in fm_tx_set_mute_mode() argument
214 ret = fmc_send_cmd(fmdev, MUTE, REG_WR, &payload, in fm_tx_set_mute_mode()
223 static int set_audio_io(struct fmdev *fmdev) in set_audio_io() argument
225 struct fmtx_data *tx = &fmdev->tx_data; in set_audio_io()
231 ret = fmc_send_cmd(fmdev, AUDIO_IO_SET, REG_WR, &payload, in set_audio_io()
241 static int enable_xmit(struct fmdev *fmdev, u8 new_xmit_state) in enable_xmit() argument
243 struct fmtx_data *tx = &fmdev->tx_data; in enable_xmit()
250 ret = fmc_send_cmd(fmdev, INT_MASK_SET, REG_WR, &payload, in enable_xmit()
257 ret = fmc_send_cmd(fmdev, POWER_ENB_SET, REG_WR, &payload, in enable_xmit()
263 init_completion(&fmdev->maintask_comp); in enable_xmit()
264 timeleft = wait_for_completion_timeout(&fmdev->maintask_comp, in enable_xmit()
272 set_bit(FM_CORE_TX_XMITING, &fmdev->flag); in enable_xmit()
279 int fm_tx_set_pwr_lvl(struct fmdev *fmdev, u8 new_pwr_lvl) in fm_tx_set_pwr_lvl() argument
282 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_pwr_lvl()
285 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_pwr_lvl()
290 if (!test_bit(FM_CORE_READY, &fmdev->flag)) { in fm_tx_set_pwr_lvl()
303 ret = fmc_send_cmd(fmdev, POWER_LEV_SET, REG_WR, &payload, in fm_tx_set_pwr_lvl()
318 int fm_tx_set_preemph_filter(struct fmdev *fmdev, u32 preemphasis) in fm_tx_set_preemph_filter() argument
320 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_preemph_filter()
324 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_preemph_filter()
339 ret = fmc_send_cmd(fmdev, PREMPH_SET, REG_WR, &payload, in fm_tx_set_preemph_filter()
350 int fm_tx_get_tune_cap_val(struct fmdev *fmdev) in fm_tx_get_tune_cap_val() argument
356 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_get_tune_cap_val()
359 ret = fmc_send_cmd(fmdev, READ_FMANT_TUNE_VALUE, REG_RD, in fm_tx_get_tune_cap_val()
370 int fm_tx_set_freq(struct fmdev *fmdev, u32 freq_to_set) in fm_tx_set_freq() argument
372 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_freq()
376 if (test_bit(FM_CORE_TX_XMITING, &fmdev->flag)) { in fm_tx_set_freq()
377 enable_xmit(fmdev, 0); in fm_tx_set_freq()
378 clear_bit(FM_CORE_TX_XMITING, &fmdev->flag); in fm_tx_set_freq()
383 ret = fmc_send_cmd(fmdev, INT_MASK_SET, REG_WR, &payload, in fm_tx_set_freq()
395 ret = fmc_send_cmd(fmdev, CHANL_SET, REG_WR, &payload, in fm_tx_set_freq()
400 fm_tx_set_pwr_lvl(fmdev, tx->pwr_lvl); in fm_tx_set_freq()
401 fm_tx_set_preemph_filter(fmdev, tx->preemph); in fm_tx_set_freq()
404 set_audio_io(fmdev); in fm_tx_set_freq()
406 enable_xmit(fmdev, 0x01); /* Enable transmission */ in fm_tx_set_freq()