From: Cezary Rojewski <cezary.rojewski@intel.com>
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 <cezary.rojewski@intel.com>
Subject: [PATCH v3 3/5] ASoC: Intel: avs: Ignore codecs with no suppoting driver
Date: Mon, 26 Feb 2024 13:44:30 +0100 [thread overview]
Message-ID: <20240226124432.1203798-4-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20240226124432.1203798-1-cezary.rojewski@intel.com>
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 <cezary.rojewski@intel.com>
---
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;
/*
--
2.25.1
next prev parent reply other threads:[~2024-02-26 12:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-26 12:44 [PATCH v3 0/5] ALSA/ASoC: Conditionally skip i915 init and cleanups Cezary Rojewski
2024-02-26 12:44 ` [PATCH v3 1/5] ALSA: hda: Skip i915 initialization on CNL/LKF-based platforms Cezary Rojewski
2024-02-26 12:44 ` [PATCH v3 2/5] ASoC: codecs: hda: Skip HDMI/DP registration if i915 is missing Cezary Rojewski
2024-02-28 17:21 ` Mark Brown
2024-02-26 12:44 ` Cezary Rojewski [this message]
2024-02-28 17:22 ` [PATCH v3 3/5] ASoC: Intel: avs: Ignore codecs with no suppoting driver Mark Brown
2024-02-26 12:44 ` [PATCH v3 4/5] ASoC: codecs: hda: Cleanup error messages Cezary Rojewski
2024-02-28 17:22 ` Mark Brown
2024-02-26 12:44 ` [PATCH v3 5/5] ALSA: hda: Reuse for_each_pcm_streams() Cezary Rojewski
2024-03-04 8:18 ` [PATCH v3 0/5] ALSA/ASoC: Conditionally skip i915 init and cleanups Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240226124432.1203798-4-cezary.rojewski@intel.com \
--to=cezary.rojewski@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=hdegoede@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tiwai@suse.com \
--cc=tvrtko.ursulin@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox