Discussion:
snd_hda_codec_hdmi: `hdaudio hdaudioC0D2: Unable to bind the codec`
(too old to reply)
Takashi Iwai
2018-09-18 21:00:53 UTC
Permalink
On Tue, 18 Sep 2018 17:55:15 +0200,
Dear Linux folks,
With drm-tip (v4.19-rc3-946-g09b295662edd) Linux prints
`snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec`
to the log.
```
[…]
[ 12.481788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.482536] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.483184] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.483737] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.484582] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.485100] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.485519] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.497685] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.498311] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.498789] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.499567] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.500268] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.501039] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.501683] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.743338] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[…]
```
Is that an error or just a notice?
This must be a side-effect of the recent change in i915 to be async
probe. This made me checking the corresponding ALSA audio binding
code change, and actually found a bug.

Could you try the fix below?


thanks,

Takashi

-- 8< --
From: Takashi Iwai <***@suse.de>
Subject: [PATCH] ALSA: hda: Fix the audio-component completion timeout

The timeout of audio component binding was incorrectly specified in
msec, not in jiffies, which results in way too shorter timeout than
expected.

Along with fixing it, add the information print about the binding
failure to show the unexpected situation more clearly.

Fixes: a57942bfdd61 ("ALSA: hda: Make audio component support more generic")
Signed-off-by: Takashi Iwai <***@suse.de>
---
sound/hda/hdac_i915.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index b5282cbbe489..617ff1aa818f 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -145,9 +145,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!acomp->ops) {
request_module("i915");
/* 10s timeout */
- wait_for_completion_timeout(&bind_complete, 10 * 1000);
+ wait_for_completion_timeout(&bind_complete,
+ msecs_to_jiffies(10 * 1000));
}
if (!acomp->ops) {
+ dev_info(bus->dev, "couldn't bind with audio component\n");
snd_hdac_acomp_exit(bus);
return -ENODEV;
}
--
2.18.0
Takashi Iwai
2018-09-19 18:44:44 UTC
Permalink
On Wed, 19 Sep 2018 13:14:43 +0200,
Dear Takashi,
Post by Takashi Iwai
With drm-tip (v4.19-rc3-946-g09b295662edd) Linux prints
`snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec`
to the log.
```
[…]
[ 12.481788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.482536] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.483184] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.483737] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.484582] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.485100] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.485519] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.497685] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.498311] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.498789] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.499567] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.500268] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.501039] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.501683] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.743338] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[…]
```
Is that an error or just a notice?
This must be a side-effect of the recent change in i915 to be async
probe. This made me checking the corresponding ALSA audio binding
code change, and actually found a bug.
Could you try the fix below?
Thank you for your quick reply. Of course, and can try it.
Post by Takashi Iwai
-- 8< --
Subject: [PATCH] ALSA: hda: Fix the audio-component completion timeout
The timeout of audio component binding was incorrectly specified in
msec, not in jiffies, which results in way too shorter timeout than
expected.
Along with fixing it, add the information print about the binding
failure to show the unexpected situation more clearly.
Fixes: a57942bfdd61 ("ALSA: hda: Make audio component support more generic")
---
sound/hda/hdac_i915.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index b5282cbbe489..617ff1aa818f 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -145,9 +145,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!acomp->ops) {
request_module("i915");
/* 10s timeout */
- wait_for_completion_timeout(&bind_complete, 10 * 1000);
+ wait_for_completion_timeout(&bind_complete,
+ msecs_to_jiffies(10 * 1000));
}
if (!acomp->ops) {
+ dev_info(bus->dev, "couldn't bind with audio component\n");
snd_hdac_acomp_exit(bus);
return -ENODEV;
}
Unfortunately, it doesn’t seem to help.
```
[ 12.471105] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component
So it has waited for 10 seconds and timed out. You can check the
calls via init_debug option or such to verify it.
[ 12.483298] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.484068] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.484643] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.485268] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.486135] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.486558] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.487051] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.498994] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.499707] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.500294] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.501194] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.502084] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.502800] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.503525] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.734286] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[ 17.734300] [drm:i915_driver_load [i915]] WOPCM size: 1024KiB
Why the i915 driver gets initialized *so late*?


BTW, could you strip the mail to more lightweight? We don't need so
much things, just the relevant kernel messages should suffice.


thanks,

Takashi
Paul Menzel
2019-02-13 14:58:44 UTC
Permalink
Dear Takashi,


I am sorry for the late reply.
Post by Takashi Iwai
On Wed, 19 Sep 2018 13:14:43 +0200,
Post by Takashi Iwai
With drm-tip (v4.19-rc3-946-g09b295662edd) Linux prints
`snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec`
to the log.
```
[
]
[ 12.481788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.482536] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.483184] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.483737] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.484582] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.485100] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.485519] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.497685] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.498311] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.498789] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.499567] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.500268] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.501039] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.501683] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.743338] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[
]
```
Is that an error or just a notice?
This must be a side-effect of the recent change in i915 to be async
probe. This made me checking the corresponding ALSA audio binding
code change, and actually found a bug.
Could you try the fix below?
Currently, I am testing Linux 4.20.8, which has your patch included.
The problem is still there.

[
]
Post by Takashi Iwai
So it has waited for 10 seconds and timed out. You can check the
calls via init_debug option or such to verify it.
I added `initcall_debug` to the Linux kernel command line. Please find
the whole log attached.

```
[ 12.486972] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component
[ 12.498511] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.499251] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.499917] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.500568] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.501135] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 12.501575] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.502116] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.502544] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.513626] probe of hdaudioC0D0 returned 1 after 15764 usecs
[ 12.513749] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.514455] probe of hdaudioC0D2 returned 0 after 727 usecs
[ 12.514462] hdaudio hdaudioC0D2: Unable to bind the codec
```

[
]
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?

```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
Post by Takashi Iwai
BTW, could you strip the mail to more lightweight? We don't need so
much things, just the relevant kernel messages should suffice.
Sure. Hopefully, this message is more to your liking.


Kind regards,

Paul
Takashi Iwai
2019-02-13 15:12:08 UTC
Permalink
On Wed, 13 Feb 2019 15:58:44 +0100,
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.

If you build the graphics driver as a module, built the sound driver
also as a module.


thanks,

Takashi
Paul Menzel
2019-02-13 15:42:19 UTC
Permalink
Dear Takashi,
Post by Takashi Iwai
On Wed, 13 Feb 2019 15:58:44 +0100,
Post by Paul Menzel
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.
If you build the graphics driver as a module, built the sound driver
also as a module.
Can this be enforced by the Kconfig configuration? If not, should the
warning/error message be extended with this hint?


Kind regards,

Paul
Takashi Iwai
2019-02-13 15:56:32 UTC
Permalink
On Wed, 13 Feb 2019 16:42:19 +0100,
Dear Takashi,
Post by Takashi Iwai
On Wed, 13 Feb 2019 15:58:44 +0100,
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.
If you build the graphics driver as a module, built the sound driver
also as a module.
Can this be enforced by the Kconfig configuration?
This is the restriction only needed if i915 HDMI audio is used, so you
can't stop the configuration statically. Your setup would still work
except for HDMI, for example.
If not, should the
warning/error message be extended with this hint?
Possible, but why such a weird configuration at the first place...?


Takashi
Takashi Iwai
2019-02-14 16:06:58 UTC
Permalink
On Thu, 14 Feb 2019 17:00:29 +0100,
Dear Takashi,
Post by Takashi Iwai
On Wed, 13 Feb 2019 16:42:19 +0100,
Post by Takashi Iwai
On Wed, 13 Feb 2019 15:58:44 +0100,
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.
If you build the graphics driver as a module, built the sound driver
also as a module.
I tried that now, but `SND_HDA_I915` is just a boolean and no tristate.
config SND_HDA_I915
bool
select SND_HDA_COMPONENT
It's not user-choosable in anyway.
Then, I built the HDA subsystem as a module, but that also did not help.
The DRM subsystem is started after the HD-audio subsystem.
```
$ grep -e SND_HDA= -e SND_HDA_INTEL /boot/config-4.20.8.mx64.245
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
That's odd. In sound/hda/hdac_i915.c there is an explicit
request_module("i915"), and at that point, it has a 10 second
timeout. If this isn't enough, try to raise the number, e.g. 60
seconds.


thanks,

Takashi
Paul Menzel
2019-02-18 15:17:30 UTC
Permalink
Dear Takashi,
Post by Takashi Iwai
Post by Takashi Iwai
Post by Paul Menzel
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.
If you build the graphics driver as a module, built the sound driver
also as a module.
I tried that now, but `SND_HDA_I915` is just a boolean and no tristate.
config SND_HDA_I915
bool
select SND_HDA_COMPONENT
It's not user-choosable in anyway.
Yes, but I read your answer the way, that it could be selected as a
module. (Or did not see, how you knew from looking at the pasted config
options.)
Post by Takashi Iwai
Then, I built the HDA subsystem as a module, but that also did not help.
The DRM subsystem is started after the HD-audio subsystem.
```
$ grep -e SND_HDA= -e SND_HDA_INTEL /boot/config-4.20.8.mx64.245
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
That's odd. In sound/hda/hdac_i915.c there is an explicit
request_module("i915"), and at that point, it has a 10 second
timeout. If this isn't enough, try to raise the number, e.g. 60
seconds.
I tried as you suggested, and increased it to 60 seconds.

sed -i 's/msecs_to_jiffies(10 * 1000))/msecs_to_jiffies(60 * 1000))/' sound/hda/hdac_i915.c

That seems to have fixed it.

```
$ grep _hda_ 20190218–linux_4.20.10–dmesg.txt
[ 15.568061] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 15.706898] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 15.708754] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 15.710249] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 15.712031] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 15.712348] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 15.712619] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 15.712929] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 15.713234] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
```

So the time-out, needs to be increased.


Kind regards,

Paul
Paul Menzel
2019-02-18 15:40:36 UTC
Permalink
Dear Takashi,
Post by Paul Menzel
Post by Takashi Iwai
Then, I built the HDA subsystem as a module, but that also did not help.
The DRM subsystem is started after the HD-audio subsystem.
```
$ grep -e SND_HDA= -e SND_HDA_INTEL /boot/config-4.20.8.mx64.245
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
That's odd. In sound/hda/hdac_i915.c there is an explicit
request_module("i915"), and at that point, it has a 10 second
timeout. If this isn't enough, try to raise the number, e.g. 60
seconds.
I tried as you suggested, and increased it to 60 seconds.
sed -i 's/msecs_to_jiffies(10 * 1000))/msecs_to_jiffies(60 * 1000))/' sound/hda/hdac_i915.c
That seems to have fixed it.
```
$ grep _hda_ 20190218–linux_4.20.10–dmesg.txt
[ 15.568061] snd_hda_intel 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 15.706898] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 15.708754] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 15.710249] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 15.712031] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 15.712619] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 15.712929] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 15.713234] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
```
So the time-out, needs to be increased.
OK, I'm going to extend the value. I thought a minute would be too
long, and I naively assumed that the recent machines were fast
enough. Maybe 60 isn't too bad after all.
Thank you. Maybe also log times greater than one(?) second, so the user
is aware of these delays and connection between subsystems.


Kind regards,

Paul

Paul Menzel
2019-02-14 16:00:29 UTC
Permalink
Dear Takashi,
Post by Takashi Iwai
On Wed, 13 Feb 2019 16:42:19 +0100,
Post by Paul Menzel
Post by Takashi Iwai
On Wed, 13 Feb 2019 15:58:44 +0100,
Post by Paul Menzel
Post by Takashi Iwai
Why the i915 driver gets initialized *so late*?
Maybe, because it’s built as a module?
```
$ grep I915 /boot/config-4.20.8.mx64.245
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_ALPHA_SUPPORT is not set
CONFIG_DRM_I915_CAPTURE_ERROR=y
CONFIG_DRM_I915_COMPRESS_ERROR=y
CONFIG_DRM_I915_USERPTR=y
# CONFIG_DRM_I915_GVT is not set
CONFIG_SND_HDA_I915=y
```
That explains. You built the HD-audio as built-in while the graphics
as module. This makes the binding impossible at the time of sound
driver initialization.
If you build the graphics driver as a module, built the sound driver
also as a module.
I tried that now, but `SND_HDA_I915` is just a boolean and no tristate.

config SND_HDA_I915
bool
select SND_HDA_COMPONENT

Then, I built the HDA subsystem as a module, but that also did not help.
The DRM subsystem is started after the HD-audio subsystem.

```
$ grep -e SND_HDA= -e SND_HDA_INTEL /boot/config-4.20.8.mx64.245
CONFIG_SND_HDA=m
CONFIG_SND_HDA_INTEL=m
$ dmesg
[
]
[ 12.465329] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component
[ 12.474968] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.475702] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.476368] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.476953] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.477421] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 12.477837] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.478252] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.478708] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.489431] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.490170] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.490867] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.491830] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.492599] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.493268] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.493960] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 15.000998] [drm] Replacing VGA console driver
[
]
```

Please find the messages attached.
Post by Takashi Iwai
Post by Paul Menzel
Can this be enforced by the Kconfig configuration?
This is the restriction only needed if i915 HDMI audio is used, so you
can't stop the configuration statically. Your setup would still work
except for HDMI, for example.
Understood.
Post by Takashi Iwai
Post by Paul Menzel
If not, should the warning/error message be extended with this hint?
Possible, but why such a weird configuration at the first place...?
Unfortunately, it comes down to historical reasons and ignorance.


Kind regards,

Paul
Paul Menzel
2018-09-19 11:14:43 UTC
Permalink
Dear Takashi,
Post by Takashi Iwai
With drm-tip (v4.19-rc3-946-g09b295662edd) Linux prints
`snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec`
to the log.
```
[
]
[ 12.481788] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.482536] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.483184] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.483737] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.484582] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.485100] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.485519] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.497685] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.498311] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.498789] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.499567] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.500268] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.501039] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.501683] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.743338] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[
]
```
Is that an error or just a notice?
This must be a side-effect of the recent change in i915 to be async
probe. This made me checking the corresponding ALSA audio binding
code change, and actually found a bug.
Could you try the fix below?
Thank you for your quick reply. Of course, and can try it.
Post by Takashi Iwai
-- 8< --
Subject: [PATCH] ALSA: hda: Fix the audio-component completion timeout
The timeout of audio component binding was incorrectly specified in
msec, not in jiffies, which results in way too shorter timeout than
expected.
Along with fixing it, add the information print about the binding
failure to show the unexpected situation more clearly.
Fixes: a57942bfdd61 ("ALSA: hda: Make audio component support more generic")
---
sound/hda/hdac_i915.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
index b5282cbbe489..617ff1aa818f 100644
--- a/sound/hda/hdac_i915.c
+++ b/sound/hda/hdac_i915.c
@@ -145,9 +145,11 @@ int snd_hdac_i915_init(struct hdac_bus *bus)
if (!acomp->ops) {
request_module("i915");
/* 10s timeout */
- wait_for_completion_timeout(&bind_complete, 10 * 1000);
+ wait_for_completion_timeout(&bind_complete,
+ msecs_to_jiffies(10 * 1000));
}
if (!acomp->ops) {
+ dev_info(bus->dev, "couldn't bind with audio component\n");
snd_hdac_acomp_exit(bus);
return -ENODEV;
}
Unfortunately, it doesn’t seem to help.

```
[ 12.471105] snd_hda_intel 0000:00:1f.3: couldn't bind with audio component
[ 12.483298] snd_hda_codec_realtek hdaudioC0D0: autoconfig for ALC671: line_outs=1 (0x21/0x0/0x0/0x0/0x0) type:line
[ 12.484068] snd_hda_codec_realtek hdaudioC0D0: speaker_outs=1 (0x17/0x0/0x0/0x0/0x0)
[ 12.484643] snd_hda_codec_realtek hdaudioC0D0: hp_outs=1 (0x14/0x0/0x0/0x0/0x0)
[ 12.485268] snd_hda_codec_realtek hdaudioC0D0: mono: mono_out=0x0
[ 12.485700] snd_hda_codec_realtek hdaudioC0D0: inputs:
[ 12.486135] snd_hda_codec_realtek hdaudioC0D0: Front Mic=0x19
[ 12.486558] snd_hda_codec_realtek hdaudioC0D0: Rear Mic=0x18
[ 12.487051] snd_hda_codec_realtek hdaudioC0D0: Line=0x1a
[ 12.498994] snd_hda_codec_hdmi hdaudioC0D2: No i915 binding for Intel HDMI/DP codec
[ 12.499707] hdaudio hdaudioC0D2: Unable to bind the codec
[ 12.500294] input: HDA Intel PCH Front Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input6
[ 12.501194] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1f.3/sound/card0/input7
[ 12.502084] input: HDA Intel PCH Line as /devices/pci0000:00/0000:00:1f.3/sound/card0/input8
[ 12.502800] input: HDA Intel PCH Line Out as /devices/pci0000:00/0000:00:1f.3/sound/card0/input9
[ 12.503525] input: HDA Intel PCH Front Headphone as /devices/pci0000:00/0000:00:1f.3/sound/card0/input10
[ 17.734286] [drm:intel_pch_type [i915]] Found SunrisePoint PCH
[ 17.734300] [drm:i915_driver_load [i915]] WOPCM size: 1024KiB
```


Kind regards,

Paul
Loading...