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: 12947194 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:15 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: 12947195 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 DA820C00140 for ; Thu, 18 Aug 2022 14:16:36 +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 E6A651681; Thu, 18 Aug 2022 16:15:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E6A651681 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660832195; bh=VI8XKvt0Ie6fJjujDnEOi8fu3pB8Ak2zVjbkujdfSnY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=SHiYUhmek1vh2J5xTO4r7bsKSOmag0TOj61nEFjsU5fIYRRMJvgVPerOaQEX352HQ SXisv3RjBM6Pkbam/V24lHt25BQqptYlBfgWDwY9CDod92mj6hvzHW+yG0MKWs963Z Ov+gH1iFX9ZoddIddfJa/0aKS+8fd39isq0P+wt4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D5B8AF804AD; Thu, 18 Aug 2022 16:15:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57EF0F804DF; Thu, 18 Aug 2022 16:15:16 +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 D1900F804B1 for ; Thu, 18 Aug 2022 16:15:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1900F804B1 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hfVOZ3XH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660832111; x=1692368111; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=VI8XKvt0Ie6fJjujDnEOi8fu3pB8Ak2zVjbkujdfSnY=; b=hfVOZ3XHiMGzQyLqy4DRC6hf6R5LzVz1kQkaeQjAqkd9z27kI+H2tW25 EB6T/cbNazn5LhWDxl8kNXJYokJYA9N4M8gAjm1MYAhXFdN0GQW75yTL6 8+stGoh5F8jnwBjh2nMBQ0p42R+WFQPLoQoJlKc/XdwGB2/qng7ydgKyi klAjfPPdpSux5ExzAg5kr1ihk8g9YksJYodwW2cP4OjJzjwZUbSXZ7PIj nxx3XvB9M0G2XW+EQ2m6sYxzWyJW9cHKvPl9hJlumwqk/7Uu7mqbEvual jYO8ltGwEZgOv9Vce/vGWcRQgI0ewWEmkqkfriM10oUXY6tvIVWl23bDw w==; X-IronPort-AV: E=McAfee;i="6500,9779,10443"; a="292764752" X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="292764752" 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:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="584222242" Received: from dev2.igk.intel.com ([10.237.148.94]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2022 07:14:45 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Takashi Iwai , alsa-devel@alsa-project.org Subject: [PATCH v2 2/4] ALSA: hda: Rework snd_hdac_stream_reset() to use macros Date: Thu, 18 Aug 2022 16:15:15 +0200 Message-Id: <20220818141517.109280-3-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" We can use existing macros to poll and update register values instead of open coding the functionality. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- sound/hda/hdac_stream.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/sound/hda/hdac_stream.c b/sound/hda/hdac_stream.c index f3582012d22f..bdf6d4db6769 100644 --- a/sound/hda/hdac_stream.c +++ b/sound/hda/hdac_stream.c @@ -165,7 +165,6 @@ EXPORT_SYMBOL_GPL(snd_hdac_stop_streams_and_chip); void snd_hdac_stream_reset(struct hdac_stream *azx_dev) { unsigned char val; - int timeout; int dma_run_state; snd_hdac_stream_clear(azx_dev); @@ -173,30 +172,17 @@ void snd_hdac_stream_reset(struct hdac_stream *azx_dev) dma_run_state = snd_hdac_stream_readb(azx_dev, SD_CTL) & SD_CTL_DMA_START; snd_hdac_stream_updateb(azx_dev, SD_CTL, 0, SD_CTL_STREAM_RESET); - udelay(3); - timeout = 300; - do { - val = snd_hdac_stream_readb(azx_dev, SD_CTL) & - SD_CTL_STREAM_RESET; - if (val) - break; - } while (--timeout); + + /* wait for hardware to report that the stream entered reset */ + snd_hdac_stream_readb_poll(azx_dev, SD_CTL, val, (val & SD_CTL_STREAM_RESET), 3, 300); if (azx_dev->bus->dma_stop_delay && dma_run_state) udelay(azx_dev->bus->dma_stop_delay); - val &= ~SD_CTL_STREAM_RESET; - snd_hdac_stream_writeb(azx_dev, SD_CTL, val); - udelay(3); + snd_hdac_stream_updateb(azx_dev, SD_CTL, SD_CTL_STREAM_RESET, 0); - timeout = 300; - /* waiting for hardware to report that the stream is out of reset */ - do { - val = snd_hdac_stream_readb(azx_dev, SD_CTL) & - SD_CTL_STREAM_RESET; - if (!val) - break; - } while (--timeout); + /* wait for hardware to report that the stream is out of reset */ + snd_hdac_stream_readb_poll(azx_dev, SD_CTL, val, !(val & SD_CTL_STREAM_RESET), 3, 300); /* reset first position - may not be synced with hw at this time */ if (azx_dev->posbuf) From patchwork Thu Aug 18 14:15:16 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: 12947197 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 379C2C00140 for ; Thu, 18 Aug 2022 14:17:00 +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 7D5E71691; Thu, 18 Aug 2022 16:16:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7D5E71691 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660832218; bh=EW0ARkTrK0sgs3zaXFUnHfDqPW/DNwNAumfLEbrEiZ4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aYv5FQUcYhgZy8EFhM+LwrQ+TYWp2mEqvvxPHUtzxXyxIrCGQlwD5+yWyTG6h55zR B0M84fbm2Ydx3l65oPQPQIU4ShO+sakMDh3th2iCfgVFKXs7DFw72OGoajdbkqfwQk 8ZvaloiKlICAG//lf4RVXGXWz6gRYeRJxRG/2aLA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0AA42F80529; Thu, 18 Aug 2022 16:15:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 60954F804C2; Thu, 18 Aug 2022 16:15:21 +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 CD848F804C2 for ; Thu, 18 Aug 2022 16:15:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CD848F804C2 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="d9AiKLri" 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=EW0ARkTrK0sgs3zaXFUnHfDqPW/DNwNAumfLEbrEiZ4=; b=d9AiKLri4mTTD/OJEiAHqTMbGY8LsRJXpVNpYToDwwj73rOR5zPQvoQ1 JIXQACY6+6xPvLXYtkYsVk8F0UpyE5I9OE3RHXRmzyQomEYytxpgSVP2P UohTt4t4AzpYNu5T7cScUf/e8TqLgzQq/Tp9YXOpzX1E8TKwN+Fm03/gb QYNU+/UL4QtZ9EcwmlyDuclkF+s21ZX+ZbrS/rQWl2rdJKmlmvc/iICUg XvQ9vzUUq7in+dEhQtLQVgaqpogVpzoxPEFJ+sOqYvXXHsmauNBXNgvZz LA7awd1H5nPNXdg4YNMwO3nwt7qcoGtSkY2fkk8S/pooux1X6wJeRw9tX w==; X-IronPort-AV: E=McAfee;i="6500,9779,10443"; a="292764766" X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="292764766" 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:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,246,1654585200"; d="scan'208";a="584222252" Received: from dev2.igk.intel.com ([10.237.148.94]) by orsmga006.jf.intel.com with ESMTP; 18 Aug 2022 07:14:47 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Takashi Iwai , alsa-devel@alsa-project.org Subject: [PATCH v2 3/4] ALSA: hda: Remove unused MAX_PIN_CONFIGS constant Date: Thu, 18 Aug 2022 16:15:16 +0200 Message-Id: <20220818141517.109280-4-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" Since it was introduced around v2.6.30 it was never used. Also HDA specification does not mention any limitation on number of PIN configurations. Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- sound/pci/hda/hda_sysfs.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/pci/hda/hda_sysfs.c b/sound/pci/hda/hda_sysfs.c index bf951c10ae61..69ebc37a4d6f 100644 --- a/sound/pci/hda/hda_sysfs.c +++ b/sound/pci/hda/hda_sysfs.c @@ -375,8 +375,6 @@ static ssize_t user_pin_configs_show(struct device *dev, return pin_configs_show(codec, &codec->user_pins, buf); } -#define MAX_PIN_CONFIGS 32 - static int parse_user_pin_configs(struct hda_codec *codec, const char *buf) { int nid, cfg, err; 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: 12947196 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;