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

Commit 85f08273 authored by himta ram's avatar himta ram Committed by Gerrit - the friendly Code Review server
Browse files

RTC6226: disable the RDS during scan operation



RDS enable is set during scanning and it causing the
incorrect register update for rtc6226 chip and this
leads to no audio issue.
Set the RDS enable bit to 0 before scanning and
set to 1 after scanning finishes.

CRs-Fixed: 2744378
Change-Id: I2c2fae1e01fb1fadccbc9133f472fca996bc2496
Signed-off-by: default avatarhimta ram <hram@codeaurora.org>
parent e3e20132
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
@@ -694,3 +694,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);