Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4669221ioa; Wed, 27 Apr 2022 08:35:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzl+oaqMjNT6TADsSER3ucen3M5anUw0eIpNHVYOQ7GyCiKlwCpRzHtSJNC3+Cs4Gf3OKrP X-Received: by 2002:a17:90a:a593:b0:1c9:b837:e77d with SMTP id b19-20020a17090aa59300b001c9b837e77dmr32671859pjq.205.1651073711296; Wed, 27 Apr 2022 08:35:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651073711; cv=none; d=google.com; s=arc-20160816; b=W5sOmllmq+gE8Bc8o7bd+vqfQ0H36O7qwn/roH1IEEoXySnomOfsbUGVCIQdXEw5Sh WOqWNPZ1xbAoBYvki0O7A2hoAdwRB7LH4xxjpun8OuVUjDgI2yNvLYeo26s2H+Zp+Dvh Z8FO06REHNG2rslsbxLq6arNQ07Q+Az6metbG00j31OxZHgO66Fb6gvBKYowGwlKCx32 WRpxsDYpPGjmE36AmbyaCIL7CDg0f9Np8qab4G94CxiQtccyO6SyQG8v6D04B5VH3Ay/ onEYa3ltwVMH7+oSNV3+f3Gqx2oU+f1ysKO1tAJ0oRvJyUxIECTnHux1aXEjCPKuWeid gG0A== 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=Kbi9tyRkam4NuDsbvQyAmGSuoQce+Q72iAA63LadoAw=; b=0IJTQdSD4Hu+omvRt3oj2ryaC5lQ2C2Oqb6X2BUMvtCzdP/AzOVKa2T9rQ0PbiP+m+ f92s8HELkbL+ndu5XJK3BsHhSW89/SIcoHwTS1WG6od6DcG88bEWJUmFSJFF+W/WswhR ZVTeT95MVESMoPuDTicjjCb76f5kP4JGn98+tToHCKwyOov8qXiT30tvm/zNyPOsaaP/ CA2i+Rdux0OmIryYOqs1u/zDm1FddBmJIN4NieENYYYd73fHp3mi1sMbypBmd8Y4TE4o EiNC+lbH/W7OBzZEvVLenjyYyIl7bW0UTYTHXyaVrrrAGHmgFWLQD4fRqztYjv4lHNh5 m8/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Vzp8ppm7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k4-20020a170902c40400b0015c8f982bd9si2107968plk.558.2022.04.27.08.35.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 08:35:11 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=Vzp8ppm7; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=cirrus.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B8A116970D; Wed, 27 Apr 2022 08:08:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238938AbiD0PLP (ORCPT + 99 others); Wed, 27 Apr 2022 11:11:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238971AbiD0PK5 (ORCPT ); Wed, 27 Apr 2022 11:10:57 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF86E541B5 for ; Wed, 27 Apr 2022 08:07:45 -0700 (PDT) Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 23R6M8vl014103; Wed, 27 Apr 2022 10:07:33 -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=Kbi9tyRkam4NuDsbvQyAmGSuoQce+Q72iAA63LadoAw=; b=Vzp8ppm7SFCtPNM7kaq8rg942NKS3qxGFLXyEgtmQu9jrrFvFtwSOpzp2uNurIRpkqnI AbApmTZ3v5sbpcIF3LUvPPKw4rcLayKu6DRm5+5aFT8F+dTENFyXwpd4cwJnI1knOaFz BRB0p+KvnEnI6PEEzrF5+PG0AWVIKEtDk81uAjbosybD/MiOn9w54WfjAdCvfsVPB2UZ ulfZ2krLfNn+0utqzB0MqObO8nw7YxTpCqSAMjUbYVHCmkrhqxQN8XtSMNhu1PEOqKJ2 yqpZS3YnFlAEaIhogNuGX4NeCvLwjDlCDSWQ78I0710X4Z3tBmmehgyiSRc/Yb+hR1Lp YA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3fprt60xth-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 27 Apr 2022 10:07:32 -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.24; Wed, 27 Apr 2022 16:07:27 +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.24 via Frontend Transport; Wed, 27 Apr 2022 16:07:27 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.170]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 5460A478; Wed, 27 Apr 2022 15:07:27 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH 12/26] ALSA: hda: cs35l41: Save codec object inside component struct Date: Wed, 27 Apr 2022 16:07:06 +0100 Message-ID: <20220427150720.9194-13-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220427150720.9194-1-vitalyr@opensource.cirrus.com> References: <20220427150720.9194-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: 5ChtLbpRIep_TSTrkoJFv5WJivlfPO1I X-Proofpoint-ORIG-GUID: 5ChtLbpRIep_TSTrkoJFv5WJivlfPO1I X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE autolearn=no 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 dc1ff4c54291..f7f732efd42b 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6630,6 +6630,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.32.0