From patchwork Tue Apr 12 22:08:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vedang Patel X-Patchwork-Id: 8816861 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 636F3C0553 for ; Tue, 12 Apr 2016 22:09:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 923372037F for ; Tue, 12 Apr 2016 22:09:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 3C82020381 for ; Tue, 12 Apr 2016 22:09:55 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 91BFE26653B; Wed, 13 Apr 2016 00:09:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id B10B9265134; Wed, 13 Apr 2016 00:08:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 26D922650F2; Wed, 13 Apr 2016 00:08:56 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by alsa0.perex.cz (Postfix) with ESMTP id 0D606265134 for ; Wed, 13 Apr 2016 00:08:46 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP; 12 Apr 2016 15:08:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,476,1455004800"; d="scan'208";a="783611066" Received: from vpatel-dev.jf.intel.com ([10.7.198.212]) by orsmga003.jf.intel.com with ESMTP; 12 Apr 2016 15:08:27 -0700 From: vedang.patel@intel.com To: alsa-devel@alsa-project.org Date: Tue, 12 Apr 2016 15:08:22 -0700 Message-Id: <1460498902-30454-4-git-send-email-vedang.patel@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1460498902-30454-1-git-send-email-vedang.patel@intel.com> References: <1460498902-30454-1-git-send-email-vedang.patel@intel.com> Cc: vinod.koul@intel.com, marc.herbert@intel.com, liam.r.girdwood@intel.com, jeeja.kp@intel.com, subhransu.s.prusty@intel.com, Vedang Patel Subject: [alsa-devel] [PATCH 3/3] ASoC: Intel: Skylake: Increase loglevel of debug messages. X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Vedang Patel There is log spam while doing playback, record or reloading the audio firmware. print_hex_dump uses printk(KERN_DEBUG,... which is different from dev_dbg used elsewhere in the driver: it's always enabled at compile-time. Add #ifdef DEBUG condition for logging consistency. For consistency with other log statements, change dev_info to dev_dbg for a kernel print which is frequently printed by the driver. Signed-off-by: Vedang Patel --- sound/soc/intel/skylake/skl-messages.c | 2 ++ sound/soc/intel/skylake/skl-sst-ipc.c | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/skylake/skl-messages.c b/sound/soc/intel/skylake/skl-messages.c index e3d149c..da2dbb2 100644 --- a/sound/soc/intel/skylake/skl-messages.c +++ b/sound/soc/intel/skylake/skl-messages.c @@ -730,8 +730,10 @@ static int skl_set_module_format(struct skl_sst *ctx, dev_dbg(ctx->dev, "Module type=%d config size: %d bytes\n", module_config->id.module_id, param_size); +#ifdef DEBUG print_hex_dump(KERN_DEBUG, "Module params:", DUMP_PREFIX_OFFSET, 8, 4, *param_data, param_size, false); +#endif return 0; } diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c index 5434602..5ee1420 100644 --- a/sound/soc/intel/skylake/skl-sst-ipc.c +++ b/sound/soc/intel/skylake/skl-sst-ipc.c @@ -363,7 +363,7 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc, /* first process the header */ switch (reply) { case IPC_GLB_REPLY_SUCCESS: - dev_info(ipc->dev, "ipc FW reply %x: success\n", header.primary); + dev_dbg(ipc->dev, "ipc FW reply %x: success\n", header.primary); /* copy the rx data from the mailbox */ sst_dsp_inbox_read(ipc->dsp, msg->rx_data, msg->rx_size); break; @@ -688,12 +688,15 @@ int skl_ipc_init_instance(struct sst_generic_ipc *ipc, struct skl_ipc_header header = {0}; u64 *ipc_header = (u64 *)(&header); int ret; - u32 *buffer = (u32 *)param_data; /* param_block_size must be in dwords */ u16 param_block_size = msg->param_data_size / sizeof(u32); +#ifdef DEBUG + u32 *buffer = (u32 *)param_data; + print_hex_dump(KERN_DEBUG, NULL, DUMP_PREFIX_NONE, 16, 4, buffer, param_block_size, false); +#endif header.primary = IPC_MSG_TARGET(IPC_MOD_MSG); header.primary |= IPC_MSG_DIR(IPC_MSG_REQUEST);