From patchwork Wed Jun 5 13:45:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 10977011 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 0A35315E6 for ; Wed, 5 Jun 2019 13:43:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEB1627D16 for ; Wed, 5 Jun 2019 13:43:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E29E92893F; Wed, 5 Jun 2019 13:43:20 +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,DKIM_SIGNED, DKIM_VALID,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]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CD0452892C for ; Wed, 5 Jun 2019 13:43:19 +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 0EB3F165E; Wed, 5 Jun 2019 15:42:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0EB3F165E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559742197; bh=wLdkgbvxruG0F+dGEFCS4gN1KK65E+OLSdfricC4nwQ=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=tTnLAIaifS1f9n4s5ni1/kZgoVvnZm9EtKCBqkKUYYQFCLNCZxdBaX7EpdCwIvjFA qqVWBhA3zEB/DiNC/16AMiZn8XiU/MJ37KY+MIHo3HiPwOHqNoEO9O/f+mSQvE1Oj5 DNfrkxiF9yIWqKx5NmuzpadZfrlUPiDZuspUSSHk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7FB0EF896DB; Wed, 5 Jun 2019 15:42:26 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 36C81F896ED; Wed, 5 Jun 2019 15:42:24 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 A91D2F896CE for ; Wed, 5 Jun 2019 15:42:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A91D2F896CE X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Jun 2019 06:42:17 -0700 X-ExtLoop1: 1 Received: from xxx.igk.intel.com ([10.237.93.170]) by orsmga004.jf.intel.com with ESMTP; 05 Jun 2019 06:42:14 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: alsa-devel@alsa-project.org Date: Wed, 5 Jun 2019 15:45:42 +0200 Message-Id: <20190605134556.10322-1-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Cc: Cezary Rojewski , linux-kernel@vger.kernel.org, Takashi Iwai , Jie Yang , Liam Girdwood , Pierre-Louis Bossart , Mark Brown , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= Subject: [alsa-devel] [PATCH 00/14] Fix driver reload issues 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" X-Virus-Scanned: ClamAV using ClamSMTP Hi, This series of patches introduces fixes to various issues found while trying to unload all snd* modules and then loading them again. This allows for modules to be really _modules_ and be unloaded and loaded on demand, making it easier to develop and test them without constant system reboots. There are some fixes in flow, either we don't initialize things before cleaning them up, clean up in wrong places or don't clean up at all. Other patches fix memory management problems, mostly things are not being freed. And finally there is few miscellaneous patches, please refer to specific patches to see what they do. This series was tested on SKL, BXT, GLK & KBL. Small note: Patch 2 in this series was already send to this list along with SOF counterpart, however it seems that there is some problem: https://mailman.alsa-project.org/pipermail/alsa-devel/2019-May/149638.html and related patch on SOF side (with discussion): https://mailman.alsa-project.org/pipermail/alsa-devel/2019-May/149640.html It is included in this patchset for completeness. Amadeusz Sławiński (14): ASoC: Intel: Skylake: Initialize lists before access so they are safe to use ALSA: hdac: fix memory release for SST and SOF drivers ALSA: hdac: Fix codec name after machine driver is unloaded and reloaded ASoC: compress: Fix memory leak from snd_soc_new_compress ASoC: Intel: Skylake: Don't return failure on machine driver reload ASoC: Intel: Skylake: Remove static table index when parsing topology ASoC: Intel: Skylake: Add function to cleanup debugfs interface ASoC: Intel: Skylake: Properly cleanup on component removal ASoC: Intel: Skylake: Fix NULL ptr dereference when unloading clk dev SoC: rt274: Fix internal jack assignment in set_jack callback ASoC: core: Tell codec that jack is being removed ASoC: Intel: hdac_hdmi: Set ops to NULL on remove ASoC: topology: Consolidate how dtexts and dvalues are freed ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow sound/hda/ext/hdac_ext_bus.c | 12 ++- sound/soc/codecs/hdac_hdmi.c | 6 ++ sound/soc/codecs/rt274.c | 3 +- sound/soc/intel/skylake/skl-debug.c | 9 ++ sound/soc/intel/skylake/skl-pcm.c | 16 ++-- sound/soc/intel/skylake/skl-ssp-clk.c | 16 ++-- sound/soc/intel/skylake/skl-topology.c | 50 ++++++----- sound/soc/intel/skylake/skl-topology.h | 2 + sound/soc/intel/skylake/skl.c | 7 +- sound/soc/intel/skylake/skl.h | 5 ++ sound/soc/soc-compress.c | 17 ++-- sound/soc/soc-core.c | 1 + sound/soc/soc-topology.c | 114 ++++++++++++------------- 13 files changed, 143 insertions(+), 115 deletions(-)