diff options
author | Paul Bolle <pebolle@tiscali.nl> | 2013-05-14 11:07:21 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-15 00:59:29 -0400 |
commit | 7ae6871fe51e337caa88025ac2dc0c586c4d4a09 (patch) | |
tree | 82e0c98ee649dbdeabd058845ce8d1c422cb8482 | |
parent | 5d9ff402152fe9421c5ed86b4f651a8c62de7c7a (diff) |
ASoC: remove saarb and tavorevb3 machine drivers
Support for PXA95x was removed in v3.8. This means that the Kconfig
symbols MACH_SAARB and MACH_TAVOREVB3 are no longer available. This
leaves the SoC Audio support for Marvell Saarb and Marvell Tavor EVB3
unbuildable. Remove these drivers too.
Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/pxa/Kconfig | 20 | ||||
-rw-r--r-- | sound/soc/pxa/Makefile | 4 | ||||
-rw-r--r-- | sound/soc/pxa/saarb.c | 190 | ||||
-rw-r--r-- | sound/soc/pxa/tavorevb3.c | 189 |
4 files changed, 0 insertions, 403 deletions
diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig index 4d2e46fae77c..b35809467547 100644 --- a/sound/soc/pxa/Kconfig +++ b/sound/soc/pxa/Kconfig | |||
@@ -130,26 +130,6 @@ config SND_PXA2XX_SOC_PALM27X | |||
130 | Say Y if you want to add support for SoC audio on | 130 | Say Y if you want to add support for SoC audio on |
131 | Palm T|X, T5, E2 or LifeDrive handheld computer. | 131 | Palm T|X, T5, E2 or LifeDrive handheld computer. |
132 | 132 | ||
133 | config SND_SOC_SAARB | ||
134 | tristate "SoC Audio support for Marvell Saarb" | ||
135 | depends on SND_PXA2XX_SOC && MACH_SAARB | ||
136 | select MFD_88PM860X | ||
137 | select SND_PXA_SOC_SSP | ||
138 | select SND_SOC_88PM860X | ||
139 | help | ||
140 | Say Y if you want to add support for SoC audio on the | ||
141 | Marvell Saarb reference platform. | ||
142 | |||
143 | config SND_SOC_TAVOREVB3 | ||
144 | tristate "SoC Audio support for Marvell Tavor EVB3" | ||
145 | depends on SND_PXA2XX_SOC && MACH_TAVOREVB3 | ||
146 | select MFD_88PM860X | ||
147 | select SND_PXA_SOC_SSP | ||
148 | select SND_SOC_88PM860X | ||
149 | help | ||
150 | Say Y if you want to add support for SoC audio on the | ||
151 | Marvell Saarb reference platform. | ||
152 | |||
153 | config SND_PXA910_SOC | 133 | config SND_PXA910_SOC |
154 | tristate "SoC Audio for Marvell PXA910 chip" | 134 | tristate "SoC Audio for Marvell PXA910 chip" |
155 | depends on ARCH_MMP && SND | 135 | depends on ARCH_MMP && SND |
diff --git a/sound/soc/pxa/Makefile b/sound/soc/pxa/Makefile index d8a265d2d5d7..2cff67b61dc3 100644 --- a/sound/soc/pxa/Makefile +++ b/sound/soc/pxa/Makefile | |||
@@ -23,8 +23,6 @@ snd-soc-e800-objs := e800_wm9712.o | |||
23 | snd-soc-spitz-objs := spitz.o | 23 | snd-soc-spitz-objs := spitz.o |
24 | snd-soc-em-x270-objs := em-x270.o | 24 | snd-soc-em-x270-objs := em-x270.o |
25 | snd-soc-palm27x-objs := palm27x.o | 25 | snd-soc-palm27x-objs := palm27x.o |
26 | snd-soc-saarb-objs := saarb.o | ||
27 | snd-soc-tavorevb3-objs := tavorevb3.o | ||
28 | snd-soc-zylonite-objs := zylonite.o | 26 | snd-soc-zylonite-objs := zylonite.o |
29 | snd-soc-hx4700-objs := hx4700.o | 27 | snd-soc-hx4700-objs := hx4700.o |
30 | snd-soc-magician-objs := magician.o | 28 | snd-soc-magician-objs := magician.o |
@@ -48,8 +46,6 @@ obj-$(CONFIG_SND_PXA2XX_SOC_HX4700) += snd-soc-hx4700.o | |||
48 | obj-$(CONFIG_SND_PXA2XX_SOC_MAGICIAN) += snd-soc-magician.o | 46 | obj-$(CONFIG_SND_PXA2XX_SOC_MAGICIAN) += snd-soc-magician.o |
49 | obj-$(CONFIG_SND_PXA2XX_SOC_MIOA701) += snd-soc-mioa701.o | 47 | obj-$(CONFIG_SND_PXA2XX_SOC_MIOA701) += snd-soc-mioa701.o |
50 | obj-$(CONFIG_SND_PXA2XX_SOC_Z2) += snd-soc-z2.o | 48 | obj-$(CONFIG_SND_PXA2XX_SOC_Z2) += snd-soc-z2.o |
51 | obj-$(CONFIG_SND_SOC_SAARB) += snd-soc-saarb.o | ||
52 | obj-$(CONFIG_SND_SOC_TAVOREVB3) += snd-soc-tavorevb3.o | ||
53 | obj-$(CONFIG_SND_SOC_ZYLONITE) += snd-soc-zylonite.o | 49 | obj-$(CONFIG_SND_SOC_ZYLONITE) += snd-soc-zylonite.o |
54 | obj-$(CONFIG_SND_PXA2XX_SOC_IMOTE2) += snd-soc-imote2.o | 50 | obj-$(CONFIG_SND_PXA2XX_SOC_IMOTE2) += snd-soc-imote2.o |
55 | obj-$(CONFIG_SND_SOC_RAUMFELD) += snd-soc-raumfeld.o | 51 | obj-$(CONFIG_SND_SOC_RAUMFELD) += snd-soc-raumfeld.o |
diff --git a/sound/soc/pxa/saarb.c b/sound/soc/pxa/saarb.c deleted file mode 100644 index c34146b776b4..000000000000 --- a/sound/soc/pxa/saarb.c +++ /dev/null | |||
@@ -1,190 +0,0 @@ | |||
1 | /* | ||
2 | * saarb.c -- SoC audio for saarb | ||
3 | * | ||
4 | * Copyright (C) 2010 Marvell International Ltd. | ||
5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <sound/core.h> | ||
18 | #include <sound/pcm.h> | ||
19 | #include <sound/pcm_params.h> | ||
20 | #include <sound/soc.h> | ||
21 | #include <sound/jack.h> | ||
22 | |||
23 | #include <asm/mach-types.h> | ||
24 | |||
25 | #include "../codecs/88pm860x-codec.h" | ||
26 | #include "pxa-ssp.h" | ||
27 | |||
28 | static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd); | ||
29 | |||
30 | static struct platform_device *saarb_snd_device; | ||
31 | |||
32 | static struct snd_soc_jack hs_jack, mic_jack; | ||
33 | |||
34 | static struct snd_soc_jack_pin hs_jack_pins[] = { | ||
35 | { .pin = "Headset Stereophone", .mask = SND_JACK_HEADPHONE, }, | ||
36 | }; | ||
37 | |||
38 | static struct snd_soc_jack_pin mic_jack_pins[] = { | ||
39 | { .pin = "Headset Mic 2", .mask = SND_JACK_MICROPHONE, }, | ||
40 | }; | ||
41 | |||
42 | /* saarb machine dapm widgets */ | ||
43 | static const struct snd_soc_dapm_widget saarb_dapm_widgets[] = { | ||
44 | SND_SOC_DAPM_HP("Headphone Stereophone", NULL), | ||
45 | SND_SOC_DAPM_LINE("Lineout Out 1", NULL), | ||
46 | SND_SOC_DAPM_LINE("Lineout Out 2", NULL), | ||
47 | SND_SOC_DAPM_SPK("Ext Speaker", NULL), | ||
48 | SND_SOC_DAPM_MIC("Ext Mic 1", NULL), | ||
49 | SND_SOC_DAPM_MIC("Headset Mic", NULL), | ||
50 | SND_SOC_DAPM_MIC("Ext Mic 3", NULL), | ||
51 | }; | ||
52 | |||
53 | /* saarb machine audio map */ | ||
54 | static const struct snd_soc_dapm_route saarb_audio_map[] = { | ||
55 | {"Headset Stereophone", NULL, "HS1"}, | ||
56 | {"Headset Stereophone", NULL, "HS2"}, | ||
57 | |||
58 | {"Ext Speaker", NULL, "LSP"}, | ||
59 | {"Ext Speaker", NULL, "LSN"}, | ||
60 | |||
61 | {"Lineout Out 1", NULL, "LINEOUT1"}, | ||
62 | {"Lineout Out 2", NULL, "LINEOUT2"}, | ||
63 | |||
64 | {"MIC1P", NULL, "Mic1 Bias"}, | ||
65 | {"MIC1N", NULL, "Mic1 Bias"}, | ||
66 | {"Mic1 Bias", NULL, "Ext Mic 1"}, | ||
67 | |||
68 | {"MIC2P", NULL, "Mic1 Bias"}, | ||
69 | {"MIC2N", NULL, "Mic1 Bias"}, | ||
70 | {"Mic1 Bias", NULL, "Headset Mic 2"}, | ||
71 | |||
72 | {"MIC3P", NULL, "Mic3 Bias"}, | ||
73 | {"MIC3N", NULL, "Mic3 Bias"}, | ||
74 | {"Mic3 Bias", NULL, "Ext Mic 3"}, | ||
75 | }; | ||
76 | |||
77 | static int saarb_i2s_hw_params(struct snd_pcm_substream *substream, | ||
78 | struct snd_pcm_hw_params *params) | ||
79 | { | ||
80 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
81 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
82 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
83 | int width = snd_pcm_format_physical_width(params_format(params)); | ||
84 | int ret; | ||
85 | |||
86 | ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_NET_PLL, 0, | ||
87 | PM860X_CLK_DIR_OUT); | ||
88 | if (ret < 0) | ||
89 | return ret; | ||
90 | |||
91 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 0, PM860X_CLK_DIR_OUT); | ||
92 | if (ret < 0) | ||
93 | return ret; | ||
94 | |||
95 | ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width); | ||
96 | |||
97 | return ret; | ||
98 | } | ||
99 | |||
100 | static struct snd_soc_ops saarb_i2s_ops = { | ||
101 | .hw_params = saarb_i2s_hw_params, | ||
102 | }; | ||
103 | |||
104 | static struct snd_soc_dai_link saarb_dai[] = { | ||
105 | { | ||
106 | .name = "88PM860x I2S", | ||
107 | .stream_name = "I2S Audio", | ||
108 | .cpu_dai_name = "pxa-ssp-dai.1", | ||
109 | .codec_dai_name = "88pm860x-i2s", | ||
110 | .platform_name = "pxa-pcm-audio", | ||
111 | .codec_name = "88pm860x-codec", | ||
112 | .init = saarb_pm860x_init, | ||
113 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
114 | SND_SOC_DAIFMT_CBM_CFM, | ||
115 | .ops = &saarb_i2s_ops, | ||
116 | }, | ||
117 | }; | ||
118 | |||
119 | static struct snd_soc_card snd_soc_card_saarb = { | ||
120 | .name = "Saarb", | ||
121 | .owner = THIS_MODULE, | ||
122 | .dai_link = saarb_dai, | ||
123 | .num_links = ARRAY_SIZE(saarb_dai), | ||
124 | |||
125 | .dapm_widgets = saarb_dapm_widgets, | ||
126 | .num_dapm_widgets = ARRAY_SIZE(saarb_dapm_widgets), | ||
127 | .dapm_routes = saarb_audio_map, | ||
128 | .num_dapm_routes = ARRAY_SIZE(saarb_audio_map), | ||
129 | }; | ||
130 | |||
131 | static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd) | ||
132 | { | ||
133 | struct snd_soc_codec *codec = rtd->codec; | ||
134 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
135 | |||
136 | /* connected pins */ | ||
137 | snd_soc_dapm_enable_pin(dapm, "Ext Speaker"); | ||
138 | snd_soc_dapm_enable_pin(dapm, "Ext Mic 1"); | ||
139 | snd_soc_dapm_enable_pin(dapm, "Ext Mic 3"); | ||
140 | snd_soc_dapm_disable_pin(dapm, "Headset Mic 2"); | ||
141 | snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); | ||
142 | |||
143 | /* Headset jack detection */ | ||
144 | snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE | ||
145 | | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2, | ||
146 | &hs_jack); | ||
147 | snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins), | ||
148 | hs_jack_pins); | ||
149 | snd_soc_jack_new(codec, "Microphone Jack", SND_JACK_MICROPHONE, | ||
150 | &mic_jack); | ||
151 | snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins), | ||
152 | mic_jack_pins); | ||
153 | |||
154 | /* headphone, microphone detection & headset short detection */ | ||
155 | pm860x_hs_jack_detect(codec, &hs_jack, SND_JACK_HEADPHONE, | ||
156 | SND_JACK_BTN_0, SND_JACK_BTN_1, SND_JACK_BTN_2); | ||
157 | pm860x_mic_jack_detect(codec, &hs_jack, SND_JACK_MICROPHONE); | ||
158 | return 0; | ||
159 | } | ||
160 | |||
161 | static int __init saarb_init(void) | ||
162 | { | ||
163 | int ret; | ||
164 | |||
165 | if (!machine_is_saarb()) | ||
166 | return -ENODEV; | ||
167 | saarb_snd_device = platform_device_alloc("soc-audio", -1); | ||
168 | if (!saarb_snd_device) | ||
169 | return -ENOMEM; | ||
170 | |||
171 | platform_set_drvdata(saarb_snd_device, &snd_soc_card_saarb); | ||
172 | |||
173 | ret = platform_device_add(saarb_snd_device); | ||
174 | if (ret) | ||
175 | platform_device_put(saarb_snd_device); | ||
176 | |||
177 | return ret; | ||
178 | } | ||
179 | |||
180 | static void __exit saarb_exit(void) | ||
181 | { | ||
182 | platform_device_unregister(saarb_snd_device); | ||
183 | } | ||
184 | |||
185 | module_init(saarb_init); | ||
186 | module_exit(saarb_exit); | ||
187 | |||
188 | MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>"); | ||
189 | MODULE_DESCRIPTION("ALSA SoC 88PM860x Saarb"); | ||
190 | MODULE_LICENSE("GPL"); | ||
diff --git a/sound/soc/pxa/tavorevb3.c b/sound/soc/pxa/tavorevb3.c deleted file mode 100644 index 8b5ab8f72726..000000000000 --- a/sound/soc/pxa/tavorevb3.c +++ /dev/null | |||
@@ -1,189 +0,0 @@ | |||
1 | /* | ||
2 | * tavorevb3.c -- SoC audio for Tavor EVB3 | ||
3 | * | ||
4 | * Copyright (C) 2010 Marvell International Ltd. | ||
5 | * Haojian Zhuang <haojian.zhuang@marvell.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <linux/module.h> | ||
13 | #include <linux/moduleparam.h> | ||
14 | #include <linux/device.h> | ||
15 | #include <linux/clk.h> | ||
16 | #include <linux/i2c.h> | ||
17 | #include <sound/core.h> | ||
18 | #include <sound/pcm.h> | ||
19 | #include <sound/pcm_params.h> | ||
20 | #include <sound/soc.h> | ||
21 | #include <sound/jack.h> | ||
22 | |||
23 | #include <asm/mach-types.h> | ||
24 | |||
25 | #include "../codecs/88pm860x-codec.h" | ||
26 | #include "pxa-ssp.h" | ||
27 | |||
28 | static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd); | ||
29 | |||
30 | static struct platform_device *evb3_snd_device; | ||
31 | |||
32 | static struct snd_soc_jack hs_jack, mic_jack; | ||
33 | |||
34 | static struct snd_soc_jack_pin hs_jack_pins[] = { | ||
35 | { .pin = "Headset Stereophone", .mask = SND_JACK_HEADPHONE, }, | ||
36 | }; | ||
37 | |||
38 | static struct snd_soc_jack_pin mic_jack_pins[] = { | ||
39 | { .pin = "Headset Mic 2", .mask = SND_JACK_MICROPHONE, }, | ||
40 | }; | ||
41 | |||
42 | /* tavorevb3 machine dapm widgets */ | ||
43 | static const struct snd_soc_dapm_widget evb3_dapm_widgets[] = { | ||
44 | SND_SOC_DAPM_HP("Headset Stereophone", NULL), | ||
45 | SND_SOC_DAPM_LINE("Lineout Out 1", NULL), | ||
46 | SND_SOC_DAPM_LINE("Lineout Out 2", NULL), | ||
47 | SND_SOC_DAPM_SPK("Ext Speaker", NULL), | ||
48 | SND_SOC_DAPM_MIC("Ext Mic 1", NULL), | ||
49 | SND_SOC_DAPM_MIC("Headset Mic 2", NULL), | ||
50 | SND_SOC_DAPM_MIC("Ext Mic 3", NULL), | ||
51 | }; | ||
52 | |||
53 | /* tavorevb3 machine audio map */ | ||
54 | static const struct snd_soc_dapm_route evb3_audio_map[] = { | ||
55 | {"Headset Stereophone", NULL, "HS1"}, | ||
56 | {"Headset Stereophone", NULL, "HS2"}, | ||
57 | |||
58 | {"Ext Speaker", NULL, "LSP"}, | ||
59 | {"Ext Speaker", NULL, "LSN"}, | ||
60 | |||
61 | {"Lineout Out 1", NULL, "LINEOUT1"}, | ||
62 | {"Lineout Out 2", NULL, "LINEOUT2"}, | ||
63 | |||
64 | {"MIC1P", NULL, "Mic1 Bias"}, | ||
65 | {"MIC1N", NULL, "Mic1 Bias"}, | ||
66 | {"Mic1 Bias", NULL, "Ext Mic 1"}, | ||
67 | |||
68 | {"MIC2P", NULL, "Mic1 Bias"}, | ||
69 | {"MIC2N", NULL, "Mic1 Bias"}, | ||
70 | {"Mic1 Bias", NULL, "Headset Mic 2"}, | ||
71 | |||
72 | {"MIC3P", NULL, "Mic3 Bias"}, | ||
73 | {"MIC3N", NULL, "Mic3 Bias"}, | ||
74 | {"Mic3 Bias", NULL, "Ext Mic 3"}, | ||
75 | }; | ||
76 | |||
77 | static int evb3_i2s_hw_params(struct snd_pcm_substream *substream, | ||
78 | struct snd_pcm_hw_params *params) | ||
79 | { | ||
80 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | ||
81 | struct snd_soc_dai *codec_dai = rtd->codec_dai; | ||
82 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | ||
83 | int width = snd_pcm_format_physical_width(params_format(params)); | ||
84 | int ret; | ||
85 | |||
86 | ret = snd_soc_dai_set_sysclk(cpu_dai, PXA_SSP_CLK_NET_PLL, 0, | ||
87 | PM860X_CLK_DIR_OUT); | ||
88 | if (ret < 0) | ||
89 | return ret; | ||
90 | |||
91 | ret = snd_soc_dai_set_sysclk(codec_dai, 0, 0, PM860X_CLK_DIR_OUT); | ||
92 | if (ret < 0) | ||
93 | return ret; | ||
94 | |||
95 | ret = snd_soc_dai_set_tdm_slot(cpu_dai, 3, 3, 2, width); | ||
96 | return ret; | ||
97 | } | ||
98 | |||
99 | static struct snd_soc_ops evb3_i2s_ops = { | ||
100 | .hw_params = evb3_i2s_hw_params, | ||
101 | }; | ||
102 | |||
103 | static struct snd_soc_dai_link evb3_dai[] = { | ||
104 | { | ||
105 | .name = "88PM860x I2S", | ||
106 | .stream_name = "I2S Audio", | ||
107 | .cpu_dai_name = "pxa-ssp-dai.1", | ||
108 | .codec_dai_name = "88pm860x-i2s", | ||
109 | .platform_name = "pxa-pcm-audio", | ||
110 | .codec_name = "88pm860x-codec", | ||
111 | .init = evb3_pm860x_init, | ||
112 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | ||
113 | SND_SOC_DAIFMT_CBM_CFM, | ||
114 | .ops = &evb3_i2s_ops, | ||
115 | }, | ||
116 | }; | ||
117 | |||
118 | static struct snd_soc_card snd_soc_card_evb3 = { | ||
119 | .name = "Tavor EVB3", | ||
120 | .owner = THIS_MODULE, | ||
121 | .dai_link = evb3_dai, | ||
122 | .num_links = ARRAY_SIZE(evb3_dai), | ||
123 | |||
124 | .dapm_widgets = evb3_dapm_widgets, | ||
125 | .num_dapm_widgets = ARRAY_SIZE(evb3_dapm_widgets), | ||
126 | .dapm_routes = evb3_audio_map, | ||
127 | .num_dapm_routes = ARRAY_SIZE(evb3_audio_map), | ||
128 | }; | ||
129 | |||
130 | static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd) | ||
131 | { | ||
132 | struct snd_soc_codec *codec = rtd->codec; | ||
133 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
134 | |||
135 | /* connected pins */ | ||
136 | snd_soc_dapm_enable_pin(dapm, "Ext Speaker"); | ||
137 | snd_soc_dapm_enable_pin(dapm, "Ext Mic 1"); | ||
138 | snd_soc_dapm_enable_pin(dapm, "Ext Mic 3"); | ||
139 | snd_soc_dapm_disable_pin(dapm, "Headset Mic 2"); | ||
140 | snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); | ||
141 | |||
142 | /* Headset jack detection */ | ||
143 | snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE | ||
144 | | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2, | ||
145 | &hs_jack); | ||
146 | snd_soc_jack_add_pins(&hs_jack, ARRAY_SIZE(hs_jack_pins), | ||
147 | hs_jack_pins); | ||
148 | snd_soc_jack_new(codec, "Microphone Jack", SND_JACK_MICROPHONE, | ||
149 | &mic_jack); | ||
150 | snd_soc_jack_add_pins(&mic_jack, ARRAY_SIZE(mic_jack_pins), | ||
151 | mic_jack_pins); | ||
152 | |||
153 | /* headphone, microphone detection & headset short detection */ | ||
154 | pm860x_hs_jack_detect(codec, &hs_jack, SND_JACK_HEADPHONE, | ||
155 | SND_JACK_BTN_0, SND_JACK_BTN_1, SND_JACK_BTN_2); | ||
156 | pm860x_mic_jack_detect(codec, &hs_jack, SND_JACK_MICROPHONE); | ||
157 | return 0; | ||
158 | } | ||
159 | |||
160 | static int __init tavorevb3_init(void) | ||
161 | { | ||
162 | int ret; | ||
163 | |||
164 | if (!machine_is_tavorevb3()) | ||
165 | return -ENODEV; | ||
166 | evb3_snd_device = platform_device_alloc("soc-audio", -1); | ||
167 | if (!evb3_snd_device) | ||
168 | return -ENOMEM; | ||
169 | |||
170 | platform_set_drvdata(evb3_snd_device, &snd_soc_card_evb3); | ||
171 | |||
172 | ret = platform_device_add(evb3_snd_device); | ||
173 | if (ret) | ||
174 | platform_device_put(evb3_snd_device); | ||
175 | |||
176 | return ret; | ||
177 | } | ||
178 | |||
179 | static void __exit tavorevb3_exit(void) | ||
180 | { | ||
181 | platform_device_unregister(evb3_snd_device); | ||
182 | } | ||
183 | |||
184 | module_init(tavorevb3_init); | ||
185 | module_exit(tavorevb3_exit); | ||
186 | |||
187 | MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>"); | ||
188 | MODULE_DESCRIPTION("ALSA SoC 88PM860x Tavor EVB3"); | ||
189 | MODULE_LICENSE("GPL"); | ||