public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Wu Fengguang <fengguang.wu@intel.com>
Subject: [PATCH 04/18] intel_audio_dump: report effective channel count
Date: Sat, 12 Nov 2011 11:12:41 +0800	[thread overview]
Message-ID: <20111112031410.487245772@intel.com> (raw)
In-Reply-To: 20111112031237.321877255@intel.com

[-- Attachment #1: channel-count --]
[-- Type: text/plain, Size: 4094 bytes --]

The raw channel count is not user friendly and may be misleading.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 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));

  parent reply	other threads:[~2011-11-12  3:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-12  3:12 [PATCH 00/18] intel-gpu-tools: intel_audio_dump updates Wu Fengguang
2011-11-12  3:12 ` [PATCH 01/18] intel_audio_dump: cleanup hyphen character Wu Fengguang
2011-11-12  3:12 ` [PATCH 02/18] intel_audio_dump: cleanup ACP DIP name for ironlake and CPT Wu Fengguang
2011-11-12  3:12 ` [PATCH 03/18] intel_audio_dump: cleanup hex output Wu Fengguang
2011-11-12  3:12 ` Wu Fengguang [this message]
2011-11-12  3:12 ` [PATCH 05/18] intel_audio_dump: fix ironlake Stream_ID indents Wu Fengguang
2011-11-12  3:12 ` [PATCH 06/18] intel_audio_dump: fix Digital_Port_D_Detected copy&paste error Wu Fengguang
2011-11-12  3:12 ` [PATCH 07/18] intel_audio_dump: fix Ironlake detection Wu Fengguang
2011-11-12  3:12 ` [PATCH 08/18] intel_audio_dump: fix DP control registers for CPT Wu Fengguang
2011-11-12  3:12 ` [PATCH 09/18] intel_audio_dump: fix DP port width " Wu Fengguang
2011-11-12  3:12 ` [PATCH 10/18] intel_audio_dump: explain Bits_per_Sample Wu Fengguang
2011-11-12  3:12 ` [PATCH 11/18] intel_audio_dump: show DP control registers for Ironlake Wu Fengguang
2011-11-12  3:12 ` [PATCH 12/18] intel_audio_dump: show detected chipset name Wu Fengguang
2011-11-12  3:12 ` [PATCH 13/18] intel_audio_dump: show ELD contents for G45 Wu Fengguang
2011-11-12  3:12 ` [PATCH 14/18] intel_audio_dump: show ironlake ELD_access_address Wu Fengguang
2011-11-12  3:12 ` [PATCH 15/18] intel_audio_dump: show VIDEO_DIP_CTL_* for CPT Wu Fengguang
2011-11-12  3:12 ` [PATCH 16/18] intel_audio_dump: show HDMI encoding Wu Fengguang
2011-11-12  3:12 ` [PATCH 17/18] intel_audio_dump: show interrupt enable bit Wu Fengguang
2011-11-12  3:12 ` [PATCH 18/18] intel_audio_dump: show Gamut Metadata DIP Wu Fengguang
2011-11-12  7:13 ` [PATCH 00/18] intel-gpu-tools: intel_audio_dump updates Paul Menzel
2011-11-12  7:16 ` intel-gpu-tools: Please release new version (was: [PATCH 00/18] intel-gpu-tools: intel_audio_dump updates) Paul Menzel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111112031410.487245772@intel.com \
    --to=fengguang.wu@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox