Lines Matching +full:tx +full:- +full:enable

1 // SPDX-License-Identifier: GPL-2.0-only
4 * This sub-module of FM driver implements FM TX functionality.
19 if (fmdev->tx_data.aud_mode == 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()
115 /* Send command to enable RDS */ 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()
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()
222 /* Set TX Audio I/O */
225 struct fmtx_data *tx = &fmdev->tx_data; in set_audio_io() local
229 /* Set Audio I/O Enable */ in set_audio_io()
230 payload = tx->audio_io; in set_audio_io()
240 /* Start TX Transmission */
243 struct fmtx_data *tx = &fmdev->tx_data; in enable_xmit() local
248 /* Enable POWER_ENB interrupts */ in enable_xmit()
255 /* Set Power Enable */ 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()
278 /* Set TX power level */
282 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_pwr_lvl() local
285 if (fmdev->curr_fmmode != FM_MODE_TX) in fm_tx_set_pwr_lvl()
286 return -EPERM; in fm_tx_set_pwr_lvl()
287 fmdbg("tx: pwr_level_to_set %ld\n", (long int)new_pwr_lvl); 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() local
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()
349 /* Get the TX tuning capacitor value.*/
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()
369 /* Set TX Frequency */
372 struct fmtx_data *tx = &fmdev->tx_data; in fm_tx_set_freq() local
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()
381 /* Enable FR, BL interrupts */ 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()
406 enable_xmit(fmdev, 0x01); /* Enable transmission */ 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()