From patchwork Mon Aug 22 18:59:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 599525 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 8561BC28D13 for ; Mon, 22 Aug 2022 19:00:59 +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 4359E1673; Mon, 22 Aug 2022 21:00:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4359E1673 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1661194857; bh=N6+L3N9i6HXrTzQ/s9qun83fPZWOQJ6IUgqBX6w88+s=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=RoBreywS2JQitFiXCyogt8KffMUsQIrydGW135Ga/D3kEJJUcs9V7CuKvOs3xFq3P VstwrXy4B1H64rCzRRejzVBfYHBe0K9vMstzrBlrXdZ6NljGAfuxnBojDUq0HZfGfN KT5VkG56nEUbsTBA28lUCrwMt7ely0eiXBZZwV5k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 991BEF80529; Mon, 22 Aug 2022 20:59:41 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1983FF80152; Mon, 22 Aug 2022 20:59:40 +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 C004CF80152 for ; Mon, 22 Aug 2022 20:59:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C004CF80152 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NCE/hUHL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1661194777; x=1692730777; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=N6+L3N9i6HXrTzQ/s9qun83fPZWOQJ6IUgqBX6w88+s=; b=NCE/hUHL8wV0SzviNGNxMZ9TWQvaxIO8bWYiu+2ZxtmHGOFXuZdJ41oH G0GKEcOBPIWNnLJYn2VPPLSFV99AjPQUN14YKjUYYHpi43u9bPiLCrwa5 8NN3CEPhhZ+p4nQesl5wlvIKEKEgyfCBY28ly8a/tYOd7siRmIZT5Dm04 6fnkwTHSGcum2vWalzCcDq5zjbMSnyuu6AeGmAHsMaF8YCJRI7RRBDhZ2 7F/zaw+gCLnp4RTTIZzX1YdyllxciNUSc0m5NdK9lyGc/Ra+7OTwDkT+U u/b5L/fTI4jSubS4Hi65gP8eDcTiMiR43wrsqP+SFyleL4lemt/G3tVwM A==; X-IronPort-AV: E=McAfee;i="6500,9779,10447"; a="379786490" X-IronPort-AV: E=Sophos;i="5.93,255,1654585200"; d="scan'208";a="379786490" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 11:59:34 -0700 X-IronPort-AV: E=Sophos;i="5.93,255,1654585200"; d="scan'208";a="669676468" Received: from apascali-mobl2.ger.corp.intel.com (HELO pbossart-mobl3.home) ([10.252.42.21]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Aug 2022 11:59:32 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 0/4] ASoC: SOF: Intel: override mclk_id for ES8336 support Date: Mon, 22 Aug 2022 20:59:07 +0200 Message-Id: <20220822185911.170440-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Cc: tiwai@suse.de, Cezary Rojewski , broonie@kernel.org, Pierre-Louis Bossart 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" This patchset solves a known issue with ES8336 platforms wrt MCLK selection. Most of the devices use the MCLK0 signal, but some devices do use the MCLK1 signal. The MCLK is defined in the topology, it would be a nightmare to generate more topology files just for one MCLK difference. With a minor extension to the intel-nhlt library, the MCLK information can be found by parsing the NHLT table, and we can override the mclk_id at boot time. The only known issues for this platform remain the detection of GPIO and microphone connections, currently only possible with manual quirks. Thanks to Eugene J. Markow for testing this patchset. Pierre-Louis Bossart (4): ASoC: SOF: add quirk to override topology mclk_id ALSA: hda: intel-nhlt: add intel_nhlt_ssp_mclk_mask() ASoC: SOF: Intel: hda: override mclk_id after parsing NHLT SSP blob ASoC: SOF: Intel: hda: refine SSP count support include/sound/intel-nhlt.h | 7 ++++ sound/hda/intel-nhlt.c | 61 +++++++++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.c | 34 +++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ sound/soc/sof/intel/mtl.c | 2 +- sound/soc/sof/intel/tgl.c | 8 ++--- sound/soc/sof/ipc3-topology.c | 7 ++++ sound/soc/sof/sof-priv.h | 4 +++ 8 files changed, 120 insertions(+), 5 deletions(-)