From patchwork Fri Aug 30 07:42:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11123203 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC30214DE for ; Fri, 30 Aug 2019 07:44:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6ED1222CE9 for ; Fri, 30 Aug 2019 07:44:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="M5LFFA1n"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="QagXLyie" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6ED1222CE9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 82FF71658; Fri, 30 Aug 2019 09:43:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 82FF71658 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567151079; bh=IBldaDh/ruxrlL49ZkRDP5DAH0dru6sRXkASBVo2QQg=; h=Date:In-Reply-To:References:From:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=M5LFFA1n0lrnjcory51lJsguDcNmKcLiKfrEV8ZarSS2bz9n4Fa7uQyoT9RDR00/e VJbxyhy1wuBUTd4JRNPh1wFNP8WdmBDjwX4NZR7nm3NcICdsSbTflSN775txlewwnv 8yoTE3k/HrbGaRfdlyKNekvEpA4LECIEH6p9CSgs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 39FB2F80377; Fri, 30 Aug 2019 09:42:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52260F80444; Fri, 30 Aug 2019 09:42:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-yw1-xc49.google.com (mail-yw1-xc49.google.com [IPv6:2607:f8b0:4864:20::c49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AD31AF80376 for ; Fri, 30 Aug 2019 09:42:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AD31AF80376 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="QagXLyie" Received: by mail-yw1-xc49.google.com with SMTP id a12so4513446ywm.10 for ; Fri, 30 Aug 2019 00:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=sdpo8UCYK/o3EiQB7yiJhWSi+mMUBEUueW2VdVsa4oY=; b=QagXLyiezDzIoHiRHvlDtzWyaF2tX/b8EVOOlv9Rh0V8NxjwjEdpHIiQbkRVoFOF4q emg039k5YoI9sc7N3zlIq1EOqmTTTt78iOdceRIM4ed25mToIGilgpjI5qt58rAHSX6s vZ8NQasNplcF1f4dtHeghwfsAEg1xRVn9dKeIrY+P9ryJnSfCVj/iXridrCsZsB2tE9P T2BkbKhRapL8qXq0tfriN9MQ28szTYeEaxv2mmSffTvdr0CqbvQreB0wx/lvYQNKVA4g Wyk70daXuAoOc4O0urEx7IVDL6LYvZMIZ90To5SpLaUzGCXdVFWAScGrG35AcgZP0iuI Asjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=sdpo8UCYK/o3EiQB7yiJhWSi+mMUBEUueW2VdVsa4oY=; b=uew3fZe5LOIuYbyKW2wU1qLBM2Ng/cBrKlV/Z/Thb4umDmfWCjfjqfFnNzbRt6CxXx wroTwGiYqUuiuJEtJoF1wWNx4iMYbqIGyJfVlbN5GY7/t77RYmwq2WKEqkTH5hTsI+Sm /v/MvUXdaFKUbTv6dCvCSNLYG39rSdbmQNFAcJcM27UcDLbzLDKVA5wRLCCIxVv7VXg1 f8xUZMVWC8l+sAu1k4iEI35OQ323F2Z2yY9vek8auj+9ko9JetNuviwbJhUSZqrMwkBJ aBC3BlJP2NNE8+O6ay3Fj1/IOmSqhBVuvTTl+FAg8meWnFc9fN6UfnW1/3k8QW5Vfnee eCLA== X-Gm-Message-State: APjAAAWZpYFNgVduPbavzNI8hEquSaAsD6L3F7Oyhcl3nMHhn7PyuMWv FoeOBNXN/d5eyF60NSP/LeEjhF/09uD1 X-Google-Smtp-Source: APXvYqzqdT3ZvV606lM/PmRFiW/rjxQD0upWZWL09z7bUl9MATrk4p5+5CfguA96YXMx5R19VEDy4p327TSd X-Received: by 2002:a25:240e:: with SMTP id k14mr10060288ybk.178.1567150971326; Fri, 30 Aug 2019 00:42:51 -0700 (PDT) Date: Fri, 30 Aug 2019 15:42:37 +0800 In-Reply-To: <20190830074240.195166-1-tzungbi@google.com> Message-Id: <20190830074240.195166-2-tzungbi@google.com> Mime-Version: 1.0 References: <20190830074240.195166-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org, dgreid@google.com, cychiang@google.com Subject: [alsa-devel] [PATCH 1/4] ASoC: mediatek: mt8183: move private structure X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Move private structure to the beginning of file to declare earlier so that most functions can see it. Signed-off-by: Tzung-Bi Shih --- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 560fcc5923a4..1d4a1600f768 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -17,6 +17,22 @@ static struct snd_soc_jack headset_jack; +enum PINCTRL_PIN_STATE { + PIN_STATE_DEFAULT = 0, + PIN_TDM_OUT_ON, + PIN_TDM_OUT_OFF, + PIN_STATE_MAX +}; + +static const char * const mt8183_pin_str[PIN_STATE_MAX] = { + "default", "aud_tdm_out_on", "aud_tdm_out_off", +}; + +struct mt8183_mt6358_ts3a227_max98357_priv { + struct pinctrl *pinctrl; + struct pinctrl_state *pin_states[PIN_STATE_MAX]; +}; + static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { @@ -46,22 +62,6 @@ static int mt8183_i2s_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, return 0; } -enum PINCTRL_PIN_STATE { - PIN_STATE_DEFAULT = 0, - PIN_TDM_OUT_ON, - PIN_TDM_OUT_OFF, - PIN_STATE_MAX -}; - -static const char * const mt8183_pin_str[PIN_STATE_MAX] = { - "default", "aud_tdm_out_on", "aud_tdm_out_off", -}; - -struct mt8183_mt6358_ts3a227_max98357_priv { - struct pinctrl *pinctrl; - struct pinctrl_state *pin_states[PIN_STATE_MAX]; -}; - static int mt8183_mt6358_ts3a227_max98357_bt_sco_startup( struct snd_pcm_substream *substream) From patchwork Fri Aug 30 07:42:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11123205 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AB9A14D5 for ; Fri, 30 Aug 2019 07:45:27 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D146D22CE3 for ; Fri, 30 Aug 2019 07:45:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="htj5z+Bz"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="CiI29s7/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D146D22CE3 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D55711667; Fri, 30 Aug 2019 09:44:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D55711667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567151124; bh=PmFEkW0Y0rHoeHWCmrB3jFKebhkYv21TgJG1kfazJpI=; h=Date:In-Reply-To:References:From:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=htj5z+BzjeGL/me2cqeJThgAU6tH70FhRPGX7yuX055dQN0eueJe9s8Ydrt8WWPHI 9x1ILUkJ/2Ed5kaYLizMp6xyvpw4+qalyZrJm2RpJKHdphScUe8bwDOMV5dSFaxLBM eA2XROtklj35Vewit7w7OeSqxzNYehrH/wHRwgko= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F19AEF805A0; Fri, 30 Aug 2019 09:43:01 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 07848F805A9; Fri, 30 Aug 2019 09:43:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E1F8AF80445 for ; Fri, 30 Aug 2019 09:42:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E1F8AF80445 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="CiI29s7/" Received: by mail-yb1-xb4a.google.com with SMTP id 137so4689945ybd.8 for ; Fri, 30 Aug 2019 00:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=dcehfAlOcinXb8/XAOP2QF2JttyhqJSZxbplDwzU1Eg=; b=CiI29s7/rMXX7yGVYWsGTqRPgcpvlu8MN1CU9CivPbC4CMxCSIizCw0KQsKAU0uvAk a4znrPFuAzlr9HlI9F/1zGSGeuv+ipoRAmiHXMU8fst2M+ciJgWu3qqClptubmKcbVLG 6wRrQKI63Zk+DrmiSVHgACRMQ+zc3Ck3G+evj5ommM787nRAcVmy/jC5o/ltvqeFoyez 430zahBbGmCkHbrjTJ4kER3lvHLbWBcigwWn8O46gQr1y+1P7be/RE82Vi3CV2JLhceb 78IiYqpt/giYeoMeCVOvL9wwVuTh5caof1Bi/fnXX96jb+20WU+8SY2KDtKZuTDaKP+o 6WLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=dcehfAlOcinXb8/XAOP2QF2JttyhqJSZxbplDwzU1Eg=; b=oaC8T46UASbBhab4RSJwewTw0xKOKKwkYsaLCE+o1qb1ToUtpYnQ9gq3Wvux/4ob+x sxv0yuDQ+C/EEZERbR6X8JY4OjKyzI/oXIhUx1pAHr/1obUGTMiuis6zmJR3tz53+om3 r2mXe7qrz7bLBrD6dC2yaSVs6x5HKCV1U/FQVolt6+AC5LjFQZSiCp93KtOVC2zu/HnI FQRGntriIpN8U14hkxU6endi0jkZp9iySIKVwxn54y6MiKBhjkdfU9yGhSkJ5uHTTk0S o8LYwSKDOpYF0RF53/su3AtcoTabjc4OijflijCbLer6L8+WKN5zxtfbyK2ls276ugCo lc0A== X-Gm-Message-State: APjAAAW1JRBKYfcSd338+pARlT9LvBZlKWocDgvBjstV2urXc/HfhF+q nrE05pIBJyIQdBNikEQtM/0YV25glVPR X-Google-Smtp-Source: APXvYqxG+wwjC4yCUfbsGWvsiyW+QH5pPMj37APoWxbB2z6762ljOsZV9gtb4eYBQb4fxQmgCPpt0rozugwC X-Received: by 2002:a25:e6c9:: with SMTP id d192mr9888170ybh.467.1567150976234; Fri, 30 Aug 2019 00:42:56 -0700 (PDT) Date: Fri, 30 Aug 2019 15:42:38 +0800 In-Reply-To: <20190830074240.195166-1-tzungbi@google.com> Message-Id: <20190830074240.195166-3-tzungbi@google.com> Mime-Version: 1.0 References: <20190830074240.195166-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org, dgreid@google.com, cychiang@google.com Subject: [alsa-devel] [PATCH 2/4] ASoC: mediatek: mt8183: move headset jack to card-specific storage X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Move headset jack descriptor from module global scope to card-specific storage to make its ownership more explicit. Signed-off-by: Tzung-Bi Shih --- .../soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 1d4a1600f768..a7ad41b6e885 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -15,8 +15,6 @@ #include "mt8183-afe-common.h" #include "../../codecs/ts3a227e.h" -static struct snd_soc_jack headset_jack; - enum PINCTRL_PIN_STATE { PIN_STATE_DEFAULT = 0, PIN_TDM_OUT_ON, @@ -31,6 +29,7 @@ static const char * const mt8183_pin_str[PIN_STATE_MAX] = { struct mt8183_mt6358_ts3a227_max98357_priv { struct pinctrl *pinctrl; struct pinctrl_state *pin_states[PIN_STATE_MAX]; + struct snd_soc_jack headset_jack; }; static int mt8183_mt6358_i2s_hw_params(struct snd_pcm_substream *substream, @@ -410,6 +409,8 @@ static int mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component) { int ret; + struct mt8183_mt6358_ts3a227_max98357_priv *priv = + snd_soc_card_get_drvdata(component->card); /* Enable Headset and 4 Buttons Jack detection */ ret = snd_soc_card_jack_new(&mt8183_mt6358_ts3a227_max98357_card, @@ -417,12 +418,12 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component) SND_JACK_HEADSET | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2 | SND_JACK_BTN_3, - &headset_jack, + &priv->headset_jack, NULL, 0); if (ret) return ret; - ret = ts3a227e_enable_jack_detect(component, &headset_jack); + ret = ts3a227e_enable_jack_detect(component, &priv->headset_jack); return ret; } From patchwork Fri Aug 30 07:42:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11123207 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 205D814D5 for ; Fri, 30 Aug 2019 07:45:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A733822CE9 for ; Fri, 30 Aug 2019 07:45:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="pa4ts/9F"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="T/dPKkb/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A733822CE9 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DE5871664; Fri, 30 Aug 2019 09:45:03 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DE5871664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567151154; bh=v9YQqnrJO2O0RJkr8dg9Qf8uQJb8SG1rJ9rVZg+Lxfo=; h=Date:In-Reply-To:References:From:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pa4ts/9F0Iy7Z1mc7Y7Sn9OM4emne3gt687lxWKtfht40qeaYsoNmwArsMg9zkn4y ia9i1eSgBXC0osNxK0pl/LJyvkliZVed33qu3DKh02xHJbaFwXk9yP0DbiDdmEz2wZ LeoNIVOhlTQJbbqdtypW3deV8gO0DUHG97gY+ErI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 35C89F805F7; Fri, 30 Aug 2019 09:43:07 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C3C1DF805F9; Fri, 30 Aug 2019 09:43:05 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 291ADF805F7 for ; Fri, 30 Aug 2019 09:43:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 291ADF805F7 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="T/dPKkb/" Received: by mail-qk1-x74a.google.com with SMTP id y188so6327713qke.18 for ; Fri, 30 Aug 2019 00:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=sQAvSFliNRzsihBO4D3II/hLNdzvUKs4D9QWENz0aT8=; b=T/dPKkb/qUAnqls4DkHU3SWROP0nWhRKfrPw40+ZwfOtNsaL09igGbf+CqYiCnn+PD h6Mk7hgleMJmhhAWQcIVeNvm9QYGmQ+RncavwmwOLS1U8oeR6x1GFm1+gItbASBy3O3T OnpyV26/WKvRzCcYhXPwGRPupV2Ve9Mp0r2rNcN0RKGU1pKLH0Dl0SiujFAEpFe9LxI4 NOfIo/KwYy0SRnSzGUmcu8VNCSF3YeH2JsCTld/JFuSXZwkY5e1YEXgnRtk//B6FPcbo kKjTJNYOgYYq0l+2cG1tBx2VtrSB8OcPIN0FCLyuLDWBlUILgNPaV+7+n9PWwe9CYYyR zyaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=sQAvSFliNRzsihBO4D3II/hLNdzvUKs4D9QWENz0aT8=; b=ez/WhsxlvN4hfKFLJJXIgn//1C/7yJXAUbX+5qEnSDW3wZOp0J9UA31ICz3ZYDYxIV NWmUNwu1Im/XrxWcYxXH7PmxJOagnbvmSZnRHgEG5u5XO0yx5sx4cbEzV+hJdqsYgo/f g8ENrs9DKQWCmxQ83H2eqnFlPMl/OsyTMXLI7L2Hc1j8aX1FoIE58+X1x+dwCYdeWi8A 9TaW7cM5G62HwzFhu4Ukg6HZRnZgtPshR/vYlhtbn0MROfitN6LW7AXyS7zqHqazzv5N q5sJy0O9QxQ16JRbLvs4jQagpp+WVwhfipRLdiKOviDNZrTnLAEZ7EacZXlWOS8suXz7 fNNQ== X-Gm-Message-State: APjAAAWByUJUm7TU43ucpzeG4tNcflWlPAaWuMeSeeolVqkaj4+W+BRa Y68jpcKGFSnE+pEKZcsk3X4p3r5GQ+lV X-Google-Smtp-Source: APXvYqxsgpQKxPDMv2XBA/AMCE1G5HEXvJ3UK59pPVMrTkwRVe2S9FWqVL86NbwiC7uiehRoW5MDJppi6dSd X-Received: by 2002:a37:9b48:: with SMTP id d69mr14297756qke.449.1567150981129; Fri, 30 Aug 2019 00:43:01 -0700 (PDT) Date: Fri, 30 Aug 2019 15:42:39 +0800 In-Reply-To: <20190830074240.195166-1-tzungbi@google.com> Message-Id: <20190830074240.195166-4-tzungbi@google.com> Mime-Version: 1.0 References: <20190830074240.195166-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org, dgreid@google.com, cychiang@google.com Subject: [alsa-devel] [PATCH 3/4] ASoC: mediatek: mt8183: remove forward declaration of headset_init X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The forward declaration of mt8183_mt6358_ts3a227_max98357_headset_init is for cyclic dependency between card, headset_dev, and headset_init. It used to be: - card depends on headset_dev - headset_dev depends on headset_init - headset_init depends on card Commit a962a809e5e4 ("ASoC: mediatek: mt8183: make headset codec optional") removed the cyclic dependency. Thus, it is safe to remove the forward declaration. Signed-off-by: Tzung-Bi Shih --- .../mt8183/mt8183-mt6358-ts3a227-max98357.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index a7ad41b6e885..30a7735c4af3 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -390,14 +390,6 @@ mt8183_mt6358_ts3a227_max98357_dai_links[] = { }, }; -static int -mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *cpnt); - -static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = { - .dlc = COMP_EMPTY(), - .init = mt8183_mt6358_ts3a227_max98357_headset_init, -}; - static struct snd_soc_card mt8183_mt6358_ts3a227_max98357_card = { .name = "mt8183_mt6358_ts3a227_max98357", .owner = THIS_MODULE, @@ -428,6 +420,11 @@ mt8183_mt6358_ts3a227_max98357_headset_init(struct snd_soc_component *component) return ret; } +static struct snd_soc_aux_dev mt8183_mt6358_ts3a227_max98357_headset_dev = { + .dlc = COMP_EMPTY(), + .init = mt8183_mt6358_ts3a227_max98357_headset_init, +}; + static int mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) { From patchwork Fri Aug 30 07:42:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tzung-Bi Shih X-Patchwork-Id: 11123215 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 555B114D5 for ; Fri, 30 Aug 2019 07:46:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DC653206BB for ; Fri, 30 Aug 2019 07:46:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Dfcaa/VU"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="jsLPPzgz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DC653206BB Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2A748167E; Fri, 30 Aug 2019 09:45:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2A748167E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1567151186; bh=ZdLf+xTRSXRlFXi0J0cLgZ7eW0UfP1Ws9TYB+e92PJ4=; h=Date:In-Reply-To:References:From:To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Dfcaa/VUl8G/3ZCb38kBISAlJI/dxP7wTVuM7ge6mTXxOkfX42Hky49C6EkBbGfEh 3rR2rH3ESGf6ymeR1kOaBtOYtkmuAIJrKmqMfU4sSozBjIvvKosBA/i54hZB5OBiKr KWkgY9DNF17n5AOT7txiZhlSXRQSJoZkXALviKcE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 88B11F805FD; Fri, 30 Aug 2019 09:43:12 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0091BF805FE; Fri, 30 Aug 2019 09:43:10 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=disabled version=3.4.0 Received: from mail-ua1-x94a.google.com (mail-ua1-x94a.google.com [IPv6:2607:f8b0:4864:20::94a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2A33BF805FC for ; Fri, 30 Aug 2019 09:43:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2A33BF805FC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="jsLPPzgz" Received: by mail-ua1-x94a.google.com with SMTP id g25so824999uan.5 for ; Fri, 30 Aug 2019 00:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=QkpFVGBsi9uV3+tI4cucGmcP2se44oABfy9yJ9m51tw=; b=jsLPPzgz8XzwERKcEyg5F0lPWQnbCiSAQKX4gWZdePlxhqI8wiHzbepzH8mF6inJ7g dC7y2AIxBi/l6FhfzvrSpcezIpQe9Yaw2PLYTXZIBnYUZzGwy4w5EJz9Fs/x+qwm06bt Jmwkfhi+cEsnB/oX7mCIS7ZfNeyKV4+R0ICHPojmgAM3fHiWdPT2d8hUdzTIA1FD5BY9 iRaovEU00iJXMPz/0Pa7I/FB1NnHIZep8Oc7HgHBfsPDeqgJI5x41u3ay5sSQCf7I5yc dyRZZwpKz4taocNohbTj1Qcn/QyzkEhSsoJ1CUWrLq47b3Kja0h7HWGAJKaWm0P0Wj5L qgrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=QkpFVGBsi9uV3+tI4cucGmcP2se44oABfy9yJ9m51tw=; b=jTXscpGUuzroR6pdoXOg2K5FE7Yi03gQ1ma0i+gcoVqcmgu487uVOyzR6YPkAts+qe hViXqVoJj/Qt9PWLFHCseYwcM6d7p35D9RrOIiK9YLCgaMPVtubsevb30SdFSGRMalHh LA/pXtjjGHcGumjKqQJOTuDpzoWnIu+xXt4SGRTnA4nLB/sXGDWigz56THTptKas7Vzu PhIJeNq4GLr0IKZx5wFyxl04wpssy3YImBWK/Uuxh/QaJqrjGX/T1KoYDWUfTJP+wAhI LrkAuFR0IchW8LWAwt3qJLe4ex1DhitZjQ7kSwJFP0keHMABEEHA3hy3SyctBxLLSuaX VctA== X-Gm-Message-State: APjAAAWZRqzuXNAIidsOcAuh8wtHJfqUybjEY3+ghUalgqeoAXCi664I 8XjXXSRNlQGGkD0ks6CIge6za3O4w4oX X-Google-Smtp-Source: APXvYqzJqUsg1jbkrZujmHhnT/Lb/G+9q7jTaeULN8RwqCe6+SLfUrA9o+s4b5wBHHKNED0tW215mk9EnapE X-Received: by 2002:a67:ff19:: with SMTP id v25mr7440177vsp.74.1567150985870; Fri, 30 Aug 2019 00:43:05 -0700 (PDT) Date: Fri, 30 Aug 2019 15:42:40 +0800 In-Reply-To: <20190830074240.195166-1-tzungbi@google.com> Message-Id: <20190830074240.195166-5-tzungbi@google.com> Mime-Version: 1.0 References: <20190830074240.195166-1-tzungbi@google.com> X-Mailer: git-send-email 2.23.0.187.g17f5b7556c-goog From: Tzung-Bi Shih To: broonie@kernel.org Cc: tzungbi@google.com, alsa-devel@alsa-project.org, dgreid@google.com, cychiang@google.com Subject: [alsa-devel] [PATCH 4/4] ASoC: mediatek: mt8183: fix space issues X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Fix space issues: - No space before ';'. - No trailing blank line. Signed-off-by: Tzung-Bi Shih --- sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c index 30a7735c4af3..bb9cdc0d6552 100644 --- a/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c +++ b/sound/soc/mediatek/mt8183/mt8183-mt6358-ts3a227-max98357.c @@ -471,7 +471,7 @@ mt8183_mt6358_ts3a227_max98357_dev_probe(struct platform_device *pdev) return PTR_ERR(priv->pinctrl); } - for (i = 0 ; i < PIN_STATE_MAX ; i++) { + for (i = 0; i < PIN_STATE_MAX; i++) { priv->pin_states[i] = pinctrl_lookup_state(priv->pinctrl, mt8183_pin_str[i]); if (IS_ERR(priv->pin_states[i])) { @@ -526,4 +526,3 @@ MODULE_DESCRIPTION("MT8183-MT6358-TS3A227-MAX98357 ALSA SoC machine driver"); MODULE_AUTHOR("Shunli Wang "); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("mt8183_mt6358_ts3a227_max98357 soc card"); -