Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A49DC07E99 for ; Fri, 9 Jul 2021 07:53:11 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EC21C613B5 for ; Fri, 9 Jul 2021 07:53:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC21C613B5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7479A886; Fri, 9 Jul 2021 09:52:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7479A886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1625817189; bh=9vHkJPPJFQuIJ2VDzn1ofOwVVtGg0y8lGsFzXPo1MlE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=bfnzmupp8SIpx6xBOwWCjYiAjQ8eZ8CEmw1v+NcMhkds9PlhO5xPJOQIIcJ/69cDN I3WqWN8hK5qjiAJguGKrMha9BCAGdkmIGYakE2Ab+54oHD6cwEH3NmMk0Df5Ar5Et5 m/c1ZAVBsN8KqG94dDOUCr133gAMMdGW1jLiHFMg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 15CE0F80107; Fri, 9 Jul 2021 09:52:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3D0C2F80224; Fri, 9 Jul 2021 09:52:17 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5A550F8012A for ; Fri, 9 Jul 2021 09:52:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5A550F8012A Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZKzOI0Vv"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WlntapEN" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 64AA122122; Fri, 9 Jul 2021 07:52:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1625817128; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fLPYioJLWB+DHkFWlPEfAKaerKCnQYEhDjJWhpjf15c=; b=ZKzOI0Vv3/VhNsu5RWcWlvg2zhiMPAkJhy2Skv/UF6Wf24vduu9RzTc7T4q7kQE2QKCf9k a/Pi/vl5pb6uYfYvnXGmMUqIZRKVc6WR0TFfNObv4/et+GDkanRsb7Msv/tmIpahN9kDd4 r+dCn1uk4Cc/irrpu4CuK/3t3BmBDgg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1625817128; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fLPYioJLWB+DHkFWlPEfAKaerKCnQYEhDjJWhpjf15c=; b=WlntapENMGxlb/czHP2M1flMnzBglzYQNjSOlV8Revt8gkkYheumAhvekhDSa+gn5Wv66d X/cirrZLbqYmChCg== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id 5DC78A3B9B; Fri, 9 Jul 2021 07:52:08 +0000 (UTC) Date: Fri, 09 Jul 2021 09:52:08 +0200 Message-ID: From: Takashi Iwai To: Hui Wang Subject: Re: [PATCH] ALSA: hda/proc - dump the coeff with the capital letters In-Reply-To: <20210709023345.6359-1-hui.wang@canonical.com> References: <20210709023345.6359-1-hui.wang@canonical.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 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. thanks, Takashi > > Signed-off-by: Hui Wang > --- > 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 >