mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
ASoC: rk817: Move dbg message into CONFIG_SND_DEBUG
$ ./scripts/bloat-o-meter rk817_codec.o.old rk817_codec.o add/remove: 5/9 grow/shrink: 1/13 up/down: 221/-1846 (-1625) Function old new delta __UNIQUE_ID_author400 - 56 +56 __UNIQUE_ID_file401 - 50 +50 __UNIQUE_ID_description399 - 50 +50 __UNIQUE_ID_license402 - 29 +29 rk817_playback_path_put 832 860 +28 __UNIQUE_ID___addressable_rk817_codec_driver_init398 - 8 +8 dbg_enable 4 - -4 __UNIQUE_ID___addressable_rk817_codec_driver_init399 8 - -8 __param_str_dbg_level 24 - -24 __UNIQUE_ID_license403 29 - -29 __UNIQUE_ID_dbg_leveltype397 37 - -37 rk817_remove 260 220 -40 rk817_probe 344 304 -40 __param_dbg_level 40 - -40 rk817_platform_shutdown 104 56 -48 __UNIQUE_ID_file402 50 - -50 __UNIQUE_ID_description400 50 - -50 rk817_set_dai_sysclk 88 32 -56 __UNIQUE_ID_author401 56 - -56 rk817_hw_params 516 456 -60 rk817_set_dai_fmt 184 116 -68 rk817_playback_path_get 108 36 -72 rk817_capture_path_get 108 36 -72 rk817_codec_power_down 516 424 -92 rk817_capture_path_put 632 492 -140 rk817_codec_power_up 756 580 -176 rk817_digital_mute 756 460 -296 rk817_platform_probe 1264 876 -388 Total: Before=9850, After=8225, chg -16.50% Change-Id: I98471c52ea342672e10deb02c4fb38d9fb82f906 Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
This commit is contained in:
@@ -26,15 +26,11 @@
|
||||
#include <sound/soc.h>
|
||||
#include "rk817_codec.h"
|
||||
|
||||
static int dbg_enable;
|
||||
module_param_named(dbg_level, dbg_enable, int, 0644);
|
||||
|
||||
#define DBG(args...) \
|
||||
do { \
|
||||
if (dbg_enable) { \
|
||||
pr_info(args); \
|
||||
} \
|
||||
} while (0)
|
||||
#ifdef CONFIG_SND_DEBUG
|
||||
#define DBG(args...) pr_info(args)
|
||||
#else
|
||||
#define DBG(args...)
|
||||
#endif
|
||||
|
||||
/* For route */
|
||||
#define RK817_CODEC_PLAYBACK 1
|
||||
@@ -862,14 +858,12 @@ static int rk817_hw_params(struct snd_pcm_substream *substream,
|
||||
{
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
|
||||
struct rk817_codec_priv *rk817 = snd_soc_component_get_drvdata(component);
|
||||
unsigned int rate = params_rate(params);
|
||||
unsigned char apll_cfg3_val;
|
||||
unsigned char dtop_digen_sr_lmt0;
|
||||
unsigned char dtop_digen_clke;
|
||||
|
||||
DBG("%s : MCLK = %dHz, sample rate = %dHz\n",
|
||||
__func__, rk817->stereo_sysclk, rate);
|
||||
DBG("%s : sample rate = %dHz\n", __func__, rate);
|
||||
|
||||
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
|
||||
dtop_digen_clke = DAC_DIG_CLK_EN;
|
||||
|
||||
Reference in New Issue
Block a user