From patchwork Mon Jul 24 18:35:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 42949 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:be1d:b0:130:ccc6:6c4b with SMTP id ge29csp2111792pzb; Mon, 24 Jul 2023 11:36:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlGPxK3qV50F/SBU1i4ZLkWfxa8AL9M8zh/yGoPKZPTaNzJ/NnHWgPLECZj3P8WSG58cibfK X-Received: by 2002:aa7:d043:0:b0:522:1d9e:221 with SMTP id n3-20020aa7d043000000b005221d9e0221mr7153787edo.38.1690223784075; Mon, 24 Jul 2023 11:36:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690223784; cv=none; d=google.com; s=arc-20160816; b=MYncEOOj1rlUTM4or4bj7Sg4U1kGCl4A/t1MhkwgI5CVjtGb1EG1d5F27uB4Q+XeYP yEcKhlPkHmoMyuRxuxJgAtt/AsQiLG5RJH2g+lo6runv8wIC0yv1fW9WUWQb0tIh+fNa CXFNyxdCclHojHiRsNQytBhNZJ1/H3QYWXUJ9NHzcnPU4OyG06DBU/U3IiG4TasdYQEW AZa0b0GeIjIyLECIZLXIEKvTNQ9sAqpEyljGa29hddg4Ry9tkDobHn4Xr+4uB/9RGrUp 1qzMvqJcAxoUpeir4OLACkRT0Drs+/pWSAr27TPkC3TF4nHo/mE34j2XGThZO0gepWpl IGSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:delivered-to; bh=/mzfhBcNwcqghnYuELy5xEk5RU7UEPFgfWReJ0y5cqk=; fh=YYwLYmpaV0Fpw/rxmSKNRLS2XzDkAlGbHATiKOPtZrY=; b=Eul04sOwnZzQi35THtafmUlkt4FtTWDftHZdiyLUxNt4YLP/heo6YCFii+qzGQHhDk EcxMGxS54Lfu7U3FLLv5JD0XuvxSSOGCJU5hfPSFPFO8y7Ok4nagjMhhtk0+k8L0LyTq ehZwsc/1nGLjW1R11QofBfh1+Ri8vv0bzx0dKIrj1TFd4d8IJq1ROcE+vWT6nssDFZxF ItfBHi9wD2NFBEp9BbTusHY+eYPOFqkmrDAbuO1TmgL8Pmir9fsjTulTZwV9BtcVw+Sg c/i4TkQWEVbCeNdsUzQ1RUow7oqLce19MHSi8NliWUkzF5lHviqdHkhjcnKqeGEMCzWD 032g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k23-20020aa7d8d7000000b0051de7b55474si7244640eds.550.2023.07.24.11.36.23; Mon, 24 Jul 2023 11:36:24 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E1A4E68C7B2; Mon, 24 Jul 2023 21:35:50 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 41CEF68C79C for ; Mon, 24 Jul 2023 21:35:42 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 96D38FF80A for ; Mon, 24 Jul 2023 18:35:41 +0000 (UTC) From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 24 Jul 2023 20:35:34 +0200 Message-Id: <20230724183535.2677937-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230724183535.2677937-1-michael@niedermayer.cc> References: <20230724183535.2677937-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/6] avradio/sdrinradio: apply R820T correction only for non direct 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3rKwL3hIwFvE Signed-off-by: Michael Niedermayer --- libavradio/sdrinradio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavradio/sdrinradio.c b/libavradio/sdrinradio.c index 2865b6a9a6..ab7e786744 100644 --- a/libavradio/sdrinradio.c +++ b/libavradio/sdrinradio.c @@ -113,7 +113,7 @@ static int64_t sdrindev_set_frequency_callback(SDRContext *sdr, int64_t freq) } else sdr->current_direct_samp = value; } - if (e && strstr(e->value, "R820T")) { + if (e && strstr(e->value, "R820T") && !strcmp(value, "0")) { //The R820T has a 16 bit fractional PLL which can do only multiplies of 439.45 //Its more complex but this approximation works //It has to be noted that SOAPY does not tell us about this, instead saopy