Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RKL: soundcard is failed to be initialized for link error #2261

Closed
RanderWang opened this issue Jul 9, 2020 · 7 comments
Closed

RKL: soundcard is failed to be initialized for link error #2261

RanderWang opened this issue Jul 9, 2020 · 7 comments
Assignees
Labels
bug Something isn't working HDA Applies to HD-Audio bus for codec connection P1 Blocker bugs or important features

Comments

@RanderWang
Copy link

[  884.040113] skl_hda_dsp_generic skl_hda_dsp_generic: ASoC: error at snd_soc_card_add_dai_link on sof-hda-dsp: -22
[  884.040121] sof-audio-pci 0000:00:1f.3: ASoC: adding FE link failed
[  884.040125] sof-audio-pci 0000:00:1f.3: ASoC: topology: could not load header: -22

Now RKL GPU driver is not included in our kernel, so there is no HDMI support now. It failed at https://github.com/thesofproject/linux/blob/topic/sof-dev/sound/soc/intel/boards/skl_hda_dsp_generic.c#L83. @kv2019i Do you have any advice ?

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 9, 2020

@RanderWang hmm, this is a new kind of error. Are you using an unmodified topology file and hda machine driver?

Possible things to check:

  • idisp codec is reported to be present even if driver is not in kernel (should not happen, but best to check):
    -> try with modprobe option: "options snd_sof_intel_hda_common codec_mask=0x1"

  • in skl_hda_hdmi_add_pcm(), only thing that could fail seems to be snd_soc_card_get_codec_dai() ... can you print out what is the "dai_name" when the error happens?

@RanderWang
Copy link
Author

@RanderWang hmm, this is a new kind of error. Are you using an unmodified topology file and hda machine driver?

Possible things to check:

  • idisp codec is reported to be present even if driver is not in kernel (should not happen, but best to check):
    -> try with modprobe option: "options snd_sof_intel_hda_common codec_mask=0x1"

I checked idsp codec is not enabled

  • in skl_hda_hdmi_add_pcm(), only thing that could fail seems to be snd_soc_card_get_codec_dai() ... can you print out what is the "dai_name" when the error happens?

dai_name = intel-hdmi-hifi0 and no such dai in sound card. I checked hdmi in sof_sdw. you added check

sof_sdw_hdmi_card_late_probe  {
......
	if (!ctx->idisp_codec)
		return 0;
......
}

How about apply the idea to hda machine driver to skip creating hdmi pcm in this case ?

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 10, 2020

@RanderWang Ok, interesting. It seems we have a regression in the HDA driver for this. I'm investigating what has happened.

@kv2019i kv2019i self-assigned this Jul 10, 2020
@kv2019i kv2019i added bug Something isn't working HDA Applies to HD-Audio bus for codec connection P1 Blocker bugs or important features labels Jul 10, 2020
@kv2019i
Copy link
Collaborator

kv2019i commented Jul 10, 2020

Ok, this is a regression in 5.8-rc :( ... I'm now bisecting what happened.

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 10, 2020

Found it, it's this patch in 5.8-rc that breaks current HDA generic driver when i915 init fails:

cbc7a6b
ASoC: soc-card: add snd_soc_card_add_dai_link()

... I'll make a fix on Monday.

kv2019i added a commit to kv2019i/linux that referenced this issue Jul 13, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()"),
error value from ASoc add_dai_link() is no longer ignored.

The generic HDA machine driver relied on the old semantics to
disable i915 HDMI/DP audio codec at runtime. If no display codec
was present, add_dai_link() returned an error, but this was ignored
and rest of the card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to
not return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: thesofproject#2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit to kv2019i/linux that referenced this issue Jul 13, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: thesofproject#2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@ClarexZhou
Copy link

ClarexZhou commented Jul 14, 2020

SOF can be loaded with this patch #2270 after workarround thesofproject/sof#3173

kv2019i added a commit that referenced this issue Jul 14, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: #2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
kv2019i added a commit that referenced this issue Jul 14, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: #2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Jul 14, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: thesofproject#2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
kv2019i added a commit that referenced this issue Jul 15, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: #2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
plbossart pushed a commit that referenced this issue Jul 17, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: #2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@ClarexZhou
Copy link

Close for PR #2270 is merged

plbossart pushed a commit that referenced this issue Jul 21, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
BugLink: #2261
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
fengguang pushed a commit to 0day-ci/linux that referenced this issue Jul 22, 2020
Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
BugLink: thesofproject#2261
Link: https://lore.kernel.org/r/20200714132804.3638221-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
kitakar5525 pushed a commit to kitakar5525/linux-kernel that referenced this issue Aug 8, 2020
…t i915

Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
BugLink: thesofproject/linux#2261
Link: https://lore.kernel.org/r/20200714132804.3638221-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit ffc6d45
 https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next)

BUG=b:162406627
TEST=check audio on lazor

Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Change-Id: Ie7d9d69865deebe8c8e6ef5a8c570089d3960784
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2328434
Reviewed-by: Sean Paul <seanpaul@chromium.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Sep 3, 2020
[ Upstream commit ffc6d45 ]

Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
BugLink: thesofproject/linux#2261
Link: https://lore.kernel.org/r/20200714132804.3638221-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
jackpot51 pushed a commit to pop-os/linux that referenced this issue Oct 19, 2020
BugLink: https://bugs.launchpad.net/bugs/1894956

[ Upstream commit ffc6d45 ]

Starting in commit cbc7a6b ("ASoC: soc-card: add
snd_soc_card_add_dai_link()"), error value from ASoc add_dai_link() is
no longer ignored.

The generic HDA machine driver relied on the old semantics to disable
i915 HDMI/DP audio codec at runtime. If no display codec was present,
add_dai_link() returned an error, but this was ignored and rest of the
card was successfully probed.

Fix the problem by changing the machine driver add_dai_link() to not
return an error in this case.

Fixes: cbc7a6b ("ASoC: soc-card: add snd_soc_card_add_dai_link()")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
BugLink: thesofproject#2261
Link: https://lore.kernel.org/r/20200714132804.3638221-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working HDA Applies to HD-Audio bus for codec connection P1 Blocker bugs or important features
Projects
None yet
Development

No branches or pull requests

3 participants