diff --git a/sound/hda/hdac_bus.c b/sound/hda/hdac_bus.c index d497414a5538..2d750edb20fc 100644 --- a/sound/hda/hdac_bus.c +++ b/sound/hda/hdac_bus.c @@ -118,6 +118,10 @@ int snd_hdac_bus_exec_verb_unlocked(struct hdac_bus *bus, unsigned int addr, else if (bus->sync_write) res = &tmp; for (;;) { + WARN_ON (cmd == 0x00935080); + WARN_ON (cmd == 0x00936080); + WARN_ON (cmd == 0x0093505b); + WARN_ON (cmd == 0x0093605b); trace_hda_send_cmd(bus, cmd); err = bus->ops->command(bus, cmd); if (err != -EAGAIN) diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index 035b720bf602..4424bfe0499b 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -256,6 +256,7 @@ static unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid, int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd, unsigned int flags, unsigned int *res) { + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); if (codec->exec_verb) return codec->exec_verb(codec, cmd, flags, res); return snd_hdac_bus_exec_verb(codec->bus, codec->addr, cmd, res); diff --git a/sound/hda/hdac_regmap.c b/sound/hda/hdac_regmap.c index fe3587547cfe..61dfab9306c7 100644 --- a/sound/hda/hdac_regmap.c +++ b/sound/hda/hdac_regmap.c @@ -597,10 +597,16 @@ EXPORT_SYMBOL_GPL(snd_hdac_regmap_update_raw_once); */ void snd_hdac_regmap_sync(struct hdac_device *codec) { + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); if (codec->regmap) { + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); mutex_lock(&codec->regmap_lock); + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); regcache_sync(codec->regmap); + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); mutex_unlock(&codec->regmap_lock); + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); } + pr_err("DEBUG: %s:%d\n", __FILE__, __LINE__); } EXPORT_SYMBOL_GPL(snd_hdac_regmap_sync); diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 2e728aad6771..bce4d074df02 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1049,6 +1049,8 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card, pm_runtime_get_noresume(&codec->core.dev); #endif + //pm_runtime_force_suspend(&codec->core.dev); + return 0; } EXPORT_SYMBOL_GPL(snd_hda_codec_device_new); diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index fc114e522480..c6eed94af72c 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -704,6 +704,8 @@ static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, int dir) static void init_amp(struct hda_codec *codec, hda_nid_t nid, int dir, int idx) { unsigned int caps = query_amp_caps(codec, nid, dir); + if (nid == 0x09) + pr_err("DEBUG: %s:%d caps=0x%08x\n", __FILE__, __LINE__, caps); int val = get_amp_val_to_activate(codec, nid, dir, caps, false); if (is_stereo_amps(codec, nid, dir)) @@ -5992,7 +5994,9 @@ int snd_hda_gen_init(struct hda_codec *codec) /* call init functions of standard auto-mute helpers */ update_automute_all(codec); + pr_err("DEBUG: %s:%d pre snd_hda_regmap_sync\n", __FILE__, __LINE__); snd_hda_regmap_sync(codec); + pr_err("DEBUG: %s:%d post snd_hda_regmap_sync\n", __FILE__, __LINE__); if (spec->vmaster_mute.sw_kctl && spec->vmaster_mute.hook) snd_hda_sync_vmaster_hook(&spec->vmaster_mute); diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e443d88f627f..759089761053 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -910,6 +910,7 @@ static int alc_build_controls(struct hda_codec *codec) static void alc_pre_init(struct hda_codec *codec) { + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); alc_fill_eapd_coef(codec); } @@ -922,6 +923,7 @@ static int alc_init(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); /* hibernation resume needs the full chip initialization */ if (is_s4_resume(codec)) alc_pre_init(codec); @@ -974,6 +976,7 @@ static int alc_resume(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); if (!spec->no_depop_delay) msleep(150); /* to avoid pop noise */ codec->patch_ops.init(codec); @@ -1190,6 +1193,7 @@ static int alc_alloc_spec(struct hda_codec *codec, hda_nid_t mixer_nid) struct alc_spec *spec = kzalloc(sizeof(*spec), GFP_KERNEL); int err; + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); if (!spec) return -ENOMEM; codec->spec = spec; @@ -4033,6 +4037,8 @@ static int alc269_resume(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); + if (spec->codec_variant == ALC269_TYPE_ALC269VB) alc269vb_toggle_power_output(codec, 0); if (spec->codec_variant == ALC269_TYPE_ALC269VB && @@ -10369,6 +10375,8 @@ static int patch_alc269(struct hda_codec *codec) struct alc_spec *spec; int err; + pr_err("DEBUG: %s:%d %s\n", __FILE__, __LINE__, __func__); + err = alc_alloc_spec(codec, 0x0b); if (err < 0) return err;