Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751958AbdIKQNN (ORCPT ); Mon, 11 Sep 2017 12:13:13 -0400 Received: from mail-by2nam01on0108.outbound.protection.outlook.com ([104.47.34.108]:62496 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751897AbdIKQM7 (ORCPT ); Mon, 11 Sep 2017 12:12:59 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=RyanS.Lee@maximintegrated.com; From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, ryans.lee@maximintegrated.com, kuninori.morimoto.gx@renesas.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Cc: ryan.lee.maxim@gmail.com Subject: [PATCH 1/3] ASoC: max98927: Added support for DSP_A and DSP_B format Date: Mon, 11 Sep 2017 09:12:18 -0700 Message-Id: <1505146339-19380-1-git-send-email-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [204.17.143.20] X-ClientProxiedBy: MWHPR2001CA0014.namprd20.prod.outlook.com (10.172.58.152) To CY1PR11MB0841.namprd11.prod.outlook.com (10.163.237.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1519f86-9f9d-4601-b0e1-08d4f92ff5af X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR11MB0841; X-Microsoft-Exchange-Diagnostics: 1;CY1PR11MB0841;3:6Pijs4vbEI7xSJr3ABn299+qxZv38PQEB8fSw9WgdU0kLp1UELBAjD6a3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EohF5H1sVY19+49HzN7pmgl057S/dv42/vGb1JlFLSerqfYD60HHQrVT/w/I5cAiWEONOhtldgk32IlgEKHJy9eCwCH3kKdjclpuo44ZGrW6NKg4cmQWoNhYlZx6TzNnu+cRdhLj0tMooXQVymt0xRtzc6nlGO63czO+qGtauJMZY8EURSDHqFtTw3xxizDIpp7hCQd78/mP2n3Iui9zKtgwVrpzwfBL8HNZB6odGWfD7+5am3kgFCg+TasWMXtUJG9jVYDDkJfz6fEpPI/3srr;4:Kt7Kh7GXtdTQmV6VNWmNjZ9B5NfkA9R0El97q32N9nOMTRo7lGZxzcnXPktrP5WMr94mJLrb6KvvIvx6/5ygXRN2w4AySEGsw75WlLGG5B9o6q5wnXbmJoFruaW8nqsEedP+1oQKff60dH8trLWcO7fkqq2MWss+hS8qxhkpkpjQ4qVhBUHFZlPcpRlVb0K7kICOI4NZOxRHpIbybneJ4S1dL88F2XftcNC+nOHVqWQWvAsCghBJXF/6IvCFF6eIKrvtshnQgppajh//tLUPXDGeKeS0SslvPJO1IsIFPKU= X-Exchange-Antispam-Report-Test: UriScan:(108721460000369); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR11MB0841;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR11MB0841; X-Forefront-PRVS: 04270EF89C X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(199003)(54534003)(189002)(48376002)(5003940100001)(50466002)(68736007)(106356001)(105586002)(6666003)(33646002)(25786009)(39060400002)(110136004)(189998001)(4326008)(72206003)(478600001)(53936002)(3846002)(6116002)(2906002)(97736004)(66066001)(81156014)(5660300001)(47776003)(8936002)(50226002)(305945005)(86362001)(6512007)(7736002)(81166006)(8676002)(53416004)(6486002)(69596002)(6506006)(42186005)(50986999)(101416001)(36756003)(2004002);DIR:OUT;SFP:1102;SCL:1;SRVR:CY1PR11MB0841;H:ryan-ThinkPad-T430.maxim-ic.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR11MB0841;23:ZZvo1OsndeIZDsmt4uLsRhgO59iTyT7tfh/f8U1vJ?= =?us-ascii?Q?Hm8Dh4u1Puiva3Qqgjm4+L48+hICbcDKNhr1679oKqih/g00vAo3vLrrmtjL?= =?us-ascii?Q?qOoO2425N/sSp0q/1JIUcir2OpL85r5fKD42PxMWRtaE36AWY8cdzFtmzdqJ?= =?us-ascii?Q?wLQx1ruZ96owxStO8JsQVF7Ru3D9XRgM12jwU38zj3Tr70KjIOeM4JoRBjX6?= =?us-ascii?Q?zxZxA5S933xlt8diPni7U6MDOsrmCit8mP0AJTT9WCmVIWZPY8NF5IJ3Jtru?= =?us-ascii?Q?zPjO0oE7BmK1vs8fikW0xHCeGPU68CEIvN3H6ZVGUy/YEgD9i4SCTJBt64+4?= =?us-ascii?Q?X9GVcaMsC+Ta3RkaQ0qVMQ3VV2wNmj3LL//JwqnhWKza44Prev1Tnoswf4uP?= =?us-ascii?Q?C0FZYzpaleTX6OEyCOC8dn1RBiGegeYXYpu5xWbPmlFAvuYnrCJLZUqx+EHy?= =?us-ascii?Q?arAr2jh5cdQ8/Wo4rp/XPxdmAt6X9Q55TCVZAq9n2ubXzov0Ww0tZCgxgRzD?= =?us-ascii?Q?lEYHVzMn+1Nday8cI9GYdQL2GhYEaoD9r7qk33uhUkzvW5b9AZ52F/eiUeYm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cM0Y3rvu2Ij+5inmopl8eFBHxPNgiaLCdu/mSvpLoBYqWd3y1sMI85IF6hAkBmkze0d6H+pA3l8wuA==;24:Dvy8wPS1K16zLXAj9D3adM0gSZvjt7jroKiCP2a6vHb6a6B212i6uNbXTUk5yPyl1BLdl0svrJary5pCVQzZR2lpPTxYI60C4tZgfmMxvvM=;7:rOKYD+2EdbD8ERbn9gbn5Rmfs9YhSZfK+U+vc7XpLCN+NhqdZW5imURVJ3VsVERfRDxj1vjVYi9tz+a8Q/ITVk5z/3dgG0P0AgE4IeAZ6eFiRzoeT5s6Eh8plhJqaI7bR3dO/HMsDZRc/9FsdGFRV348uuXoMyE7Jm01rBGrrTVbsCnzwJ++SEKwDJ2sGsceI6WaIQYRJ2cPmOWylFqVrKTo9/mHRfKP/eP2Eh1yYlk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Sep 2017 16:12:53.8668 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR11MB0841 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 8539 Lines: 288 Signed-off-by: Ryan Lee --- Changelog: Added support for DSP_A and DSP_B format Added 'max98927_dai_tdm_slot' function to set proper slot configuration. Moved max98927->iface out of switch statement to avoid line duplication. Added variable 'tdm_mode' to avoid BCLK overwrite after 'max98927_dai_tdm_slot' configure BCLK value. sound/soc/codecs/max98927.c | 155 +++++++++++++++++++++++++++++++++++--------- sound/soc/codecs/max98927.h | 7 +- 2 files changed, 129 insertions(+), 33 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index d9dbbe7..a1d3935 100644 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -1,7 +1,7 @@ /* * max98927.c -- MAX98927 ALSA Soc Audio driver * - * Copyright (C) 2016 Maxim Integrated Products + * Copyright (C) 2016-2017 Maxim Integrated Products * Author: Ryan Lee * * This program is free software; you can redistribute it and/or modify it @@ -146,6 +146,7 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); unsigned int mode = 0; unsigned int format = 0; + bool use_pdm = false; unsigned int invert = 0; dev_dbg(codec->dev, "%s: fmt 0x%08X\n", __func__, fmt); @@ -187,22 +188,27 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) /* interface format */ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { case SND_SOC_DAIFMT_I2S: - max98927->iface |= SND_SOC_DAIFMT_I2S; format = MAX98927_PCM_FORMAT_I2S; break; case SND_SOC_DAIFMT_LEFT_J: - max98927->iface |= SND_SOC_DAIFMT_LEFT_J; format = MAX98927_PCM_FORMAT_LJ; break; + case SND_SOC_DAIFMT_DSP_A: + format = MAX98927_PCM_FORMAT_TDM_MODE1; + break; + case SND_SOC_DAIFMT_DSP_B: + format = MAX98927_PCM_FORMAT_TDM_MODE0; + break; case SND_SOC_DAIFMT_PDM: - max98927->iface |= SND_SOC_DAIFMT_PDM; + use_pdm = true; break; default: return -EINVAL; } + max98927->iface = fmt & SND_SOC_DAIFMT_FORMAT_MASK; - /* pcm channel configuration */ - if (max98927->iface & (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_LEFT_J)) { + if (!use_pdm) { + /* pcm channel configuration */ regmap_update_bits(max98927->regmap, MAX98927_R0018_PCM_RX_EN_A, MAX98927_PCM_RX_CH0_EN | MAX98927_PCM_RX_CH1_EN, @@ -217,13 +223,11 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) MAX98927_R003B_SPK_SRC_SEL, MAX98927_SPK_SRC_MASK, 0); - } else regmap_update_bits(max98927->regmap, - MAX98927_R0018_PCM_RX_EN_A, - MAX98927_PCM_RX_CH0_EN | MAX98927_PCM_RX_CH1_EN, 0); - - /* pdm channel configuration */ - if (max98927->iface & SND_SOC_DAIFMT_PDM) { + MAX98927_R0035_PDM_RX_CTRL, + MAX98927_PDM_RX_EN_MASK, 0); + } else { + /* pdm channel configuration */ regmap_update_bits(max98927->regmap, MAX98927_R0035_PDM_RX_CTRL, MAX98927_PDM_RX_EN_MASK, 1); @@ -231,10 +235,11 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) regmap_update_bits(max98927->regmap, MAX98927_R003B_SPK_SRC_SEL, MAX98927_SPK_SRC_MASK, 3); - } else + regmap_update_bits(max98927->regmap, - MAX98927_R0035_PDM_RX_CTRL, - MAX98927_PDM_RX_EN_MASK, 0); + MAX98927_R0018_PCM_RX_EN_A, + MAX98927_PCM_RX_CH0_EN | MAX98927_PCM_RX_CH1_EN, 0); + } return 0; } @@ -245,6 +250,21 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) 13000000, 19200000, }; +/* BCLKs per LRCLK */ +static const int bclk_sel_table[] = { + 32, 48, 64, 96, 128, 192, 256, 384, 512, +}; + +static int max98927_get_bclk_sel(int bclk) +{ + int i; + /* match BCLKs per LRCLK */ + for (i = 0; i < ARRAY_SIZE(bclk_sel_table); i++) { + if (bclk_sel_table[i] == bclk) + return i + 2; + } + return 0; +} static int max98927_set_clock(struct max98927_priv *max98927, struct snd_pcm_hw_params *params) { @@ -270,23 +290,20 @@ static int max98927_set_clock(struct max98927_priv *max98927, i << MAX98927_PCM_MASTER_MODE_MCLK_RATE_SHIFT); } - switch (blr_clk_ratio) { - case 32: - value = 2; - break; - case 48: - value = 3; - break; - case 64: - value = 4; - break; - default: - return -EINVAL; + if (!max98927->tdm_mode) { + /* BCLK configuration */ + value = max98927_get_bclk_sel(blr_clk_ratio); + if (!value) { + dev_err(codec->dev, "format unsupported %d\n", + params_format(params)); + return -EINVAL; + } + + regmap_update_bits(max98927->regmap, + MAX98927_R0022_PCM_CLK_SETUP, + MAX98927_PCM_CLK_SETUP_BSEL_MASK, + value); } - regmap_update_bits(max98927->regmap, - MAX98927_R0022_PCM_CLK_SETUP, - MAX98927_PCM_CLK_SETUP_BSEL_MASK, - value); return 0; } @@ -386,6 +403,78 @@ static int max98927_dai_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } +static int max98927_dai_tdm_slot(struct snd_soc_dai *dai, + unsigned int tx_mask, unsigned int rx_mask, + int slots, int slot_width) +{ + struct snd_soc_codec *codec = dai->codec; + struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); + int bsel = 0; + unsigned int chan_sz = 0; + + max98927->tdm_mode = true; + + /* BCLK configuration */ + bsel = max98927_get_bclk_sel(slots * slot_width); + if (bsel == 0) { + dev_err(codec->dev, "BCLK %d not supported\n", + slots * slot_width); + return -EINVAL; + } + + regmap_update_bits(max98927->regmap, + MAX98927_R0022_PCM_CLK_SETUP, + MAX98927_PCM_CLK_SETUP_BSEL_MASK, + bsel); + + /* Channel size configuration */ + switch (slot_width) { + case 16: + chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_16; + break; + case 24: + chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_24; + break; + case 32: + chan_sz = MAX98927_PCM_MODE_CFG_CHANSZ_32; + break; + default: + dev_err(codec->dev, "format unsupported %d\n", + slot_width); + return -EINVAL; + } + + regmap_update_bits(max98927->regmap, + MAX98927_R0020_PCM_MODE_CFG, + MAX98927_PCM_MODE_CFG_CHANSZ_MASK, chan_sz); + + /* Rx slot configuration */ + regmap_write(max98927->regmap, + MAX98927_R0018_PCM_RX_EN_A, + rx_mask & 0xFF); + regmap_write(max98927->regmap, + MAX98927_R0019_PCM_RX_EN_B, + (rx_mask & 0xFF00) >> 8); + + /* Tx slot configuration */ + regmap_write(max98927->regmap, + MAX98927_R001A_PCM_TX_EN_A, + tx_mask & 0xFF); + regmap_write(max98927->regmap, + MAX98927_R001B_PCM_TX_EN_B, + (tx_mask & 0xFF00) >> 8); + + /* Tx slot Hi-Z configuration */ + regmap_write(max98927->regmap, + MAX98927_R001C_PCM_TX_HIZ_CTRL_A, + ~tx_mask & 0xFF); + regmap_write(max98927->regmap, + MAX98927_R001D_PCM_TX_HIZ_CTRL_B, + (~tx_mask & 0xFF00) >> 8); + + return 0; +} + #define MAX98927_RATES SNDRV_PCM_RATE_8000_48000 #define MAX98927_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ @@ -405,6 +494,7 @@ static int max98927_dai_set_sysclk(struct snd_soc_dai *dai, .set_sysclk = max98927_dai_set_sysclk, .set_fmt = max98927_dai_set_fmt, .hw_params = max98927_dai_hw_params, + .set_tdm_slot = max98927_dai_tdm_slot, }; static int max98927_dac_event(struct snd_soc_dapm_widget *w, @@ -414,6 +504,9 @@ static int max98927_dac_event(struct snd_soc_dapm_widget *w, struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); switch (event) { + case SND_SOC_DAPM_PRE_PMU: + max98927->tdm_mode = 0; + break; case SND_SOC_DAPM_POST_PMU: regmap_update_bits(max98927->regmap, MAX98927_R003A_AMP_EN, diff --git a/sound/soc/codecs/max98927.h b/sound/soc/codecs/max98927.h index ece6a60..9ea8397 100644 --- a/sound/soc/codecs/max98927.h +++ b/sound/soc/codecs/max98927.h @@ -1,7 +1,7 @@ /* * max98927.h -- MAX98927 ALSA Soc Audio driver * - * Copyright 2013-15 Maxim Integrated Products + * Copyright (C) 2016-2017 Maxim Integrated Products * Author: Ryan Lee * * This program is free software; you can redistribute it and/or modify it @@ -161,7 +161,9 @@ #define MAX98927_PCM_MODE_CFG_FORMAT_SHIFT (3) #define MAX98927_PCM_FORMAT_I2S (0x0 << 0) #define MAX98927_PCM_FORMAT_LJ (0x1 << 0) - +#define MAX98927_PCM_FORMAT_TDM_MODE0 (0x3 << 0) +#define MAX98927_PCM_FORMAT_TDM_MODE1 (0x4 << 0) +#define MAX98927_PCM_FORMAT_TDM_MODE2 (0x5 << 0) #define MAX98927_PCM_MODE_CFG_CHANSZ_MASK (0x3 << 6) #define MAX98927_PCM_MODE_CFG_CHANSZ_16 (0x1 << 6) #define MAX98927_PCM_MODE_CFG_CHANSZ_24 (0x2 << 6) @@ -268,5 +270,6 @@ struct max98927_priv { unsigned int iface; unsigned int master; unsigned int digital_gain; + bool tdm_mode; }; #endif -- 1.9.1