From patchwork Tue Feb 19 16:15:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Codrin Ciubotariu X-Patchwork-Id: 10820145 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E46A91805 for ; Tue, 19 Feb 2019 16:23:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF8B02CC13 for ; Tue, 19 Feb 2019 16:23:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C403B2CC16; Tue, 19 Feb 2019 16:23:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E64F2CC13 for ; Tue, 19 Feb 2019 16:23:49 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5C1FB26553C; Tue, 19 Feb 2019 17:23:48 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 53C1226553F; Tue, 19 Feb 2019 17:23:46 +0100 (CET) Received: from esa5.microchip.iphmx.com (esa5.microchip.iphmx.com [216.71.150.166]) by alsa0.perex.cz (Postfix) with ESMTP id F3BB2265538 for ; Tue, 19 Feb 2019 17:23:43 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.58,388,1544511600"; d="scan'208";a="24900743" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 19 Feb 2019 09:23:28 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.76.108) with Microsoft SMTP Server (TLS) id 14.3.352.0; Tue, 19 Feb 2019 09:15:44 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector1-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q2ALYGuUtMAD5CLQ0EeOIvbCgyLbfb0kQAVgZnmJH8E=; b=cqWgiMudzHc5JD/hplbjtKZG1b4ehbUf2fj7eMfoovUOGdnebTlFOsHYUiNmimZr/xnMgzg0qmlfaN4b1lcuowC59KJmMiYfB1ne0fA2tod/mNiyz6UlTw78F43VrOpj57ogU7woWcQ//JJXM+nqwwMq9LG2fAokfJlmHNswNtY= Received: from CY4PR11MB1256.namprd11.prod.outlook.com (10.169.252.10) by CY4PR11MB1814.namprd11.prod.outlook.com (10.175.60.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.14; Tue, 19 Feb 2019 16:15:42 +0000 Received: from CY4PR11MB1256.namprd11.prod.outlook.com ([fe80::d9cc:7741:4930:cda3]) by CY4PR11MB1256.namprd11.prod.outlook.com ([fe80::d9cc:7741:4930:cda3%8]) with mapi id 15.20.1643.014; Tue, 19 Feb 2019 16:15:42 +0000 From: To: , Thread-Topic: [PATCH 1/2] ASoC: codecs: pcm186x: fix wrong usage of DECLARE_TLV_DB_LINEAR() Thread-Index: AQHUyG5ckbI47UgWGkCR6aNSYU4cPA== Date: Tue, 19 Feb 2019 16:15:42 +0000 Message-ID: <20190219161518.1331-1-codrin.ciubotariu@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: VI1P194CA0054.EURP194.PROD.OUTLOOK.COM (2603:10a6:803:3c::43) To CY4PR11MB1256.namprd11.prod.outlook.com (2603:10b6:903:25::10) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Codrin.Ciubotariu@microchip.com; x-ms-exchange-messagesentrepresentingtype: 1 x-mailer: git-send-email 2.17.1 x-originating-ip: [94.177.32.154] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c59cdd9b-ec49-42dc-7080-08d696857eda x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR11MB1814; x-ms-traffictypediagnostic: CY4PR11MB1814: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; CY4PR11MB1814; 23:h+BhzaFJiKq3FgYzXA1cA0RwnHkMPIYkAtKkmNf?= =?iso-8859-1?q?FyceOXkH+83WgQe?= =?iso-8859-1?q?+R+mDmNWVYZBqCUxGpBn+/HjIRZ64B2WEmXEcG300XSPWdbI3UDhFoCQmW6x?= =?iso-8859-1?q?lgB5Ik0BQ8X+cSxmHqr2+pDWOPijJhb9nqflNVOxT50c1eP2EjCIXPfcR+gB?= =?iso-8859-1?q?RIiyrK2PK9rIaceQDd59eROGK3Gsq1H9fP80RgHhOs0cSUJ3w6cY7qQANTso?= =?iso-8859-1?q?oKjnLvE7jpIF/kLj2DEyQaGSzR29dt+fOoxOX4dMK3M17E6njaYUVL0nDKy8?= =?iso-8859-1?q?tN9YUUmmuoBb5pEfBBFQS5KMHhJWUoRXYiRC9czZqeA5guKlHv4QKS9DQCr6?= =?iso-8859-1?q?UaC8vWpqG87VN2Da2HW0CA9O3TFqnd8ItDYnyiOKSQI7fE7M994U1Jg/VaDW?= =?iso-8859-1?q?Bsa8RHRk3w31q39FKH8kbG2sPKfJ7gD0dguWlzOlr16UOwL2yWg1k5LxEaX6?= =?iso-8859-1?q?IuneDN040lwlc/V0CYwPwg8RXlGcvGrqrZpj52AeGDvYsIP10/G3mA/ANnbr?= =?iso-8859-1?q?tcQoB2vo1K/MEucVEu7bHdZNGktRg0Pzu9qGnQudV1Knt46ikVHDJxh+jMQZ?= =?iso-8859-1?q?+yfLf7xyJ+9dZTgqUq8SnEPpG3gXUv+7iQLYykgoVvJsaCbNFb55i89qtpGc?= =?iso-8859-1?q?qe7ncMSl97fsky09lVNx/kjLKRYOOMuMxclx9tj8hqHyfUu2FLZNN2Q8aTmd?= =?iso-8859-1?q?kaDaugeq1bNXRaKZ52IlmrtiUnHgSVo9pYu1Nws3Kp1GpP2F2+75cWgk6kKy?= =?iso-8859-1?q?lMQxiU6rLDDS3akIKCYuQwfJ1HL69rnD7fRF4nDAGiPNp4JqCuw33OWB+GQQ?= =?iso-8859-1?q?9PLtkzGyKFs6uk2ICssxUJbsJVUaEsJsQRNh1wUapPGa5k/mbPca5e4yw3SI?= =?iso-8859-1?q?oZUym51AravTdsJ8a11OToE7FNSf4spGjBoA5IUyY3D9JDcXVOwmDESm3g5W?= =?iso-8859-1?q?U+JWMZ/CQBULr6RQ+z1HIY/Chki3ZTefzNnv/VkbnZtYrPR2wrZkWTlAn/2P?= =?iso-8859-1?q?wBpL9NERnz/sJO+vjQqsVdqjjoKwXcj4fdmctKExPhLFMK/AQiO96PZUFwY7?= =?iso-8859-1?q?MK+7e9v3k4fbNqlAZ5vxx18j8yhLlejqb/JHI6X6T19qONPpdU2zoKmT8Gqm?= =?iso-8859-1?q?1WP66y5HErnI09Fsf24r1lNNPWhxFN4KEmh10MbZSxu68XVFOuoi1tJkzJbB?= =?iso-8859-1?q?lKUl4+55xXNbp7OaV+tLQIhyCrFeYLxY2z+k1YXKp7rA=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 09538D3531 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(39860400002)(366004)(136003)(396003)(346002)(199004)(189003)(6486002)(107886003)(476003)(6436002)(72206003)(26005)(2616005)(4744005)(25786009)(106356001)(1076003)(53936002)(486006)(97736004)(105586002)(5660300002)(186003)(2501003)(6512007)(4326008)(81166006)(81156014)(8676002)(71190400001)(68736007)(316002)(478600001)(110136005)(86362001)(71200400001)(66066001)(52116002)(256004)(6506007)(386003)(305945005)(7736002)(102836004)(50226002)(14454004)(99286004)(8936002)(3846002)(6116002)(36756003)(2906002)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR11MB1814; H:CY4PR11MB1256.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microchip.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ztBvgqLzhJjl782V/UmBt7v44y6KZVwzpRmegX8D7w3YWnUdrD4tPVtBw5ijqNRTf5FrsdsiEd0xDGFXNog/sdYfTiCVXPX6hB9q+YwTN3FKogaCO5JroJ3tiVAyRdr6PoOCqqPswzuMeVjFwL3s4LlotXsdwaaOCFgW1hi8x+gJxgsQEpk7wSBNzYkJOhtW2HLCQEZ6dwGWyljKnZtpj8/9pC3B+T961ENqdHeWjuLYIiRAo3u2QL2YpAVbRGAxtJ7EtMnA8m6Me2bYXu4A0uhg1HATD4M9xQhNoFK85HO2m7A9EKc5B0elkMOaUhfN6mruc0oGaH8+894sjvDBLESbetOJhx2DBbN11sBhGia9N65gsR+5tuFdFtmrP8nXJoZzfUcDpOlnungQEdnPX4/+OLS5Ny6GUzvGPBU4YpU= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c59cdd9b-ec49-42dc-7080-08d696857eda X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Feb 2019 16:15:40.4880 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1814 X-OriginatorOrg: microchip.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, afd@ti.com, m-stecklein@ti.com, Codrin.Ciubotariu@microchip.com, dannenberg@ti.com Subject: [alsa-devel] [PATCH 1/2] ASoC: codecs: pcm186x: fix wrong usage of DECLARE_TLV_DB_LINEAR() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Codrin Ciubotariu According to DS, the gain is between -12 dB and 40 dB, with a 0.5 dB step. Tested on pcm1863. Signed-off-by: Codrin Ciubotariu --- sound/soc/codecs/pcm186x.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/pcm186x.c b/sound/soc/codecs/pcm186x.c index 809b7e9f03ca..7947279243f9 100644 --- a/sound/soc/codecs/pcm186x.c +++ b/sound/soc/codecs/pcm186x.c @@ -6,7 +6,6 @@ * Andreas Dannenberg * Andrew F. Davis */ - #include #include #include @@ -42,7 +41,7 @@ struct pcm186x_priv { bool is_master_mode; }; -static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 4000, 50); +static const DECLARE_TLV_DB_SCALE(pcm186x_pga_tlv, -1200, 50, 0); static const struct snd_kcontrol_new pcm1863_snd_controls[] = { SOC_DOUBLE_R_S_TLV("ADC Capture Volume", PCM186X_PGA_VAL_CH1_L,