On Fri, 09 Jun 2023 10:12:16 +0200, Takashi Iwai wrote:
On Fri, 09 Jun 2023 09:34:37 +0200, Joseph C. Sible wrote:
On Fri, Jun 9, 2023 at 3:04 AM Kailang kailang@realtek.com wrote:
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
Could you give it a try? Then got dump also.
If it passed, please test my two patches also. Then get dump again.
I ran that command under the kernel with my patch and then got an alsa-info dump again, and it still said "Invalid AFG subtree". The full result is attached as alsa-info-1.txt.
I then added snd_hda_intel.power_save=0 to the kernel command line and tried under the kernel with your patches again. No change here either: still "Invalid AFG subtree", and upon a warm boot, it still breaks. Attached from this test are alsa-info-2.txt (cold boot) and alsa-info-3.txt (warm boot).
Thanks. It's puzzling.
The power setting of AFG looks already unusual:
State of AFG node 0x01: Power states: D0 D2 (null) (null) (null) (null) (null) (null) (null) Power: setting=UNKNOWN, actual=D0, Clock-stop-OK, Setting-reset
So apparently the codec isn't ready yet for accessing.
But, the fact that the codec got parsed (hence you see the parsed results in dmesg) means that this subtree call could succeed at the beginning.
When you load snd-hda-intel module with "model=,generic" option (the command is intentional), does the codec content show up?
Also, assuming it being some timing issue, adding the delay forcibly like below has any influence on the AFG error?
Takashi
--- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -792,6 +792,7 @@ static void print_codec_info(struct snd_info_entry *entry, snd_iprintf(buffer, "State of AFG node 0x%02x:\n", fg); print_power_state(buffer, codec, fg);
+ msleep(100); // XXX nodes = snd_hda_get_sub_nodes(codec, fg, &nid); if (! nid || nodes < 0) { snd_iprintf(buffer, "Invalid AFG subtree\n");