ASoC: msm: refactor machine driver for msmfalcon

Combine the common code of both external and internal
codec machine drivers. Provide config support for
independent compilation of internal and external
codecs.

CRs-Fixed: 1083537
Change-Id: Ia63f8baf02b0ceee0960e208b976d7b573c39d52
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:
Laxminath Kasam 2016-11-02 11:28:18 +05:30
parent adb1d031d0
commit 6b3ed52a63
11 changed files with 7943 additions and 3 deletions

View file

@ -1606,6 +1606,130 @@ Example:
asoc-wsa-codec-prefixes = "SpkrMono";
};
* MSMFALCON ASoC Machine driver
Required properties:
- compatible : "qcom,msmfalcon-asoc-snd"
- qcom,model : The user-visible name of this sound card.
- qcom,msm-hs-micbias-type : This property is used to recognize the headset
micbias type, internal or external.
- qcom,msm-mbhc-hphl-swh: This property is used to distinguish headset HPHL
switch type on target typically the switch type will be normally open or
normally close, value for this property 0 for normally close and 1 for
normally open.
- qcom,msm-mbhc-gnd-swh: This property is used to distinguish headset GND
switch type on target typically the switch type will be normally open or
normally close, value for this property 0 for normally close and 1 for
normally open.
- qcom,audio-routing : A list of the connections between audio components.
- qcom,msm-gpios : Lists down all the gpio sets that are supported.
- qcom,pinctrl-names : Lists all the possible combinations of the gpio sets
mentioned in qcom,msm-gpios.
- pinctrl-names : The combinations of gpio sets from above that are supported in
the flavor.
- pinctrl-# : Pinctrl states as mentioned in pinctrl-names.
Optional properties:
- qcom,cdc-us-euro-gpios : GPIO on which gnd/mic swap signal is coming.
- qcom,msm-micbias1-ext-cap : Boolean. Enable micbias1 external
capacitor mode.
- qcom,msm-micbias2-ext-cap : Boolean. Enable micbias2 external
capacitor mode.
- qcom,msm-spk-ext-pa : GPIO which enables external speaker pa.
- qcom,msm-mclk-freq : This property is used to inform machine driver about
mclk frequency needs to be configured for internal and external PA.
- asoc-platform: This is phandle list containing the references to platform device
nodes that are used as part of the sound card dai-links.
- asoc-platform-names: This property contains list of platform names. The order of
the platform names should match to that of the phandle order
given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
cpu dai names should match to that of the phandle order given.
- asoc-codec: This is phandle list containing the references to codec dai device
nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
codec dai names should match to that of the phandle order given
in "asoc-codec".
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs : List of phandles for all possible WSA881x devices supported for the target
- qcom,wsa-aux-dev-prefix : Name prefix with Left/Right configuration for WSA881x device
Example:
sound {
compatible = "qcom,msmfalcon-asoc-snd";
qcom,model = "msmfalcon-snd-card";
qcom,msm-mclk-freq = <9600000>;
qcom,msm-mbhc-hphl-swh = <0>;
qcom,msm-mbhc-gnd-swh = <0>;
qcom,msm-hs-micbias-type = "internal";
qcom,msm-micbias1-ext-cap;
qcom,audio-routing =
"RX_BIAS", "MCLK",
"SPK_RX_BIAS", "MCLK",
"INT_LDO_H", "MCLK",
"MIC BIAS External", "Handset Mic",
"MIC BIAS Internal2", "Headset Mic",
"MIC BIAS External", "Secondary Mic",
"AMIC1", "MIC BIAS External",
"AMIC2", "MIC BIAS Internal2",
"AMIC3", "MIC BIAS External";
qcom,msm-gpios =
"int_pdm",
"us_eu_gpio";
qcom,pinctrl-names =
"all_off",
"int_pdm_act",
"us_eu_gpio_act",
"int_pdm_us_eu_gpio_act";
pinctrl-names =
"all_off",
"int_pdm_act",
"us_eu_gpio_act",
"int_pdm_us_eu_gpio_act";
pinctrl-0 = <&cdc_pdm_lines_sus &cdc_pdm_lines_2_sus &cross_conn_det_sus>;
pinctrl-1 = <&cdc_pdm_lines_act &cdc_pdm_lines_2_act &cross_conn_det_sus>;
pinctrl-2 = <&cdc_pdm_lines_sus &cdc_pdm_lines_2_sus &cross_conn_det_act>;
pinctrl-3 = <&cdc_pdm_lines_act &cdc_pdm_lines_2_act &cross_conn_det_act>;
qcom,cdc-us-euro-gpios = <&msm_gpio 63 0>;
asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
<&loopback>, <&compress>, <&hostless>,
<&afe>, <&lsm>, <&routing>, <&lpa>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
"msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe",
"msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa";
asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>,
<&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>,
<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
<&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>,
<&bt_sco_rx>, <&bt_sco_tx>, <&int_fm_rx>, <&int_fm_tx>,
<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>, <&afe_proxy_tx>,
<&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>,
<&incall_music_2_rx>;
asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
"msm-dai-q6-dev.12288", "msm-dai-q6-dev.12289",
"msm-dai-q6-dev.12292", "msm-dai-q6-dev.12293",
"msm-dai-q6-dev.224", "msm-dai-q6-dev.225",
"msm-dai-q6-dev.241", "msm-dai-q6-dev.240",
"msm-dai-q6-dev.32771", "msm-dai-q6-dev.32772",
"msm-dai-q6-dev.32773", "msm-dai-q6-dev.32770";
asoc-codec = <&stub_codec>;
asoc-codec-names = "msm-stub-codec.1";
qcom,wsa-max-devs = <2>;
qcom,wsa-devs = <&wsa881x_211>, <&wsa881x_212>,
<&wsa881x_213>, <&wsa881x_214>;
qcom,wsa-aux-dev-prefix = "SpkrRight", "SpkrLeft",
"SpkrRight", "SpkrLeft";
};
* MSM8952 Slimbus ASoC Machine driver
Required properties:
@ -2032,6 +2156,139 @@ Example:
asoc-codec-names = "msm-stub-codec.1";
};
* MSMFALCON ASoC Slimbus Machine driver
Required properties:
- compatible : "qcom,msmfalcon-asoc-snd-tasha" for tasha codec,
"qcom,msmfalcon-asoc-snd-tavil" for tavil codec.
- qcom,model : The user-visible name of this sound card.
- qcom,msm-mclk-freq : MCLK frequency value for external codec
- qcom,msm-gpios : Lists down all the gpio sets that are supported.
- qcom,pinctrl-names : Lists all the possible combinations of the gpio sets
mentioned in qcom,msm-gpios. Say we have 2^N combinations for N GPIOs,
this would list all the 2^N combinations.
- pinctrl-names : The combinations of gpio sets from above that are supported in
the flavor. This can be sometimes same as qcom, pinctrl-names i.e with 2^N
combinations or will have less incase if some combination is not supported.
- pinctrl-# : Pinctrl states as mentioned in pinctrl-names.
- qcom,audio-routing : A list of the connections between audio components.
- asoc-platform: This is phandle list containing the references to platform device
nodes that are used as part of the sound card dai-links.
- asoc-platform-names: This property contains list of platform names. The order of
the platform names should match to that of the phandle order
given in "asoc-platform".
- asoc-cpu: This is phandle list containing the references to cpu dai device nodes
that are used as part of the sound card dai-links.
- asoc-cpu-names: This property contains list of cpu dai names. The order of the
cpu dai names should match to that of the phandle order given
in "asoc-cpu". The cpu names are in the form of "%s.%d" form,
where the id (%d) field represents the back-end AFE port id that
this CPU dai is associated with.
- asoc-codec: This is phandle list containing the references to codec dai device
nodes that are used as part of the sound card dai-links.
- asoc-codec-names: This property contains list of codec dai names. The order of the
codec dai names should match to that of the phandle order given
in "asoc-codec".
Optional properties:
- qcom,cdc-us-euro-gpios : GPIO on which gnd/mic swap signal is coming.
- clock-names : clock name defined for external clock.
- clocks : external clock defined for codec clock.
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs : List of phandles for all possible WSA881x devices supported for the target
- qcom,wsa-aux-dev-prefix : Name prefix with Left/Right configuration for WSA881x device
Example:
sound-9335 {
compatible = "qcom,msmfalcon-asoc-snd-tasha";
qcom,model = "msmfalcon-tasha-snd-card";
qcom,audio-routing =
"RX_BIAS", "MCLK",
"LDO_H", "MCLK",
"AIF4 MAD", "MCLK",
"ultrasound amp", "LINEOUT1",
"ultrasound amp", "LINEOUT3",
"AMIC1", "MIC BIAS1 Internal1",
"MIC BIAS1 Internal1", "Handset Mic",
"AMIC2", "MIC BIAS2 External",
"MIC BIAS2 External", "Headset Mic",
"AMIC3", "MIC BIAS2 External",
"MIC BIAS2 External", "ANCRight Headset Mic",
"AMIC4", "MIC BIAS2 External",
"MIC BIAS2 External", "ANCLeft Headset Mic",
"DMIC1", "MIC BIAS1 External",
"MIC BIAS1 External", "Digital Mic1",
"DMIC2", "MIC BIAS1 External",
"MIC BIAS1 External", "Digital Mic2",
"DMIC3", "MIC BIAS3 External",
"MIC BIAS3 External", "Digital Mic3",
"DMIC4", "MIC BIAS3 External",
"MIC BIAS3 External", "Digital Mic4",
"DMIC5", "MIC BIAS4 External",
"MIC BIAS4 External", "Digital Mic5",
"DMIC6", "MIC BIAS4 External",
"MIC BIAS4 External", "Digital Mic6";
qcom,msm-mbhc-hphl-swh = <0>;
qcom,msm-mbhc-gnd-swh = <0>;
qcom,msm-mclk-freq = <9600000>;
qcom,msm-gpios =
"slim",
"us_eu_gpio";
qcom,pinctrl-names =
"all_off",
"slim_act",
"us_eu_gpio_act",
"slim_us_eu_gpio_act";
pinctrl-names =
"all_off",
"slim_act",
"us_eu_gpio_act",
"slim_us_eu_gpio_act";
pinctrl-0 = <&cdc_slim_lines_sus &cross_conn_det_sus>;
pinctrl-1 = <&cdc_slim_lines_act &cross_conn_det_sus>;
pinctrl-2 = <&cdc_slim_lines_sus &cross_conn_det_act>;
pinctrl-3 = <&cdc_slim_lines_act &cross_conn_det_act>;
qcom,cdc-us-euro-gpios = <&msm_gpio 63 0>;
asoc-platform = <&pcm0>, <&pcm1>, <&pcm2>, <&voip>, <&voice>,
<&loopback>, <&compress>, <&hostless>,
<&afe>, <&lsm>, <&routing>, <&cpe>, <&compr>;
asoc-platform-names = "msm-pcm-dsp.0", "msm-pcm-dsp.1",
"msm-pcm-dsp.2", "msm-voip-dsp",
"msm-pcm-voice", "msm-pcm-loopback",
"msm-compress-dsp", "msm-pcm-hostless",
"msm-pcm-afe", "msm-lsm-client",
"msm-pcm-routing", "msm-cpe-lsm",
"msm-compr-dsp";
asoc-cpu = <&dai_hdmi>,
<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
<&sb_2_rx>, <&sb_2_tx>, <&sb_3_rx>, <&sb_3_tx>,
<&sb_4_rx>, <&sb_4_tx>, <&sb_5_tx>,
<&afe_pcm_rx>, <&afe_pcm_tx>, <&afe_proxy_rx>,
<&afe_proxy_tx>, <&incall_record_rx>,
<&incall_record_tx>, <&incall_music_rx>,
<&incall_music_2_rx>, <&sb_5_rx>;
asoc-cpu-names = "msm-dai-q6-hdmi.8",
"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
"msm-dai-q6-dev.16386", "msm-dai-q6-dev.16387",
"msm-dai-q6-dev.16388", "msm-dai-q6-dev.16389",
"msm-dai-q6-dev.16390", "msm-dai-q6-dev.16391",
"msm-dai-q6-dev.16392", "msm-dai-q6-dev.16393",
"msm-dai-q6-dev.16395", "msm-dai-q6-dev.224",
"msm-dai-q6-dev.225", "msm-dai-q6-dev.241",
"msm-dai-q6-dev.240", "msm-dai-q6-dev.32771",
"msm-dai-q6-dev.32772", "msm-dai-q6-dev.32773",
"msm-dai-q6-dev.32770", "msm-dai-q6-dev.16394";
asoc-codec = <&stub_codec>;
asoc-codec-names = "msm-stub-codec.1";
qcom,wsa-max-devs = <2>;
qcom,wsa-devs = <&wsa881x_211>, <&wsa881x_212>,
<&wsa881x_213>, <&wsa881x_214>;
qcom,wsa-aux-dev-prefix = "SpkrRight", "SpkrLeft",
"SpkrRight", "SpkrLeft";
};
* MSMCOBALT ASoC Machine driver
Required properties:

View file

@ -98,6 +98,70 @@ config SND_SOC_CPE
The configuration includes the cpe lsm driver to enable
listen on codec.
config SND_SOC_INT_CODEC
tristate "SoC Machine driver for MSMFALCON_INT"
depends on ARCH_QCOM
select SND_SOC_QDSP6V2
select SND_SOC_MSM_STUB
select SND_SOC_MSM_HOSTLESS_PCM
select SND_DYNAMIC_MINORS
select MSM_QDSP6_APRV2_GLINK
select MSM_QDSP6_SSR
select MSM_QDSP6_PDR
select MSM_QDSP6_NOTIFIER
select MSM_QDSP6V2_CODECS
select SND_SOC_MSM_SWR
select SND_SOC_MSM8X16_WCD
select QTI_PP
select DTS_SRS_TM
select DOLBY_DAP
select DOLBY_DS2
select SND_HWDEP
select MSM_ULTRASOUND
select DTS_EAGLE
select SND_SOC_MSMFALCON_COMMON
select SND_SOC_COMPRESS
help
To add support for SoC audio on MSM_INT.
This will enable sound soc drivers which
interfaces with DSP, also it will enable
the machine driver and the corresponding
DAI-links
config SND_SOC_EXT_CODEC
tristate "SoC Machine driver for MSMFALCON_EXT"
depends on ARCH_QCOM
select SND_SOC_QDSP6V2
select SND_SOC_MSM_STUB
select SND_SOC_MSM_HOSTLESS_PCM
select SND_DYNAMIC_MINORS
select MSM_QDSP6_APRV2_GLINK
select MSM_QDSP6_SSR
select MSM_QDSP6_PDR
select MSM_QDSP6_NOTIFIER
select MSM_QDSP6V2_CODECS
select SND_SOC_WCD9335
select SND_SOC_WCD934X
select SND_SOC_WSA881X
select MFD_CORE
select QTI_PP
select DTS_SRS_TM
select DOLBY_DAP
select DOLBY_DS2
select SND_SOC_CPE
select SND_SOC_WCD_CPE
select SND_HWDEP
select MSM_ULTRASOUND
select DTS_EAGLE
select SND_SOC_MSMFALCON_COMMON
select SND_SOC_COMPRESS
help
To add support for SoC audio on MSM_EXT.
This will enable sound soc drivers which
interfaces with DSP, also it will enable
the machine driver and the corresponding
DAI-links
config SND_SOC_MSM8996
tristate "SoC Machine driver for MSM8996 boards"
depends on ARCH_MSM8996
@ -157,4 +221,16 @@ config SND_SOC_MSMCOBALT
the machine driver and the corresponding
DAI-links
config SND_SOC_FALCON
tristate "SoC Machine driver for MSMFALCON boards"
depends on ARCH_MSMFALCON
select SND_SOC_INT_CODEC
select SND_SOC_EXT_CODEC
help
To add support for SoC audio on MSMFALCON.
This will enable sound soc drivers which
interfaces with DSP, also it will enable
the machine driver and the corresponding
DAI-links
endmenu

View file

@ -19,3 +19,18 @@ obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-msm8996.o
# for MSMCOBALT sound card driver
snd-soc-msmcobalt-objs := msmcobalt.o
obj-$(CONFIG_SND_SOC_MSMCOBALT) += snd-soc-msmcobalt.o
# for MSMFALCON sound card driver
snd-soc-msmfalcon-common-objs := msm-audio-pinctrl.o msmfalcon-common.o
obj-$(CONFIG_SND_SOC_MSMFALCON_COMMON) += snd-soc-msmfalcon-common.o
# for MSMFALCON sound card driver
snd-soc-int-codec-objs := msmfalcon-internal.o
obj-$(CONFIG_SND_SOC_INT_CODEC) += snd-soc-msmfalcon-common.o
obj-$(CONFIG_SND_SOC_INT_CODEC) += snd-soc-int-codec.o
# for MSMFALCON sound card driver
snd-soc-ext-codec-objs := msmfalcon-external.o msmfalcon-ext-dai-links.o
obj-$(CONFIG_SND_SOC_EXT_CODEC) += snd-soc-msmfalcon-common.o
obj-$(CONFIG_SND_SOC_EXT_CODEC) += snd-soc-ext-codec.o

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2015-2016, 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
@ -14,8 +14,7 @@
#define __MSM_AUDIO_PINCTRL_H
enum pinctrl_client {
CLIENT_WCD_INT,
CLIENT_WCD_EXT,
CLIENT_WCD,
CLIENT_WSA_BONGO_1,
CLIENT_WSA_BONGO_2,
MAX_PINCTRL_CLIENT,

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,69 @@
/* Copyright (c) 2015-2016, 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 __MSM_COMMON
#define __MSM_COMMON
#include <sound/soc.h>
#include <sound/q6afe-v2.h>
#include "../codecs/wcd-mbhc-v2.h"
#define SAMPLING_RATE_8KHZ 8000
#define SAMPLING_RATE_11P025KHZ 11025
#define SAMPLING_RATE_16KHZ 16000
#define SAMPLING_RATE_22P05KHZ 22050
#define SAMPLING_RATE_32KHZ 32000
#define SAMPLING_RATE_44P1KHZ 44100
#define SAMPLING_RATE_48KHZ 48000
#define SAMPLING_RATE_88P2KHZ 88200
#define SAMPLING_RATE_96KHZ 96000
#define SAMPLING_RATE_176P4KHZ 176400
#define SAMPLING_RATE_192KHZ 192000
#define SAMPLING_RATE_352P8KHZ 352800
#define SAMPLING_RATE_384KHZ 384000
extern const struct snd_kcontrol_new msm_common_snd_controls[];
struct msmfalcon_codec {
void* (*get_afe_config_fn)(struct snd_soc_codec *codec,
enum afe_config_type config_type);
};
struct msm_asoc_mach_data {
int us_euro_gpio; /* used by gpio driver API */
int hph_en1_gpio;
int hph_en0_gpio;
struct device_node *us_euro_gpio_p; /* used by pinctrl API */
struct device_node *hph_en1_gpio_p; /* used by pinctrl API */
struct device_node *hph_en0_gpio_p; /* used by pinctrl API */
struct snd_soc_codec *codec;
struct msmfalcon_codec msmfalcon_codec_fn;
struct snd_info_entry *codec_root;
int spk_ext_pa_gpio;
int mclk_freq;
int lb_mode;
u8 micbias1_cap_mode;
u8 micbias2_cap_mode;
atomic_t int_mclk0_rsc_ref;
atomic_t int_mclk0_enabled;
struct mutex cdc_int_mclk0_mutex;
struct delayed_work disable_int_mclk0_work;
struct afe_clk_set digital_cdc_core_clk;
bool int_codec;
};
int msm_common_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
int msm_aux_pcm_snd_startup(struct snd_pcm_substream *substream);
void msm_aux_pcm_snd_shutdown(struct snd_pcm_substream *substream);
int msm_mi2s_snd_startup(struct snd_pcm_substream *substream);
void msm_mi2s_snd_shutdown(struct snd_pcm_substream *substream);
#endif

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,44 @@
/* Copyright (c) 2015-2016, 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 __MSMFALCON_EXTERNAL
#define __MSMFALCON_EXTERNAL
int msm_snd_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
int msm_ext_slimbus_2_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
int msm_btsco_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
int msm_proxy_rx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
int msm_proxy_tx_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
int msm_audrx_init(struct snd_soc_pcm_runtime *rtd);
int msm_snd_cpe_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params);
struct snd_soc_card *populate_snd_card_dailinks(struct device *dev);
int msm_ext_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
#ifdef CONFIG_SND_SOC_EXT_CODEC
int msm_ext_cdc_init(struct platform_device *, struct msm_asoc_mach_data *,
struct snd_soc_card **, struct wcd_mbhc_config *);
#else
inline int msm_ext_cdc_init(struct platform_device *pdev,
struct msm_asoc_mach_data *pdata,
struct snd_soc_card **card,
struct wcd_mbhc_config *wcd_mbhc_cfg_ptr1)
{
return 0;
}
#endif
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
/* Copyright (c) 2016, 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 __MSMFALCON_INTERNAL
#define __MSMFALCON_INTERNAL
#include <sound/soc.h>
#ifdef 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