Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5430067iob; Mon, 9 May 2022 16:34:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7bSX24n+sRGHibzOkkKWy12MY/AmI+ifzv8+G7ITPXzrXvkZJnamYuR+evZ6pfW4a++YJ X-Received: by 2002:a17:90a:6c43:b0:1dc:d03b:5637 with SMTP id x61-20020a17090a6c4300b001dcd03b5637mr22489969pjj.15.1652139280447; Mon, 09 May 2022 16:34:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652139280; cv=none; d=google.com; s=arc-20160816; b=wIyxZfGd8lkBxGv1SFzhsMrJ6pRny+OsGf5Xmd+YLbQ4yAl1RJM3H8aYzEJ18IIeSh /MDZnzeopebXfFue9qBZHBVZW/J2/d40QpATXY6fgD88gM+XkNxbdrTJY8eBpCu5/bwI RYEK3jdBy/8OjL0dn3LG/pjW6mG6GH8CKSGI+18El6jgp146+BOVKNWBzlmtTJg7hGMM OOQNhP078iBhStB3qWzjepY0ZJlqitx9QFrXiOnHqpLJdUQtBJjCIhtLSHdROnTRiNcl CLIDmbEeIOG0/Mwz8S90OPc8W2wNDtRlKrMOkw2fcsY9sTWaOBMKln0rs2DKOAsTbELY yFDw== 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=kVHwR/HgGPXUPmwC6fxZwJpBlfWBvsGK0BJ48PSvGPY=; b=oKRrCrDzmefVCQGFJgpbQ9IRhe+E4Ja+KGG0mWW3xNpwvZRqIF1Oheh7v7CRNGXv4W GNZlmbcRJYciUnqPfaFDatHfpcPLow1zi4B4IB2NerpOEphUtjV46MfDSS0sdNACoUVG BSbDWA3CRN/S4HPKD7fjXXg+sMY3rIXMZBEuEvlIvas4wUBpzw2HgkSXb5m4/P+lwXp8 beMpgTrsTyQTsj+X3Y9/m2Zpk2bcxjGlc4wz3NGZeyS/9yMEh8gfA/qWyCdiOTEE6pvR rAL7j/jLBbaL59o8MxbiR6XeBK50NXrMrCdj589b2GGBdcmY8iMsOdf914YoARHdT7CX 6HXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cirrus.com header.s=PODMain02222019 header.b=i58IzG16; 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 i13-20020a636d0d000000b003c6157157b1si15379368pgc.144.2022.05.09.16.34.23; Mon, 09 May 2022 16:34:40 -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=i58IzG16; 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 S231218AbiEIVxZ (ORCPT + 99 others); Mon, 9 May 2022 17:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbiEIVvU (ORCPT ); Mon, 9 May 2022 17:51:20 -0400 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1958F2701BE for ; Mon, 9 May 2022 14:47:25 -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 249Bt3Z9026043; Mon, 9 May 2022 16:47:11 -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=kVHwR/HgGPXUPmwC6fxZwJpBlfWBvsGK0BJ48PSvGPY=; b=i58IzG16vaBsLib8aSq/lIlz/4h+80SBj1gB1PRkt1MDjc0tuR6AyKaTQXHdkKG7sVYi 1OFIHXCSt8AxCa4qTE4iWrppBmKlsYRv0UIEGMxdUjYV1F3bceaS0ZN1NQcvt0DL0p8D 2iQ15wuYzugRlzlko4Emw/uBifmorCueIWtDWEtAgUFx6Jf0vzYdXp8GJ+bvxEirG96a d5Hd8ZWTCN+bDu00tQ7Pi2YVOhmcCrHYcCPNyl8neu6XrysqZqgRxaAyvywZdYsyV+cu m3hIY0/sLqdxzgKbrPt7P/XJURKkJWijYZ6+gYbtvkjItdFdC91gTKS5yPqI1GHmFuZy ow== Received: from ediex01.ad.cirrus.com ([84.19.233.68]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 3fwp613jeu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 09 May 2022 16:47:11 -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; Mon, 9 May 2022 22:47:09 +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; Mon, 9 May 2022 22:47:09 +0100 Received: from vitaly-Legion-7-16ACHg6.ad.cirrus.com (unknown [198.90.238.55]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id D46B5B10; Mon, 9 May 2022 21:47:08 +0000 (UTC) From: Vitaly Rodionov To: Jaroslav Kysela , Takashi Iwai , Mark Brown CC: , , , Stefan Binding Subject: [PATCH v2 12/26] ALSA: hda: cs35l41: Save codec object inside component struct Date: Mon, 9 May 2022 22:46:49 +0100 Message-ID: <20220509214703.4482-13-vitalyr@opensource.cirrus.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509214703.4482-1-vitalyr@opensource.cirrus.com> References: <20220509214703.4482-1-vitalyr@opensource.cirrus.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: vnHTJjcKk3A8jh2k9d5WseIzk11GDaOW X-Proofpoint-ORIG-GUID: vnHTJjcKk3A8jh2k9d5WseIzk11GDaOW 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 27460a61487e..3220f9f59e21 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.34.1