diff --git a/sound/soc/samsung/Kconfig b/sound/soc/samsung/Kconfig index efc550105..3a6a210e6 100755 --- a/sound/soc/samsung/Kconfig +++ b/sound/soc/samsung/Kconfig @@ -341,6 +341,11 @@ config SND_SOC_SAMSUNG_AUDIO help Say Y here to enable audio support for the Samsung Audio. +config SND_SOC_SAMSUNG_DEBUG + tristate "ABOX debugging support" + help + Say Y here to enable debugging support for the Samsung ABOX audio subsystem. + source "sound/soc/samsung/abox/Kconfig" source "sound/soc/samsung/vts/Kconfig" source "sound/soc/samsung/slif/Kconfig" diff --git a/sound/soc/samsung/Makefile b/sound/soc/samsung/Makefile index 2171a3625..b008a8fa2 100755 --- a/sound/soc/samsung/Makefile +++ b/sound/soc/samsung/Makefile @@ -80,4 +80,5 @@ obj-$(CONFIG_SND_SOC_SAMSUNG_EXYNOS8825_RT5665) += exynos8825_rt5665.o obj-$(CONFIG_SND_SOC_SAMSUNG_EXYNOS8825_RT5665_DBMDX) += exynos8825_rt5665.o obj-$(CONFIG_SND_SOC_SAMSUNG_EXYNOS8825_RT5691) += exynos8825_rt5691.o obj-$(CONFIG_SND_SOC_SAMSUNG_RAINBOW_PRINCE) += rainbow_prince.o -obj-$(CONFIG_SND_SOC_SAMSUNG_AUDIO) += sec_audio_sysfs.o sec_audio_debug.o +obj-$(CONFIG_SND_SOC_SAMSUNG_DEBUG) += sec_audio_debug.o +obj-$(CONFIG_SND_SOC_SAMSUNG_AUDIO) += sec_audio_sysfs.o diff --git a/sound/soc/samsung/abox/abox.c b/sound/soc/samsung/abox/abox.c index 9629465da..711c614b5 100755 --- a/sound/soc/samsung/abox/abox.c +++ b/sound/soc/samsung/abox/abox.c @@ -2397,7 +2397,7 @@ static void abox_system_ipc_handler(struct device *dev, type); break; } -#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_AUDIO) +#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_DEBUG) abox_debug_string_update(system_msg->param1, system_msg->param2, system_msg->param3, system_msg->bundle.param_s32[1], data->audio_mode, data->audio_mode_time); @@ -3663,7 +3663,7 @@ int abox_notify_modem_event(enum abox_modem_event event) if (system_msg->msgtype) abox_request_ipc(dev, msg.ipcid, &msg, sizeof(msg), 1, 0); -#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_AUDIO) +#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_DEBUG) set_modem_event(event); if (event == ABOX_MODEM_EVENT_EXIT) abox_debug_string_update(TYPE_ABOX_VSSERROR, 0, 0, 0, diff --git a/sound/soc/samsung/abox/abox_log.c b/sound/soc/samsung/abox/abox_log.c index 3c016dbec..cb7183cf0 100755 --- a/sound/soc/samsung/abox/abox_log.c +++ b/sound/soc/samsung/abox/abox_log.c @@ -113,7 +113,7 @@ static void abox_log_flush(struct device *dev, mutex_lock(&info->lock); -#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_AUDIO) +#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_DEBUG) if (info->id == 0) abox_log_extra_copy(log_buffer->buffer, log_buffer->index_reader, index_writer, log_buffer->size); diff --git a/sound/soc/samsung/abox/abox_oem.c b/sound/soc/samsung/abox/abox_oem.c index 27e18cfaf..e583db4ce 100755 --- a/sound/soc/samsung/abox/abox_oem.c +++ b/sound/soc/samsung/abox/abox_oem.c @@ -20,7 +20,7 @@ static ssize_t abox_oem_resize_reserved_memory_dbg(void) { ssize_t size = -ENODEV; -#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_ABOX_CHANGE_RMEM_SIZE) +#if (IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_ABOX_CHANGE_RMEM_SIZE) && IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_DEBUG)) if (check_upload_mode_disabled()) size = get_rmem_size_min(TYPE_ABOX_DBG_SIZE); #endif @@ -32,7 +32,7 @@ static ssize_t abox_oem_resize_reserved_memory_slog(void) { ssize_t size = -ENODEV; -#if IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_ABOX_CHANGE_RMEM_SIZE) +#if (IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_ABOX_CHANGE_RMEM_SIZE) && IS_ENABLED(CONFIG_SND_SOC_SAMSUNG_DEBUG)) if (check_debug_level_low()) size = get_rmem_size_min(TYPE_ABOX_SLOG_SIZE); #if IS_ENABLED(CONFIG_SAMSUNG_PRODUCT_SHIP)