From patchwork Thu Aug 18 14:15:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 598100 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1104BC00140 for ; Thu, 18 Aug 2022 14:16:14 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 356391672; Thu, 18 Aug 2022 16:15:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 356391672 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660832172; bh=kzzNDnHHoacYqckwuIDXKHWBTJTer+bxj1MMqeY0Ku8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=F9DPLawefVEXYD7e/MxeOP5ctn0DEGDM8N4HCn9Snze1CPvBDJWMtwWSafxP81dVj w/1iQP8H/KNh+cH6bVSwCBl3QRTgFWuwU0b9KSM4QvTcYgYphxdTCLdhSd5sMTpmSL VDVo7YZ7djKyB6MtjIJahbAnbTtJSRYFWfegDAEE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 564E0F80495; Thu, 18 Aug 2022 16:14:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9C23EF80495; Thu, 18 Aug 2022 16:14:57 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1C21FF800E9 for ; Thu, 18 Aug 2022 16:14:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C21FF800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="J4WxeJJA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660832092; x=1692368092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kzzNDnHHoacYqckwuIDXKHWBTJTer+bxj1MMqeY0Ku8=; b=J4WxeJJA/oJ5ATcdrgGHV4XUINN3qmj5pnByGxDDnT6dI5gCmBgwq28z N4YEhOveIdtR24C9qXF0m4aKPsOBS8aUUCDtIKSjHMSEYdRVhMfaD/2dv ohWmnEW+sZRGImWqlH5XJVrnbtB7plKjqAJ9K6WZ99Exbl9ggAO9U8tL6 YTvdhRiE5CeZNs3fBz1nDzWJEeyIo3ToMHxjVfzIaWdeU86B0WuEmRm7+ 0EbSu+kAomZc02If8dhpk+HJOl0jSmk2h+d5dvyzGLbTzvRlWksfE7h7Y Uw7Zz2EWfM/LOF2tzKKLH32nGJ/OE2PN7yCDPiWYqOwl1LwEm9VG0bzIn w==; X-IronPort-AV: E=McAfee;i="6500,9779,10443"; a="292764744" X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="292764744" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2022 07:14:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="584222226" Received: from dev2.igk.intel.com ([10.237.148.94]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2022 07:14:43 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Takashi Iwai , alsa-devel@alsa-project.org Subject: [PATCH v2 1/4] ALSA: hda: Move stream-register polling macros Date: Thu, 18 Aug 2022 16:15:14 +0200 Message-Id: <20220818141517.109280-2-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220818141517.109280-1-amadeuszx.slawinski@linux.intel.com> References: <20220818141517.109280-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , linux-kernel@vger.kernel.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Polling stream registers doesn't really have anything to do with extended HDA registers, so move it to basic HDA header. This will allow for use in HDA framework. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- include/sound/hdaudio.h | 7 +++++++ include/sound/hdaudio_ext.h | 6 ------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 797bf67a164d..6e74aeafeda4 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -589,6 +590,12 @@ int snd_hdac_get_stream_stripe_ctl(struct hdac_bus *bus, snd_hdac_reg_readw((dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) #define snd_hdac_stream_readb(dev, reg) \ snd_hdac_reg_readb((dev)->bus, (dev)->sd_addr + AZX_REG_ ## reg) +#define snd_hdac_stream_readb_poll(dev, reg, val, cond, delay_us, timeout_us) \ + readb_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \ + delay_us, timeout_us) +#define snd_hdac_stream_readl_poll(dev, reg, val, cond, delay_us, timeout_us) \ + readl_poll_timeout((dev)->sd_addr + AZX_REG_ ## reg, val, cond, \ + delay_us, timeout_us) /* update a register, pass without AZX_REG_ prefix */ #define snd_hdac_stream_updatel(dev, reg, mask, val) \ diff --git a/include/sound/hdaudio_ext.h b/include/sound/hdaudio_ext.h index d26234f9ee46..03634ea198d0 100644 --- a/include/sound/hdaudio_ext.h +++ b/include/sound/hdaudio_ext.h @@ -188,12 +188,6 @@ void snd_hdac_ext_bus_link_power(struct hdac_device *codec, bool enable); #define snd_hdac_adsp_readq_poll(chip, reg, val, cond, delay_us, timeout_us) \ readq_poll_timeout((chip)->dsp_ba + (reg), val, cond, \ delay_us, timeout_us) -#define snd_hdac_stream_readb_poll(strm, reg, val, cond, delay_us, timeout_us) \ - readb_poll_timeout((strm)->sd_addr + AZX_REG_ ## reg, val, cond, \ - delay_us, timeout_us) -#define snd_hdac_stream_readl_poll(strm, reg, val, cond, delay_us, timeout_us) \ - readl_poll_timeout((strm)->sd_addr + AZX_REG_ ## reg, val, cond, \ - delay_us, timeout_us) struct hdac_ext_device; From patchwork Thu Aug 18 14:15:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 598099 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1DCBCC00140 for ; Thu, 18 Aug 2022 14:16:45 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 24FAB168A; Thu, 18 Aug 2022 16:15:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 24FAB168A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660832203; bh=+Jw2sCqhFjrjd0ogBdcPM4xUu9vU/3VB2S/clQ7Sul0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=YNEeuoOfzM1WiltULgv8S16gbONjKUkeBEz8grwzCpXqcpUNtXSgLokyPxlJMD7a+ L7jolIe3w7qhz5j7RnsIE2oQxWU/h2RAIPaOxTqBKkyCS8gAEM0w6CRRBRqHsEvKrC vevZndaWAKI8/lEMaQRXs+CWWl+/M6Y6Ll3B+ark= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 76A21F804CB; Thu, 18 Aug 2022 16:15:20 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3BDC4F804E5; Thu, 18 Aug 2022 16:15:19 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id F044EF804CB for ; Thu, 18 Aug 2022 16:15:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F044EF804CB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OAveoJvq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660832113; x=1692368113; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Jw2sCqhFjrjd0ogBdcPM4xUu9vU/3VB2S/clQ7Sul0=; b=OAveoJvq5MUqqBvduEc2vqRV2JqbJPzOza6M7Xf44YvmNPzgsWwPc7fc eF6jB29o4jalrq1ysG0S5gClKiN+R2t0TVQP0+KamO+SZ5cFD5R6tvhts 5Y47udx79NIdzkNo093hdwV9HZCYUuuoXmIr5uZUqKfEx5AOh2CKJx6iY rwxBtTrKwxE1obBrZNTu3IMwgzF8lToSs0qD68sRnkS/Gk2iDSwhyef/m 1AMnIOwu2wrky8/oy6GHpqxoMOJizqaXaE9fcCqMFTEfvfOGjAEW0x5SS bIeI0OSVsY5wz4ryIlR7hKjUBfsIsyh/uTdjCCZ1ra64Gxq+WQ2vMqakp w==; X-IronPort-AV: E=McAfee;i="6500,9779,10443"; a="292764772" X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="292764772" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2022 07:14:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="584222264" Received: from dev2.igk.intel.com ([10.237.148.94]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2022 07:14:49 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Takashi Iwai , alsa-devel@alsa-project.org Subject: [PATCH v2 4/4] ALSA: hda: Remove unused defines Date: Thu, 18 Aug 2022 16:15:17 +0200 Message-Id: <20220818141517.109280-5-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220818141517.109280-1-amadeuszx.slawinski@linux.intel.com> References: <20220818141517.109280-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Cc: Cezary Rojewski , linux-kernel@vger.kernel.org, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Pierre-Louis Bossart X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" There is no need to keep unused defines in file. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- sound/pci/hda/hda_intel.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a77165bd92a9..7720978dc132 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -86,9 +86,6 @@ enum { #define INTEL_SCH_HDA_DEVC 0x78 #define INTEL_SCH_HDA_DEVC_NOSNOOP (0x1<<11) -/* Define VIA HD Audio Device ID*/ -#define VIA_HDAC_DEVICE_ID 0x3288 - /* max number of SDs */ /* ICH, ATI and VIA have 4 playback and 4 capture */ #define ICH6_NUM_CAPTURE 4 @@ -102,10 +99,6 @@ enum { #define ATIHDMI_NUM_CAPTURE 0 #define ATIHDMI_NUM_PLAYBACK 8 -/* TERA has 4 playback and 3 capture */ -#define TERA_NUM_CAPTURE 3 -#define TERA_NUM_PLAYBACK 4 - static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;