Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1332380rdb; Wed, 6 Dec 2023 16:06:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHgR32EvjwQo8gAyLqlZbifeEoUXGv61qr+N3mEpOwKZtxzETKwcwSmJXkIz1mqbQsObP+o X-Received: by 2002:a17:902:e749:b0:1cf:aff5:8934 with SMTP id p9-20020a170902e74900b001cfaff58934mr1412747plf.48.1701907566152; Wed, 06 Dec 2023 16:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701907566; cv=none; d=google.com; s=arc-20160816; b=ajTPpXxtssq1JgT11lhsNGkNQy46Tr/p1QmvlXuBArhUOJfCiPHQdZ90SeWOG0c1Dj Ts7LzIMogYfTkKtMbUBRyEU7fyhGUSWMlJhqzK0NEbr+8lP+irNrE4ihbwRDI5L2lQQY dykVGqdJiWa20t2HxtAlaQf5/Qp1qoEcygkQpIbhB4Y5/jwYQJCii2AIbfgKiZpqD6MB yCnhAdgyopAduBDgirzfJ5Rp/Sk0tbMwf6dhcU43ClQ7exQnr6TKOymxN7sv+49xy6pX MnKiOBQleIgNXAqBFrwTvQQNRODvxjbCaqNkxshTVf9pQL1aaom3Gtbb0nDZwioGL30e I2MA== 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; bh=PKIshb7n8euDo2/MzRAwJCwnyW9xVOYuWIeX1xVWrbQ=; fh=zySoyVfK/7ExaDz2MWyww8poQ40q3tZak5TTvfb/Ovc=; b=brHGiQQUdGdk+ihJM845W2TPUkUgRlF6ntEa8lF5Xr8zc4OhgTkO8l9APyeL+zmP5p CDJ52byYL0kTm+clBiO0hhQYduzJLDSx8fjhKaFEam7XyMOPVqYNz7NGT1vb8FxZpKci J2aNNr0rXMRDhR9rlEt04h8oMY2V9fdJ2vCr2LVgEOAeg1f6PqqIAsIKf+GDb094lxtd orvDH9X8nnGg7LWSSKTfEZ+3xO2pQ35pO/cDe8tbPBSJktgwlN/PeC7C1iIAzesljmw5 w/adu25BbYHbY0Mv8RSpVGYCmw+RLarDw3Q4eHglGoSV7EaTT9peql9U3rXWsSM4EV4x wn2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id jo3-20020a170903054300b001d1ce4cc5b4si73133plb.50.2023.12.06.16.06.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 16:06:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=irl.hu Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 455758090FBE; Wed, 6 Dec 2023 16:05:25 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232382AbjLGAFG (ORCPT + 99 others); Wed, 6 Dec 2023 19:05:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235135AbjLGAEn (ORCPT ); Wed, 6 Dec 2023 19:04:43 -0500 Received: from irl.hu (irl.hu [95.85.9.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B65C1A5 for ; Wed, 6 Dec 2023 16:04:40 -0800 (PST) Received: from fedori.lan (51b690cd.dsl.pool.telekom.hu [::ffff:81.182.144.205]) (AUTH: CRAM-MD5 soyer@irl.hu, ) by irl.hu with ESMTPSA id 0000000000071705.0000000065710C17.00119103; Thu, 07 Dec 2023 01:04:38 +0100 From: Gergo Koteles To: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Mark Brown Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, Gergo Koteles Subject: [PATCH 15/16] ALSA: hda/tas2781: reset the amp before component_add Date: Thu, 7 Dec 2023 01:04:31 +0100 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Mime-Autoconverted: from 8bit to 7bit by courier 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 06 Dec 2023 16:05:25 -0800 (PST) Prevent race to make the init reliable. Signed-off-by: Gergo Koteles --- sound/pci/hda/tas2781_hda_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c index cb8872e15bb0..f72e0beab1fb 100644 --- a/sound/pci/hda/tas2781_hda_i2c.c +++ b/sound/pci/hda/tas2781_hda_i2c.c @@ -800,14 +800,14 @@ static int tas2781_hda_i2c_probe(struct i2c_client *clt) pm_runtime_put_autosuspend(tas_hda->dev); + tas2781_reset(tas_hda->priv); + ret = component_add(tas_hda->dev, &tas2781_hda_comp_ops); if (ret) { dev_err(tas_hda->dev, "Register component failed: %d\n", ret); pm_runtime_disable(tas_hda->dev); goto err; } - - tas2781_reset(tas_hda->priv); err: if (ret) tas2781_hda_remove(&clt->dev); -- 2.43.0