Skip to content

Commit b9f706f

Browse files
crojewsk-inteltiwai
authored andcommitted
ASoC: Intel: avs: Ignore codecs with no suppoting driver
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> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240226124432.1203798-4-cezary.rojewski@intel.com
1 parent cf9c19d commit b9f706f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

sound/soc/intel/avs/core.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ static int probe_codec(struct hdac_bus *bus, int addr)
144144
/* configure effectively creates new ASoC component */
145145
ret = snd_hda_codec_configure(codec);
146146
if (ret < 0) {
147-
dev_err(bus->dev, "failed to config codec %d\n", ret);
147+
dev_warn(bus->dev, "failed to config codec #%d: %d\n", addr, ret);
148148
return ret;
149149
}
150150

@@ -153,15 +153,16 @@ static int probe_codec(struct hdac_bus *bus, int addr)
153153

154154
static void avs_hdac_bus_probe_codecs(struct hdac_bus *bus)
155155
{
156-
int c;
156+
int ret, c;
157157

158158
/* First try to probe all given codec slots */
159159
for (c = 0; c < HDA_MAX_CODECS; c++) {
160160
if (!(bus->codec_mask & BIT(c)))
161161
continue;
162162

163-
if (!probe_codec(bus, c))
164-
/* success, continue probing */
163+
ret = probe_codec(bus, c);
164+
/* Ignore codecs with no supporting driver. */
165+
if (!ret || ret == -ENODEV)
165166
continue;
166167

167168
/*

0 commit comments

Comments
 (0)