alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com,
	amadeuszx.slawinski@linux.intel.com, tiwai@suse.com
Subject: [PATCH 06/15] ASoC: Intel: avs: Support da7219 on both KBL and APL
Date: Mon, 10 Oct 2022 14:07:40 +0200	[thread overview]
Message-ID: <20221010120749.716499-7-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20221010120749.716499-1-cezary.rojewski@intel.com>

From: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>

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 <amadeuszx.slawinski@linux.intel.com>
---
 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 <linux/module.h>
+#include <linux/platform_data/x86/soc.h>
 #include <linux/platform_device.h>
 #include <sound/jack.h>
 #include <sound/pcm.h>
@@ -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) {
-- 
2.25.1


  parent reply	other threads:[~2022-10-10 11:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 12:07 [PATCH 00/15] ASoC: Intel: avs: Fixes and new boards support Cezary Rojewski
2022-10-10 11:57 ` Cezary Rojewski
2022-10-10 12:07 ` [PATCH 01/15] ASoC: Intel: avs: Fix DMA mask assignment Cezary Rojewski
2022-10-10 12:07 ` [PATCH 02/15] ASoC: Intel: avs: Fix potential RX buffer overflow Cezary Rojewski
2022-10-10 12:07 ` [PATCH 03/15] ASoC: codecs: rt298: Add quirk for KBL-R RVP platform Cezary Rojewski
2022-10-10 12:07 ` [PATCH 04/15] ASoC: Intel: avs: " Cezary Rojewski
2022-10-10 12:07 ` [PATCH 05/15] ASoC: Intel: avs: Support AML with rt286 configuration Cezary Rojewski
2022-10-10 12:07 ` Cezary Rojewski [this message]
2022-10-10 12:07 ` [PATCH 07/15] ASoC: Intel: avs: Add missing SKL-based device IDs Cezary Rojewski
2022-10-10 12:07 ` [PATCH 08/15] ASoC: Intel: avs: Simplify d0ix disabling routine Cezary Rojewski
2022-10-10 12:07 ` [PATCH 09/15] ASoC: Intel: avs: Add missing include to HDA board Cezary Rojewski
2022-10-10 12:07 ` [PATCH 10/15] ASoC: Intel: avs: Do not reuse msg between different IPC handlers Cezary Rojewski
2022-10-10 12:07 ` [PATCH 11/15] ASoC: Intel: avs: Do not treat unsupported IPCs as invalid Cezary Rojewski
2022-10-10 12:07 ` [PATCH 12/15] ASoC: Intel: avs: Do not print IPC error message twice Cezary Rojewski
2022-10-10 12:07 ` [PATCH 13/15] ASoC: Intel: avs: Simplify ignore_fw_version description Cezary Rojewski
2022-10-10 12:07 ` [PATCH 14/15] ASoC: Intel: avs: Simplify log control for SKL Cezary Rojewski
2022-10-10 12:07 ` [PATCH 15/15] ASoC: codecs: hda: Fix spelling error in log message Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221010120749.716499-7-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=hdegoede@redhat.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).