atv_demod: Optimizing ATV auto scan Speed. [1/2]

PD#SWPL-4123

Problem:
Optimizing ATV auto scan Speed.

Solution:
optimizing the step of scanning.

Verify:
verified by x301

Change-Id: I0f616f14488be49be67c40eca7fc9f30108545b8
Signed-off-by: nengwen.chen <nengwen.chen@amlogic.com>
This commit is contained in:
nengwen.chen
2019-01-18 19:12:44 +08:00
committed by Jianxin Pan
parent 875989f1d7
commit 6beaed7268
2 changed files with 5 additions and 18 deletions

View File

@@ -52,6 +52,8 @@
DEBUGFS_CREATE_NODE(aud_std, 0640, dentry, u32)\
DEBUGFS_CREATE_NODE(aud_mode, 0640, dentry, u32)\
DEBUGFS_CREATE_NODE(aud_auto, 0640, dentry, u32)\
DEBUGFS_CREATE_NODE(aud_reinit, 0640, dentry, u32)\
DEBUGFS_CREATE_NODE(aud_mono_only, 0640, dentry, u32)\
DEBUGFS_CREATE_NODE(over_threshold, 0640, dentry, u64)\
DEBUGFS_CREATE_NODE(input_amplitude, 0640, dentry, u64)\
DEBUGFS_CREATE_NODE(atvaudio_det_outputmode_en, 0640, dentry, bool)\

View File

@@ -440,7 +440,7 @@ static struct analog_demod_ops atvdemod_ops = {
};
unsigned int tuner_status_cnt = 8; /* 4-->16 test on sky mxl661 */
unsigned int tuner_status_cnt = 4; /* 4-->16 test on sky mxl661 */
bool slow_mode;
@@ -985,7 +985,7 @@ static enum v4l2_search atvdemod_fe_search(struct v4l2_frontend *v4l2_fe)
pr_dbg("[%s] slow mode to search the channel\n", __func__);
afc_step = ATV_AFC_1_0MHZ;
} else if (!slow_mode) {
afc_step = ATV_AFC_2_0MHZ;
afc_step = p->afc_range/* ATV_AFC_2_0MHZ */;
} else {
pr_dbg("[%s] slow mode to search the channel\n", __func__);
afc_step = ATV_AFC_1_0MHZ;
@@ -1098,7 +1098,7 @@ static enum v4l2_search atvdemod_fe_search(struct v4l2_frontend *v4l2_fe)
auto_search_std,
&std_bk, &audio, &soundsys);
pr_dbg("[%s] freq:%d, std_bk:0x%x, audmode:0x%x, search OK.\n",
pr_info("[%s] freq:%d, std_bk:0x%x, audmode:0x%x, search OK.\n",
__func__, p->frequency,
(unsigned int) std_bk, audio);
@@ -1120,21 +1120,6 @@ static enum v4l2_search atvdemod_fe_search(struct v4l2_frontend *v4l2_fe)
}
}
/*avoid sound format is not match after search over */
if (std_bk != 0 && audio != 0) {
p->std = std_bk;
p->audmode = audio;
params.frequency = p->frequency;
params.mode = p->afc_range;
params.audmode = p->audmode;
params.std = p->std;
fe->ops.analog_ops.set_params(fe, &params);
std_bk = 0;
audio = 0;
}
pr_dbg("[%s] freq[analog.std:0x%08x] is[%d] unlock\n",
__func__,
(uint32_t) p->std, p->frequency);