From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 7CFD545435 for ; Sun, 30 Jul 2023 22:12:04 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 743AC68C55A; Mon, 31 Jul 2023 01:11:44 +0300 (EEST) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EEB9B68C36E for ; Mon, 31 Jul 2023 01:11:36 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1E605240004 for ; Sun, 30 Jul 2023 22:11:35 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 31 Jul 2023 00:11:22 +0200 Message-Id: <20230730221131.1205193-3-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230730221131.1205193-1-michael@niedermayer.cc> References: <20230730221131.1205193-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 03/12] avradio/avdevice/sdrindev: Soapy / RTLSDR ignores gain in direct sampling mode X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Signed-off-by: Michael Niedermayer --- libavdevice/sdrindev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavdevice/sdrindev.c b/libavdevice/sdrindev.c index f07bd6b154..8766fc2f34 100644 --- a/libavdevice/sdrindev.c +++ b/libavdevice/sdrindev.c @@ -88,6 +88,10 @@ static int sdrindev_set_gain_callback(SDRContext *sdr, float gain) } if (sdr->sdr_gain != GAIN_SDR_AGC) { + if (sdr->current_direct_samp && !strcmp(sdr->current_direct_samp, "2")) { + return -1; // soapy ignores gain in direct sampling mode + } + ret = SoapySDRDevice_setGain(soapy, SOAPY_SDR_RX, 0, gain); if (ret) { av_log(avfmt, AV_LOG_WARNING, "Failed to set gain to %f (%s)\n", gain, SoapySDRDevice_lastError()); -- 2.31.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".