Currently, firmware retry logic keeps reading from FS every
time during the retry logic. This is not needed. Instead,
only release the firmware read after success.
While here, make the non-debug messages less verbose, as it
only matters to the user if the firmware was successfully
loaded, or if some error happened.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
With the current code, if something bad happens during the
firmware init process, the device will keep trying forever,
and removing it would cause an OOPS.
Instead, try only a limited amount of time. If not, fails.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
The programmed frequency on xc5000 is not the middle
frequency, but the initial frequency on the bandwidth range.
However, the DVB API works with the middle frequency.
Cc: stable@vger.kernel.org
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Some drivers, like au0828 are very sensitive to tuner sleep and may
break if the sleep happens too fast. Also, by keeping the tuner alive
for a while could speedup tuning process during channel scan. So,
change the logic to delay the actual sleep to 5 seconds after its
command.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
WARNING: please, no space before tabs
+#define XC_PRODUCT_ID_FW_LOADED ^I0x1388$
WARNING: please, no space before tabs
+#define DK_SECAM_A2LDK3 ^I13$
WARNING: please, no space before tabs
+#define DK_SECAM_A2MONO ^I14$
WARNING: please, no space before tabs
+#define FM_RADIO_INPUT2 ^I21$
WARNING: please, no space before tabs
+#define FM_RADIO_INPUT1 ^I22$
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
There's absolutely no reason to wrap msleep() call here.
Just rename all occurences of xc_wait() with msleep() and
remove the wrapper function.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
I found very small bug in xc5000 source. When set option debug=1 and
listen a radio we see in dmesg xc5000: xc_SetTVStandard()
Standard = M/N-NTSC/PAL-BTSC at all times. However, it should be, instead
"FM Radio-INPUT1_MONO".
That happens because xc5000_set_radio_freq() gets the correct value for
VideoMode and AudioMode for radio and calls xc_SetTVStandard() where name
of standard comes from the incorrect place priv->video_standard.
This incorrect debug message makes debugging a little difficult.
Signed-off-by: Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
There is a missing break so we use XC_RF_MODE_CABLE instead of
XC_RF_MODE_AIR.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Move the tuners one level up, as the "common" directory will be used
by drivers that are shared between more than one driver.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>