Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp383119rdb; Tue, 5 Dec 2023 08:01:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKpytwbJpMQUPkTyKZM8W7lDqoT2bfZSUNFukMu0mN2rugbbISV/9aXKE1pAQirfBZqr3f X-Received: by 2002:a05:622a:184:b0:425:4043:29f7 with SMTP id s4-20020a05622a018400b00425404329f7mr1661615qtw.114.1701792088806; Tue, 05 Dec 2023 08:01:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701792088; cv=none; d=google.com; s=arc-20160816; b=aeEtKtxNvzUM3mBCrqd0EMJRrTW3TvBVYeILdG2DAIL4nMpgEIr+eHyESKL4pWcx43 sjIsIxUinr6h55bBo/7yBqcnS2xtaa3dCfF8Y3/+l2rwOQVWtSy9rZ1HXxvEM/jvhSk+ q4XgA5z5BUrMvI3/Ax7dqA8GKBIAGpxjBXQrNZbZP0TTsTxUfMeLqCE5tVKksY9Fch07 Msce11ATa0QAxDPzJgO8LbFiKQXZBtYqFghjhUyQu1cCzSIuhR6XS9IE+dtrOnf5zaoR 8xRMlQ1I7HIaIYSBugPx5bnVNmE1Y9Hk+d6clq2MgJ1akxxhF8qEIsfEP/QpWCI8r7qJ X99A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SJptVZtSVn0mQTomLmRpMpHWkjXi5ZFwXmMkI3Thggc=; fh=YyxsRYkbHM08lPfDm95++lnfeyJHWvum75AUW+8bHQ8=; b=c1gyqZg4goJLlA57h4FFjmPBkw5huGCxdS+nyEKKLwtKwxrXhq3XWlwqR+9GoE8ade UOXk8RzXivcj3WCvzk57r65b2Ns8XMM835wOeRZwisJxJa/hdLs7udn/bqLL6PxG4/ca Fq52ZGx8F+VX/mU1oI/doUC6xmsgDovDenl0d9JL6DO9zSGCVTynqrfMBkFZ0zcsphEa oeRLTMtYBfBBQ9GqY1khqTq18BG4mVp0PYBTPL6LMn4cpFCO1Hw1S952hq0raZIIJRjX WuX0AliifDW/yC0jebrRKpSPRSZh+dKdQItjQFz6f46gmMKd1UDAo91gv4spd4v7825t T1qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VtLYzU3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id ff20-20020a05622a4d9400b004236ed850d4si13011660qtb.166.2023.12.05.08.01.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 08:01:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VtLYzU3d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 38621804477E; Tue, 5 Dec 2023 08:01:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442517AbjLEQBG (ORCPT + 99 others); Tue, 5 Dec 2023 11:01:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346946AbjLEQBE (ORCPT ); Tue, 5 Dec 2023 11:01:04 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 199A1D40 for ; Tue, 5 Dec 2023 08:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701792071; x=1733328071; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=eX8OhMZSokhyU5v3JSffkIZ6nySYH16Uvt5sYcjUftY=; b=VtLYzU3dimITen+LWO7xKXkTG6+1Bkla028AUm4ZWNPmvcw+u3GTCMWk AOlsFLG0Hy3ABZha0u78MvTU9xEnMZPIBwqwwYwNd0OYUuPWDfrZ0avz/ 2QZpNlBig2cmb8Qrmg5bp5x6IHsHwoTW3Fi6p2HlbUjiqR2tDqDWUB/iV L8PrtA5UXpOHZq88tiTG0qKJGr54U8pDTm4UpsMX49rT+X/sIaxvWbZ7j XVlDdp9SIrLvdm3KYRjUm4pU9paRAMqhPlDSuXTWxqmoGAMyVfN9V+NVI 0gNSBmmQMYXRh1v6GCyykbalvMutUvpfW6dDyRhE/FZemVRUNp09gELKQ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="758200" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="758200" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 08:01:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10915"; a="914845112" X-IronPort-AV: E=Sophos;i="6.04,252,1695711600"; d="scan'208";a="914845112" Received: from mbapna-mobl1.amr.corp.intel.com (HELO [10.212.151.198]) ([10.212.151.198]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2023 08:01:09 -0800 Message-ID: Date: Tue, 5 Dec 2023 10:01:08 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/2] ALSA: hda/tas2563: Add tas2563 HDA driver Content-Language: en-US To: Gergo Koteles , 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 References: <4a2f31d4eb8479789ceb1daf2e93ec0e25c23171.1701733441.git.soyer@irl.hu> <90765ee0-a814-4852-9b2a-020cda98d930@linux.intel.com> <974d41f6c703d9b65ebcd75a2c659cecf13bd877.camel@irl.hu> From: Pierre-Louis Bossart In-Reply-To: <974d41f6c703d9b65ebcd75a2c659cecf13bd877.camel@irl.hu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 05 Dec 2023 08:01:20 -0800 (PST) >>> + >>> +static void tas2563_fixup_i2c(struct hda_codec *cdc, >>> + const struct hda_fixup *fix, int action) >>> +{ >>> + tas2xxx_generic_fixup(cdc, action, "i2c", "INT8866"); >> >> Any specific reason to use an Intel ACPI identifier? Why not use >> "TIAS2563" ? >> > INT8866 is in the ACPI. > I don't know why Lenovo uses this name. > I think it's more internal than intel. > > Scope (_SB.I2CD) > { > Device (TAS) > { > Name (_HID, "INT8866") // _HID: Hardware ID Ouch, I hope they checked with Intel that this isn't an HID already in use... > Name (_UID, Zero) // _UID: Unique ID > Method (_CRS, 0, NotSerialized) // _CRS: Current Resource > Settings > { > Name (RBUF, ResourceTemplate () > { > I2cSerialBusV2 (0x004C, ControllerInitiated, > 0x00061A80, > AddressingMode7Bit, "\\_SB.I2CD", > 0x00, ResourceConsumer, , Exclusive, > ) > I2cSerialBusV2 (0x004D, ControllerInitiated, > 0x00061A80, > AddressingMode7Bit, "\\_SB.I2CD", > 0x00, ResourceConsumer, , Exclusive, > ) > GpioInt (Edge, ActiveLow, SharedAndWake, PullNone, > 0x0000, > "\\_SB.GPIO", 0x00, ResourceConsumer, , > ) > { // Pin list > 0x0020 > } > }) > Return (RBUF) /* \_SB_.I2CD.TAS_._CRS.RBUF */ > } > > Method (_STA, 0, NotSerialized) // _STA: Status > { > Return (0x0F) > } > } > } >>> +static int tas2563_system_resume(struct device *dev) >>> +{ >>> + int ret; >>> + struct tas2563_data *tas2563 = dev_get_drvdata(dev); >>> + >>> + dev_dbg(tas2563->dev, "System Resume\n"); >>> + >>> + ret = pm_runtime_force_resume(dev); >>> + if (ret) >>> + return ret; >>> + >>> + for (int i = 0; i < tas2563->ndev; ++i) >>> + tas2563_tasdev_setup(tas2563, &tas2563->tasdevs[i]); >>> + >>> + return 0; >>> +} >>> + >>> +static const struct dev_pm_ops tas2563_hda_pm_ops = { >>> + SYSTEM_SLEEP_PM_OPS(tas2563_system_suspend, tas2563_system_resume) >> >> where's the pm_runtime stuff? >> > > The amp stores its state in software shutdown mode. > The tas2563_hda_playback_hook wakes/shutdowns the amp, not the > pm_runtime. My point was that you have all these pm_runtime_ calls in the code, but nothing that provides pm_runtime suspend-resume functions so not sure what exactly the result is?