From patchwork Fri Jan 25 20:34:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 10782035 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5FEB246E2 for ; Fri, 25 Jan 2019 20:43:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4AADE289A9 for ; Fri, 25 Jan 2019 20:43:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48AE328AFD; Fri, 25 Jan 2019 20:43:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5989928CD8 for ; Fri, 25 Jan 2019 20:43:51 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C74D8267964; Fri, 25 Jan 2019 21:35:20 +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 ECF8126680F; Fri, 25 Jan 2019 21:35:17 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by alsa0.perex.cz (Postfix) with ESMTP id DCF9B26680F for ; Fri, 25 Jan 2019 21:35:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jan 2019 12:35:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,523,1539673200"; d="scan'208";a="141393388" Received: from unknown (HELO pbossart-mobl3.intel.com) ([10.255.229.191]) by fmsmga001.fm.intel.com with ESMTP; 25 Jan 2019 12:35:11 -0800 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Date: Fri, 25 Jan 2019 14:34:54 -0600 Message-Id: <20190125203509.22994-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.17.1 Cc: tiwai@suse.de, liam.r.girdwood@linux.intel.com, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart Subject: [alsa-devel] [PATCH 00/15] ASoC: Intel: pass platform name to machine drivers 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP To reuse the same machine drivers with Atom/SST, Skylake and SOF, we need to change the default platform_name (or platforms->name in the "modern" representation). So far, this override was done with an automatic override, which was broken by a set of changes for DT platforms related to deferred probe handling. This automatic override is actually not really needed, the machine driver can already receive the platform name as a platform_data parameter. This is used e.g. for HDaudio support where we have different PCI aliases used for different platforms. We can reuse the same mechanism and modify the machine drivers to override the dailinks prior to registrating the card. This will require additional work for SOF, but with this helper it'll be just two lines of additional code per machine driver which is reused, not the end of the world. This helper can be simplified when all drivers have transitioned to the "modern" representation of dailinks. While these changes are simple and largely mechanical, there is always a risk. These patches were tested with Asus T100 (rt5640), rt5651, rt5682, pcm512x, both in SST and SOF cases. Additional tests are on-going for Chromebook platforms and Broadwell. I figured it was better to share this patchset earlier to get more feedback. Note that byt-max98080, byt-rt5640 were not modified since they are deprecated. bytcht-nocodec and the Skylake/Kabylake machine drivers changes were not changed since SOF does not support them. There may be additional changes if and when Skylake/Kabylake are supported by SOF (largely a firmware authentication issue, not technical difficulty). Pierre-Louis Bossart (15): ASoC: add helper to change platform name for all dailinks ASoC: Intel: haswell: platform name fixup support ASoC: Intel: broadwell: platform name fixup support ASoC: Intel: bdw-rt5677: platform name fixup support ASoC: Intel: bytcr_rt5640: platform name fixup support ASoC: Intel: bytcr_rt5651: platform name fixup support ASoC: Intel: bytcht_da7213: platform name fixup support ASoC: Intel: bytcht_es8316: platform name fixup support ASoC: Intel: cht_bsw_max98090_ti: platform name fixup support ASoC: Intel: cht_bsw_nau8824: platform name fixup support ASoC: Intel: cht_bsw_rt5645: platform name fixup support ASoC: Intel: cht_bsw_rt5672: platform name fixup support ASoC: Intel: bxt_da7219_max98357a: platform name fixup support ASoC: Intel: bxt_rt298: platform name fixup support ASoC: Intel: glk_rt5682_max98357a: platform name fixup support include/sound/soc.h | 31 +++++++++++++++++++ sound/soc/intel/boards/bdw-rt5677.c | 14 +++++++++ sound/soc/intel/boards/broadwell.c | 16 ++++++++++ sound/soc/intel/boards/bxt_da7219_max98357a.c | 13 ++++++++ sound/soc/intel/boards/bxt_rt298.c | 13 ++++++++ sound/soc/intel/boards/bytcht_da7213.c | 8 +++++ sound/soc/intel/boards/bytcht_es8316.c | 9 ++++++ sound/soc/intel/boards/bytcr_rt5640.c | 9 ++++++ sound/soc/intel/boards/bytcr_rt5651.c | 9 ++++++ sound/soc/intel/boards/cht_bsw_max98090_ti.c | 12 +++++++ sound/soc/intel/boards/cht_bsw_nau8824.c | 12 +++++++ sound/soc/intel/boards/cht_bsw_rt5645.c | 9 ++++++ sound/soc/intel/boards/cht_bsw_rt5672.c | 9 ++++++ sound/soc/intel/boards/glk_rt5682_max98357a.c | 21 ++++++++++--- sound/soc/intel/boards/haswell.c | 15 +++++++++ 15 files changed, 196 insertions(+), 4 deletions(-)