Received: by 2002:a89:2d5:0:b0:1ef:f8eb:5d24 with SMTP id d21csp38621lqs; Sun, 17 Mar 2024 09:29:08 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXzjWYHOn3gFMuprzmI1m0WVZuFlCCZkIzYNx9glXrBPo+hXnume6AgaUyHzS5P6GBvE5QYJgCmSwLkR6HR4cxXsTgNh/+sFb55hq0yMg== X-Google-Smtp-Source: AGHT+IFtmPbRJUDx54Bwr37EEApdO3Hi2u8myMlltIbpFkrd23xbIIQ74WkYu7tcn9ywUMR8ap/3 X-Received: by 2002:a05:6a00:983:b0:6e6:9c97:a90e with SMTP id u3-20020a056a00098300b006e69c97a90emr12252150pfg.18.1710692948488; Sun, 17 Mar 2024 09:29:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710692948; cv=pass; d=google.com; s=arc-20160816; b=RIfGyUmVXqSxlijnreEX0sAyCYkHPbRJzwQ9/7+AfOkVzwnKS3jPJe68viN+QiMko0 M2e25VDO2vACP3MDINOObRG5TEOJTGmBlXv9v+EYtWyO8sRDoMzaFmQybUoburLeNmvb 6erdmFK1y1p7usgWTxJxkXt1HyCYdLDIsCnxHlOtlyURyXbDI6NOsWrH2L/fMmkio3Iy XATJyqg5Cnvry4We7+uA/qW8/ZognRL/PNQd+JiuHPPwKAjv/TwYONU14E7S0INJPIyh co8lsVwMoLzWqNikic02trQ/X8ysObZ9kx7qdY0Y++JjLupY1FLKvnv3Ms+kHRhoamym dnmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature :dkim-filter; bh=4qS7So0Sq9vro7xE2zLDXeUD46+3m6X+u8Tq5QOIzBo=; fh=IbuSOb82+RXRKeUr/JBBbwf2ycFuwll79mfMmLs3104=; b=tMsrjzr9xXPWdLnO61IXyMuCvAXweSUyYbvXOqXz2rh1qPtL9OQtwQKcZnS+43GWDI 1CgEu8ezAJpS1Enm5DUY50H5eoGx/UNLD96ShycjjLUak06E8uCw5w+geyYKcm/dgjpg DWccRyK2izHkAEPbM8PWvP9m0TcSL/7w0ycjaDn7X0E+quAKvBeA0yliPB9POwESpbUE B5EF9BJuqU58kMS23FzrrAOKypWMv8RnSzyxPqFhIK3b/ulKJ98deWwj0eDVsZV3Rtji 2Oa8sm5kZC/kQ7IvlQpKUGf2y88Usys7WSxeg0xo29guz8eSLKj1GbuLGlcAU18a8Z27 hjbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=tW0w0m6R; arc=pass (i=1 spf=pass spfdomain=sberdevices.ru dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-105473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y1-20020aa793c1000000b006e64519650esi7402079pff.205.2024.03.17.09.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Mar 2024 09:29:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-105473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@salutedevices.com header.s=mail header.b=tW0w0m6R; arc=pass (i=1 spf=pass spfdomain=sberdevices.ru dkim=pass dkdomain=salutedevices.com dmarc=pass fromdomain=salutedevices.com); spf=pass (google.com: domain of linux-kernel+bounces-105473-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-105473-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=salutedevices.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 07EF82804D9 for ; Sun, 17 Mar 2024 16:29:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E3E9C1DDD5; Sun, 17 Mar 2024 16:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b="tW0w0m6R" Received: from mx1.sberdevices.ru (mx1.sberdevices.ru [37.18.73.165]) (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 3A9DF208A3; Sun, 17 Mar 2024 16:27:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=37.18.73.165 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710692886; cv=none; b=CmaGoPkG3+n8UGc93yWt0JWfx1fdRPMobcx7cHCZeMZA9MjG29j+NWksuf8w7RvpMoQZAYlmXYJMivWrNtBMO2bdfoktLfI/SAWY0QRAbfEsA0QNJdFHEbnTu4HxMM4fn212Ax6DhCMTvZJdT4b18YpJ9oEWRQOHZsSOFKWXo+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710692886; c=relaxed/simple; bh=FZB+Ru54xR1WMMpBS6VYjrA31Nq/JCKODbm5lDsavoU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=PXzvQBfPvY8vS6is8lBW1on166a2j0pEO+Oxa7dwIHrOZAbaWAo9doH6ZnpIp55Mg9Q7jY75lBHQeeWLWmFdON6oC+7M6zPokoy978ch+K/pAp9rYrwgtdxgRTsHmKUE6YOTy1f3BBTpdM9gbwX+9OanS9t1g6YMWdbwJNYtZrg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com; spf=pass smtp.mailfrom=sberdevices.ru; dkim=pass (2048-bit key) header.d=salutedevices.com header.i=@salutedevices.com header.b=tW0w0m6R; arc=none smtp.client-ip=37.18.73.165 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=salutedevices.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sberdevices.ru Received: from p-infra-ksmg-sc-msk01 (localhost [127.0.0.1]) by mx1.sberdevices.ru (Postfix) with ESMTP id 74482100006; Sun, 17 Mar 2024 19:27:57 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.sberdevices.ru 74482100006 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=salutedevices.com; s=mail; t=1710692877; bh=4qS7So0Sq9vro7xE2zLDXeUD46+3m6X+u8Tq5QOIzBo=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type:From; b=tW0w0m6RJF1gAE8R44hsxulHFsWnRUpT4WgEYVKp1z2mHww8GdOgs2W7gkOyYeZrA 0doNe4sA+BxnMVi/5Zdk1modCoIZUj3NeT/bbbgCZPCpOEBHjHbfIr079ybI5Bma3y gGHNhvIVgsk94SRBmJbiYquUXAW9zSPHnQSUwSKZpEPEYRESbpBGpco6KMbOk20/xR 4BNgal5O4neLf422l9A9Tf4nP++vFSjgunGVtQvOjE1EOw5Rog/YBc7126L7bf1ulE 1ZXf++qiKcaT2HXRPbzn9TjrMta/y8+rcd8VbGWdFkRow50TRXjmfBHBxr1dSGlUUC E2RZul9be+Ozg== Received: from smtp.sberdevices.ru (p-i-exch-sc-m02.sberdevices.ru [172.16.192.103]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.sberdevices.ru (Postfix) with ESMTPS; Sun, 17 Mar 2024 19:27:57 +0300 (MSK) Received: from [172.28.160.49] (100.64.160.123) by p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Sun, 17 Mar 2024 19:27:56 +0300 Message-ID: Date: Sun, 17 Mar 2024 19:27:14 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/25] ASoC: meson: t9015: add support for A1 SoC family Content-Language: en-US To: Mark Brown CC: Neil Armstrong , Jerome Brunet , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Philipp Zabel , Kevin Hilman , Martin Blumenstingl , Liam Girdwood , Linus Walleij , Jaroslav Kysela , Takashi Iwai , , , , , , , , , References: <20240314232201.2102178-1-jan.dakinevich@salutedevices.com> <20240314232201.2102178-13-jan.dakinevich@salutedevices.com> <5f8e8cd2-f9c4-4961-a85d-a0f3217294e6@sirena.org.uk> From: Jan Dakinevich In-Reply-To: <5f8e8cd2-f9c4-4961-a85d-a0f3217294e6@sirena.org.uk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: p-i-exch-sc-m01.sberdevices.ru (172.16.192.107) To p-i-exch-sc-m02.sberdevices.ru (172.16.192.103) X-KSMG-Rule-ID: 10 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Lua-Profiles: 183875 [Feb 29 2024] X-KSMG-AntiSpam-Version: 6.1.0.3 X-KSMG-AntiSpam-Envelope-From: YVDakinevich@sberdevices.ru X-KSMG-AntiSpam-Rate: 0 X-KSMG-AntiSpam-Status: not_detected X-KSMG-AntiSpam-Method: none X-KSMG-AntiSpam-Auth: dkim=none X-KSMG-AntiSpam-Info: LuaCore: 7 0.3.7 6d6bf5bd8eea7373134f756a2fd73e9456bb7d1a, {Tracking_smtp_not_equal_from}, {Tracking_from_domain_doesnt_match_to}, FromAlignment: n, {Tracking_smtp_domain_mismatch}, {Tracking_smtp_domain_2level_mismatch}, ApMailHostAddress: 100.64.160.123 X-MS-Exchange-Organization-SCL: -1 X-KSMG-AntiSpam-Interceptor-Info: scan successful X-KSMG-AntiPhishing: Clean X-KSMG-LinksScanning: Clean X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.0.1.6960, bases: 2024/02/29 19:21:00 #23899999 X-KSMG-AntiVirus-Status: Clean, skipped On 3/15/24 16:36, Mark Brown wrote: > On Fri, Mar 15, 2024 at 02:21:48AM +0300, Jan Dakinevich wrote: > >> +static const char * const a1_adc_mic_bias_level_txt[] = { "2.0V", "2.1V", >> + "2.3V", "2.5V", "2.8V" }; >> +static const unsigned int a1_adc_mic_bias_level_values[] = { 0, 1, 2, 3, 7 }; > > Why would this be varied at runtime rather than being something fixed > when the system is designed? > >> +static const char * const a1_adc_pga_txt[] = { "None", "Differential", >> + "Positive", "Negative" }; >> +static const unsigned int a1_adc_pga_right_values[] = { 0, PGAR_DIFF, >> + PGAR_POSITIVE, PGAR_NEGATIVE }; >> +static const unsigned int a1_adc_pga_left_values[] = { 0, PGAL_DIFF, >> + PGAL_POSITIVE, PGAL_NEGATIVE }; > > Similarly here. > Both mic bias and ADC's input mode depends on schematics and should be configurable. What is the better way to give access to these parameters? Device tree? >> + SOC_SINGLE("ADC Mic Bias Switch", LINEIN_CFG, MICBIAS_EN, 1, 0), >> + SOC_ENUM("ADC Mic Bias Level", a1_adc_mic_bias_level), > > Why would micbias be user controlled rather than a DAPM widget as > normal? Yes, I could use SND_SOC_DAPM_SUPPLY, but it supports only raw values, and doesn't supports enums. Here, I want to use enum to restrict possible values, because only these values mentioned in the documentation that I have. -- Best regards Jan Dakinevich