diff options
| author | Steve Markgraf <steve@steve-m.de> | 2012-05-04 23:02:29 +0200 |
|---|---|---|
| committer | Steve Markgraf <steve@steve-m.de> | 2012-05-04 23:02:29 +0200 |
| commit | 86c34428aabebc79ac0de7f1194e6b755a6fa213 (patch) | |
| tree | 55aa08354560202e781846298d8f69de0acec531 /src/rtl_tcp.c | |
| parent | 0af094070f3aaf7f0394523025c61b0aaf25f2b6 (diff) | |
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 <steve@steve-m.de>
Diffstat (limited to 'src/rtl_tcp.c')
| -rw-r--r-- | src/rtl_tcp.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <sys/socket.h> #include <netinet/in.h> #include <fcntl.h> +#else +#include <WinSock2.h> #endif #include <pthread.h> @@ -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; |
