From patchwork Mon Feb 26 12:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13572066 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9ED81CF89 for ; Mon, 26 Feb 2024 12:43:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951382; cv=none; b=I4Y40EoHw9okPMZtz4G2p5Y01dFlJGfaC0R+7TKt98P7fupVv45kpi1lWDudfb5P0GLAFOvPQDfzJYkThI6G+/0hO55SyrSrlnnRHLKMcnRk6Wq2fDGGt3mERIN5lloiLisXqpL5q5p/DDNqT73hDstTRs7RZ09ea/H694X5MgM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951382; c=relaxed/simple; bh=4VIPX9egWgJRNiiGEM9wm8oDiCKsOQEHw4CxYJ7Q4bE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BrfJ0VMjfNm/1yaGfwJIMe9YYGfWMka8fQEScWRpr1bDSgToGulPGkZniWb4lzVBkMzn69YBDU+/DCT4lumWpO3UbAtsh9yJNRmM/GbtI1eBD1Dv+Nq2OQep+LDJiW6JmktkYCgAzX14xKbBf8m5LvlLw0mdlImTsT5J918NlJU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VpbMVisa; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VpbMVisa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951381; x=1740487381; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4VIPX9egWgJRNiiGEM9wm8oDiCKsOQEHw4CxYJ7Q4bE=; b=VpbMVisaFx/opoPp5Pg6Jt8e34yMHuntR23pxCUakP5qHF2aEnDorMYp QLsRxogoeeeQgaylpIxozxOvFdhmjXdZhPEjNistI8CHaCfBWNMsnyX43 MxclTMdN0rEeQhs1+8L+mUOoG0vfH5fOdNCotuNm0OOyVLb1Ij0CcK68y 08RzYw4X9zctwsala7wCVoccwJyGWzK/2couHcUTbIw0OCBDHyZyoUl9v OOBi6QQXaYY831QvOIDTxA4OuZ/PPwNzx7l9Ih/PjzbGcOEXCg3XbiH+F juhXS9jq79hFmViAtVBcNwradQl9lXZGGy8zsnZR3Z2aYrbXirBFudx/c Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658232" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658232" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688610" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:42:57 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 1/5] ALSA: hda: Skip i915 initialization on CNL/LKF-based platforms Date: Mon, 26 Feb 2024 13:44:28 +0100 Message-Id: <20240226124432.1203798-2-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 78f613ba1efb ("drm/i915: finish removal of CNL") and its friends removed support for i915 for all CNL-based platforms. HDAudio library, however, still treats such platforms as valid candidates for i915 binding. Update query mechanism to reflect changes made in drm tree. At the same time, i915 support for LKF-based platforms has not been provided so remove them from valid binding candidates. Link: https://lore.kernel.org/all/20210728215946.1573015-1-lucas.demarchi@intel.com/ Reviewed-by: Rodrigo Vivi Signed-off-by: Cezary Rojewski --- sound/hda/hdac_i915.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 365c36fdf205..e9425213320e 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -127,15 +127,41 @@ static int i915_component_master_match(struct device *dev, int subcomponent, /* check whether Intel graphics is present and reachable */ static int i915_gfx_present(struct pci_dev *hdac_pci) { + /* List of known platforms with no i915 support. */ + static const struct pci_device_id denylist[] = { + /* CNL */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a40), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a41), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a42), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a44), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a49), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a4a), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a4c), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a50), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a51), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a52), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a54), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a59), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a5a), 0x030000, 0xff0000 }, + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x5a5c), 0x030000, 0xff0000 }, + /* LKF */ + { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9840), 0x030000, 0xff0000 }, + {} + }; struct pci_dev *display_dev = NULL; if (!gpu_bind || (gpu_bind < 0 && video_firmware_drivers_only())) return false; for_each_pci_dev(display_dev) { - if (display_dev->vendor == PCI_VENDOR_ID_INTEL && - (display_dev->class >> 16) == PCI_BASE_CLASS_DISPLAY && - connectivity_check(display_dev, hdac_pci)) { + if (display_dev->vendor != PCI_VENDOR_ID_INTEL || + (display_dev->class >> 16) != PCI_BASE_CLASS_DISPLAY) + continue; + + if (pci_match_id(denylist, display_dev)) + continue; + + if (connectivity_check(display_dev, hdac_pci)) { pci_dev_put(display_dev); return true; } From patchwork Mon Feb 26 12:44:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13572067 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F13A4E1CC for ; Mon, 26 Feb 2024 12:43:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951385; cv=none; b=p2EAsFcQ3/bZLuAh2llxY92mkpeyaxZMsv1bFCwcjoa8E89MjU7WC2fm6AbC0Q7llSOraQuXkRh7Ax5WKDYr86UhBll8MwQloMiyvWdDjX5yUDT+TRn0YhHmyLy7PaMIVYmJHHXY7YgdL6/KFiXCLkBkk9egQr/RckK92JX75VQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951385; c=relaxed/simple; bh=z8lPSEjbSrtzAuUskaODEdGF5O7WHGh3H8vOdHVof2M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gF/p5PR73sTfo5g2uvMImwMmuIZFChaQynBZb5QIbeoO+eWhTyUPDA+ZAe5VCqoCmtSbgzZL2TP8grlXweh4vPPCPZh2HirAcHgZlJZSjXN1vTZ3rX3VmaLkjdJ2DyuQgp4dTBVaYdMrRyWXk0W9b2CUTLwc+ntzbORvUZiIcbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jbo7vgTr; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jbo7vgTr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951384; x=1740487384; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=z8lPSEjbSrtzAuUskaODEdGF5O7WHGh3H8vOdHVof2M=; b=jbo7vgTrntm1NQeHWbG0VCFXwoPAiAPToQ8S9qugayQSZHLKlU/Rz2Kc mPsJ4nUUT1xEAvdLJhhg61nEeCE2HMnQyVfjsSLNDVoMEkXjkT1ON9sI4 NZJ8U/cZCglXsVcIlRpNjKfs1r+kB9XI581adLLgWmacPXmPERUZN/kLg WHyM5XDLho8o4qFTIoYveiRYTI9S4c14tyXl6uF7kRAeibrG0dDiVYzJV ryxzE+G9j/SHzRxPjRGARXDef4YED5D46XrsPZ3TZZUPdvmf9rfz0WX+S o0y1FWv5KFDri2sfTIYDTmwW8uz/imItPotph4m+FZXk1Fx9ptHDlUIX8 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658245" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658245" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688613" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:43:01 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 2/5] ASoC: codecs: hda: Skip HDMI/DP registration if i915 is missing Date: Mon, 26 Feb 2024 13:44:29 +0100 Message-Id: <20240226124432.1203798-3-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 If i915 does not support given platform but the hardware i.e.: HDAudio codec is still there, the codec-probing procedure will succeed for such device but the follow up initialization will always end up with -ENODEV. While bus could filter out address '2' which Intel's HDMI/DP codecs always enumerate on, more robust approach is to check for i915 presence before registering display codecs. Signed-off-by: Cezary Rojewski Acked-by: Mark Brown --- sound/soc/codecs/hda.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sound/soc/codecs/hda.c b/sound/soc/codecs/hda.c index d2117e36ddd1..7c6bedeceaa2 100644 --- a/sound/soc/codecs/hda.c +++ b/sound/soc/codecs/hda.c @@ -350,6 +350,11 @@ static int hda_hdev_attach(struct hdac_device *hdev) struct hda_codec *codec = dev_to_hda_codec(&hdev->dev); struct snd_soc_component_driver *comp_drv; + if (hda_codec_is_display(codec) && !hdev->bus->audio_component) { + dev_dbg(&hdev->dev, "no i915, skip registration for 0x%08x\n", hdev->vendor_id); + return -ENODEV; + } + comp_drv = devm_kzalloc(&hdev->dev, sizeof(*comp_drv), GFP_KERNEL); if (!comp_drv) return -ENOMEM; From patchwork Mon Feb 26 12:44:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13572068 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C1C460860 for ; Mon, 26 Feb 2024 12:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951388; cv=none; b=uMNfr7S//z3Lshb/MNgU9qILQBiqSVXopm54ftV5A85jR+/fjEdEv8KU+KjUw8QT4QyIRdsrSiLI1Qc7fBGwhQ5d1GNgWbpmzumotexbRF4WL+tgri9lhoKpckDPyyLR+tA+pOi8j45EBPktJ0wIA9u3OlX49hXLXT4QfHmLTJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951388; c=relaxed/simple; bh=oTHR95JWcz0ap604v+zFjYvXKhk2SC2e8b03VMGFeXk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qTG+JNOYi4KHmcOCeWxrM1swudfRwRbdEk1f05xQYvGDjRRgFMmx6HzNNwgvFjcPsj29NwLRO6bW6HxtraaPKnp6HCAC4crn9ZVhGbj3t+zSW9ABK3np1cQBagA+C4vpSx1/OMZpC5odxTr0Ju5rh6NhOx/SXumOSseT2Gs+k8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jXwEre8t; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jXwEre8t" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951387; x=1740487387; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oTHR95JWcz0ap604v+zFjYvXKhk2SC2e8b03VMGFeXk=; b=jXwEre8tnQe4YpbceKbF4QkyvJnmiFxy/iSKZQU79bYXa1L2TYjM3mVa 00Xk6QYT4Oy/s9lYIyIpQWF3YcCfSifsGPHQ3j73RscpAkzG1p/NMJ6O+ CoXIBDrbEG4d+B4BNiWhn50ScbISDtgDDQBY8QPNTfLod1VOBNGxADxS9 x8k955PjCmNu1R/2s9UxceXctvwlW6pRBZVYk893JiJQ5gX4icdmeriCY YO95t/zruPnAOwSi40A9J6WV3jTENh2nR7oRPDmG7+J4qoI+sGVtQookF CxTTiiDduoiJwziUC+LAiXHugIlLJNEs9LBoBIHSiQlsMHBy7ZNCQbhlD A==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658254" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658254" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688616" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:43:04 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 3/5] ASoC: Intel: avs: Ignore codecs with no suppoting driver Date: Mon, 26 Feb 2024 13:44:30 +0100 Message-Id: <20240226124432.1203798-4-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 HDMI codecs which are present and functional from audio perspective lack i915 support on drm side what results in -ENODEV during the probing sequence. There is no reason to perform recovery procedure e.g.: reset the HDAudio controller if this is the case. Signed-off-by: Cezary Rojewski Acked-by: Mark Brown --- sound/soc/intel/avs/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/avs/core.c b/sound/soc/intel/avs/core.c index b3e5a5012167..a61ce42b426c 100644 --- a/sound/soc/intel/avs/core.c +++ b/sound/soc/intel/avs/core.c @@ -150,7 +150,7 @@ static int probe_codec(struct hdac_bus *bus, int addr) /* configure effectively creates new ASoC component */ ret = snd_hda_codec_configure(codec); if (ret < 0) { - dev_err(bus->dev, "failed to config codec %d\n", ret); + dev_warn(bus->dev, "failed to config codec #%d: %d\n", addr, ret); return ret; } @@ -159,15 +159,16 @@ static int probe_codec(struct hdac_bus *bus, int addr) static void avs_hdac_bus_probe_codecs(struct hdac_bus *bus) { - int c; + int ret, c; /* First try to probe all given codec slots */ for (c = 0; c < HDA_MAX_CODECS; c++) { if (!(bus->codec_mask & BIT(c))) continue; - if (!probe_codec(bus, c)) - /* success, continue probing */ + ret = probe_codec(bus, c); + /* Ignore codecs with no supporting driver. */ + if (!ret || ret == -ENODEV) continue; /* From patchwork Mon Feb 26 12:44:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13572069 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 950CD60860 for ; Mon, 26 Feb 2024 12:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951392; cv=none; b=twMLu3WB58EEuLO6zt7Zq2BOSp10p+oNUs7b9brAkOvm7rPpYHr1+ey2bcW4p3KylW3/yH/+LzitY0wyWsaZe5pOT24BCg2iJns20wtkOnmtSFRqj/Qyatex4KbB+2lBHYm+a+2BOefCTFGeq4UzTxGq2J0QZWTI+mCUHv1RYFc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951392; c=relaxed/simple; bh=HNPW3gZaSH6fjCMtquzM1dI/vEaBhFuoLxGDia1XD9A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pLw2W5MkP/QYmdSRw0+PyS2VjDoueLBS44qi+44/rYfpT2hSnS5rOqikDrs5wnPnX9T8mQulx5dGvfoRLgyeqV+XffdPN4n2fuouUCGAR4xg/1m+AdHxbyPLU7EpG2eJY36NrAaeSgsuWfMoV2ZuWwbLN/9UKQchZZsg21y7f9k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BRC9Akz1; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BRC9Akz1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951391; x=1740487391; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HNPW3gZaSH6fjCMtquzM1dI/vEaBhFuoLxGDia1XD9A=; b=BRC9Akz1jGmLw5hp/G0P4A7y6k7qu16OQGP5Vb7ifxplDZrF0fLWzh5B d2WuPdO9ka5ggKnAsFCRsBsylgAGuS9fL3+aJwXYZ0+k1Aqpv+gdW0ZW+ 5epb10JR81TsSyD7egmbmfD24He8+C/lpxNikopwIz1A+aM/HHOO7lu0b LFTr/gN0sEzYVUQ/y/icYD6gQjSL8esWmxkaGoJqtWDnefBhiq7KGKpGa lV6zmQES4gdtu+j8MBms8+pok1O4pHqgQfBpcUv7gDEqUTHhCHepq8S+g 2Nv+S3y1qf5819sFpKTMxqWvWmsJ0NYsudfiV79sPFkxr3AfIt94KvEjY A==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658264" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658264" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688619" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:43:07 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 4/5] ASoC: codecs: hda: Cleanup error messages Date: Mon, 26 Feb 2024 13:44:31 +0100 Message-Id: <20240226124432.1203798-5-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Be cohesive and use same pattern in each error message. Signed-off-by: Cezary Rojewski Acked-by: Mark Brown --- sound/soc/codecs/hda.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/hda.c b/sound/soc/codecs/hda.c index 7c6bedeceaa2..5a58723dc0e9 100644 --- a/sound/soc/codecs/hda.c +++ b/sound/soc/codecs/hda.c @@ -198,19 +198,19 @@ static int hda_codec_probe(struct snd_soc_component *component) ret = snd_hda_codec_device_new(codec->bus, component->card->snd_card, hdev->addr, codec, false); if (ret < 0) { - dev_err(&hdev->dev, "create hda codec failed: %d\n", ret); + dev_err(&hdev->dev, "codec create failed: %d\n", ret); goto device_new_err; } ret = snd_hda_codec_set_name(codec, codec->preset->name); if (ret < 0) { - dev_err(&hdev->dev, "name failed %s\n", codec->preset->name); + dev_err(&hdev->dev, "set name: %s failed: %d\n", codec->preset->name, ret); goto err; } ret = snd_hdac_regmap_init(&codec->core); if (ret < 0) { - dev_err(&hdev->dev, "regmap init failed\n"); + dev_err(&hdev->dev, "regmap init failed: %d\n", ret); goto err; } @@ -223,13 +223,13 @@ static int hda_codec_probe(struct snd_soc_component *component) ret = patch(codec); if (ret < 0) { - dev_err(&hdev->dev, "patch failed %d\n", ret); + dev_err(&hdev->dev, "codec init failed: %d\n", ret); goto err; } ret = snd_hda_codec_parse_pcms(codec); if (ret < 0) { - dev_err(&hdev->dev, "unable to map pcms to dai %d\n", ret); + dev_err(&hdev->dev, "unable to map pcms to dai: %d\n", ret); goto parse_pcms_err; } From patchwork Mon Feb 26 12:44:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cezary Rojewski X-Patchwork-Id: 13572070 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8A2F60860 for ; Mon, 26 Feb 2024 12:43:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951395; cv=none; b=rSeiu4Y3mRLF27iv+7VQKyNvFmGqzkZdTppC2rZyikREgt1oNfxmUSrLe6KtIM5SBjfS3RlWFGilR5dPeIlUeGQbx4ENi85rU9hH8C79VaSfnznclqv2JHRtYAo4XAf9zQ7mliiSnfG0YDQ1ysrnWdH+v2z56PhqOqgAQKU3fvs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708951395; c=relaxed/simple; bh=cewHMOUP9XE8f1iBRQp0XY/AtymJk2wyw8t26geqAWQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hfKDVjCM9h207dnMUjqmy/XYAHXu88BhqA1k77RoY8NyIEtKL+OzxkEQ6kyeRth7uaXiZxzIdM1E9CP7PRRQqTcf6iQCSM8iC+nMMSpDtWm6CVoqQfOBCj4UsqNHFerXzjvYjkjhIfTx/x9fwkYWVruWjemVumgVs2CB1PwQ+/8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=GlzSYhCu; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GlzSYhCu" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708951394; x=1740487394; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cewHMOUP9XE8f1iBRQp0XY/AtymJk2wyw8t26geqAWQ=; b=GlzSYhCu0LydwGzjPYcoLRYOl38RHO+hRGrVoS0bRJyu9Zu4pOvuwvXl MMc/yK1JZOBEGO5PN4UKJ52ahv09bOwSa4COB3U7OC8k/lK7qoFeMPnEs iIpVKS5wd0qU1U1RZBIAizQl58vxKmxnejfuo+oDiv9ir4NPTA5w+0wU6 hxyOvQmwEl80REho6rZy04aPoBPyHMoV/BqinwaXOvO6cNDHrCfh5IHKo Q1ddWOIg2tY93yWtM8QxSH/AgKrblG//ds3AFsQZQ9cW+48Byg24+XIsi z5LMqkGSSRHMvXZew5ogRyVX/5hcxCPl2SXqzNHbpRHxhKL1UZPEG0Eip w==; X-IronPort-AV: E=McAfee;i="6600,9927,10995"; a="28658272" X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="28658272" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Feb 2024 04:43:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,185,1705392000"; d="scan'208";a="6688625" Received: from crojewsk-ctrl.igk.intel.com ([10.102.9.28]) by orviesa009.jf.intel.com with ESMTP; 26 Feb 2024 04:43:11 -0800 From: Cezary Rojewski To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, tiwai@suse.com, perex@perex.cz, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com, intel-gfx@lists.freedesktop.org, amadeuszx.slawinski@linux.intel.com, pierre-louis.bossart@linux.intel.com, hdegoede@redhat.com, Cezary Rojewski Subject: [PATCH v3 5/5] ALSA: hda: Reuse for_each_pcm_streams() Date: Mon, 26 Feb 2024 13:44:32 +0100 Message-Id: <20240226124432.1203798-6-cezary.rojewski@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com> References: <20240226124432.1203798-1-cezary.rojewski@intel.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use the macro to improve readability. Signed-off-by: Cezary Rojewski --- sound/pci/hda/hda_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 12f02cdc9659..2cac337f5263 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -3313,7 +3313,7 @@ int snd_hda_codec_parse_pcms(struct hda_codec *codec) list_for_each_entry(cpcm, &codec->pcm_list_head, list) { int stream; - for (stream = 0; stream < 2; stream++) { + for_each_pcm_streams(stream) { struct hda_pcm_stream *info = &cpcm->stream[stream]; if (!info->substreams)