From patchwork Thu Mar 13 20:38:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lin, Mengdong" X-Patchwork-Id: 3822261 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D3670BF540 for ; Thu, 13 Mar 2014 07:36:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E9D8220270 for ; Thu, 13 Mar 2014 07:36:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id E9D5B2021F for ; Thu, 13 Mar 2014 07:36:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3227FADD5; Thu, 13 Mar 2014 00:36:17 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 25235FADD5 for ; Thu, 13 Mar 2014 00:36:16 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 13 Mar 2014 00:36:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,645,1389772800"; d="scan'208";a="471456685" Received: from amanda-hsw-pc.sh.intel.com ([10.239.37.140]) by orsmga001.jf.intel.com with ESMTP; 13 Mar 2014 00:36:14 -0700 From: mengdong.lin@intel.com To: intel-gfx@lists.freedesktop.org Date: Thu, 13 Mar 2014 16:38:02 -0400 Message-Id: <1212523efe55f7fae8bf968587837e9f392fe985.1394663349.git.mengdong.lin@intel.com> X-Mailer: git-send-email 1.8.1.2 Subject: [Intel-gfx] [PATCH] intel_audio_dump: fix CTS/M value index X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_12_24, RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Mengdong Lin This patch fixes the reversed CTS/M value index when dumping the 'audio M/CTS programing enable' register. Signed-off-by: Mengdong Lin Reviewed-by: Haihao Xiang diff --git a/tools/intel_audio_dump.c b/tools/intel_audio_dump.c index 46eebdb..3ed2918 100644 --- a/tools/intel_audio_dump.c +++ b/tools/intel_audio_dump.c @@ -97,6 +97,11 @@ static int get_num_pipes(void) return num_pipes; } +static const char * const cts_m_value_index[] = { + [0] = "CTS", + [1] = "M", +}; + static const char * const pixel_clock[] = { [0] = "25.2 / 1.001 MHz", [1] = "25.2 MHz", @@ -1408,7 +1413,8 @@ static void dump_aud_m_cts_enable(int index) printf("%s CTS_programming\t\t\t%#lx\n", prefix, BITS(dword, 19, 0)); printf("%s Enable_CTS_or_M_programming\t%lu\n", prefix, BIT(dword, 20)); - printf("%s CTS_M value Index\t\t\t%s\n", prefix, BIT(dword, 21) ? "CTS" : "M"); + printf("%s CTS_M value Index\t\t\t[0x%lx] %s\n",prefix, BIT(dword, 21), + OPNAME(cts_m_value_index, BIT(dword, 21))); } static void dump_aud_power_state(void)