Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp121455ybg; Mon, 8 Jun 2020 18:12:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGCTKFa9+CYbMQ7UA7bJ/USiXNNjHlsXGRgnLBXZTwx/kek7xLJIx1SMG1RkrHAOloJaGv X-Received: by 2002:a17:906:7751:: with SMTP id o17mr24349972ejn.111.1591665149094; Mon, 08 Jun 2020 18:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591665149; cv=none; d=google.com; s=arc-20160816; b=xCHc+76jWaT0Pra1j/uxuogZKe/3bhTUhj0rm45w7KmBoBmwkMVhLYZ/+TdXzhTgpk RH4hXuN/lrI3lMdd6nggjvKU/0v06cQXM22NcqceiZO5IOI04yD85EmMnOoI8JGzl46x ti3QN8KygnlLz4lepFAoEuyFsug+GCDbSPAB4ELORtcPcLYLxeQKaG39mFx6RbM330En bsUgaYsMuhGKYeKFqxG7BY+drNcXQCeZp79OB/p9YE4a0OG5f4+/yJn8tlbJ+lJataPW EuMsSQa8gJThhYnmY70f7E1H0obw6xx1/S3RfhumGSqptW6RbmsHNEG9U0+gp3VFsQdg Q+sA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8hnzvPg65U+3JM7yNwqBnaRHhOMxPwsn2oUa1sgxsTo=; b=lW3H1wMQi6huL8Dsj544XaEJ/ll87gacCjM1nqdrqbvqYu81umnUhChXbPZXgv0GZh EmzeGmev9nqv85h+LlqNR8IjArb9GkWLBpD4acsBriSpVOyP5hSnzSMWmcCONSzwu2ys pGCkTAYjrr+CM1Zc9XMcCWZfUV+V7vSOaQzcJxJl2SBpDvwuKVHdjw1AZ0hF8zHG8o+C iEIIvRZcowEH2n9w+l5tbCm9AKSWpHKdA4bR5ZWnComMNjzQR7jKk4WmCEuP5r+7QFYo bldXVMpaJJEk6C59np8zom/mY/DMqYPXSszNL1MD82CaapPOcJ4LufQ3WXJvjNirF6Gl iEhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LiRg6alm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si9935022eja.573.2020.06.08.18.12.04; Mon, 08 Jun 2020 18:12:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LiRg6alm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388186AbgFIBKY (ORCPT + 99 others); Mon, 8 Jun 2020 21:10:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:49134 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726912AbgFHXGQ (ORCPT ); Mon, 8 Jun 2020 19:06:16 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1D21220774; Mon, 8 Jun 2020 23:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591657575; bh=MvkpziLz+OYcARuVbeGtxopmI4GZl9PufbVqxqdF9n4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LiRg6alm6r3eVfOHOW5WvzaOMAqLQOku9gT94QkQ99Nxx68EDi05y5Dx6T9xzmZcH 8F8wdKCnuhEp5TJY2N7JOjIHt2Z+j/kCOtubOz7Z0gwAFOO9nt1lCig8bXqZUvo4A+ 058BpS+guDhxHS8Ir3k1Uoqm6v7jR/0aCNGYZVog= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Bogdan Togorean , Andrzej Hajda , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.7 006/274] drm: bridge: adv7511: Extend list of audio sample rates Date: Mon, 8 Jun 2020 19:01:39 -0400 Message-Id: <20200608230607.3361041-6-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200608230607.3361041-1-sashal@kernel.org> References: <20200608230607.3361041-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bogdan Togorean [ Upstream commit b97b6a1f6e14a25d1e1ca2a46c5fa3e2ca374e22 ] ADV7511 support sample rates up to 192kHz. CTS and N parameters should be computed accordingly so this commit extend the list up to maximum supported sample rate. Signed-off-by: Bogdan Togorean Reviewed-by: Andrzej Hajda Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20200413113513.86091-2-bogdan.togorean@analog.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c index a428185be2c1..d05b3033b510 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c @@ -19,13 +19,15 @@ static void adv7511_calc_cts_n(unsigned int f_tmds, unsigned int fs, { switch (fs) { case 32000: - *n = 4096; + case 48000: + case 96000: + case 192000: + *n = fs * 128 / 1000; break; case 44100: - *n = 6272; - break; - case 48000: - *n = 6144; + case 88200: + case 176400: + *n = fs * 128 / 900; break; } -- 2.25.1