Message ID | 87frtb3x4k.wl-kuninori.morimoto.gx@renesas.com |
---|---|
Headers | show
Return-Path: <devicetree+bounces-76794-incoming-dt=patchwork.ozlabs.org@vger.kernel.org> X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=renesas.com header.i=@renesas.com header.a=rsa-sha256 header.s=selector1 header.b=ZFJOP56O; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.80.249; helo=am.mirrors.kernel.org; envelope-from=devicetree+bounces-76794-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W37Dk23zSz20KL for <incoming-dt@patchwork.ozlabs.org>; Tue, 18 Jun 2024 10:39:34 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 25A9D1F21990 for <incoming-dt@patchwork.ozlabs.org>; Tue, 18 Jun 2024 00:39:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9BD754778B; Tue, 18 Jun 2024 00:36:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="ZFJOP56O" X-Original-To: devicetree@vger.kernel.org Received: from JPN01-TYC-obe.outbound.protection.outlook.com (mail-tycjpn01on2056.outbound.protection.outlook.com [40.107.114.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B609445BE4 for <devicetree@vger.kernel.org>; Tue, 18 Jun 2024 00:36:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.114.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718670994; cv=fail; b=G7KbSrOIoQ+KCjG+uJk8tUwuzmrwsQJ6VRKPJfoAuaol3PxFQK1DJ93gHAEPYUJO0VK+sG3KMPxEbn2JlHPhv/bdj884U96SSHRHc5QSa70a8cmb9A1s8yohhz0I/UY2j0HgUyrxa9Nxd07AwDLiizPWOptBLQSDlP6EIlqwGtk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718670994; c=relaxed/simple; bh=XBM1Semt3LcPyAGbrWTnEAQty4kR0wtd9GxW6NwZugo=; h=Message-ID:From:To:Cc:Subject:Content-Type:Date:MIME-Version; b=F6i06+qD8+GhhUIn+qanjZVJq3/Y8ATvnUI5VyxFr5MWRV4h7RtUxWNrhUYM/1yLlcl39yrxlI1fHboAmxifCZVjDa1uH8BRHQGFDk12pQfl/+7aYmDqTMRNm0ZG7MdDG6oFcfz81xAvWm3eVb/LyF7nPx3sDA2Byz635OydhMk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=ZFJOP56O; arc=fail smtp.client-ip=40.107.114.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C7yHxe6KO/ZD22tRXYebqeBKaspa29Y0D8HIugn+qA5a3Un03StnAhe4rhRrSATGd2G6141McBT3lMiwatt/r4EwM8JhAsyszhkupOMK91OnShj5ILuyb5YaBrW5CmfVEUcLsPjn7Ic4F56KkNAPrARUCRWXyH/34MgZEn/gVZxkSirS4wQzLsXOnmEdpynIfeB/5yazVagdaZPrMYbufGshOT9itlgeeiE2R4nWvB22W+LglzBIrjcKpvmQom6BlqFP99BgKfCpDhoZycpFpmvJEj1nLioUNLV1H6jRWfrzBgSjfr3xhdyU4V+DwmR5widldqfRcjEvWdNxzfpVeA== 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=N1hfEIeXgQoYrNZhEEhZswvU6a/jCaZnvmy2TMUX/Pk=; b=Urvmy5kcuAvP8GadwGRoTF1PUGlP7I2Q+2MZ4UBuOW6oWl4s3LexfRU/m43+1rqz7RkCpHWqFLU3Q6KKxpHL+PzqvaKK6txV/VeuVZcU+Rnbor1s6SbPhX5gd1AtXGTY20tXBf054dUDxCcSeTjNPgcSYvTIWmMz9YBhzI/YqOUvC+z9q+k5DZGCR/EiCqEZ063u7uvxy73ij4P6u9+M1LpXVqb5YBZg2iw1gdvMhYSwPbwql6cAJkQjcoCNfRRKFW+cCkOKl8lcSZ0r5sWRTN9F8wNARzR53YzcMpgSpFMoZ1x8clOMtE2yVJlU0lPncKzIyNgJ2bsmuOVF60+HxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com; dkim=pass header.d=renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=N1hfEIeXgQoYrNZhEEhZswvU6a/jCaZnvmy2TMUX/Pk=; b=ZFJOP56OqSgON5l8XZqYBqFb++AqdpqL8X/jJaT4mF+AvC7kAl9+UV8KNBT9ue3Acx7qpj42MdezCJ1I8F3UfhabPSuCCO27MvsqyPYA5iZVYhbm145No/co+9u40NEO2ccHUT/YD9fIo5KhPXWoEJSWyD8xGpLEdZhRG24jgVw= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=renesas.com; Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) by TY3PR01MB11574.jpnprd01.prod.outlook.com (2603:1096:400:374::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31; Tue, 18 Jun 2024 00:36:27 +0000 Received: from TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11]) by TYCPR01MB10914.jpnprd01.prod.outlook.com ([fe80::c568:1028:2fd1:6e11%4]) with mapi id 15.20.7677.030; Tue, 18 Jun 2024 00:36:27 +0000 Message-ID: <87frtb3x4k.wl-kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> To: Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org> Cc: Linux-ALSA <alsa-devel@alsa-project.org>, devicetree@vger.kernel.org, Khanh Le <khanh.le.xr@renesas.com> Subject: [PATCH v2 0/2] ASoC: Add ak4619 codec support User-Agent: Wanderlust/2.15.9 Emacs/29.3 Mule/6.0 Content-Type: text/plain; charset=US-ASCII Date: Tue, 18 Jun 2024 00:36:27 +0000 X-ClientProxiedBy: TYCP286CA0156.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:383::20) To TYCPR01MB10914.jpnprd01.prod.outlook.com (2603:1096:400:3a9::11) Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: <devicetree.vger.kernel.org> List-Subscribe: <mailto:devicetree+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:devicetree+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: TYCPR01MB10914:EE_|TY3PR01MB11574:EE_ X-MS-Office365-Filtering-Correlation-Id: fcdce077-2d94-408c-7b1f-08dc8f2eb0cf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|1800799021|366013|52116011|376011|38350700011; X-Microsoft-Antispam-Message-Info: skj+KF0RJ+ZzN5S1PHYGI1kD2wegUmVgH1UELxlW7PHN0GHKkI67tigSyUTyUHxBc/4hGRO1ZgO/d9ca2EGRl96XHftz1hZ+hOVl+el/tH4Ciz7OC5wJCCCfipbsfn4nK0iqEY67nvaHdFVt9yW4AW1QcuOeJx/voTPA0bjQwnBowpwzDPqzP5q8ZiQLFYTkzwSmkWLqXhfLgytXA1wl1gE3TO82m3fonh1ejeKkehdcFUdVeuWz4pzNPHvkY9T5Almt+1L4KtZu9CwDpKByO4l2Ns+Cj2Im53szJLfzhZHwAkOn/QfCx8/VsJkQr3QCYPdMvEunDoyZHZXhzwx8Qs127PGiMkaV0zwni6PqLrEwSkhrXtcGgHb31ZPGM0kLohWqk+SgGh4L0x3rnJ1T5lAIgt4ZRBDTjWIDxe+L9jxOan6bpgWVMM/fRaGym/SVGK7edS8VZfcbfIZXtQiHHqLvDw5xV7gCA+LrgMIpIDZvIyFUu8UAGmhtUfDwlP8d3sV/uPTPK6eD3iO2IAgGOz/p6CGPSgyN9jCNUbo74tzVQ+DyhtIb1hQ37B8Yw4pIuzZsAa/bpC8oV2EkhDaBBkYH7agyP+Fb7dTJPk+z/scRFUj9Bzk1FLz7VLaExSfoOHB9SUcWC1sCku+SYiSYfWp25L3zkYap1cmck7WZmOuJd1VjIaaYY03bLqZyTOeC7My9DBerPgoAmwmH+vMgmLhstQVi7PmMi7BgkyRTDdJED9Se8/0XwWEJ/vrIp6hfcNRMNyAgrqza7VoHnv48ReXhkNnL5hZbV7nCeVpEJi3+PgT7d7HnCPzVT1tv99gHOc41SnK/3F4aIfJksqaIvC141F28NC2/9YidnVAJdi8JALQxnKtoQphMIupGYe8w4KM4+meXXi3G5fgGRvH1Mw4I0Ybh3jmVEcPA62nmkBMnBrM2FNpQZAJbgumNknc3euslmfL5Yd6ExCKrtth14P/sPzO7cTwQ2FJKPz8OdxBG4RIwWBSWqsu/SBGA8wuE0Vd8LyC1mwbV/9ujTrC4iO4MyoIpwmJlEfTDYvjrS/f382qiqAhqWn6W1GtNhlW8LmeOTt+JqnsT0bBKOm9qrHSiHKZ5byrRzvLiGh79FHY4dz8hSc8+Umb2uSWBZK2+Q7bD3qZl9OSaSXwHxn2XTDjbE0C601Q5jVQ8dEu4+cXyAN6zYFAahtmZPAd1F6Z2e+keaZMY1nt90okKSeT9t3fUC6Uow+BIWC81aAiZ3dzrR2TPNMDjKCDWsNdviYJgdytXylZxqs9p2vUjorToFnMV5blMPiYfopLll+WvOdOp5994tSkxrQpgxKbikxBJ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TYCPR01MB10914.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(1800799021)(366013)(52116011)(376011)(38350700011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: mZcp59natkM01EQEktidUMFRJGGbG92yAx5gH+Cqn40mFNpZ25BbELtzQPduWBr6OzPjgCWB6IXSLUzXPwPe2yhV273pe/R9fvFiFkr8lHERYLSSJoLTKMWEBB4ZC+OAP5fm9FlibqqD5MAUyD7jhrCFGWILGPKJE1W363w4qirbCg85Bclut++z1NJPi7sthGszIw0ewhTDnx7t6o8xj5+qkDWKGvIb8rHQ8THAabD8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JFg+kR96Yj1yPTjgxxJ/aEUjP4vKtm8XzQ/wxvACby3/MGgTbV0X8AFASx8AG0xdgxSoxVOGlfknTMUx1tfVqCMAu3eBvSKrZqS9UMrmKKOyub+zHIE+TTvhcXm28Ia1vsY4bQOPt+1n/2Q448FXb1XPEaWfFKxJivHZfXCYZhSoVovYUbyDoXPy5v3YV9n8CLrdoQ/PudGZvspWKIMR7Hg+4kfKyAB0sxXOjdl4TWmkmpOR+ku0OnLjCIoXXjz+CtOEZT/POW5Gz74WSLJlUvbP6YNu0UFJRK19eiXCNxqJvJ2hn5x730qr3D9lkBFWdw= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-Network-Message-Id: fcdce077-2d94-408c-7b1f-08dc8f2eb0cf X-MS-Exchange-CrossTenant-AuthSource: TYCPR01MB10914.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2024 00:36:27.8700 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: npACvHL+YA4v9fUsLkxkbPJkeyhWqMsUA3qF+pSbFLgxu+BswVWLRzhs5TIpmViTYIm9m1DFxCgg7DuSHR1J1pB1c/eJy3fs2G/T+2CgTKo4qGYTf9xnEw3xGobxqo0g X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY3PR01MB11574 |
Series |
ASoC: Add ak4619 codec support
|
expand
|
On Tue, Jun 18, 2024 at 12:36:43AM +0000, Kuninori Morimoto wrote: Looks mostly good, a few small nits: > +static int ak4619_put_deemph(struct snd_kcontrol *kcontrol, > + struct snd_ctl_elem_value *ucontrol) > +{ > + struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); > + struct ak4619_priv *ak4619 = snd_soc_component_get_drvdata(component); > + int deemph_en = ucontrol->value.integer.value[0]; > + > + if (deemph_en > 1) > + return -EINVAL; > + We should also check for negative values here, those are also out of range (many other drivers are buggy). > + ak4619->deemph_en = deemph_en; > + ak4619_set_deemph(component); > + > + return 0; > +} This won't return 1 on change so will miss generating events confusing some UIs, the mixer-test selftest should notice this and the range check issue. > + /* Only slave mode is support */ > + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { > + case SND_SOC_DAIFMT_CBS_CFS: > + break; > + default: > + return -EINVAL; > + } Please update for the modern names. > +static const struct regmap_config ak4619_regmap_cfg = { > + .reg_bits = 8, > + .val_bits = 8, > + .max_register = 0x14, > + .reg_defaults = ak4619_reg_defaults, > + .num_reg_defaults = ARRAY_SIZE(ak4619_reg_defaults), > + .cache_type = REGCACHE_RBTREE, > +}; Unless there's a specific reason it's probably best to use _MAPLE for the cache, not that it's likely to make a difference to a driver with such a small regmap.