From patchwork Wed Jul 20 13:06:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 12923937 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 B1C5DC433EF for ; Wed, 20 Jul 2022 12:58:09 +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 4FDC416FF; Wed, 20 Jul 2022 14:57:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4FDC416FF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658321887; bh=wdrNDjjTleU+YsTn831JnQVcBmPhMch9eEabtUrbKXg=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=bbkguR7fX/d4d+1RPyz4v6HcUEe8jzuWNDxehNkcTxQvUUCETTZeSoW/RAvdMR6Nr 5asNiSqeO2WFb8Cy2lKKTDqAlcYhRO7TZJnuDDfwirpofym/QopQI7HQ1RGimSSGRG YeNp9AkgB7oDaq6MFq4l93gSg5+g78fz/so3R0Iw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C5019F80169; Wed, 20 Jul 2022 14:57:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 10154F8025D; Wed, 20 Jul 2022 14:57:07 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) (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 C70BEF80118 for ; Wed, 20 Jul 2022 14:57:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C70BEF80118 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QB0qUiUx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658321825; x=1689857825; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=wdrNDjjTleU+YsTn831JnQVcBmPhMch9eEabtUrbKXg=; b=QB0qUiUxOGhqHLYMDdyzVHQ74TmPijjkQo+RT53TaDr4RtHrnE2MCTyy m09dExwt1CJQevOnsx9BaAHVa09ykZi82fKyVNjDaxWK1sXXXV8UKVxTU G/c2MhDH3RKQhgngZEhrhjJU02UoA0XGeZybWyxaWeCdJraJndu/Yi/ec wTxJQUF06f8J6XzR7v1u3ABz+Ah2C+D2GPqtdwMIiinuggPWj1PIBXO/x 0TV77kNz7c7fMD8Z8SK3S3u/SgB0OzHQa0wiuH0R1BEQHyNxu85wlap9/ dZOoCHG1BCzGUNt7mo3ihMjk4DULD4XN9gflwUNXx0f+EAilayrG232VE Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10413"; a="269797804" X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="269797804" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2022 05:56:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,286,1650956400"; d="scan'208";a="656259001" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by fmsmga008.fm.intel.com with ESMTP; 20 Jul 2022 05:56:54 -0700 From: Cezary Rojewski To: alsa-devel@alsa-project.org, broonie@kernel.org, tiwai@suse.com Subject: [PATCH 0/4] ALSA: hda: Unify codec construction Date: Wed, 20 Jul 2022 15:06:18 +0200 Message-Id: <20220720130622.146973-1-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Cc: Cezary Rojewski , kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, lgirdwood@gmail.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, ranjani.sridharan@linux.intel.com, amadeuszx.slawinski@linux.intel.com, peter.ujfalusi@linux.intel.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" A follow up to the recent HDAudio fixes series [1]. Given the recently reported regression [2], before the page fault occurring on codec shutdown can be fixed, codec construction procedure needs to be updated for skylake and sof-intel drivers. Drivers: pci-hda and avs need no changes - already making use of snd_hda_codec_device_init(). [1]: https://lore.kernel.org/alsa-devel/20220706120230.427296-7-cezary.rojewski@intel.com/ [2]: https://lore.kernel.org/alsa-devel/3c40df55-3aee-1e08-493b-7b30cd84dc00@linux.intel.com/ Cezary Rojewski (4): ASoC: hdac_hda: Disconnect struct hdac_hda_priv and hda_codec ALSA: hda: Make snd_hda_codec_device_init() the only codec constructor ALSA: hda: Always free codec on the device release ALSA: hda: Fix page fault in snd_hda_codec_shutdown() include/sound/hda_codec.h | 2 - include/sound/hdaudio_ext.h | 4 +- sound/hda/ext/hdac_ext_bus.c | 34 ++++++-------- sound/pci/hda/hda_codec.c | 49 +++++++++----------- sound/soc/codecs/hdac_hda.c | 26 ++++------- sound/soc/codecs/hdac_hda.h | 2 +- sound/soc/intel/boards/hda_dsp_common.c | 2 +- sound/soc/intel/boards/skl_hda_dsp_generic.c | 2 +- sound/soc/intel/skylake/skl.c | 24 ++++------ sound/soc/sof/intel/hda-codec.c | 29 +++++------- 10 files changed, 73 insertions(+), 101 deletions(-)