From 9b1c6840fa44c1b1a74da3155441aed8eb19cb6f Mon Sep 17 00:00:00 2001 From: Javier Martin Date: Wed, 11 Jan 2012 13:21:05 +0100 Subject: [PATCH] --- yaml --- r: 293191 b: refs/heads/master c: a6b44f1636f244c97eacb43720414ff356e17c6e h: refs/heads/master i: 293189: 764e03fe787c2a825e92c4b45b3f4957e581cb29 293187: b209ae6d34d94a7933ec6e27715bfc7976229d13 293183: 87c198dc719b3c65d13b87fe7cc0dbb3aafd14b1 v: v3 --- [refs] | 2 +- trunk/sound/soc/imx/mx27vis-aic32x4.c | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 17c89d88deea..a3cd601efc9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 44fb864b8f696d3e8328b294e6515ad45aecfeb0 +refs/heads/master: a6b44f1636f244c97eacb43720414ff356e17c6e diff --git a/trunk/sound/soc/imx/mx27vis-aic32x4.c b/trunk/sound/soc/imx/mx27vis-aic32x4.c index 3c2eed9094d5..d37e23cfc94d 100644 --- a/trunk/sound/soc/imx/mx27vis-aic32x4.c +++ b/trunk/sound/soc/imx/mx27vis-aic32x4.c @@ -74,6 +74,24 @@ static struct snd_soc_ops mx27vis_aic32x4_snd_ops = { .hw_params = mx27vis_aic32x4_hw_params, }; +static const struct snd_kcontrol_new mx27vis_aic32x4_controls[] = { + SOC_DAPM_PIN_SWITCH("External Mic"), +}; + +static const struct snd_soc_dapm_widget aic32x4_dapm_widgets[] = { + SND_SOC_DAPM_MIC("External Mic", NULL), +}; + +static const struct snd_soc_dapm_route aic32x4_dapm_routes[] = { + {"Mic Bias", NULL, "External Mic"}, + {"IN1_R", NULL, "Mic Bias"}, + {"IN2_R", NULL, "Mic Bias"}, + {"IN3_R", NULL, "Mic Bias"}, + {"IN1_L", NULL, "Mic Bias"}, + {"IN2_L", NULL, "Mic Bias"}, + {"IN3_L", NULL, "Mic Bias"}, +}; + static struct snd_soc_dai_link mx27vis_aic32x4_dai = { .name = "tlv320aic32x4", .stream_name = "TLV320AIC32X4", @@ -89,6 +107,12 @@ static struct snd_soc_card mx27vis_aic32x4 = { .owner = THIS_MODULE, .dai_link = &mx27vis_aic32x4_dai, .num_links = 1, + .controls = mx27vis_aic32x4_controls, + .num_controls = ARRAY_SIZE(mx27vis_aic32x4_controls), + .dapm_widgets = aic32x4_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(aic32x4_dapm_widgets), + .dapm_routes = aic32x4_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(aic32x4_dapm_routes), }; static struct platform_device *mx27vis_aic32x4_snd_device;