[PATCH] ALSA: hda/proc - dump the coeff with the capital letters

Hui Wang hui.wang at canonical.com
Fri Jul 9 04:33:45 CEST 2021


Sometimes we need to dump the coeff to debug the audio issues, and
need to compare it with the log of RTHDDump.exe under Windows, this is
the coeff under Windows and Linux:
Vendor widget coefficient value under Windows
Index 0x00  0x0002
Index 0x01  0xAAAA
Index 0x02  0x8AAA

Processing caps: benign=0, ncoeff=91 under Linux
Coeff 0x00: 0x0002
Coeff 0x01: 0xaaaa
Coeff 0x02: 0x8aaa

Windows prints the hex number with capital letter while Linux prints
the hex number with lower case letter, it adds the trouble when
comparing them. Let us change it to use capital letter.

Signed-off-by: Hui Wang <hui.wang at canonical.com>
---
 sound/pci/hda/hda_proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 00c2eeb2c472..9037c87665b6 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -590,7 +590,7 @@ static void print_proc_caps(struct snd_info_buffer *buffer,
 		snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, i);
 		val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF,
 					 0);
-		snd_iprintf(buffer, "    Coeff 0x%02x: 0x%04x\n", i, val);
+		snd_iprintf(buffer, "    Coeff 0x%02X: 0x%04X\n", i, val);
 	}
 	snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, oldindex);
 }
-- 
2.25.1



More information about the Alsa-devel mailing list