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>
This commit is contained in:
Steve Markgraf
2012-05-04 23:02:29 +02:00
parent 0af094070f
commit 86c34428aa
11 changed files with 1328 additions and 2217 deletions

View File

@ -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;