Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp33042iog; Wed, 29 Jun 2022 17:26:14 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sdky92NhxU6OC6KNGpRJw7FI9dFuQLDtuwdq8I4Q3q4QQ5PaOE70/imwM4vky7OKmfJ9dd X-Received: by 2002:a17:902:e30c:b0:16a:2ee:c232 with SMTP id q12-20020a170902e30c00b0016a02eec232mr11464305plc.123.1656548774188; Wed, 29 Jun 2022 17:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656548774; cv=none; d=google.com; s=arc-20160816; b=x5JVeSxZRs5LIdL/7Of9rY0FK6HpsPAnS2v/R+LXGAtlI781FnrqLCjCpXowjqUMCt C9Gn4T1rqRbUFrFtur/qDo84o2r6cWetQFtqbYVXId7hXxoienGyJyvZlRwWk85mAyuO 0KPsHeJ1AUWrzWFBNlHPbQTr70cOPRHCLmA2VUghH/vXsb4Oa9FHsGO8ctHc8sUjkV2h dIRzhwnEQq7+qIGRC9rhsHRvoikuA4gHnftROYRtVyjNWHbsvtxHm6NJ0OIQY+oic7BU CFon14C5wF1GJrSKhsv1qLcSfyJJhpB+uPt5zVPyRMFjd9s6Nu+03hOXdtOdVLFuPIgx 7BiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+8Kh7yN91EZQ3CL/Ah4ypeCz4A1jHv0IsZAzGkM/i5Y=; b=DBF8nPxPoPWgpkI2KKKaQO42GQqbXMMMFcYhxDHAaO1/Up41lA9VO//Ai/Ne2rzpxu QAFEaapHADev/d7ZC33AHhfejA84j86zYK3LqlgHnvKDKGYwBYAwPp2hByMXvQSth+pG I12t5FukTyrPnzkuakS9vCzgzRUeSyrl/FiNuwXy49jGmoe+lrjYYYoMcrEnl7bxaZmi 6bkrx7bFCWYRm27GL96aYu2OTHtWmV+QytCOwrDGaJN5HFg6m4uMUDRupa1cdrMrTWYV RcyLD1OdSmuqnlkSEsUrRMqVL9XZ3i+0900P1Kuj3Cq9caZibKIBPIr3JzHHpfvWru/I m0QQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="XKcKwxo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y10-20020a056a00190a00b0050ce6214b5esi22620770pfi.120.2022.06.29.17.26.00; Wed, 29 Jun 2022 17:26:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b="XKcKwxo/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231244AbiF3AY1 (ORCPT + 99 others); Wed, 29 Jun 2022 20:24:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230041AbiF3AYJ (ORCPT ); Wed, 29 Jun 2022 20:24:09 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F5AA1E3C1 for ; Wed, 29 Jun 2022 17:24:09 -0700 (PDT) Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25U004kJ009594; Wed, 29 Jun 2022 19:23:47 -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=+8Kh7yN91EZQ3CL/Ah4ypeCz4A1jHv0IsZAzGkM/i5Y=; b=XKcKwxo/o+uYbu9VZHVQ6Yyem4TkZvxFVxEEABdbWgAYWzDKzaC2TlJNPzPVNnGywq6n yBRADlGvJyd1eD6JFIXMZKC69wqH731IKnF3vd/5QXbEBkwIhIKe8Ux9fHLjHh5bcibw TIHhBW6he6V4gNbRoR56IRVbvdPwxObeSqSq3oLJWhTLlQCYBOvvq/jAgFyHn1EdStZm HXtVE726+z/XWHQ+uywstNRF9p8nuK1WdfLZ/nswCSNJeM7mAA5V/1zEgB5ms8ttTefm ptAXbLui5gnMXAENsD0u7vT1l8cg+nfVXmY3/eEgoeAdTGxaHSKz9T5yvcHCLznx9niA Sw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3gwys2p9gn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 29 Jun 2022 19:23:47 -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_128_GCM_SHA256) id 15.1.2375.28; Thu, 30 Jun 2022 01:23:45 +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.1.2375.28 via Frontend Transport; Thu, 30 Jun 2022 01:23:45 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.125]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id CBA9D2A9; Thu, 30 Jun 2022 00:23:44 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH v8 03/14] ALSA: hda: cs35l41: Save codec object inside component struct Date: Thu, 30 Jun 2022 01:23:24 +0100 Message-ID: <20220630002335.366545-4-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220630002335.366545-1-vitalyr@opensource.cirrus.com> References: <20220630002335.366545-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: srYXN0isQarPV8V9aXt1WIxbA231VGPQ X-Proofpoint-GUID: srYXN0isQarPV8V9aXt1WIxbA231VGPQ X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefan Binding This is required for ALSA control support. Signed-off-by: Stefan Binding Signed-off-by: Vitaly Rodionov --- sound/pci/hda/cs35l41_hda.c | 1 + sound/pci/hda/cs35l41_hda.h | 1 + sound/pci/hda/hda_component.h | 1 + sound/pci/hda/patch_realtek.c | 1 + 4 files changed, 4 insertions(+) diff --git a/sound/pci/hda/cs35l41_hda.c b/sound/pci/hda/cs35l41_hda.c index cce27a86267f..bbbaafac50c3 100644 --- a/sound/pci/hda/cs35l41_hda.c +++ b/sound/pci/hda/cs35l41_hda.c @@ -117,6 +117,7 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas return -EBUSY; comps->dev = dev; + cs35l41->codec = comps->codec; strscpy(comps->name, dev_name(dev), sizeof(comps->name)); comps->playback_hook = cs35l41_hda_playback_hook; diff --git a/sound/pci/hda/cs35l41_hda.h b/sound/pci/hda/cs35l41_hda.h index a52ffd1f7999..aaf9e16684c2 100644 --- a/sound/pci/hda/cs35l41_hda.h +++ b/sound/pci/hda/cs35l41_hda.h @@ -32,6 +32,7 @@ struct cs35l41_hda { struct regmap *regmap; struct gpio_desc *reset_gpio; struct cs35l41_hw_cfg hw_cfg; + struct hda_codec *codec; int irq; int index; diff --git a/sound/pci/hda/hda_component.h b/sound/pci/hda/hda_component.h index e26c896a13f3..534e845b9cd1 100644 --- a/sound/pci/hda/hda_component.h +++ b/sound/pci/hda/hda_component.h @@ -14,5 +14,6 @@ struct hda_component { struct device *dev; char name[HDA_MAX_NAME_SIZE]; + struct hda_codec *codec; void (*playback_hook)(struct device *dev, int action); }; diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index cee69fa7e246..0369e19cd4bd 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6654,6 +6654,7 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char "%s-%s:00-cs35l41-hda.%d", bus, hid, i); if (!name) return; + spec->comps[i].codec = cdc; component_match_add(dev, &spec->match, component_compare_dev_name, name); } ret = component_master_add_with_match(dev, &comp_master_ops, spec->match); -- 2.34.1