Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96103a3a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "RTC6226: disable the RDS during scan operation"

parents 13cde485 85f08273
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -494,6 +494,8 @@ void rtc6226_scan(struct work_struct *work)
		else
			FMDERR("%s: received STD for tune\n", __func__);
	}
	/* Enable the RDS as it was disabled before scan */
	rtc6226_rds_on(radio);
	rtc6226_q_event(radio, RTC6226_EVT_SEEK_COMPLETE);
	rtc6226_q_event(radio, RTC6226_EVT_TUNE_SUCC);
	radio->seek_tune_status = NO_SEEK_TUNE_PENDING;
@@ -1357,7 +1359,7 @@ void rtc6226_rds_handler(struct work_struct *worker)
/*
 * rtc6226_rds_on - switch on rds reception
 */
static int rtc6226_rds_on(struct rtc6226_device *radio)
int rtc6226_rds_on(struct rtc6226_device *radio)
{
	int retval;

@@ -2271,6 +2273,14 @@ static int rtc6226_vidioc_s_hw_freq_seek(struct file *file, void *priv,

	radio->is_search_cancelled = false;

	/* Disable the rds before seek */
	radio->registers[SYSCFG] &= ~SYSCFG_CSR0_RDS_EN;
	retval = rtc6226_set_register(radio, SYSCFG);
	if (retval < 0) {
		FMDERR("%s fail to disable RDS\n", __func__);
		return retval;
	}

	if (radio->g_search_mode == SEEK) {
		/* seek */
		FMDBG("%s starting seek\n", __func__);
+2 −0
Original line number Diff line number Diff line
@@ -259,6 +259,8 @@ static void rtc6226_i2c_interrupt_handler(struct rtc6226_device *radio)
		rtc6226_reset_rds_data(radio);
		FMDBG("%s clear Seek/Tune bit\n", __func__);
		if (radio->seek_tune_status == SEEK_PENDING) {
			/* Enable the RDS as it was disabled before seek */
			rtc6226_rds_on(radio);
			FMDBG("posting RTC6226_EVT_SEEK_COMPLETE event\n");
			rtc6226_q_event(radio, RTC6226_EVT_SEEK_COMPLETE);
			/* post tune comp evt since seek results in a tune.*/
+1 −0
Original line number Diff line number Diff line
@@ -695,3 +695,4 @@ int rtc6226_cancel_seek(struct rtc6226_device *radio);
void rtc6226_rds_handler(struct work_struct *worker);
void rtc6226_q_event(struct rtc6226_device *radio, enum rtc6226_evt_t event);
int rtc6226_reset_rds_data(struct rtc6226_device *radio);
int rtc6226_rds_on(struct rtc6226_device *radio);