From patchwork Mon Jun 5 15:28:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 689783 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 8E58BC77B73 for ; Mon, 5 Jun 2023 15:30:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 84E19820; Mon, 5 Jun 2023 17:29:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 84E19820 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685979035; bh=O6JACBOybLFKiDCKUHXpkKR022gig8ragcTiQpzMQbQ=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dbaZ0glT0DBaguA9TWKuCBZKNOKLw/VOIlFbE7Vsj7Z309H3iNbTUd1Bz03evczLf 7pdIIeRjQFImNOmG6zRUrD1FQweUq5FrDb80fJu34bQozpQrLZ5Qb3vW5rdeC1fnbB 2asOhZqWXQcM4iZdHnIe4McPumd1T3khh+eWXA7A= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0EA90F8016C; Mon, 5 Jun 2023 17:29:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 52B8DF80155; Mon, 5 Jun 2023 17:29:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F79AF80494; Mon, 5 Jun 2023 17:29:13 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 5A110F80130 for ; Mon, 5 Jun 2023 17:29:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5A110F80130 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=jORWHZOJ Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3558sEEG030588; Mon, 5 Jun 2023 10:29:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=I3l9dEf9Pxrt0iwsB+1r4Bv1ieTEMmtO3O+2uHhuyLc=; b=jORWHZOJiDgCTNJcVf2nFbpIbPjYqM6jy1O0lo3R5+BiNWqYEjPLTevqY4+GDauwMSAy z+haucZREOk5Nj/lrj30j5o8LZHquq7oPs9nis/N9hukVeOkA0jAGiU98elfWwd7JztY bwijaIJ0kSMCag+1Oy39ZrKF5ybgAzjzi7Srrd0xhVaqK6o1uvfNuSf4bE/9FcwzI9ul H/8wA8S5JU9Z9vHPGuRVmuCs73yYfiuDsw5EHkDmJ4GOgXNgVFGEllE5A9H4EFx09Qq4 KfW8ueuMYeE2m/t9jCmRW/g2oE76evISsNCy3+ZOqktC4kPQBE7N1qedi7dMgqcGQTJP Jg== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3r01xna179-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Jun 2023 10:29:05 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 5 Jun 2023 16:29:03 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 5 Jun 2023 16:29:03 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (NEWNC1SL3J3.ad.cirrus.com [198.90.238.20]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id F3CD1B2F; Mon, 5 Jun 2023 15:29:02 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v2 1/3] ALSA: hda: cs35l41: Clean up Firmware Load Controls Date: Mon, 5 Jun 2023 16:28:53 +0100 Message-ID: <20230605152855.448115-2-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605152855.448115-1-sbinding@opensource.cirrus.com> References: <20230605152855.448115-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: cx2g64B3zanoghmQu9UO1mb7CAd7WSF9 X-Proofpoint-GUID: cx2g64B3zanoghmQu9UO1mb7CAd7WSF9 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: BEHCZBSEAHPCLPRNW5VZEPVFCOHASM4X X-Message-ID-Hash: BEHCZBSEAHPCLPRNW5VZEPVFCOHASM4X X-MailFrom: prvs=1520dfaea3=sbinding@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Ensure Firmware Load control and Firmware Type control returns 1 when the value changes. Remove fw_mutex from firmware load control put, since it is unnecessary, and prevents any possibility of mutex inversion. Signed-off-by: Stefan Binding --- sound/pci/hda/cs35l41_hda.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index b5210abb5141f..d100189e15b83 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -835,34 +835,26 @@ static int cs35l41_fw_load_ctl_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct cs35l41_hda *cs35l41 = snd_kcontrol_chip(kcontrol); - unsigned int ret = 0; - - mutex_lock(&cs35l41->fw_mutex); if (cs35l41->request_fw_load == ucontrol->value.integer.value[0]) - goto err; + return 0; if (cs35l41->fw_request_ongoing) { dev_dbg(cs35l41->dev, "Existing request not complete\n"); - ret = -EBUSY; - goto err; + return -EBUSY; } /* Check if playback is ongoing when initial request is made */ if (cs35l41->playback_started) { dev_err(cs35l41->dev, "Cannot Load/Unload firmware during Playback\n"); - ret = -EBUSY; - goto err; + return -EBUSY; } cs35l41->fw_request_ongoing = true; cs35l41->request_fw_load = ucontrol->value.integer.value[0]; schedule_work(&cs35l41->fw_load_work); -err: - mutex_unlock(&cs35l41->fw_mutex); - - return ret; + return 1; } static int cs35l41_fw_type_ctl_get(struct snd_kcontrol *kcontrol, @@ -881,8 +873,12 @@ static int cs35l41_fw_type_ctl_put(struct snd_kcontrol *kcontrol, struct cs35l41_hda *cs35l41 = snd_kcontrol_chip(kcontrol); if (ucontrol->value.enumerated.item[0] < HDA_CS_DSP_NUM_FW) { - cs35l41->firmware_type = ucontrol->value.enumerated.item[0]; - return 0; + if (cs35l41->firmware_type != ucontrol->value.enumerated.item[0]) { + cs35l41->firmware_type = ucontrol->value.enumerated.item[0]; + return 1; + } else { + return 0; + } } return -EINVAL; From patchwork Mon Jun 5 15:28:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 689288 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 21D3FC77B73 for ; Mon, 5 Jun 2023 15:31:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BDE92836; Mon, 5 Jun 2023 17:30:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BDE92836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685979060; bh=UruFh6U7bhpdZyDxBIlHCtnZk2zvtnd0T9fe9urbU2s=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oFLqOd9pX1JHjEWDV1z8sa7YvPsBrxozrl0YX74tIdAuttcrZ4XJpBggBq5Opus1D jXf1J1uXshg1aLRWLiYE2UdnxVwYeABsx987VPfgIKvjlqDMYDDvQplGeaxnFsPODR 6M8vFLC/hSbW1ef4+YCNFju2sVyDusGSCnvjTg2U= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F27E2F8055A; Mon, 5 Jun 2023 17:29:21 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 182E7F80553; Mon, 5 Jun 2023 17:29:21 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8FF59F80290; Mon, 5 Jun 2023 17:29:14 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (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 C70BCF80199 for ; Mon, 5 Jun 2023 17:29:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C70BCF80199 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=XVQdMUiw Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3558sEEH030588; Mon, 5 Jun 2023 10:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=eYBg8d8Hvj15ndjFUQ9ONSXAzqhuPZlCNKFw2fRkfqM=; b=XVQdMUiwFCV1xgNobYOpoj9ynBGEzVnZ6JJ3gBWqNrVNWPfPo4muzn0cPgaqmzqzAnjq wGLZBoykwwYlRmpypyPmNla7qZl4URHILlna33kGiE5Iur9bKKpZERte/bCgH6bl1Pqh M6dUfgQBsrbM+SVU4hItxeSFTVG55wzaZcF8QpKFvLHEO7io2k6q0YTXuA1m0jehNhUc uaL7o14dtL6d4+YItJ4qrfM5iEjb3akyAFSPGHbNL5B6iDEsSvB5UdVHW1CklS5782A2 BGvayWngHQPc+xCFZhxXhAvURIFIDyk/eN1oBFAXIwYnzG07nPuCPEPE8322/BYaOQz8 8A== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3r01xna179-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Jun 2023 10:29:05 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 5 Jun 2023 16:29:03 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 5 Jun 2023 16:29:03 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (NEWNC1SL3J3.ad.cirrus.com [198.90.238.20]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 322B611C6; Mon, 5 Jun 2023 15:29:03 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v2 2/3] ALSA: hda: cs35l41: Fix endian conversions Date: Mon, 5 Jun 2023 16:28:54 +0100 Message-ID: <20230605152855.448115-3-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605152855.448115-1-sbinding@opensource.cirrus.com> References: <20230605152855.448115-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: jfXpQQwIbuQLEB63hjr0rcaSYRFwu9AC X-Proofpoint-GUID: jfXpQQwIbuQLEB63hjr0rcaSYRFwu9AC X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 77ZDWS7WXE3SZ54DTCVOC7VIKFST4NBH X-Message-ID-Hash: 77ZDWS7WXE3SZ54DTCVOC7VIKFST4NBH X-MailFrom: prvs=1520dfaea3=sbinding@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Found during static analysis, ensure variables are correct types before endian conversion. Signed-off-by: Stefan Binding --- sound/pci/hda/cs35l41_hda.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index d100189e15b83..ce5faa6205170 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -308,8 +308,8 @@ static int cs35l41_request_firmware_files(struct cs35l41_hda *cs35l41, } #if IS_ENABLED(CONFIG_EFI) -static int cs35l41_apply_calibration(struct cs35l41_hda *cs35l41, unsigned int ambient, - unsigned int r0, unsigned int status, unsigned int checksum) +static int cs35l41_apply_calibration(struct cs35l41_hda *cs35l41, __be32 ambient, __be32 r0, + __be32 status, __be32 checksum) { int ret; @@ -745,7 +745,7 @@ static int cs35l41_runtime_resume(struct device *dev) static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) { - int halo_sts; + __be32 halo_sts; int ret; ret = cs35l41_init_dsp(cs35l41); @@ -773,7 +773,7 @@ static int cs35l41_smart_amp(struct cs35l41_hda *cs35l41) &halo_sts, sizeof(halo_sts)); if (ret) { - dev_err(cs35l41->dev, "Timeout waiting for HALO Core to start. State: %d\n", + dev_err(cs35l41->dev, "Timeout waiting for HALO Core to start. State: %u\n", halo_sts); goto clean_dsp; } From patchwork Mon Jun 5 15:28:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Binding X-Patchwork-Id: 689287 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 7A366C77B73 for ; Mon, 5 Jun 2023 15:31:28 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 31C95846; Mon, 5 Jun 2023 17:30:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 31C95846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685979086; bh=HHEnCqDTVAiMHpx8oMxvWbopMv+wgvd+ZakTFFuAT2k=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=rmpgVT4x38vc47iS5LbYi3BgMsgyRM6YTzk28Rerqx9Ni4HrJ9QZkGv0DW5EZTiyd qYJSCKgSWhc6AKm7FpLlOPenz99mKv5xZer2Q3wsRfjqnuZiB3aOSIJFbvwrZzKU/q uAy0a6LS3jbhfpFHABgWDVtsicvD78u+GGusYN8o= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 14E47F80290; Mon, 5 Jun 2023 17:30:16 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 7F0D9F80290; Mon, 5 Jun 2023 17:30:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7B6CFF80199; Mon, 5 Jun 2023 17:30:12 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (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 25263F80254 for ; Mon, 5 Jun 2023 17:29:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 25263F80254 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=db9Scri0 Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 355CoAUe020912; Mon, 5 Jun 2023 10:29:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=6wz2vaNUW7aZwUs1r4Wrw1zVQNO/7hVTjslreqKkGKE=; b=db9Scri08I+0MaD+FRWTKhWnXHzhFLzAmG4j739ApsC5aaEYh3n1PCVtuuXk+uMlAGYn m/oM8nHSGpXnDSRG+J6hg5FlyA96lHSAJz2T+uTLML6T50qVKvK9rU0tNVyTyHxWLkTN XrQva2ryBARh0uPG0CpX4qsbwAPP+tbIp7P4UZmiBvEWNg8kOf60IKejoknWdyqCGwtg YOquwJnYme+tJgFCngFb2Shn2LAvKxJrzicgsS3IDYzqVP59Vmu6IJ2P4Oy12gsbsWXl lG25+SJL39TRVpFS3jSSspYQRbQZIhS+u1l99aegdE204AWl1TfjelU99R332xt1VnRP wA== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3r02x19ynk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 05 Jun 2023 10:29:05 -0500 Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.26; Mon, 5 Jun 2023 16:29:03 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Mon, 5 Jun 2023 16:29:03 +0100 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (NEWNC1SL3J3.ad.cirrus.com [198.90.238.20]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 6669A15A4; Mon, 5 Jun 2023 15:29:03 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH v2 3/3] ALSA: hda/realtek: Delete cs35l41 component master during free Date: Mon, 5 Jun 2023 16:28:55 +0100 Message-ID: <20230605152855.448115-4-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230605152855.448115-1-sbinding@opensource.cirrus.com> References: <20230605152855.448115-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: 4i6lp2aVatnYIwKY7ejPhYNobwx5hpH9 X-Proofpoint-GUID: 4i6lp2aVatnYIwKY7ejPhYNobwx5hpH9 X-Proofpoint-Spam-Reason: safe Message-ID-Hash: M5NC2HFISX7PYMB3HM7B4XUZVUA7OS54 X-Message-ID-Hash: M5NC2HFISX7PYMB3HM7B4XUZVUA7OS54 X-MailFrom: prvs=1520dfaea3=sbinding@opensource.cirrus.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This ensures that the driver is properly cleaned up when freed. Signed-off-by: Stefan Binding --- sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 7b5f194513c7b..e3774903918fe 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6757,6 +6757,8 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char else spec->gen.pcm_playback_hook = comp_generic_playback_hook; break; + case HDA_FIXUP_ACT_FREE: + component_master_del(dev, &comp_master_ops); } }