Lines Matching +full:preemphasis +full:- +full:level
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()
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()
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()
278 /* Set TX power level */
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()
295 /* Set power level: Application will specify power level value in in fm_tx_set_pwr_lvl()
297 * For TI's WL chips, convert application specified power level value in fm_tx_set_pwr_lvl()
302 payload = (FM_PWR_LVL_HIGH - new_pwr_lvl); in fm_tx_set_pwr_lvl()
308 /* TODO: is the power level set? */ 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)
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()
325 return -EPERM; in fm_tx_set_preemph_filter()
327 switch (preemphasis) { 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()