OSDN Git Service

Bluetooth: Enhance logging in btfm slim & audio codec drivers
authorRupesh Tatiya <rtatiya@codeaurora.org>
Fri, 17 Feb 2017 07:28:01 +0000 (12:58 +0530)
committerGerrit - the friendly Code Review server <code-review@localhost>
Mon, 20 Feb 2017 08:42:10 +0000 (00:42 -0800)
Add dai name & slim port numbers for better logs for debugging. Remove
function name from pr_debug as it can be enabled by dynamic debugging.

Change-Id: If9c300e1fe22680e98dd29aadfd2bf3b8c2b5624
Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
drivers/bluetooth/btfm_slim.c
drivers/bluetooth/btfm_slim.h
drivers/bluetooth/btfm_slim_codec.c
drivers/bluetooth/btfm_slim_wcn3990.c

index 37cc628..969f755 100644 (file)
@@ -127,7 +127,7 @@ int btfm_slim_enable_ch(struct btfmslim *btfmslim, struct btfmslim_ch *ch,
        if (!btfmslim || !ch)
                return -EINVAL;
 
-       BTFMSLIM_DBG("port:%d", ch->port);
+       BTFMSLIM_DBG("port: %d ch: %d", ch->port, ch->ch);
 
        /* Define the channel with below parameters */
        prop.prot = SLIM_AUTO_ISO;
index dbb4c56..5d105fb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -13,7 +13,7 @@
 #define BTFM_SLIM_H
 #include <linux/slimbus/slimbus.h>
 
-#define BTFMSLIM_DBG(fmt, arg...)  pr_debug("%s: " fmt "\n", __func__, ## arg)
+#define BTFMSLIM_DBG(fmt, arg...)  pr_debug(fmt "\n", ## arg)
 #define BTFMSLIM_INFO(fmt, arg...) pr_info("%s: " fmt "\n", __func__, ## arg)
 #define BTFMSLIM_ERR(fmt, arg...)  pr_err("%s: " fmt "\n", __func__, ## arg)
 
index d7d24ff..354b48b 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -54,8 +54,8 @@ static int btfm_slim_dai_startup(struct snd_pcm_substream *substream,
        int ret;
        struct btfmslim *btfmslim = dai->dev->platform_data;
 
-       BTFMSLIM_DBG("substream = %s  stream = %d",
-                substream->name, substream->stream);
+       BTFMSLIM_DBG("substream = %s  stream = %d dai name = %s",
+                substream->name, substream->stream, dai->name);
        ret = btfm_slim_hw_init(btfmslim);
        return ret;
 }
@@ -65,8 +65,8 @@ static void btfm_slim_dai_shutdown(struct snd_pcm_substream *substream,
 {
        struct btfmslim *btfmslim = dai->dev->platform_data;
 
-       BTFMSLIM_DBG("substream = %s  stream = %d",
-                substream->name, substream->stream);
+       BTFMSLIM_DBG("substream = %s  stream = %d dai name = %s",
+                substream->name, substream->stream, dai->name);
        btfm_slim_hw_deinit(btfmslim);
 }
 
@@ -74,7 +74,7 @@ static int btfm_slim_dai_hw_params(struct snd_pcm_substream *substream,
                            struct snd_pcm_hw_params *params,
                            struct snd_soc_dai *dai)
 {
-       BTFMSLIM_DBG("dai_name = %s DAI-ID %x rate %d num_ch %d",
+       BTFMSLIM_DBG("dai name = %s DAI-ID %x rate %d num_ch %d",
                dai->name, dai->id, params_rate(params),
                params_channels(params));
 
@@ -89,7 +89,7 @@ int btfm_slim_dai_prepare(struct snd_pcm_substream *substream,
        struct btfmslim_ch *ch;
        uint8_t rxport, grp = false, nchan = 1;
 
-       BTFMSLIM_DBG("dai->name:%s, dai->id: %d, dai->rate: %d", dai->name,
+       BTFMSLIM_DBG("dai name: %s, dai->id: %d, dai->rate: %d", dai->name,
                dai->id, dai->rate);
 
        switch (dai->id) {
@@ -137,7 +137,7 @@ int btfm_slim_dai_hw_free(struct snd_pcm_substream *substream,
        struct btfmslim_ch *ch;
        uint8_t rxport, grp = false, nchan = 1;
 
-       BTFMSLIM_DBG("dai->name:%s, dai->id: %d, dai->rate: %d", dai->name,
+       BTFMSLIM_DBG("dai name: %s, dai->id: %d, dai->rate: %d", dai->name,
                dai->id, dai->rate);
 
        switch (dai->id) {
@@ -384,7 +384,7 @@ static struct snd_soc_dai_driver btfmslim_dai[] = {
 static struct snd_soc_codec_driver btfmslim_codec = {
        .probe  = btfm_slim_codec_probe,
        .remove = btfm_slim_codec_remove,
-       .read           = btfm_slim_codec_read,
+       .read   = btfm_slim_codec_read,
        .write  = btfm_slim_codec_write,
 };
 
index 7d7bd24..72e28da 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2016, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 and
@@ -76,7 +76,7 @@ int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num,
        uint8_t reg_val = 0;
        uint16_t reg;
 
-       BTFMSLIM_DBG("enable(%d)", enable);
+       BTFMSLIM_DBG("port(%d) enable(%d)", port_num, enable);
        if (rxport) {
                /* Port enable */
                reg = CHRK_SB_PGD_PORT_RX_CFGN(port_num - 0x10);