aboutsummaryrefslogtreecommitdiffstats
path: root/src/tuner_e4k.c
diff options
context:
space:
mode:
authorSteve Markgraf <steve@steve-m.de>2013-01-16 01:43:45 +0100
committerSteve Markgraf <steve@steve-m.de>2013-01-16 01:43:45 +0100
commit84f0a9084bb944c0cd36289a462978054e93ca35 (patch)
tree701a76fa562a1e07dd3e253d3cd86c3c80774abd /src/tuner_e4k.c
parent3087e7acdee6e011713885bc851b96209d38c736 (diff)
lib: enable standby mode of e4k and r820t on exit
Since the R820T is a power hog and gets quite hot, this makes sense, especially when being battery- powered. Signed-off-by: Steve Markgraf <steve@steve-m.de>
Diffstat (limited to 'src/tuner_e4k.c')
-rw-r--r--src/tuner_e4k.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tuner_e4k.c b/src/tuner_e4k.c
index 0232f88..47fe4fe 100644
--- a/src/tuner_e4k.c
+++ b/src/tuner_e4k.c
@@ -881,6 +881,19 @@ int e4k_dc_offset_gen_table(struct e4k_state *e4k)
}
/***********************************************************************
+ * Standby */
+
+/*! \brief Enable/disable standby mode
+ */
+int e4k_standby(struct e4k_state *e4k, int enable)
+{
+ e4k_reg_set_mask(e4k, E4K_REG_MASTER1, E4K_MASTER1_NORM_STBY,
+ enable ? 0 : E4K_MASTER1_NORM_STBY);
+
+ return 0;
+}
+
+/***********************************************************************
* Initialization */
static int magic_init(struct e4k_state *e4k)