mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
c0f1886de7
It seems that a few recent AMD systems show the codec configuration errors at the early boot, while loading the driver at a later stage works magically. Although the root cause of the error isn't clear, it's certainly not bad to allow retrying the codec probe in such a case if that helps. This patch adds the capability for retrying the probe upon codec probe errors on the certain AMD platforms. The probe_work is changed to a delayed work, and at the secondary call, it'll jump to the codec probing. Note that, not only adding the re-probing, this includes the behavior changes in the codec configuration function. Namely, snd_hda_codec_configure() won't unregister the codec at errors any longer. Instead, its caller, azx_codec_configure() unregisters the codecs with the probe failures *if* any codec has been successfully configured. If all codec probe failed, it doesn't unregister but let it re-probed -- which is the most case we're seeing and this patch tries to improve. Even if the driver doesn't re-probe or give up, it will go to the "free-all" error path, hence the leftover codecs shall be disabled / deleted in anyway. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1190801 Link: https://lore.kernel.org/r/20211006141940.2897-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
38 lines
823 B
C
38 lines
823 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
*/
|
|
#ifndef __SOUND_HDA_INTEL_H
|
|
#define __SOUND_HDA_INTEL_H
|
|
|
|
#include "hda_controller.h"
|
|
|
|
struct hda_intel {
|
|
struct azx chip;
|
|
|
|
/* for pending irqs */
|
|
struct work_struct irq_pending_work;
|
|
|
|
/* sync probing */
|
|
struct completion probe_wait;
|
|
struct delayed_work probe_work;
|
|
|
|
/* card list (for power_save trigger) */
|
|
struct list_head list;
|
|
|
|
/* extra flags */
|
|
unsigned int irq_pending_warned:1;
|
|
unsigned int probe_continued:1;
|
|
|
|
/* vga_switcheroo setup */
|
|
unsigned int use_vga_switcheroo:1;
|
|
unsigned int vga_switcheroo_registered:1;
|
|
unsigned int init_failed:1; /* delayed init failed */
|
|
unsigned int freed:1; /* resources already released */
|
|
|
|
bool need_i915_power:1; /* the hda controller needs i915 power */
|
|
|
|
int probe_retry; /* being probe-retry */
|
|
};
|
|
|
|
#endif
|