From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932954AbcHaHkv (ORCPT ); Wed, 31 Aug 2016 03:40:51 -0400 Received: from dd1012.kasserver.com ([85.13.128.8]:48532 "EHLO dd1012.kasserver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758110AbcHaHkt (ORCPT ); Wed, 31 Aug 2016 03:40:49 -0400 Date: Wed, 31 Aug 2016 09:40:44 +0200 From: Danny Milosavljevic To: Chen-Yu Tsai Cc: Maxime Ripard , Mark Brown , linux-kernel , linux-arm-kernel , Linux-ALSA , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , linux-sunxi Subject: Re: [linux-sunxi] Re: [PATCH v9 2/2] Add mixer controls: Line-In, FM-In, Mic 2, Capture Source, Differential Line-In. Message-ID: <20160831094044.1c3227d6@scratchpost.org> In-Reply-To: References: <20160830054403.7878-1-dannym@scratchpost.org> <20160830054403.7878-3-dannym@scratchpost.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > And what about microphone bias? Would this be OK? static int sun4i_codec_handle_mic_bias_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *k, int event) { struct sun4i_codec *scodec = snd_soc_card_get_drvdata(w->dapm->card); if (SND_SOC_DAPM_EVENT_ON(event)) regmap_update_bits(scodec->regmap, SUN4I_CODEC_ADC_ACTL, BIT(SUN4I_CODEC_ADC_ACTL_VMICEN), BIT(SUN4I_CODEC_ADC_ACTL_VMICEN)); else regmap_update_bits(scodec->regmap, SUN4I_CODEC_ADC_ACTL, BIT(SUN4I_CODEC_ADC_ACTL_VMICEN), 0); } static const struct snd_soc_dapm_widget sun4i_codec_codec_dapm_widgets[] = { ... SND_SOC_DAPM_MIC("Mic1", sun4i_codec_handle_mic_bias_event), SND_SOC_DAPM_MIC("Mic2", sun4i_codec_handle_mic_bias_event), Do I then remove SND_SOC_DAPM_SUPPLY("VMIC", SUN4I_CODEC_ADC_ACTL, SUN4I_CODEC_ADC_ACTL_VMICEN, 0, NULL, 0), completely? What about the routes?