Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp4185531ioo; Wed, 25 May 2022 17:43:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/FLY3vlqNteAHy0rfITHjhDRokN4bZCyR0s94pFuft9gE+As0G+qyvJ7h6DD8NkTHkTOJ X-Received: by 2002:a17:902:c40e:b0:162:4b86:8dc5 with SMTP id k14-20020a170902c40e00b001624b868dc5mr9672093plk.144.1653525833482; Wed, 25 May 2022 17:43:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653525833; cv=none; d=google.com; s=arc-20160816; b=EMRH0+R2j8AcnTNEuBrojHiaQGLAbcEDy4497DNDBMdJ2lpGIz4EUr2WD00hzKA0Lg aUAd0ekivl/j7WBpRzrQs2nAdLg8z2f4q/E1SWyx6ENkV/C2i+XTF2n445tiOEMI9sT5 eey6DPR6FhcbV3up5SWNgai8/qz/gleTUc8YP/SVjVVZ5dYI2LkqxqHqPWEZhQrRmyl1 c/gORoqueBH8o985/RT0hcXZH5xFmA20WtTlTeSPx0aGGb/C+ueTaEzG6KFO4UaEHt9w uRJV4zEWBqYSw8rctJSMy8vfwJGNET2n+8wSsoBRuQxaZTP+m4I/23aXTDK4gfyE8H5k qZWw== 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=i7lw6DOkLlBNhuFgnm6YHtLKyoQAfOY/+S/HCRu3sx8=; b=Qow8HZ6OkWH9+xCDj3NnV9WAhfhpIxblscLdgvlXL6y2itxGmYm9NfT4rQiTWfyk7a F73BRWtIkrCT6RQ4jZVpY5yew7g+fymDtfjlx7TG5hev8xjm39vPD18HVBu1cOWyoQg6 3jCHB1M80q8UBO/SlawKv8/pH/ADizylFsx7mVcxpLcrMve2kbk0+wHGfCm4/chozRqa AZCdeM+7MA1/9kPuZwdS2dnG/pVvXFounN38exEiaw3XQ7riIbyqKj+kw65S7tFGW2pr I+DcGpaHlAI8zhlGjylv019OtiflqjVVe/RWskMKBWELZf6aMTDgX0DfUXKmMpeR3E5i vrWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=cMF1YJ+b; 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 s2-20020a170903200200b00153b2d1655fsi13320pla.359.2022.05.25.17.43.41; Wed, 25 May 2022 17:43:53 -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=cMF1YJ+b; 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 S244295AbiEYNR2 (ORCPT + 99 others); Wed, 25 May 2022 09:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234869AbiEYNQ7 (ORCPT ); Wed, 25 May 2022 09:16:59 -0400 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9375AE000 for ; Wed, 25 May 2022 06:16:55 -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 24PCRmjD022096; Wed, 25 May 2022 08:16:42 -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=i7lw6DOkLlBNhuFgnm6YHtLKyoQAfOY/+S/HCRu3sx8=; b=cMF1YJ+bB/91I6V+BAzdglfZmsg8XyxKs3JBuuX96ZEqDQByDNbUATghpAq1KqNilQTk Fw4tTZ8x/NRpkcriKmtbAXx0MT6Epxl0EgrcLZZJK5wm/i5Kq/7TILAm+4AHhxik8Qtt dXslTCNLfw+QChDHKTtNgrwX3s5vNYoyV7WbOkjOfBN9yeI8YVXn5sJxZjQpndTAsbtm +fM12vX5rNUqDS3i4RW/TjJj5O1Zi6+2m1m0gWtLCD/Ifudox6TDdb4tTZZ7+6/Lwd6k 1hTzaDLR0CrruRxh5BNmO9FHzovh2RjKEy6FFscGVD1DcWFpZvbqFeILTewL+PkDcy0U yw== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3g93u20we6-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 25 May 2022 08:16:42 -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_128_GCM_SHA256) id 15.1.2375.24; Wed, 25 May 2022 14:16:40 +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, 25 May 2022 14:16:40 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.233]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 8D02546C; Wed, 25 May 2022 13:16:40 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH v4 03/17] ALSA: hda: cs35l41: Save codec object inside component struct Date: Wed, 25 May 2022 14:16:24 +0100 Message-ID: <20220525131638.5512-4-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220525131638.5512-1-vitalyr@opensource.cirrus.com> References: <20220525131638.5512-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 24KTQH9yo1OnROhtqO6VGewz92BYlJ7B X-Proofpoint-GUID: 24KTQH9yo1OnROhtqO6VGewz92BYlJ7B X-Proofpoint-Spam-Reason: safe X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 --- Changes since v2: - No change 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 80e4955e8c10..cd289b17ca13 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -6631,6 +6631,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