From patchwork Thu Mar 12 00:52:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jin, Yao" X-Patchwork-Id: 5989651 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 38E77BF90F for ; Thu, 12 Mar 2015 00:52:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C977201C8 for ; Thu, 12 Mar 2015 00:52:46 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 38DA8201BC for ; Thu, 12 Mar 2015 00:52:45 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 69AB02654BC; Thu, 12 Mar 2015 01:52:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_DNS_FOR_FROM, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 3EE1E265499; Thu, 12 Mar 2015 01:52:35 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 1DEA726549B; Thu, 12 Mar 2015 01:52:34 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by alsa0.perex.cz (Postfix) with ESMTP id 1416F265497 for ; Thu, 12 Mar 2015 01:52:26 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 11 Mar 2015 17:52:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,385,1422950400"; d="scan'208";a="539664157" Received: from yjin15-mobl1.ccr.corp.intel.com (HELO [10.239.196.76]) ([10.239.196.76]) by orsmga003.jf.intel.com with ESMTP; 11 Mar 2015 17:51:43 -0700 Message-ID: <5500E346.8020700@linux.intel.com> Date: Thu, 12 Mar 2015 08:52:22 +0800 From: "Jin, Yao" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Mark Brown References: <1426045713-1738-1-git-send-email-yao.jin@linux.intel.com> <20150311125047.GD28806@sirena.org.uk> In-Reply-To: <20150311125047.GD28806@sirena.org.uk> Cc: mengdong.lin@intel.com, alsa-devel@alsa-project.org, subhransu.s.prusty@intel.com, lgirdwood@gmail.com, bardliao@realtek.com Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: Add suspend_pre and resume_post for Braswell snd_soc_card X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Mark, Bard, This patch has dependency on Bard's patch "ASoC: rt5670: export jack suspend/resume APIs". I pull the Mark's for-next branch right now and I can see Bard's patch "ASoC: rt5670: export jack suspend/resume APIs" has been integrated. So there now is only one build error in rt5670.c: sound/soc/codecs/rt5670.c: In function 'is_sys_clk_from_pll': sound/soc/codecs/rt5670.c:702:38: error: 'struct snd_soc_dapm_widget' has no member named 'codec' struct snd_soc_codec *codec = source->codec; ^ After I fix it with my change as following, the build is successful. Could Bard take a look at it? For my patch, the build is successful. ASoC: Intel: Add suspend_pre and resume_post for Braswell snd_soc_card ASoC: Intel: move the jack creation to Braswell machine driver Thanks Jin Yao On 2015/3/11 20:50, Mark Brown wrote: > On Wed, Mar 11, 2015 at 11:48:33AM +0800, Jin Yao wrote: >> On Braswell, we need to add some machine specific setting before suspend >> and after resume. For example, disable/enable jack detection in codec so >> use snd_soc_card suspend_pre and resume_post ops for this purpose. > > Reverted since it doesn't build! > --- a/sound/soc/codecs/rt5670.c +++ b/sound/soc/codecs/rt5670.c @@ -699,7 +699,7 @@ static int set_dmic_clk(struct snd_soc_dapm_widget *w, static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { - struct snd_soc_codec *codec = source->codec; + struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec); if (rt5670->sysclk_src == RT5670_SCLK_S_PLL1)