android_kernel_xiaomi_sm8350/asoc/sdm660-internal.h
Meng Wang f74efd8eb1 audio-lnx: Add support to build sdm670 machine driver as module
When CONFIG_SND_SOC_EXT_CODEC/CONFIG_SND_SOC_INT_CODEC is set to m not y,
"ifdef CONFIG_SND_SOC_EXT_CODEC/CONFIG_SND_SOC_INT_CODEC"
would be false which would cause init functions as dummy functions.
Change to "if IS_ENABLED" and When CONFIG_SND_SOC_EXT_CODEC/
CONFIG_SND_SOC_INT_CODEC is set to y/m, both would set the
condition to true.
Change Makefile to compile machine driver for internal/external
codec as one module.

Change-Id: Ib72f95a24e8a4e657a1e9efc655f92a397b44d32
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-10-18 10:19:08 +08:00

33 lines
1.0 KiB
C

/* 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
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __SDM660_INTERNAL
#define __SDM660_INTERNAL
#include <sound/soc.h>
#if IS_ENABLED(CONFIG_SND_SOC_INT_CODEC)
int msm_int_cdc_init(struct platform_device *pdev,
struct msm_asoc_mach_data *pdata,
struct snd_soc_card **card,
struct wcd_mbhc_config *mbhc_cfg);
#else
int msm_int_cdc_init(struct platform_device *pdev,
struct msm_asoc_mach_data *pdata,
struct snd_soc_card **card,
struct wcd_mbhc_config *mbhc_cfg)
{
return 0;
}
#endif
#endif