Skip to content

Commit 4f7946e

Browse files
David Henningssontiwai
authored andcommitted
ALSA: hda - Debug output which type of fixup was selected
Our fixup system is becoming increasingly complex, so it's becoming time consuming to figure out which way the fix was applied. This patch adds a few debug prints to aid when debugging why a specific fixup was selected. Signed-off-by: David Henningsson <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
1 parent 322b8af commit 4f7946e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sound/pci/hda/hda_auto_parser.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,8 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,
920920
codec->fixup_id = pq->value;
921921
#ifdef CONFIG_SND_DEBUG_VERBOSE
922922
codec->fixup_name = pq->name;
923+
codec_dbg(codec, "%s: picked fixup %s (pin match)\n",
924+
codec->chip_name, codec->fixup_name);
923925
#endif
924926
codec->fixup_list = fixlist;
925927
return;
@@ -960,6 +962,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
960962
codec->fixup_list = NULL;
961963
codec->fixup_name = NULL;
962964
codec->fixup_id = HDA_FIXUP_ID_NO_FIXUP;
965+
codec_dbg(codec, "%s: picked no fixup (nofixup specified)\n",
966+
codec->chip_name);
963967
return;
964968
}
965969

@@ -969,6 +973,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
969973
codec->fixup_id = models->id;
970974
codec->fixup_name = models->name;
971975
codec->fixup_list = fixlist;
976+
codec_dbg(codec, "%s: picked fixup %s (model specified)\n",
977+
codec->chip_name, codec->fixup_name);
972978
return;
973979
}
974980
models++;
@@ -980,6 +986,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
980986
id = q->value;
981987
#ifdef CONFIG_SND_DEBUG_VERBOSE
982988
name = q->name;
989+
codec_dbg(codec, "%s: picked fixup %s (PCI SSID%s)\n",
990+
codec->chip_name, name, q->subdevice_mask ? "" : " - vendor generic");
983991
#endif
984992
}
985993
}
@@ -992,6 +1000,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
9921000
id = q->value;
9931001
#ifdef CONFIG_SND_DEBUG_VERBOSE
9941002
name = q->name;
1003+
codec_dbg(codec, "%s: picked fixup %s (codec SSID)\n",
1004+
codec->chip_name, name);
9951005
#endif
9961006
break;
9971007
}

0 commit comments

Comments
 (0)