]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ALSA: hda - Fix doubly initialization of i915 component
authorTakashi Iwai <tiwai@suse.de>
Thu, 29 Jun 2017 14:18:12 +0000 (16:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 30 Jun 2017 06:58:53 +0000 (08:58 +0200)
commitdba9b7b6ca1af60fd21137c18795a81a5652c5ae
treedd4af47c1cbfd604d031efaaea30a7117c9b0b05
parenta5a041b6b50bcaf96f96e5db4850d11006d61d26
ALSA: hda - Fix doubly initialization of i915 component

In the commit fcc88d91cd36 ("ALSA: hda - Bind with i915 component
before codec binding"), the binding with i915 audio component is moved
to be performed always at probing the controller.  This fixed the
potential problems on IVB, but now it brought another issue on HSW and
BDW.  These two platforms give two individual HD-audio controllers,
one for the analog codec on PCH and another for HDMI over gfx.  Since
I decided to take a lazy path to check only AZX_DRIVER_PCH type in the
commit above, now both controllers try to bind with i915, and you see
a kernel WARNING.

This patch tries to address it again properly.  Now a new DCAPS bit,
AZX_DCAPS_I915_COMPONENT, is introduced for indicating the binding
with i915 component in addition to the existing I915_POWERWELL bit
flag.  Each PCI entry has to give this new flag if it requires the
binding with i915 component.  For HSW/BDW PCH (i.e. the ones defined
by AZX_DCAPS_INTEL_PCH) doesn't contain AZX_DCAPS_I915_COMPONENT bit
while others have it.

While we're at it, add parentheses around the bit flag check for
avoiding possible compiler warnings, too.

The bug was spotted by Intel CI tests.

Fixes: fcc88d91cd36 ("ALSA: hda - Bind with i915 component before codec binding")
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196219
Reported-by: Martin Peres <martin.peres@free.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_controller.h
sound/pci/hda/hda_intel.c