Received: by 10.213.65.68 with SMTP id h4csp961281imn; Wed, 14 Mar 2018 05:40:40 -0700 (PDT) X-Google-Smtp-Source: AG47ELtLajY09Ki7O6H3/oUkgy/hE0R0VnadqAHulXDsl4mB8aNygIO8VbaQ5qQ8vAorieAyV0G9 X-Received: by 2002:a17:902:6717:: with SMTP id f23-v6mr4036593plk.188.1521031240563; Wed, 14 Mar 2018 05:40:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521031240; cv=none; d=google.com; s=arc-20160816; b=OqURmAvzzY51+Z6bLcatHnel82MWXadKUzKBb3xGr2cy436ctxOviZOjcbM7U/lO7c +Fxt61nqGIW8dboQzmUZR3XhmMtCtG2x6J5hpIG13FjhdixVnfjztDG6nW3mUhsbnk+P SSCgtdV6D5kXsWTGnzdv52UwCKAmmdSdvAPivWtINDd6VTDDCeJy/RExOC7aNRSBf4VZ sYkkj50o+YAntbhI2p+TSIkot2MBRunZCXRiNoWhYybUhQwJvITHLSWHutVsiw8n8fyM dwdoMH/Vx+jeVeKSxNt/eFjbkydL+y8aerIFs4OpHrG533OhljuEj3z4IiSrBTbssTkD 57OQ== 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 n68si1818853pga.524.2018.03.14.05.40.25; Wed, 14 Mar 2018 05:40:40 -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 S1751414AbeCNMjE (ORCPT + 99 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(+) 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, -- 2.16.1