Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754276AbbFOKdD (ORCPT ); Mon, 15 Jun 2015 06:33:03 -0400 Received: from mail-bn1on0142.outbound.protection.outlook.com ([157.56.110.142]:44282 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753425AbbFOKc6 (ORCPT ); Mon, 15 Jun 2015 06:32:58 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; From: Zidan Wang To: CC: , , , , , , , Zidan Wang Subject: [alsa-devel][PATCH] ASoC: wm8960: add two kcontrols to select ADC left/right channel source Date: Mon, 15 Jun 2015 18:34:33 +0800 Message-ID: <1434364473-27130-1-git-send-email-zidan.wang@freescale.com> X-Mailer: git-send-email 1.9.1 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD036;1:R/1l6QwCKf+f+hG1AU7fMr4ODPwKvGznKBjM61P6xFrV1tzpJw5aR4POX4DNHWe/rsTO43tzK5b5nFKpVhbp5a8LeYSL5hNoO9K1XD5kijHxUjZKvC1lIVyia5rstTYXcP9L6kavGY3pAFODZMuSka9fmiBVorFuJkzfCp4SwjlrG/U9fdEhxdjVgLTe0M3+Ju2wSaxj8RAMUwGANpl1PQ4zvho9t07AzsoxkaRzUDejrg+5/JcHT35PWN0B7nU4xc7bXG6o5sdrTQlJpa+xSm+cxCzHOWXSZCysJSxtrA4FdvoHMOgFeETPOiYQIPQYDghtcwDxTFnZi2u7zFrhc6RzlsWlx3eXzGUiEMCKgBI= X-Forefront-Antispam-Report: CIP:192.88.158.2;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10019020)(6009001)(339900001)(189002)(199003)(92566002)(77156002)(62966003)(47776003)(107886002)(110136002)(189998001)(46102003)(5001920100001)(5001960100002)(77096005)(19580395003)(19580405001)(87936001)(50986999)(105606002)(86362001)(85426001)(104016003)(229853001)(50226001)(33646002)(106466001)(2351001)(50466002)(48376002)(6806004)(36756003)(4001430100001);DIR:OUT;SFP:1102;SCL:1;SRVR:BN3PR0301MB1252;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:sfv;MX:1;A:1;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1252;2:gtj1g2BGJ+5KvjGaH7ZIP13njWyW6g9psCb85gqAseK53+PgZmRX2lZqoONZc9oo;2:vyf4p78W0MXZwWEnPjvyOVOHb1qQ2rRSVRh8rZm17aAqXaJ72oPAQMXziopTGLORZsSV0aj2YBr6AQwzo4XfcP8LzmkWPntZ3YR3NU27j8i0VV/bb/FGTC0kQqZ1PUSYMIN0eZsq4huVxuBLDHczD/RSNFZWoYgiyCjrpUywjSs64UMGB+qI9nT3IaDDhkuEjLy3aDSaxn5sbChIlzdFcZn/aionJrzQ8/qXLTVr1gQ=;6:SLJHLIzI97YfYhRbS5Y5aVzizEyUqYmX90M0NPwiERbiZLYfg/geKshke68UkGGUS6M+ybm5pyFfj/qgqCT7baGTyPqYy1Zf+OYRwISKQvpUI+LjdPqj8LVMAo8hfESapEczCwLI23AWBZ9p34JRjUHRiaUk4WL1qGbTm7mk4axwnjg1PFiE+aqPih07lNkz/qAEDuULy9y8Wq5agf9tOdlLMoSJGBz8gIAOFDUJR8ysnOTP5w7mRHiTnOIwyY/AAVkEbScOEBCmssQFIhgGdAQL7aQ+tqNBpARvSMtXjtzJK7I0fRkW4raqo5AESNf+XsTb3VWxAhkpm8UdB8hLlQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0301MB1252; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(520003)(5005006)(3002001);SRVR:BN3PR0301MB1252;BCL:0;PCL:0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JaBddKZiqsznB9Cvq3AhbwuvKpa80XVDl69F78Nxf/CLPfHTHT2hVCTEv6L2dzypZccyvYatFI3+d8ypLWrTR0u9BwlNV3PK0bS0fGPPJVYoQQgJCoDpanbvn5UY43MhtekyG5Z07Du9KO1GQVockUNpqHBguFSMTPcUIvSFZKL9tp/C/SkGXrzsCgAucHF5pDGByszZHBWo8Ah3ucbpBXv2piPVQEGmCLAHv3zFIfh3n+rkQAt7lFtp7MhL7+qR72oT2uvghwgMOsG X-Microsoft-Exchange-Diagnostics: 1;BN3PR0301MB1252;3:zi/kY2hoRXbUKjNtdLC8OkFHY5/Az3FBc+BuOSn5GVh6VTbUgXwHZW4F7OjUCdAUDnUYmWJRaRIW6h2C1/WdMuTQmV7Fld7LLfrDhCZZo0G2pVJ+KXfAC2TRhazl2Ehv5xeqbUEXKPTjxNzDFiCFPQ==;10:kRmrzjhi0QNC7uFympT8XEAubmB+GriHTuUOoLZCv4L621Z5jFa3UktaZ4rPbiOuQx5s4azXKQcHtD/SnnCSdYrJwVEG7gkwiUys1/6fnc0=;6:HMklHN7JNjAg/JyRG/8sURCVBlj7x5iNZjPrdSwa9PxPI/t8O9a+7bbjF/fZV345 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2015 10:32:55.6425 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d;Ip=[192.88.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0301MB1252 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2061 Lines: 48 Add two kcontrols to select ADC left/right channel source, one to select the left channel source and one for the right channel source. Signed-off-by: Zidan Wang --- sound/soc/codecs/wm8960.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index 023e898..8f9aed1 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -141,6 +141,8 @@ static const char *wm8960_3d_upper_cutoff[] = {"High", "Low"}; static const char *wm8960_3d_lower_cutoff[] = {"Low", "High"}; static const char *wm8960_alcfunc[] = {"Off", "Right", "Left", "Stereo"}; static const char *wm8960_alcmode[] = {"ALC", "Limiter"}; +static const char *wm8960_adc_left_source[] = {"left ADC", "right ADC"}; +static const char *wm8960_adc_right_source[] = {"right ADC", "left ADC"}; static const struct soc_enum wm8960_enum[] = { SOC_ENUM_SINGLE(WM8960_DACCTL1, 5, 4, wm8960_polarity), @@ -149,6 +151,8 @@ static const struct soc_enum wm8960_enum[] = { SOC_ENUM_SINGLE(WM8960_3D, 5, 2, wm8960_3d_lower_cutoff), SOC_ENUM_SINGLE(WM8960_ALC1, 7, 4, wm8960_alcfunc), SOC_ENUM_SINGLE(WM8960_ALC3, 8, 2, wm8960_alcmode), + SOC_ENUM_SINGLE(WM8960_ADDCTL1, 3, 2, wm8960_adc_left_source), + SOC_ENUM_SINGLE(WM8960_ADDCTL1, 2, 2, wm8960_adc_right_source), }; static const int deemph_settings[] = { 0, 32000, 44100, 48000 }; @@ -279,6 +283,9 @@ SOC_SINGLE_TLV("Right Output Mixer Boost Bypass Volume", WM8960_BYPASS2, 4, 7, 1, bypass_tlv), SOC_SINGLE_TLV("Right Output Mixer RINPUT3 Volume", WM8960_ROUTMIX, 4, 7, 1, bypass_tlv), + +SOC_ENUM("ADC Left Channel Source", wm8960_enum[6]), +SOC_ENUM("ADC Right Channel Source", wm8960_enum[7]), }; static const struct snd_kcontrol_new wm8960_lin_boost[] = { -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/