From patchwork Wed Jan 4 02:57:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13088157 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16046C4708D for ; Wed, 4 Jan 2023 02:59:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 596F7829D; Wed, 4 Jan 2023 03:58:36 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 596F7829D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1672801166; bh=vdd1us7HjjScn+yBUHCcf5h6wlX9PRtSc/sUqbe5RcQ=; h=From:To:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Cc:From; b=urx270586vZ3dNLY6xY7XllAgTSvjXtVog2CbmCvKI8NrehF2ioRZoTrWcooDdZjt gGUMJuJEUmIl2J1bbQ5d5vvNTkRpRY4xEfIoWJm+NwKkTXwWyM7oQZd5iEyDQMTqgT PWTxRqUt5mgsxhhOE8GzEZ57JWjGfhCfXFNx8psw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 09052F8024D; Wed, 4 Jan 2023 03:58:36 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ABB5CF80240; Wed, 4 Jan 2023 03:58:34 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2071.outbound.protection.outlook.com [40.107.22.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 82B7DF8023B for ; Wed, 4 Jan 2023 03:58:32 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 82B7DF8023B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=VtlGilN3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AUOuoXyUSdsevssDmHvsepMD0iDXvo9shQ+Yrm7jAAPU0JtSl9JDPPcyy1neUuTCLrnsZ5OcRxfi8VR7sQ/jfRQoOWCW6TTjSAAf86XWpmAi5VGghbzm5mkAZ8oLfeHw3eN6EpmA3Cq5i6TBwattsKkiFLQBXQXH/2kqKIaRfipyyvruFvRD8MkoqERp7p7P3aZl8Qm0Eh1uuGyZ1xbcjqo1cD6gq7IfAWCsZ5v4Kz2p8hJbjCQUKGrsBGOBgy8sBf686CtdX8s6mUtcxiGBUzFXKVCkeJkDAMBM2t6VvOQ+yv9XsCT8+p/9VAVDYBH5YMMkTcAVJxvqP0yQRQkY3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gnLGiYFi4LereKa+NPSlcj9TnzVQ3MMfEnS7AizFYnk=; b=MLNjl9/0HZ3nO4+z2NmQuC+Q80KzGodC1FX87umDFFmkkJ6jlvVYXIM++NAZQqpKYtCRGXvfBMkeI8D9g8eCHHva+GRwNIpLNnKt9gtzTu2VYMABK1MuS614VA+/ap6pjxfZLrcCkhGdAIf+FF+c0d/rpums2Q8OBmP4Yk2T/svrwzGYF+TgYwM/JY9xdVE29FB1qbsYcce1lMmJ+dwNPasn917wCiaDAjkeDOx3SGSoqaY1b4F4d7DGduRLrvqPXOS/Jaq6l8ypifMAkJRu9+mjLJN8opQTMWIHM1rH2gy9RY/GohMHMTTlE5k5jdo5skYbGC21SPjR23QVA0L57Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gnLGiYFi4LereKa+NPSlcj9TnzVQ3MMfEnS7AizFYnk=; b=VtlGilN3vQl75jb1m2W/TU0ajfI3dBfpqQFMajokL9PGDojdrVnwGJ6QvQ3vH6L1/+Ga2kKztXrRrhDhxLyYf/1WhwkYOevkecNDWeaFzYjySmJnJc3YaFQiDB4zFYKZsjHUOguEjRL+la5Q4NSWWdLMzD8J0hziAuSQomy9gys= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:5b::30) by PR3PR04MB7387.eurprd04.prod.outlook.com (2603:10a6:102:91::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 02:58:30 +0000 Received: from AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::c1e7:eafb:408c:6ae5]) by AM0PR04MB4211.eurprd04.prod.outlook.com ([fe80::c1e7:eafb:408c:6ae5%4]) with mapi id 15.20.5944.018; Wed, 4 Jan 2023 02:58:30 +0000 From: Chancel Liu To: shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: fsl_micfil: Correct the number of steps on SX controls Date: Wed, 4 Jan 2023 10:57:54 +0800 Message-Id: <20230104025754.3019235-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SYBPR01CA0061.ausprd01.prod.outlook.com (2603:10c6:10:2::25) To AM0PR04MB4211.eurprd04.prod.outlook.com (2603:10a6:208:5b::30) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB4211:EE_|PR3PR04MB7387:EE_ X-MS-Office365-Filtering-Correlation-Id: 7dffc2ee-378e-4cfd-b6b6-08daedff8e2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: M500dH7W0DTSwtskjXztaC4hOUvORg+q/ng9OE/7EZTvpu5bhI1Ei/pbUkna6/zV3NtqcgzSpfpFgkxf5W5lIRLh/beIFxlpeZtywfTAf2N9YxYFpZPi7ulqL6nuoe/fjgzFZNsFtQNmvb/ZEzm+QWIDbXBaxRCUnfijpWrcAdO1hAmnZlK70QO+w+TuOpkJuCw3TStY9Iua1tK84vBjDSRLxDVoQF2rES9VE/QUoKc1WfAU5B0vko0TNyj23klmWWdkDuHGv+gvcyEgiXxvILwknn5QuuTN2ZHRhYmmMFZQVDVnhqzo/zd0gMYF7YgnNqsBa2sRDAJsHR4eAKgcNP2tPfu8I+eX5UMUOpsjju8wsWdTl7J3hjcCWZOd9x08i2V+MEf2TLduQqK7n27inot/Tf0rEXi/tAUdq/uU0ScAv95pe89ZZR9WNrJANup3lYVpahrESW/UbZo7Pif1F1rhU/1B94PS62SRAmrN9R0rFiNe6Ot3W0b+6GA253gFl04j6mjKBGXhT7cJJPOqEMU/6fRcaTwuhKVNxFRyp2lVfApj4BJrwqpL4aSSxN0Z9PXvKm7drHqDSf5k7K8j2z94LIPuJAwIvuwVXQ6u9Fw3y3ggYSXcNx2PY2ETuyh9PImlc/usK4tzFbEI81GN6xbqiWBu37DWkWFSYBNZK+rw54HhVaqOr3Js8IizdA356RIqwn2HAe6sCClUYSN2yw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR04MB4211.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(136003)(39860400002)(396003)(366004)(376002)(346002)(451199015)(36756003)(2906002)(8936002)(921005)(38100700002)(38350700002)(5660300002)(44832011)(41300700001)(7416002)(83380400001)(86362001)(6486002)(52116002)(66946007)(6506007)(6666004)(66476007)(8676002)(316002)(66556008)(4326008)(186003)(1076003)(478600001)(2616005)(26005)(6512007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mi64PLMtPlNjyvRFjkQ5JUdKc8Q3CCfX80s2KhTcqf1HqQhspHTCAnyAd8L2VDjvZQcz6FanlUy6VjsOfrArwckgyd43/8gsAGZmg83o5fCKLD6ZfqTrtZZdJQs6wZX/87y1lO7A7vuki0QevGrg/GND2Rzs/KHvjPuRngR/nQehmprnyMPxuYMy8FRZr564UAf/eY0ER6AiFHcQB8raRI1dMB0ChHz41u0mdXeZfdTxvqmIIUjJp05i6ZIh2MJD+6GkZDGesAUrH1xtsCLsmFO4/LunCTrC0IurfRcW2RSYKr1VAGsJIm/rI8nFcC/9ndUxbLVhbqSKe+hn+mneX+V/BhIN+jEjKjo11CYz9tzAXc0qy4XgG0Asv430flKU5InVeOfF6eicKVBaC7m4YDssFGIEupQE4pupxu8RrVg81Ej7NCUyZh6u6e5PnIifyC3dwHMYbyFOU6rjvift573vQItgFh1oEyY0h0MhOdOLygmrCCqsIhe7USd/IpoFINTsJy2H5P/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.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7dffc2ee-378e-4cfd-b6b6-08daedff8e2a X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB4211.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2023 02:58:30.5202 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Dfj8v4TNCTy2iU+8YdpdfGMCCgUU3REiw79yH+yvXYlwsWI2KIOqZXw8+ud2Ez787mq/k43ridwI887Jrx0cZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7387 X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.29 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: , Cc: Chancel Liu Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The parameter "max" of SOC_SINGLE_SX_TLV() means the number of steps rather than maximum value. This patch corrects the minimum value to -8 and the number of steps to 15. Signed-off-by: Chancel Liu Acked-by: Shengjiu Wang --- sound/soc/fsl/fsl_micfil.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c index d7e6fc996166..d4d3bc7ca87c 100644 --- a/sound/soc/fsl/fsl_micfil.c +++ b/sound/soc/fsl/fsl_micfil.c @@ -325,21 +325,21 @@ static int hwvad_detected(struct snd_kcontrol *kcontrol, static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = { SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(0), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(1), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(1), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH2 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(2), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(2), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH3 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(3), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(3), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH4 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(4), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(4), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH5 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(5), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(5), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH6 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(6), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv), SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL, - MICFIL_OUTGAIN_CHX_SHIFT(7), 0xF, 0x7, gain_tlv), + MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv), SOC_ENUM_EXT("MICFIL Quality Select", fsl_micfil_quality_enum, micfil_quality_get, micfil_quality_set),