Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752676AbdFSWKB (ORCPT ); Mon, 19 Jun 2017 18:10:01 -0400 Received: from mail-bn3nam01on0132.outbound.protection.outlook.com ([104.47.33.132]:51130 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751988AbdFSWHm (ORCPT ); Mon, 19 Jun 2017 18:07:42 -0400 Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=maximintegrated.com; From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, ryans.lee@maximintegrated.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: ryan.lee.maxim@gmail.com Subject: [PATCH 2/7] staging: max98927: Added controls for Envelope tracking Date: Mon, 19 Jun 2017 15:07:21 -0700 Message-Id: <1497910046-3369-2-git-send-email-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497910046-3369-1-git-send-email-ryans.lee@maximintegrated.com> References: <1497910046-3369-1-git-send-email-ryans.lee@maximintegrated.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [204.17.143.20] X-ClientProxiedBy: CY4PR2201CA0021.namprd22.prod.outlook.com (10.171.208.159) To BLUPR11MB0833.namprd11.prod.outlook.com (10.163.217.143) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0f7e074a-be4e-4a32-fd0a-08d4b75f9931 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:BLUPR11MB0833; X-Microsoft-Exchange-Diagnostics: 1;BLUPR11MB0833;3:hmwHeh/1svDCgjHDdZqlZSfkrTiTfb2sCTwok7bvxlWgQ/Mcxykb+QhMNw2fap3AwlEKYC+rSfjMznJqzBNRXjdtpDKjHCWGW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1yz/EqXvkb+GXldGlVcwSm5x2x4g5CfO8G1xWNYTiZMbPTGCvjDhEK2HUFhGdQ2k6p5S1/5wi6hBawGPD5TXQ69loI/IM+tlya4zJMVynkzhHATAUPcBnhtuQDif5h8NXABybG9NNNdzZ/l4EZRACN8wJGxe9pWhwmNxeM+2/8Q6WL81ADPo8RJXQGuZ2KUpcgc6UUM+f/ZmG7/P8ID2qQWhZ2+o6/eK0elMNyQcSzMF1u8f72H55HXjeaQFqAW8PJa0w4LK3TeoMxltxkICiB1mE/4eL9Eo9x790Ivxj79WaIAtDZ2hcUevLdmp0cxCA5b6U5sdPfK+LzF6yiMrHIqd4QAz8e1W2uwlLPYo6g0YL/X3BtJz8cbDtxnlQuzQtxZsgEwiyxk0MgOknOlg76SEeFJanXRYJkQSv5/q5CIgpC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(108721460000369); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(3002001)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123555025)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BLUPR11MB0833;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BLUPR11MB0833; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR11MB0833;4:S7wwZqglIIA6S5OGUXqB6m/iUNnLlZ/7bVBNiKrUqe?= =?us-ascii?Q?XhuIyscs6g77qNKIv+WUE1UeCDztcDccNs9h/IMe2U8bTRmZT7JESwbpYoti?= =?us-ascii?Q?gxrAjIvV/W4xJcyuLWa300RwLJCHAonUbnGnfmK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h7ozSEokoeFpnxK51tflFInvgXzX0bHmLiWSlNXfK2J?= =?us-ascii?Q?VnkM7FbQcujrPkt51KKy/Gdt7ClVQyQP0hG8iP/fcqWRc9eOkH47MizJel+u?= =?us-ascii?Q?E5XJPVpiSBDT4GyW24Qqx1lX2FOBVBr4Gv5YE+Lrc4fYal82JctlQxg0tmqW?= =?us-ascii?Q?pN++JsyBBxEaXhM2zzgVS7fCljaWabYuro?= X-Forefront-PRVS: 0343AC1D30 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(39400400002)(39410400002)(39850400002)(39860400002)(39840400002)(39450400003)(6486002)(53416004)(7736002)(42186005)(189998001)(81166006)(50226002)(8676002)(5003940100001)(86362001)(50466002)(575784001)(5660300001)(53936002)(6512007)(2906002)(36756003)(305945005)(66066001)(4326008)(6666003)(110136004)(38730400002)(2950100002)(47776003)(478600001)(33646002)(3846002)(50986999)(76176999)(72206003)(25786009)(6506006);DIR:OUT;SFP:1102;SCL:1;SRVR:BLUPR11MB0833;H:ryan-linux.maxim-ic.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR11MB0833;23:00DpMM+0Hh2FKtf2GKPyFfR/7mVs0OJHdxy55fOoG?= =?us-ascii?Q?l7ag+lOepO5JwZ2mBr2ESSwctkG7ePFe1rWI/mC6LmKgRH5Lz2bHx7gy3J+u?= =?us-ascii?Q?37w3hzosNVVbODajM5zKtAncO3W15B73GyIdMQPjfW2tzAmSxfnE+jYewYAy?= =?us-ascii?Q?ERWgFxC7621D8btxon6qBVGwyiAthJzgiT4ugKvSo60WQePMGmsX8/4xpWg+?= =?us-ascii?Q?UrJE7JMgVPm1SwiLOCQR6Pl93XzUfiKiXckn/TSpiZ5WEfK7A+diydowZ/dD?= =?us-ascii?Q?+/tQg7qelW+QL1sNk1H0c/oMTp8y62kVsA9me7lZH7k1MNe/Wp4HU27TWkbJ?= =?us-ascii?Q?Uf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blAkRksa9J6ao?= =?us-ascii?Q?Av2k9LlR3vbK2OnQcfrz42?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR11MB0833;5:8Z1B6dY/Dd76RjD59qxR342nM5MD8bw0yE9Mf6IcZkwPpbuYHwN6ZT2hZTOB3KgpPnmia0qmrHbL90y4HXLWipLOI0ik185lGuQveJ2RuA/3A7yie1S1SWCxTOQ9fuAknHFlKE3decu+eKfbyCvoIRumQ1sAd9+huiBJrWbMlwWllEZb/J9HtXH7ZeEqM+e8OEBcUAbWLbGdLz8ueBVdWa+iAFmFwThBIYTB3cZDej6MEfJorgTE2mTz+sm9WSYZMnejpPPhWEwqYne/3N7gQTYXj8rPsEc6PKR+rPQ1RqsStaPbAegdbL4bemP2cH7nim3wfTVSVrUebw/trkrBeATyjXf2ooFKgt+QGNVMZlSEulucbRRWSdmBp4ZtcorxW/K6HLgt1oKI4/KFnGNAXahPbx/4oGzvz0ZU/WFwzDzLek6r+TXnlgSNziOrm03SD/tNaqpAxNVlqjDKZl00bnGSk/kFth1wvzmRbWbROapmjsOWHW4W8AGGA9Vcstb/;24:H4xpKkl5c34jkyVbvnEG6FzoqkUzES5OdYxmwfKxcP5YqEE74hnebJxi/NjdffJfrdxuVC88HiYeXrlDUDZsqKIT0t1QLak540JsuGmpM0w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR11MB0833;7:1HfVFpORJjycf+uVTII0FfULlcrsU1OUiAV+FkcxU+mdexPE1hUA/UVwFUecY3ZeWpHOUSzhKJK/B3wGGHcuiU9y7jlMh4SKrh5gb+v2ooGGVhvlh7Oe89eJ9ose8Osds4XQrLW2zeW8UtB/+4K0lwrz5yHk7SzVGsBI0USBkx+wJWJxXsFY18DifQEg6EEvF3FOFS72j1kEIkST2s/hujjj2KO+5zC7UVjKvEWll9y6hk4NWVyEqHcW/IKnbQerLAjf85byJJ5z3nZERKiwYEqPc0y9FonJaJLLz7nhO+JzMuCIXZTd/QZq4tyvEtNdHpfb9HzE8a3lH5f+Cqd5QF17C/47mOS3JMawP8FVxx0a0LeVIQyhSvaks1X6sH8CZ6+P2Eu8KTKL9Fc5vo6Ot5IaPcREizyGhG8xf1X31ybRZN8HCPFNcOwWoC3HoDnhElXRxaAnMY+6QAlA+qYo9F2UMbtZXuKe9BBGrjJB9kK+HTi/72G75tYWrGv9D2tm4dnu78cA+GBZBYXwewg7KEfuIstcZgFVZ+snFZt91W//+xgWqGJQi9WGYrXSr+TklKxBEs2ZggJ2ghf0LeNs2Urowo2d1YXoDEavUcTQ6oSu+yDCPJVcw1FPupIGJEut+A94eI8l0t9fMvVpEOS0ux/JztATju96L3BkwXzjsRNgFF9pdzrSlb5IpXQQ973+8PE1HMUmlyuLXtqebUlez3W1F4qOMDJ7gTne/G51Cq4Xx5dZNTAEGcT36fIGoWfOgbhK8vtubCaJ+6buJG7fMioyDhNi1jT0sxsjx8s+bJE= X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jun 2017 22:07:37.3548 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR11MB0833 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2590 Lines: 71 Signed-off-by: Ryan Lee --- sound/soc/codecs/max98927.c | 20 ++++++++++++++++---- sound/soc/codecs/max98927.h | 4 ++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index 99d6e41..cdee3a3 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -614,6 +614,18 @@ static SOC_ENUM_SINGLE_DECL(max98927_current_limit, MAX98927_R0042_BOOST_CTRL1, 1, max98927_current_limit_text); +static const char * const max98927_env_track_headroom_text[] = { + "0.000V", "0.125V", "0.250V", "0.375V", "0.500V", "0.625V", + "0.750V", "0.875V", "1.000V", "1.125V", "1.250V", "1.375V", + "1.500V", "1.625V", "1.750V", "1.875V", "2.000V", "2.125V", + "2.250V", "2.375V", "2.500V", "2.625V", "2.750V", "2.875V", + "3.000V", "3.125V", "3.250V", "3.375V", "3.500V" +}; + +static SOC_ENUM_SINGLE_DECL(max98927_env_track_headroom, + MAX98927_R0082_ENV_TRACK_VOUT_HEADROOM, 0, + max98927_env_track_headroom_text); + static const struct snd_kcontrol_new max98927_snd_controls[] = { SOC_SINGLE_TLV("Speaker Volume", MAX98927_R003C_SPK_GAIN, 0, 6, 0, @@ -631,6 +643,9 @@ static const struct snd_kcontrol_new max98927_snd_controls[] = { MAX98927_AMP_VOL_SEL_SHIFT, 1, 0), SOC_ENUM("Boost Output Voltage", max98927_boost_voltage), SOC_ENUM("Current Limit", max98927_current_limit), + SOC_SINGLE("EnvTrack Switch", MAX98927_R0086_ENV_TRACK_CTRL, + MAX98927_ENV_TRACKER_EN_SHIFT, 1, 0), + SOC_ENUM("EnvTrack Headroom", max98927_env_track_headroom), }; static const struct snd_soc_dapm_route max98927_audio_map[] = { @@ -726,13 +741,10 @@ static int max98927_probe(struct snd_soc_codec *codec) /* Envelope Tracking configuration */ regmap_write(max98927->regmap, MAX98927_R0082_ENV_TRACK_VOUT_HEADROOM, - 0x08); + 0x0A); regmap_write(max98927->regmap, MAX98927_R0086_ENV_TRACK_CTRL, 0x01); - regmap_write(max98927->regmap, - MAX98927_R0087_ENV_TRACK_BOOST_VOUT_READ, - 0x10); /* voltage, current slot configuration */ regmap_write(max98927->regmap, diff --git a/sound/soc/codecs/max98927.h b/sound/soc/codecs/max98927.h index bf7a6f92..3069a09 100644 --- a/sound/soc/codecs/max98927.h +++ b/sound/soc/codecs/max98927.h @@ -250,6 +250,10 @@ #define MAX98927_BROWNOUT_DSP_EN (0x1 << 2) #define MAX98927_BROWNOUT_DSP_SHIFT (2) +/* MAX98927_R0086_ENV_TRACK_CTRL */ +#define MAX98927_ENV_TRACKER_EN (0x1 << 0) +#define MAX98927_ENV_TRACKER_EN_SHIFT (0) + /* MAX98927_R0100_SOFT_RESET */ #define MAX98927_SOFT_RESET (0x1 << 0) -- 2.7.4