From 421d298c8683def81a7e48422820429c543cd98e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Hamal=20Dvo=C5=99=C3=A1k?= <mordae@anilinux.org>
Date: Fri, 7 Jun 2024 21:33:16 +0200
Subject: [PATCH] Adjust gain factor

---
 src/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main.c b/src/main.c
index 59816c7..5e87852 100644
--- a/src/main.c
+++ b/src/main.c
@@ -544,11 +544,11 @@ static void run_command(uint8_t cmd, uint32_t arg)
 		dma_timer_set_fraction(dma_t_samp, 1, CLK_SYS_HZ / (sample_rate * DECIMATE));
 	} else if (0x04 == cmd) {
 		/* Set the tuner gain level */
-		gain = INIT_GAIN * powf(10.0f, 0.01f * arg);
+		gain = INIT_GAIN * powf(10.0f, 0.005f * arg);
 	} else if (0x0d == cmd) {
 		/* Set tuner gain by the tuner's gain index */
 		if (arg < NUM_GAINS) {
-			gain = INIT_GAIN * powf(10.0f, 0.01f * gains[arg]);
+			gain = INIT_GAIN * powf(10.0f, 0.005f * gains[arg]);
 		}
 	}
 }