From 86c34428aabebc79ac0de7f1194e6b755a6fa213 Mon Sep 17 00:00:00 2001 From: Steve Markgraf Date: Fri, 4 May 2012 23:02:29 +0200 Subject: use new E4000 tuner driver, allow manual gain Many thanks to Hoernchen for making the driver work properly and adding manual gain! Signed-off-by: Steve Markgraf --- src/rtl_tcp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/rtl_tcp.c') diff --git a/src/rtl_tcp.c b/src/rtl_tcp.c index f1f05ca..89019c0 100644 --- a/src/rtl_tcp.c +++ b/src/rtl_tcp.c @@ -32,6 +32,8 @@ #include #include #include +#else +#include #endif #include @@ -278,6 +280,9 @@ static void *command_worker(void *arg) printf("set freq %d\n", cmd.param); rtlsdr_set_center_freq(dev, cmd.param); break; + case 0x04: + rtlsdr_set_tuner_gain(dev, cmd.param); + break; default: break; } @@ -293,7 +298,7 @@ int main(int argc, char **argv) uint32_t frequency = 0, samp_rate = 2048000; struct sockaddr_in local, remote; int device_count; - uint32_t dev_index = 0, gain = 5; + uint32_t dev_index = 0, gain = -10; struct llist *curelem,*prev; pthread_attr_t attr; void *status; -- cgit v1.3.1