From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wu Fengguang Subject: [PATCH 04/18] intel_audio_dump: report effective channel count Date: Sat, 12 Nov 2011 11:12:41 +0800 Message-ID: <20111112031410.487245772@intel.com> References: <20111112031237.321877255@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id A72C89E7A4 for ; Fri, 11 Nov 2011 19:16:10 -0800 (PST) Content-Disposition: inline; filename=channel-count List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: intel-gfx@lists.freedesktop.org Cc: Wu Fengguang List-Id: intel-gfx@lists.freedesktop.org The raw channel count is not user friendly and may be misleading. Signed-off-by: Wu Fengguang --- tools/intel_audio_dump.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- intel-gpu-tools.orig/tools/intel_audio_dump.c 2011-11-09 16:21:43.000000000 +0800 +++ intel-gpu-tools/tools/intel_audio_dump.c 2011-11-09 16:22:23.000000000 +0800 @@ -367,16 +367,16 @@ static void dump_eaglelake(void) dword = INREG(AUD_OUT_CH_STR); printf("AUD_OUT_CH_STR stream id\t\t0x%lx\n", BITS(dword, 7, 4)); - printf("AUD_OUT_CH_STR lowest channel\t\t0x%lx\n", BITS(dword, 3, 0)); + printf("AUD_OUT_CH_STR lowest channel\t\t%lu\n", BITS(dword, 3, 0)); dword = INREG(AUD_OUT_STR_DESC); - printf("AUD_OUT_STR_DESC stream channels\t0x%lx\n", BITS(dword, 3, 0)); + printf("AUD_OUT_STR_DESC stream channels\t%lu\n", BITS(dword, 3, 0) + 1); dword = INREG(AUD_PINW_CAP); printf("AUD_PINW_CAP widget type\t\t0x%lx\n", BITS(dword, 23, 20)); printf("AUD_PINW_CAP sample delay\t\t0x%lx\n", BITS(dword, 19, 16)); - printf("AUD_PINW_CAP channel count\t\t0x%lx\n", - BITS(dword, 15, 13) * 2 + BIT(dword, 0)); + printf("AUD_PINW_CAP channel count\t\t%lu\n", + BITS(dword, 15, 13) * 2 + BIT(dword, 0) + 1); printf("AUD_PINW_CAP HDCP\t\t\t%lu\n", BIT(dword, 12)); printf("AUD_PINW_CAP L-R swap\t\t\t%lu\n", BIT(dword, 11)); printf("AUD_PINW_CAP power control\t\t%lu\n", BIT(dword, 10)); @@ -647,13 +647,13 @@ static void dump_ironlake(void) dword = INREG(AUD_OUT_STR_DESC_A); printf("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n", BITS(dword, 28, 27)); - printf("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16)); + printf("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16) + 1); printf("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n", BITS(dword, 6, 4)); printf("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n", 1 + BITS(dword, 3, 0)); dword = INREG(AUD_OUT_STR_DESC_B); printf("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n", BITS(dword, 28, 27)); - printf("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16)); + printf("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16) + 1); printf("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n", BITS(dword, 6, 4)); printf("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n", 1 + BITS(dword, 3, 0)); @@ -1044,19 +1044,19 @@ static void dump_cpt(void) dword = INREG(AUD_OUT_STR_DESC_A); printf("AUD_OUT_STR_DESC_A HBR_enable\t\t\t\t%lu\n", BITS(dword, 28, 27)); - printf("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16)); + printf("AUD_OUT_STR_DESC_A Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16) + 1); printf("AUD_OUT_STR_DESC_A Bits_per_Sample\t\t\t%lu\n", BITS(dword, 6, 4)); printf("AUD_OUT_STR_DESC_A Number_of_Channels_in_a_Stream\t%lu\n", 1 + BITS(dword, 3, 0)); dword = INREG(AUD_OUT_STR_DESC_B); printf("AUD_OUT_STR_DESC_B HBR_enable\t\t\t\t%lu\n", BITS(dword, 28, 27)); - printf("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16)); + printf("AUD_OUT_STR_DESC_B Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16) + 1); printf("AUD_OUT_STR_DESC_B Bits_per_Sample\t\t\t%lu\n", BITS(dword, 6, 4)); printf("AUD_OUT_STR_DESC_B Number_of_Channels_in_a_Stream\t%lu\n", 1 + BITS(dword, 3, 0)); dword = INREG(AUD_OUT_STR_DESC_C); printf("AUD_OUT_STR_DESC_C HBR_enable\t\t\t\t%lu\n", BITS(dword, 28, 27)); - printf("AUD_OUT_STR_DESC_C Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16)); + printf("AUD_OUT_STR_DESC_C Convertor_Channel_Count\t\t%lu\n", BITS(dword, 20, 16) + 1); printf("AUD_OUT_STR_DESC_C Bits_per_Sample\t\t\t%lu\n", BITS(dword, 6, 4)); printf("AUD_OUT_STR_DESC_C Number_of_Channels_in_a_Stream\t%lu\n", 1 + BITS(dword, 3, 0));