]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ALSA: hda: Show the codec quirk info at probing
authorTakashi Iwai <tiwai@suse.de>
Tue, 26 Nov 2024 14:10:10 +0000 (15:10 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 26 Nov 2024 14:53:53 +0000 (15:53 +0100)
Lots of HD-audio devices need the device-specific quirk, and it's
often helpful to know which quirk is applied.  But currently the
driver shows it only as a debug output, hence we'd have to enable the
debug option at each time we want to see it (and the output becomes
too messy due to other debug messages).

This patch changes the messages to the info level, so that they appear
at probing normally.

Link: https://patch.msgid.link/20241126141010.12567-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_auto_parser.c

index 8e74be038b0faded87fc13a182cf60abcafb47e3..84393f4f429dff9e26e04d0e69f52c457dd04345 100644 (file)
@@ -933,6 +933,7 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,
                            bool match_all_pins)
 {
        const struct snd_hda_pin_quirk *pq;
+       const char *name = NULL;
 
        if (codec->fixup_id != HDA_FIXUP_ID_NOT_SET)
                return;
@@ -946,9 +947,10 @@ void snd_hda_pick_pin_fixup(struct hda_codec *codec,
                        codec->fixup_id = pq->value;
 #ifdef CONFIG_SND_DEBUG_VERBOSE
                        codec->fixup_name = pq->name;
-                       codec_dbg(codec, "%s: picked fixup %s (pin match)\n",
-                                 codec->core.chip_name, codec->fixup_name);
+                       name = pq->name;
 #endif
+                       codec_info(codec, "%s: picked fixup %s (pin match)\n",
+                                  codec->core.chip_name, name ? name : "");
                        codec->fixup_list = fixlist;
                        return;
                }
@@ -1015,8 +1017,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
        if (codec->modelname && !strcmp(codec->modelname, "nofixup")) {
                id = HDA_FIXUP_ID_NO_FIXUP;
                fixlist = NULL;
-               codec_dbg(codec, "%s: picked no fixup (nofixup specified)\n",
-                         codec->core.chip_name);
+               codec_info(codec, "%s: picked no fixup (nofixup specified)\n",
+                          codec->core.chip_name);
                goto found;
        }
 
@@ -1026,8 +1028,8 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
                        if (!strcmp(codec->modelname, models->name)) {
                                id = models->id;
                                name = models->name;
-                               codec_dbg(codec, "%s: picked fixup %s (model specified)\n",
-                                         codec->core.chip_name, codec->fixup_name);
+                               codec_info(codec, "%s: picked fixup %s (model specified)\n",
+                                          codec->core.chip_name, name);
                                goto found;
                        }
                        models++;
@@ -1085,9 +1087,9 @@ void snd_hda_pick_fixup(struct hda_codec *codec,
 #ifdef CONFIG_SND_DEBUG_VERBOSE
        name = q->name;
 #endif
-       codec_dbg(codec, "%s: picked fixup %s for %s %04x:%04x\n",
-                 codec->core.chip_name, name ? name : "",
-                 type, q->subvendor, q->subdevice);
+       codec_info(codec, "%s: picked fixup %s for %s %04x:%04x\n",
+                  codec->core.chip_name, name ? name : "",
+                  type, q->subvendor, q->subdevice);
  found:
        codec->fixup_id = id;
        codec->fixup_list = fixlist;