From patchwork Mon Oct 10 12:07:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 614244 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 37869C433FE for ; Mon, 10 Oct 2022 11:54:23 +0000 (UTC) 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 698532926; Mon, 10 Oct 2022 13:53:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 698532926 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1665402861; bh=OgygjgFOLQ+lJxPo5N6olQTmtthRmOt/SHG8C643xTo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gwct4eegvJVKbJsqDtY+95BJMLSn4cVoSDlgON0A5bSf9hjR5N0POg1GOxp4l+T+I ia2pHWZSMOUyrcZAdLpOI89/XRc1Snu3erBZmX2O0qaVjl5OHHkCzZX2bhgW2kIFmo VVkupRbm7vOeDj+j4Z1GDa7dhkhSJccZ3EqShZl8= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A1234F80568; Mon, 10 Oct 2022 13:51:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F23EFF80571; Mon, 10 Oct 2022 13:51:56 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id C6E83F80557 for ; Mon, 10 Oct 2022 13:51:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C6E83F80557 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NdhyEMeD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665402711; x=1696938711; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OgygjgFOLQ+lJxPo5N6olQTmtthRmOt/SHG8C643xTo=; b=NdhyEMeDhK9ccV1V9TPx5+vyp1rNl2tcb2Xewi27by+n+yF1MiGOTtWW YaRIwmQlrnp/P/jmtxa/XTwhC+IgGzL9f+b8ptKByUKPJf6ZUSU5QDvHg N9N2bNfEIDmyTDp26YKw/uOhrudw6MHyBA9zWXwn/i2iDmRfkgB9coqK4 JzYL3BlYHTPjFjxg2PsAjZDt2Y9d5/AOoJSGGza6zzZUtz6MwMpTivKy2 3aq86QC8Ml2jLJXDkq10dilN2Q2BO3hWeWd3FcoYlFWuZIlECj5NsbmAX Mbm1t4p1o3wwhxfZsUrDddyWIZqRSH+ZI/nhVYUTwcD2h+9R1eJ2uZotY A==; X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="390513237" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="390513237" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 04:51:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="954889053" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="954889053" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga005.fm.intel.com with ESMTP; 10 Oct 2022 04:51:45 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org Subject: [PATCH 06/15] ASoC: Intel: avs: Support da7219 on both KBL and APL Date: Mon, 10 Oct 2022 14:07:40 +0200 Message-Id: <20221010120749.716499-7-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221010120749.716499-1-cezary.rojewski@intel.com> References: <20221010120749.716499-1-cezary.rojewski@intel.com> MIME-Version: 1.0 Cc: pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, amadeuszx.slawinski@linux.intel.com, tiwai@suse.com 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" From: Amadeusz Sławiński KBL and APL devices use same codec but have different clock, so it must be set appropriately depending on device. Signed-off-by: Amadeusz Sławiński --- sound/soc/intel/avs/boards/da7219.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/avs/boards/da7219.c b/sound/soc/intel/avs/boards/da7219.c index 02ae542ad779..503a967a1c3a 100644 --- a/sound/soc/intel/avs/boards/da7219.c +++ b/sound/soc/intel/avs/boards/da7219.c @@ -6,6 +6,7 @@ // #include +#include #include #include #include @@ -80,7 +81,10 @@ static int avs_da7219_codec_init(struct snd_soc_pcm_runtime *runtime) int ret; jack = snd_soc_card_get_drvdata(card); - clk_freq = 19200000; + if (soc_intel_is_apl()) + clk_freq = 19200000; + else /* kbl */ + clk_freq = 24576000; ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK, clk_freq, SND_SOC_CLOCK_IN); if (ret) {