From patchwork Thu May 25 13:59: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: 13255265 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 6EA54C7EE2F for ; Thu, 25 May 2023 14:01:57 +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 76CD274C; Thu, 25 May 2023 16:01:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76CD274C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685023315; 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=ZRx5XSEh6puVPerxDEQgVXKZAkwgItieNJeHkXQBfMioYSAzoTWyWNFpynBjJleKS O/sORqCuQE1RpbDtnWi+GHuK76lBd5u3LPP+JJ6ir+X+hVC98Lot4j3YlCM+3KWm1D S62DoTxqytagDWZE/FnHsyoYjc/Q5Z1tLHCbzx5Y= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 66778F80558; Thu, 25 May 2023 16:00: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 DF173F80551; Thu, 25 May 2023 16:00:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A88E2F8026A; Thu, 25 May 2023 16:00:12 +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 BCA01F800DF for ; Thu, 25 May 2023 16:00:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BCA01F800DF 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=LjovRqGn 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 34PBPhU2006105; Thu, 25 May 2023 09:00: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=LjovRqGnqJBLgMnsb+RmNOQD7sbuLvL4avbkpPfOwJbdERZBaGjUvGtiuPgtqZ5t6KKm d1eH3bbHQloTje/fWpecbdxj+j2mD8PR+0A/nH8K769/KosJ7ggQHkInoptc7X72OQO8 Uwn/rCh54gQhiim3/i5EHxYBpJwgrlwU4Ep57jPssb7bG8/SsG2mqoRczVbyJtgND40n TR99g+ARvkSgw3BZgFUA0/DCOPovexzFmvsKOcq3hpGXbFbDQHkGHxtZDdaNh+5V6JEb 9utSVcSszXSf2Qo0jKOsWJLRfkQel16f30PTGbEBmjop/0PEM8wdDSKSwFIe7Qe2XCE9 nQ== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3qptmm6wbf-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 09:00:05 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) 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; Thu, 25 May 2023 09:00:03 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 25 May 2023 09:00:03 -0500 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.43]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 2591945; Thu, 25 May 2023 14:00:03 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH RESEND v1 1/3] ALSA: hda: cs35l41: Clean up Firmware Load Controls Date: Thu, 25 May 2023 14:59:53 +0100 Message-ID: <20230525135955.2108140-2-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> References: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: SDkSKi_mbC0gP72s9JAp318146wTbO-a X-Proofpoint-GUID: SDkSKi_mbC0gP72s9JAp318146wTbO-a X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 5BTXPSJCYUCXTV6CKAYSOPX4SC4256GX X-Message-ID-Hash: 5BTXPSJCYUCXTV6CKAYSOPX4SC4256GX X-MailFrom: prvs=0509245bd3=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 Thu May 25 13:59: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: 13255266 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 6745DC77B7A for ; Thu, 25 May 2023 14:02:11 +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 782EB1FE; Thu, 25 May 2023 16:01:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 782EB1FE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685023329; bh=sW7uxI82R7awfpaKn54XMYs5j73FQub+nqbBrHJmysw=; 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=CSLUYz8i5M7XdHSg9BPGUG/inOzXxxXG3C3J96OFXT4PFVcssFXDPzBa5StbHfT5J xLWMKOYeEoQZ6UvOWuQdgp2b1fphh1njK8e2FvxxqT1otq/FKaiK7fhjTH70pqrLzr QLtaOLYyqtqc/+72WDkSdfF0AmQrq8iubAgYBAOk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 96A90F80568; Thu, 25 May 2023 16:00:20 +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 2D2C8F80568; Thu, 25 May 2023 16:00:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0335BF8053D; Thu, 25 May 2023 16:00:13 +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 047A5F8016A for ; Thu, 25 May 2023 16:00:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 047A5F8016A 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=Ri4YGLK3 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 34P8Mm6O016336; Thu, 25 May 2023 09:00: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=K1cH0ZtWLCX8sI+lF/y9e1IRq9QfXxo07nEhVezuoz8=; b=Ri4YGLK3FZa9c9GfrDkby/4rbuLaStJrwhynXGQAFAahKrJDEOKPlcnwDe2fqwFgNUF8 1G9rWJU3gXbHYKPaQpAsX7Oy4sKBPcT0gvzCdvFV1uypki79q0qRQnL7X9g67bCN3fpS QAZcWEi2THpSRpQr76ikxZo9VYqfuKHk2ovHHdeJtb4C/5+rpEA0pZxbIaD7njfn8Hnx EmVpb2TzgrhZIncTyl2mkqlB90vuRbNFVx4cNsdaAue/kwckxmAsgUvR3xnntbm3pCPb I5jv0nar1g7wdKEcRQD11SfYKkbtVR+YEmWUFhC0Y7SbhOcyajW9/lyv6CjHIAEazL5r Lg== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3qsde8hsqk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 09:00:05 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) 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; Thu, 25 May 2023 09:00:03 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 25 May 2023 09:00:03 -0500 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.43]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 5A26E11D4; Thu, 25 May 2023 14:00:03 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH RESEND v1 2/3] ALSA: hda: cs35l41: Fix endian conversions Date: Thu, 25 May 2023 14:59:54 +0100 Message-ID: <20230525135955.2108140-3-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> References: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: pHXjP75wp6WerhLDKNYkfpBqR2QQBN9R X-Proofpoint-GUID: pHXjP75wp6WerhLDKNYkfpBqR2QQBN9R X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 6VO2DWRSXMEEMSPWWVOFP4E4S7RANQH2 X-Message-ID-Hash: 6VO2DWRSXMEEMSPWWVOFP4E4S7RANQH2 X-MailFrom: prvs=0509245bd3=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 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index d100189e15b83..b02462ae21f04 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; @@ -379,10 +379,10 @@ static int cs35l41_save_calibration(struct cs35l41_hda *cs35l41) /* Calibration can only be applied whilst the DSP is not running */ ret = cs35l41_apply_calibration(cs35l41, - cpu_to_be32(cl->calAmbient), - cpu_to_be32(cl->calR), - cpu_to_be32(cl->calStatus), - cpu_to_be32(cl->calR + 1)); + (__be32)cpu_to_be32(cl->calAmbient), + (__be32)cpu_to_be32(cl->calR), + (__be32)cpu_to_be32(cl->calStatus), + (__be32)cpu_to_be32(cl->calR + 1)); } } vfree(data); @@ -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 Thu May 25 13:59: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: 13255267 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 827C7C7EE2D for ; Thu, 25 May 2023 14:02:19 +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 BF06383B; Thu, 25 May 2023 16:01:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BF06383B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1685023337; 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=vLLVNfEdapoS3z/QcWTipnxyRe4WvugJFd1lPYxuKRZfELMoypDb1VzjuYvZikp6k Io1TIYndTBb373RgEmJLujOAmA7dVFa5J7To3i/Dp5YJnSc3GHH6sDEQFpHaDDCfNS 1lkydSmc7yqsDYHXdj+z1yOolZCCuMsWco9Ahfy8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 713B1F80579; Thu, 25 May 2023 16:00:23 +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 C730AF8057B; Thu, 25 May 2023 16:00:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2A1BAF80551; Thu, 25 May 2023 16:00:17 +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 B5BECF8024E for ; Thu, 25 May 2023 16:00:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B5BECF8024E 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=KXx5GHEJ 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 34P8Mm6P016336; Thu, 25 May 2023 09:00: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=KXx5GHEJEI67PDyzhvihgN06vrxfDxinV/ILLli7yUj4tFC5YZ1UAzRCRz+KcGVaJZDv f1hNMLXayHEuok1FW+Fl4Dc/bbhUNW7C/CjLr8pJz/Z2vd58uulg5aGNafD0IdrsBRLT hLdj0X0XkMDGVxUZ6VfoQYWAUpLF2T6xQeFfafICdvRzX7N+4fHEop1eUIciNjnwZpG8 SfrbZ0Ai24Nw6SKbTTme7H/QoXIoa/5j4oQ2p9dMkBAradaAMuxSHgJfxwsuiDXaDjCT UHRcZcxT5JKysfoVpif6CCenxHLHyiEsEPqxDT6fvEB9F8IOSSkMWIo5fA3PU4QHy8x/ fw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3qsde8hsqk-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 May 2023 09:00:06 -0500 Received: from ediex02.ad.cirrus.com (198.61.84.81) 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; Thu, 25 May 2023 09:00:03 -0500 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.26 via Frontend Transport; Thu, 25 May 2023 09:00:03 -0500 Received: from sbinding-cirrus-dsktp2.ad.cirrus.com (unknown [198.90.238.43]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 8DE8815B4; Thu, 25 May 2023 14:00:03 +0000 (UTC) From: Stefan Binding To: Jaroslav Kysela , Takashi Iwai CC: , , , Stefan Binding Subject: [PATCH RESEND v1 3/3] ALSA: hda/realtek: Delete cs35l41 component master during free Date: Thu, 25 May 2023 14:59:55 +0100 Message-ID: <20230525135955.2108140-4-sbinding@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> References: <20230525135955.2108140-1-sbinding@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: nxDTKbOQ0DHagdHqVxAuRyG70FBAwcGv X-Proofpoint-GUID: nxDTKbOQ0DHagdHqVxAuRyG70FBAwcGv X-Proofpoint-Spam-Reason: safe Message-ID-Hash: YFTOXCHGHXY5N3PHKT5UBH3TIHR2HLOG X-Message-ID-Hash: YFTOXCHGHXY5N3PHKT5UBH3TIHR2HLOG X-MailFrom: prvs=0509245bd3=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); } }