Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752459AbdCCRfi (ORCPT ); Fri, 3 Mar 2017 12:35:38 -0500 Received: from mail-dm3nam03on0118.outbound.protection.outlook.com ([104.47.41.118]:48837 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751790AbdCCRew (ORCPT ); Fri, 3 Mar 2017 12:34:52 -0500 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: , , , , , , , , , , , , , , , , , , , , CC: Subject: [PATCH 04/10] Modified indentation Date: Fri, 3 Mar 2017 23:52:42 +0900 Message-ID: <1488552768-14901-5-git-send-email-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488552768-14901-1-git-send-email-ryans.lee@maximintegrated.com> References: <1488552768-14901-1-git-send-email-ryans.lee@maximintegrated.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [222.234.201.146] X-ClientProxiedBy: KL1PR02CA0031.apcprd02.prod.outlook.com (10.165.15.41) To CY4PR11MB1367.namprd11.prod.outlook.com (10.173.16.149) X-MS-Office365-Filtering-Correlation-Id: b3c7c277-8377-405a-def6-08d462452143 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081);SRVR:CY4PR11MB1367; X-Microsoft-Exchange-Diagnostics: 1;CY4PR11MB1367;3:XNlrRmtOhFLwOLOpcJCFzTO0I6exq7qxzbdScylCKjCU6/nsIebrhwX40xech4s87jSYK+4ERo0DbuS1ZOiJD+CVRA1qG6cRVWk9kaq3uG16CWI5IAcnRDZTx/5J6hqPxqfWr361RpudzuHlhUoUl6/uTfK4Nr1O2yr3f6163NMPrvOr2ahF4sbyMf9EqL8fX8yy92K/Qp3Ueq/Nio30+H+UnElsu0KOID0HMirSoil7+CGZ/EHGtY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qSeYV7NRevBZBYWwvmdSDC5JVCPonpYLTy16WJPQSSpPtWO1zTEN8OGy8HEb43epiTosm8WQvUfX1LGuiI4SnnisS/AJRRKD6Hw3rHrOqHNNuwquNlyqfBrTOoV0DT0XNk6TDN8Wo6D2MBg/jqc0NscMhGB1AAh+fQMpFTtfnECqyOIuEQzNgHy9NF9vh58Ild5hQdLmPOukYYk4V3yIu1xNpPxCbY/5oVNXYqATuLosaMd1jCDScdnBBf/b/HCIrvyyVkVFUdp9+aNcKhh75plv7lg X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(108721460000369); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123555025)(20161123564025)(20161123558025)(20161123562025)(6072148);SRVR:CY4PR11MB1367;BCL:0;PCL:0;RULEID:;SRVR:CY4PR11MB1367; X-Microsoft-Exchange-Diagnostics: 1;CY4PR11MB1367;4:7Jnzoi94bbIUd1Tu+ce7ZSHS6Gn9FPx2p1eeTpct34ozdodqbruqs0RAV0Cm5MjWpQ49gt037w7kC9tTv+g+glSPgKwHsng/mq89wAbjMRhziJ7s/Wn1yAFEexDLsThmgHgZR8v18+w5SCd7i586npA4U1wJNq0FnGpuEOHSNQUt/fZ20pQbEUYeLLqexsT4Ua0QmuH0GaqzOWCwfHu0JEaVGiOlrGye7I2pbd+lhJOsYrzJiPyny7H7pH6iWO3cCPEANGKD3C9ueOvqlLx/Wa+st/f+2jWyoJz92T2ajK20IqzZ7Dkf6Y6VmPprRVF1La2n6jOCiNed4wicN/4HpBhG2O5ng68fkH6Em0X5/08Ry9hWvzsk6mGU8Vj+U6cF9HjtbNH6fWbnTJwnctSm4fE9fJ6Irya8YcXxM0Y4Epj0eIFG9peMEt0JEgjeJJd/jCTy+U7tUmLwo7gHA7K0hFcGkdkj5IBvC5D7iWAQmFmHvXUpbBL1l46NuOTy4c+cIEOoJNg3k0AYoUSkkSHwzN7RxKpePjTizl2xRhqmrcnTqjt2nK+l0/4k94lftpSJEUqNXke7Fk0w2QlL2yKFbXBibWTw5YaRXqR+0wY8E9iwWgFsm7JPniuWzHc9YwRCUhbSFanBi2pistrEZyOpVsSFoE9u5qn2VFvDmVpk7ys= X-Forefront-PRVS: 0235CBE7D0 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(4630300001)(6009001)(7916002)(39850400002)(39410400002)(39840400002)(39450400003)(39860400002)(33646002)(86362001)(50986999)(5003940100001)(7416002)(25786008)(76176999)(2201001)(50226002)(189998001)(6512007)(2906002)(6486002)(6506006)(6666003)(53936002)(42186005)(53416004)(3846002)(305945005)(66066001)(6116002)(48376002)(50466002)(92566002)(8676002)(7736002)(47776003)(36756003)(2950100002)(5660300001)(4326008)(38730400002)(81166006)(921003)(1121003);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR11MB1367;H:ryan-Lenovo-IdeaPad-Z510.maxim-ic.com;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY4PR11MB1367;23:0+VwqouPF4qbvu3bbJF07NRSNXKOzXIxV/giW9w4v?= =?us-ascii?Q?X8/cHL1YZGrX/Tu+yLHM8dTajhLQcprvbwgHjKNVm73oVIbUe1zE3RUtCwPE?= =?us-ascii?Q?3hg+FMLr9FAIYHVqNI0nYy+d5F6GpEiE4NIb0IDLfEExkNP24ppHeKfc2MpH?= =?us-ascii?Q?fuibpCSoY921kvMJPOf7IBUESxjFeYhti31OHzsFiJ1vCzmT5deA8tY3GZDN?= =?us-ascii?Q?RwfBcj1loZqamCpjUVUhX0w8QiOSByKQq22xAXtAkOa4njL32Ak/0qwtruVo?= =?us-ascii?Q?m0ZdO8SrIFG7vSpnROQckEnGHiEe1z9/EiIM+W/+4hJBHKg4Tk2QdfFVpbSQ?= =?us-ascii?Q?vhwpiEfH15ji0Z28kdljEL42FfYFfK/REXLtjMJQ1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8IAcLtFNjK7n+m6nLh7rlAFtxtGts3y38STBKMbltePH05ldmGFeEBDM5GVC4d8wb2se8uFaMiQxkZrkwgt0kyMuG4YuRaTsVYAaMtLlXk6CFwXsE6J3WvEjlSWnhjWODT+iE0rofEdkCP/ohL2e9zTgBVXJ4nMd5h+PP1P11LIinYRBZ8U3ZH6GUbwhrORI4+HGwZPqYxJgt04PYP5YMdUZuf17uSd+DUgiaPhZx9IKOF659JN5Dk5qoQBjJ8BwVEvT0h706eN4KjRBFGZ04YNp74Ko4s/HA=;5:EjfCWziXUIoQHUP/381aDOYKdsxKr7+e9Lm7+h/5lSUFLyRXP+aKzOiQSqAFqc7BYEDRFn1LYvVSYdX1rt9jCql+YsaWrXsx25CPZT6uP9PskbOFfHGQ6qIg91lmf4QNRyr40oqVmSH458jvWQbKH/JtzejB86m78QCM37/GZvA=;24:ezh5iX2kncWfPuT7YpZgFyjXdhFkX+VwK44aq/9HaTrWT0nDCawxS1x5F/XzWofgG8YoFfofQE1jaSqJVULyd7bzFNIzgDdqrX0Xqy/HZ1w= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY4PR11MB1367;7:RQuJGFKqrpJvKIoTFffrDPckwAskCpRZBTcLzqo3JncbCYkpENnHFeQnghiAeWG1bXgmxBlaJ7Vy4EcouWaTc3lm3KTUXfRJjcM9EfArmWW9+HUjm9w0c6ato9KM0dSfbof+rTqaRaJYZVj37eTTaQFI/D2Jjlvd3ZlNxNzbRSkxOG8AnNxQ0pCESY2sOl7zg6NqbZohGcWod02OQhazhdRY6LCGHcOtpYH9vwyWbpfYzRH9VG294VGjkXen0u94IaaqVhKDBE/rrwci/jbuAObUmHtpRWbOt+2YAicM0NsKidjk4hQ1R5jJvG2OmUTBwrTfD1KpRK1Kt6+eGgHtMg== X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2017 14:53:55.2360 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1367 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 10793 Lines: 301 Signed-off-by: Ryan Lee --- Modified indentation problem. sound/soc/codecs/max98927.c | 80 ++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 41 deletions(-) diff --git a/sound/soc/codecs/max98927.c b/sound/soc/codecs/max98927.c index 5627279c..efc761b 100755 --- a/sound/soc/codecs/max98927.c +++ b/sound/soc/codecs/max98927.c @@ -141,22 +141,21 @@ static struct reg_default max98927_reg[] = { }; static int max98927_reg_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol, unsigned int reg, - unsigned int mask, unsigned int shift) + struct snd_ctl_elem_value *ucontrol, unsigned int reg, + unsigned int mask, unsigned int shift) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); int data; regmap_read(max98927->regmap, reg, &data); - ucontrol->value.integer.value[0] = - (data & mask) >> shift; + ucontrol->value.integer.value[0] = (data & mask) >> shift; return 0; } static int max98927_reg_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol, unsigned int reg, - unsigned int mask, unsigned int shift) + struct snd_ctl_elem_value *ucontrol, unsigned int reg, + unsigned int mask, unsigned int shift) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -164,18 +163,18 @@ static int max98927_reg_put(struct snd_kcontrol *kcontrol, regmap_update_bits(max98927->regmap, reg, mask, sel << shift); dev_dbg(codec->dev, "%s: register 0x%02X, value 0x%02X\n", - __func__, reg, sel); + __func__, reg, sel); return 0; } -static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, - unsigned int fmt) +static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_codec *codec = codec_dai->codec; struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); unsigned int invert = 0; dev_dbg(codec->dev, "%s: fmt 0x%08X\n", __func__, fmt); + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBS_CFS: regmap_update_bits(max98927->regmap, @@ -218,13 +217,13 @@ static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, regmap_update_bits(max98927->regmap, MAX98927_R0020_PCM_MODE_CFG, max98927->iface, max98927->iface); - break; + break; case SND_SOC_DAIFMT_LEFT_J: max98927->iface |= SND_SOC_DAIFMT_LEFT_J; regmap_update_bits(max98927->regmap, MAX98927_R0020_PCM_MODE_CFG, max98927->iface, max98927->iface); - break; + break; default: return -EINVAL; } @@ -292,8 +291,7 @@ static int max98927_set_clock(struct max98927_priv *max98927, default: return -EINVAL; } - regmap_update_bits(max98927->regmap, - reg, mask, value); + regmap_update_bits(max98927->regmap, reg, mask, value); return 0; } @@ -388,7 +386,7 @@ static int max98927_dai_hw_params(struct snd_pcm_substream *substream, SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE) static int max98927_dai_set_sysclk(struct snd_soc_dai *dai, - int clk_id, unsigned int freq, int dir) + int clk_id, unsigned int freq, int dir) { struct snd_soc_codec *codec = dai->codec; struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -458,7 +456,7 @@ static DECLARE_TLV_DB_SCALE(max98927_spk_tlv, 300, 300, 0); static DECLARE_TLV_DB_SCALE(max98927_digital_tlv, -1600, 25, 0); static int max98927_spk_gain_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -470,7 +468,7 @@ static int max98927_spk_gain_get(struct snd_kcontrol *kcontrol, } static int max98927_spk_gain_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -486,7 +484,7 @@ static int max98927_spk_gain_put(struct snd_kcontrol *kcontrol, } static int max98927_digital_gain_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -498,7 +496,7 @@ static int max98927_digital_gain_get(struct snd_kcontrol *kcontrol, } static int max98927_digital_gain_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct max98927_priv *max98927 = snd_soc_codec_get_drvdata(codec); @@ -514,7 +512,7 @@ static int max98927_digital_gain_put(struct snd_kcontrol *kcontrol, } static int max98927_boost_voltage_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0040_BOOST_CTRL0, @@ -522,7 +520,7 @@ static int max98927_boost_voltage_get(struct snd_kcontrol *kcontrol, } static int max98927_boost_voltage_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0040_BOOST_CTRL0, @@ -530,7 +528,7 @@ static int max98927_boost_voltage_put(struct snd_kcontrol *kcontrol, } static int max98927_amp_vol_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0036_AMP_VOL_CTRL, @@ -539,7 +537,7 @@ static int max98927_amp_vol_get(struct snd_kcontrol *kcontrol, } static int max98927_amp_dsp_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0052_BROWNOUT_EN, @@ -548,7 +546,7 @@ static int max98927_amp_dsp_put(struct snd_kcontrol *kcontrol, } static int max98927_amp_dsp_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0052_BROWNOUT_EN, @@ -557,7 +555,7 @@ static int max98927_amp_dsp_get(struct snd_kcontrol *kcontrol, } static int max98927_ramp_switch_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0037_AMP_DSP_CFG, @@ -565,7 +563,7 @@ static int max98927_ramp_switch_put(struct snd_kcontrol *kcontrol, MAX98927_AMP_DSP_CFG_RMP_SHIFT); } static int max98927_ramp_switch_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0037_AMP_DSP_CFG, @@ -574,21 +572,21 @@ static int max98927_ramp_switch_get(struct snd_kcontrol *kcontrol, } static int max98927_dre_en_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0039_DRE_CTRL, MAX98927_DRE_CTRL_DRE_EN, 0); } static int max98927_dre_en_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0039_DRE_CTRL, MAX98927_DRE_CTRL_DRE_EN, 0); } static int max98927_amp_vol_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0036_AMP_VOL_CTRL, @@ -596,7 +594,7 @@ static int max98927_amp_vol_put(struct snd_kcontrol *kcontrol, 7); } static int max98927_spk_src_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R003B_SPK_SRC_SEL, @@ -604,7 +602,7 @@ static int max98927_spk_src_get(struct snd_kcontrol *kcontrol, } static int max98927_spk_src_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R003B_SPK_SRC_SEL, @@ -612,7 +610,7 @@ static int max98927_spk_src_put(struct snd_kcontrol *kcontrol, } static int max98927_mono_out_get(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_get(kcontrol, ucontrol, MAX98927_R0025_PCM_TO_SPK_MONOMIX_A, @@ -621,7 +619,7 @@ static int max98927_mono_out_get(struct snd_kcontrol *kcontrol, } static int max98927_mono_out_put(struct snd_kcontrol *kcontrol, - struct snd_ctl_elem_value *ucontrol) + struct snd_ctl_elem_value *ucontrol) { return max98927_reg_put(kcontrol, ucontrol, MAX98927_R0025_PCM_TO_SPK_MONOMIX_A, @@ -646,9 +644,10 @@ static bool max98927_readable_register(struct device *dev, unsigned int reg) case MAX98927_R0100_SOFT_RESET: case MAX98927_R01FF_REV_ID: return true; + default: + return false; } - return false; -}; +} static const char * const max98927_boost_voltage_text[] = { "6.5V", "6.625V", "6.75V", "6.875V", "7V", "7.125V", "7.25V", "7.375V", @@ -701,13 +700,12 @@ static const struct snd_kcontrol_new max98927_snd_controls[] = { MAX98927_R0036_AMP_VOL_CTRL, MAX98927_AMP_VOL_SEL_SHIFT, 1, 0, max98927_amp_vol_get, max98927_amp_vol_put), - SOC_ENUM_EXT("Boost Output Voltage", max98927_enum[2], - max98927_boost_voltage_get, max98927_boost_voltage_put), + max98927_boost_voltage_get, max98927_boost_voltage_put), SOC_ENUM_EXT("Speaker Source", max98927_enum[1], - max98927_spk_src_get, max98927_spk_src_put), + max98927_spk_src_get, max98927_spk_src_put), SOC_ENUM_EXT("Monomix Output", max98927_enum[0], - max98927_mono_out_get, max98927_mono_out_put), + max98927_mono_out_get, max98927_mono_out_put), }; static const struct snd_soc_dapm_route max98927_audio_map[] = { @@ -762,9 +760,9 @@ static int max98927_probe(struct snd_soc_codec *codec) if (max98927->regmap) regmap_write(max98927->regmap, MAX98927_R001E_PCM_TX_CH_SRC_A, - (max98927->i_l_slot - <v_l_slot)&0xFF); + ((max98927->i_l_slot << + MAX98927_PCM_TX_CH_SRC_A_I_SHIFT) + | max98927->v_l_slot) & 0xFF); /* Set interleave mode */ if (max98927->interleave_mode) -- 2.7.4