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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 7/9/21 3:52 PM, Takashi Iwai wrote:
On Fri, 09 Jul 2021 04:33:45 +0200,
Hui Wang wrote:
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.
I'm not convinced by that argument, sorry.  You have to convert the
strings in anyway (e.g. "Index" vs "Coeff" and strip colon).  If we
were to provide a compatible string intentionally, we'd have to fix
it, but that's not the case.

Also, there can be already some tools to use the proc file and parse
the values as of now, and such a change would break them.

OK, got it.

Thanks.


thanks,

Takashi

Signed-off-by: Hui Wang <hui.wang@xxxxxxxxxxxxx>
---
  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




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux