From patchwork Wed Mar 14 12:39:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 131573 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp819095ljb; Wed, 14 Mar 2018 05:39:11 -0700 (PDT) X-Google-Smtp-Source: AG47ELsEstLvfHz/jfGgvhn6r02k7nZ06cdtRzzzcE0ZdmL4Rd3KY+GO32UlAhXsYPSoV+gsQ9Vy X-Received: by 2002:a17:902:f81:: with SMTP id 1-v6mr3947232plz.265.1521031151557; Wed, 14 Mar 2018 05:39:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521031151; cv=none; d=google.com; s=arc-20160816; b=UOTZbMJivv9yFFOCAWLi2e5Quv3hwdbDuqWGa1gxsuWPr51if29iWnnv7AYXk04DWW S7zMOHBO0/jBv3eimrKhqdb/lQYlx//AtLpTVPnGBwbU/6EtzLSfE9eaBALMocmM3XTI P0RI5lPhYvpbtkkoyJzthJBgtPJmmhTMSRjjgAgn8e4jrT1XZLcUjEySAwCGJZhJHVSD ZNLYRxu5sH5MnuQeU9wia23VerFO2Wpu34KSFHlibjA/l8sJ2sXdMpR0CFxINJxTbut5 HQh3zsBsXtrA3kZ4+ZrTTWtKt1BjOIKzsDKc32QmchnBvZf0dPAIHyuOyL6+Kj1Echj9 nVVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Uwx+3Mi4ayVXmmpZop3GE6gs8zeTxQo5Q0Xd60t7jJA=; b=P0A9Ej4Xt1DhscUl269HxZkbfSHe5ZG4BYgimFTEqJ0v1QI23p3nQDlhr8y/JfGNSd +ZBivqUNBptGS/MVTkJgE1wjPOaY046mcu5fAF3+mIJWAX5BoKeoSeNyhRbhYdQIJ3dn WWOUK33RSg7cDmS2xWTKy/9iCoWIzCxJYhVSMzmEF06dnA08Y+xC9TjciPwuzG70ZqnV 0FhdK0xN7RoSddzstl74NraprxPNrEZWIvd+5eg7IaUrKw3p6U4MURETXCSFEZCay0N/ B8/CR0r5DC2OwZBdHUUyAUY6C+hxUlRJXD6/Yby0D9q5GxfEijRcfYQeooQIJSfpbFmS 8eEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k75si1840806pgc.134.2018.03.14.05.39.11; Wed, 14 Mar 2018 05:39:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751456AbeCNMjE (ORCPT + 28 others); Wed, 14 Mar 2018 08:39:04 -0400 Received: from mx.socionext.com ([202.248.49.38]:57093 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750905AbeCNMjC (ORCPT ); Wed, 14 Mar 2018 08:39:02 -0400 Received: from unknown (HELO iyokan-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 14 Mar 2018 21:39:01 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by iyokan-ex.css.socionext.com (Postfix) with ESMTP id F386A6006F; Wed, 14 Mar 2018 21:39:01 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Wed, 14 Mar 2018 21:39:44 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id 8F55740389; Wed, 14 Mar 2018 21:39:01 +0900 (JST) Received: from aegis.e01.socionext.com (unknown [10.213.134.210]) by yuzu.css.socionext.com (Postfix) with ESMTP id 66A1D120534; Wed, 14 Mar 2018 21:39:01 +0900 (JST) From: Katsuhiro Suzuki To: Mark Brown , alsa-devel@alsa-project.org Cc: Masami Hiramatsu , Jassi Brar , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Katsuhiro Suzuki Subject: [PATCH] ASoC: uniphier: evea: add switch for changing source of line-in Date: Wed, 14 Mar 2018 21:39:00 +0900 Message-Id: <20180314123900.19505-1-suzuki.katsuhiro@socionext.com> X-Mailer: git-send-email 2.16.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds mixer switch for changing audio source of line-in. We can choose one of LIN1, 2, 3, default is LIN1. Signed-off-by: Katsuhiro Suzuki --- sound/soc/uniphier/evea.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.16.1 diff --git a/sound/soc/uniphier/evea.c b/sound/soc/uniphier/evea.c index 439f14f91b23..73fd6730095c 100644 --- a/sound/soc/uniphier/evea.c +++ b/sound/soc/uniphier/evea.c @@ -18,6 +18,8 @@ #define AADCPOW(n) (0x0078 + 0x04 * (n)) #define AADCPOW_AADC_POWD BIT(0) +#define ALINSW1 0x0088 +#define ALINSW1_SEL1_SHIFT 3 #define AHPOUTPOW 0x0098 #define AHPOUTPOW_HP_ON BIT(4) #define ALINEPOW 0x009c @@ -278,7 +280,16 @@ static int evea_set_switch_hp(struct snd_kcontrol *kcontrol, return evea_update_switch_hp(evea); } +static const char * const linsw1_sel1_text[] = { + "LIN1", "LIN2", "LIN3" +}; + +static SOC_ENUM_SINGLE_DECL(linsw1_sel1_enum, + ALINSW1, ALINSW1_SEL1_SHIFT, + linsw1_sel1_text); + static const struct snd_kcontrol_new evea_controls[] = { + SOC_ENUM("Line Capture Source", linsw1_sel1_enum), SOC_SINGLE_BOOL_EXT("Line Capture Switch", 0, evea_get_switch_lin, evea_set_switch_lin), SOC_SINGLE_BOOL_EXT("Line Playback Switch", 0,