Lines Matching +full:mode +full:- +full:flag

1 // SPDX-License-Identifier: GPL-2.0-only
4 * This sub-module of FM driver implements FM TX functionality.
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()
22 fmdbg("stereo mode: %d\n", mode); in fm_tx_set_stereo_mono()
24 /* Set Stereo/Mono mode */ in fm_tx_set_stereo_mono()
25 payload = (1 - mode); in fm_tx_set_stereo_mono()
31 fmdev->tx_data.aud_mode = mode; in fm_tx_set_stereo_mono()
46 /* Scroll mode */ in set_rds_text()
56 static int set_rds_data_mode(struct fmdev *fmdev, u8 mode) in set_rds_data_mode() argument
111 /* Set RDS mode */ in fm_tx_set_rds_mode()
133 fmdev->tx_data.rds.flag = rds_en_dis; in fm_tx_set_rds_mode()
143 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_radio_text()
144 return -EPERM; in fm_tx_set_radio_text()
154 /* Set RDS mode */ in fm_tx_set_radio_text()
171 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_af()
172 return -EPERM; in fm_tx_set_af()
176 af = (af - 87500) / 100; in fm_tx_set_af()
193 return -EINVAL; in fm_tx_set_region()
211 fmdbg("tx: mute mode %d\n", mute_mode_toset); in fm_tx_set_mute_mode()
225 struct fmtx_data *tx = &fmdev->tx_data; in set_audio_io()
230 payload = tx->audio_io; in set_audio_io()
243 struct fmtx_data *tx = &fmdev->tx_data; in enable_xmit()
263 init_completion(&fmdev->maintask_comp); in enable_xmit()
264 timeleft = wait_for_completion_timeout(&fmdev->maintask_comp, in enable_xmit()
269 return -ETIMEDOUT; in enable_xmit()
272 set_bit(FM_CORE_TX_XMITING, &fmdev->flag); in enable_xmit()
273 tx->xmit_state = new_xmit_state; in enable_xmit()
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()
286 return -EPERM; in fm_tx_set_pwr_lvl()
290 if (!test_bit(FM_CORE_READY, &fmdev->flag)) { in fm_tx_set_pwr_lvl()
291 tx->pwr_lvl = new_pwr_lvl; in fm_tx_set_pwr_lvl()
302 payload = (FM_PWR_LVL_HIGH - new_pwr_lvl); in fm_tx_set_pwr_lvl()
309 tx->pwr_lvl = new_pwr_lvl; in fm_tx_set_pwr_lvl()
315 * Sets FM TX pre-emphasis filter value (OFF, 50us, or 75us)
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()
325 return -EPERM; in fm_tx_set_preemph_filter()
344 tx->preemph = payload; in fm_tx_set_preemph_filter()
356 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_get_tune_cap_val()
357 return -EPERM; in fm_tx_get_tune_cap_val()
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()
378 clear_bit(FM_CORE_TX_XMITING, &fmdev->flag); in fm_tx_set_freq()
388 tx->tx_frq = (unsigned long)freq_to_set; in fm_tx_set_freq()
389 fmdbg("tx: freq_to_set %ld\n", (long int)tx->tx_frq); 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()
403 tx->audio_io = 0x01; /* I2S */ in fm_tx_set_freq()
408 tx->aud_mode = FM_STEREO_MODE; in fm_tx_set_freq()
409 tx->rds.flag = FM_RDS_DISABLE; in fm_tx_set_freq()