Received: by 10.213.65.68 with SMTP id h4csp1249336imn; Sun, 18 Mar 2018 21:36:18 -0700 (PDT) X-Google-Smtp-Source: AG47ELtyT0wXhJrHyaRXUaqtviMbN61Ub5lJn/RZqek8EEEB6I7UTkh02JztuQeAeAljkt1CNiis X-Received: by 10.98.11.19 with SMTP id t19mr7886375pfi.218.1521434178094; Sun, 18 Mar 2018 21:36:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521434178; cv=none; d=google.com; s=arc-20160816; b=nUEBgPW9QAKyW5vzC/7o7DRRH9a1xvoDy5xjA70pXpHTyb3cYKlb7usUULPIX6x6Ej SJIT/LlIh+CuvMTJ0lc0w2zqFQ5ZJmCbxFVMbM3N04TedsB8aaRQjKFwGEq/BteIR3/1 Z6G8jme747f8mmJXbUDi7rEuLPs0C//bg9F4aIYPQMCluxBdxDx/NZKoR5F6L60s+TId UWvDe/xYvbTLcUsHkvutfJSO/Fc1nxiGxI4lsQn00mgQwOWD1iL9zv3hTMMOzpplt8We VCy7tnhEEdWw4Ib4T5dIusMKwfFKFSkgbfkcSkvpU/P6XJOC4XXuDJoimYpSmrGn2r3j 9SAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:arc-authentication-results; bh=Xpj4KhbNQppOGxPi5XcjONucMLs1pGcg7SjYzpE7fsU=; b=v1RygG+/uwFx95qDFXSOpKo66wCg0wslPMCsEmMNY1mbZeM/Gh3HjRRl50UXAHxXvT wT+U0ngcdv3EZnRCLZS48yjtcP3lgBwZKnU/pClNbC6TnwnWZ7EVYrPNgam+i0viF8oj 0k6t86DZW0L93a2BmtZiH7KKGlDFRRIgNZJsBSDA5LoFFQtHhXrcEyKygv7PU74oTB2Q 4sjyhbkhC69PPtVffVZr4J4OhmOIOyeOVg34yS0jcGehJawqjlYqiH4vmK5R7QjBoC+p QXkVDtzNo+I+PqQ71aNQQR8U/O8/yXnzpo5FkU53sCStBjUHv2X6zRa5eAiY7yK++uUw 7KnA== 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 q9-v6si11633435plr.21.2018.03.18.21.36.02; Sun, 18 Mar 2018 21:36:18 -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 S1754917AbeCSETT (ORCPT + 99 others); Mon, 19 Mar 2018 00:19:19 -0400 Received: from mx.socionext.com ([202.248.49.38]:58803 "EHLO mx.socionext.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750739AbeCSETP (ORCPT ); Mon, 19 Mar 2018 00:19:15 -0400 Received: from unknown (HELO kinkan-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 19 Mar 2018 13:19:14 +0900 Received: from mail.mfilter.local (m-filter-1 [10.213.24.61]) by kinkan-ex.css.socionext.com (Postfix) with ESMTP id 3B2DC180B6F; Mon, 19 Mar 2018 13:19:14 +0900 (JST) Received: from 172.31.9.53 (172.31.9.53) by m-FILTER with ESMTP; Mon, 19 Mar 2018 13:19:14 +0900 Received: from yuzu.css.socionext.com (yuzu [172.31.8.45]) by iyokan.css.socionext.com (Postfix) with ESMTP id D35234037B; Mon, 19 Mar 2018 13:19:13 +0900 (JST) Received: from DESKTOPFLNNJ4T (unknown [10.213.132.95]) by yuzu.css.socionext.com (Postfix) with ESMTP id A9B4612062E; Mon, 19 Mar 2018 13:19:13 +0900 (JST) From: "Katsuhiro Suzuki" To: "'Mark Brown'" , =?iso-2022-jp?B?U3V6dWtpLCBLYXRzdWhpcm8vGyRCTmtMWhsoQiAbJEI+IUduGyhC?= Cc: , "Masami Hiramatsu" , "Jassi Brar" , , References: <20180314123900.19505-1-suzuki.katsuhiro@socionext.com> <20180314162609.GV2186@sirena.org.uk> In-Reply-To: <20180314162609.GV2186@sirena.org.uk> Subject: Re: [PATCH] ASoC: uniphier: evea: add switch for changing source of line-in Date: Mon, 19 Mar 2018 13:19:10 +0900 Message-ID: <001101d3bf39$6e3933c0$4aab9b40$@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQHTu5FuzEJuYhG2tk6R1XBNqubmsKPPVE6AgAdyUOA= Content-Language: ja x-securitypolicycheck: OK by SHieldMailChecker v2.5.2 x-shieldmailcheckerpolicyversion: POLICY180220 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Mark, > -----Original Message----- > From: Mark Brown [mailto:broonie@kernel.org] > Sent: Thursday, March 15, 2018 1:26 AM > To: Suzuki, Katsuhiro > Cc: alsa-devel@alsa-project.org; Masami Hiramatsu ; > Jassi Brar ; linux-arm-kernel@lists.infradead.org; > linux-kernel@vger.kernel.org > Subject: Re: [PATCH] ASoC: uniphier: evea: add switch for changing source of line-in > > On Wed, Mar 14, 2018 at 09:39:00PM +0900, Katsuhiro Suzuki wrote: > > This patch adds mixer switch for changing audio source of line-in. > > We can choose one of LIN1, 2, 3, default is LIN1. > > I'll apply for now but this should really be a DAPM control so that we > can power down things connected to the disconnected line inputs when > recording. Thanks a lot for your suggestion. I tried to change the implementation to DAPM control as follows: ---------- 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 linesw1_mux = SOC_DAPM_ENUM("Line In 1 Source", linsw1_sel1_enum); static const struct snd_soc_dapm_widget evea_widgets[] = { SND_SOC_DAPM_ADC("ADC", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_MUX("Line In 1 Mux", SND_SOC_NOPM, 0, 0, &linesw1_mux), SND_SOC_DAPM_INPUT("LIN1_LP"), SND_SOC_DAPM_INPUT("LIN1_RP"), SND_SOC_DAPM_INPUT("LIN2_LP"), SND_SOC_DAPM_INPUT("LIN2_RP"), SND_SOC_DAPM_INPUT("LIN3_LP"), SND_SOC_DAPM_INPUT("LIN3_RP"), SND_SOC_DAPM_DAC("DAC HP", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_DAC("DAC LO1", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_DAC("DAC LO2", NULL, SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_OUTPUT("HP1_L"), SND_SOC_DAPM_OUTPUT("HP1_R"), SND_SOC_DAPM_OUTPUT("LO2_L"), SND_SOC_DAPM_OUTPUT("LO2_R"), }; static const struct snd_soc_dapm_route evea_routes[] = { { "Line In 1", NULL, "ADC" }, { "ADC", NULL, "Line In 1 Mux" }, { "Line In 1 Mux", NULL, "LIN1_LP" }, { "Line In 1 Mux", NULL, "LIN1_RP" }, { "Line In 1 Mux", NULL, "LIN2_LP" }, { "Line In 1 Mux", NULL, "LIN2_RP" }, { "Line In 1 Mux", NULL, "LIN3_LP" }, { "Line In 1 Mux", NULL, "LIN3_RP" }, { "DAC HP", NULL, "Headphone 1" }, { "DAC LO1", NULL, "Line Out 1" }, { "DAC LO2", NULL, "Line Out 2" }, { "HP1_L", NULL, "DAC HP" }, { "HP1_R", NULL, "DAC HP" }, { "LO2_L", NULL, "DAC LO2" }, { "LO2_R", NULL, "DAC LO2" }, }; ---------- I can see the value of ALINSW1 register at 'Line In 1 Mux',0 using amixer get 'Line In 1 Mux',0 But I can't change the value. amixer set 'Line In 1 Mux',0 LIN2 Simple mixer control 'Line In 1 Mux',0 Capabilities: enum Items: 'LIN1' 'LIN2' 'LIN3' Item0: 'LIN1' Would you tell me what is wrong... Regards, -- Katsuhiro Suzuki