diff options
Diffstat (limited to 'sound/soc/omap/n810.c')
-rw-r--r-- | sound/soc/omap/n810.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index a3b6d897ad84..83d213bfd3d1 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <sound/core.h> | 27 | #include <sound/core.h> |
28 | #include <sound/pcm.h> | 28 | #include <sound/pcm.h> |
29 | #include <sound/soc.h> | 29 | #include <sound/soc.h> |
30 | #include <sound/soc-dapm.h> | ||
31 | 30 | ||
32 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
33 | #include <mach/hardware.h> | 32 | #include <mach/hardware.h> |
@@ -36,7 +35,6 @@ | |||
36 | 35 | ||
37 | #include "omap-mcbsp.h" | 36 | #include "omap-mcbsp.h" |
38 | #include "omap-pcm.h" | 37 | #include "omap-pcm.h" |
39 | #include "../codecs/tlv320aic3x.h" | ||
40 | 38 | ||
41 | #define N810_HEADSET_AMP_GPIO 10 | 39 | #define N810_HEADSET_AMP_GPIO 10 |
42 | #define N810_SPEAKER_AMP_GPIO 101 | 40 | #define N810_SPEAKER_AMP_GPIO 101 |
@@ -58,6 +56,7 @@ static int n810_dmic_func; | |||
58 | 56 | ||
59 | static void n810_ext_control(struct snd_soc_codec *codec) | 57 | static void n810_ext_control(struct snd_soc_codec *codec) |
60 | { | 58 | { |
59 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
61 | int hp = 0, line1l = 0; | 60 | int hp = 0, line1l = 0; |
62 | 61 | ||
63 | switch (n810_jack_func) { | 62 | switch (n810_jack_func) { |
@@ -72,25 +71,25 @@ static void n810_ext_control(struct snd_soc_codec *codec) | |||
72 | } | 71 | } |
73 | 72 | ||
74 | if (n810_spk_func) | 73 | if (n810_spk_func) |
75 | snd_soc_dapm_enable_pin(codec, "Ext Spk"); | 74 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); |
76 | else | 75 | else |
77 | snd_soc_dapm_disable_pin(codec, "Ext Spk"); | 76 | snd_soc_dapm_disable_pin(dapm, "Ext Spk"); |
78 | 77 | ||
79 | if (hp) | 78 | if (hp) |
80 | snd_soc_dapm_enable_pin(codec, "Headphone Jack"); | 79 | snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); |
81 | else | 80 | else |
82 | snd_soc_dapm_disable_pin(codec, "Headphone Jack"); | 81 | snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); |
83 | if (line1l) | 82 | if (line1l) |
84 | snd_soc_dapm_enable_pin(codec, "LINE1L"); | 83 | snd_soc_dapm_enable_pin(dapm, "LINE1L"); |
85 | else | 84 | else |
86 | snd_soc_dapm_disable_pin(codec, "LINE1L"); | 85 | snd_soc_dapm_disable_pin(dapm, "LINE1L"); |
87 | 86 | ||
88 | if (n810_dmic_func) | 87 | if (n810_dmic_func) |
89 | snd_soc_dapm_enable_pin(codec, "DMic"); | 88 | snd_soc_dapm_enable_pin(dapm, "DMic"); |
90 | else | 89 | else |
91 | snd_soc_dapm_disable_pin(codec, "DMic"); | 90 | snd_soc_dapm_disable_pin(dapm, "DMic"); |
92 | 91 | ||
93 | snd_soc_dapm_sync(codec); | 92 | snd_soc_dapm_sync(dapm); |
94 | } | 93 | } |
95 | 94 | ||
96 | static int n810_startup(struct snd_pcm_substream *substream) | 95 | static int n810_startup(struct snd_pcm_substream *substream) |
@@ -274,17 +273,18 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { | |||
274 | static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) | 273 | static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) |
275 | { | 274 | { |
276 | struct snd_soc_codec *codec = rtd->codec; | 275 | struct snd_soc_codec *codec = rtd->codec; |
276 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
277 | int err; | 277 | int err; |
278 | 278 | ||
279 | /* Not connected */ | 279 | /* Not connected */ |
280 | snd_soc_dapm_nc_pin(codec, "MONO_LOUT"); | 280 | snd_soc_dapm_nc_pin(dapm, "MONO_LOUT"); |
281 | snd_soc_dapm_nc_pin(codec, "HPLCOM"); | 281 | snd_soc_dapm_nc_pin(dapm, "HPLCOM"); |
282 | snd_soc_dapm_nc_pin(codec, "HPRCOM"); | 282 | snd_soc_dapm_nc_pin(dapm, "HPRCOM"); |
283 | snd_soc_dapm_nc_pin(codec, "MIC3L"); | 283 | snd_soc_dapm_nc_pin(dapm, "MIC3L"); |
284 | snd_soc_dapm_nc_pin(codec, "MIC3R"); | 284 | snd_soc_dapm_nc_pin(dapm, "MIC3R"); |
285 | snd_soc_dapm_nc_pin(codec, "LINE1R"); | 285 | snd_soc_dapm_nc_pin(dapm, "LINE1R"); |
286 | snd_soc_dapm_nc_pin(codec, "LINE2L"); | 286 | snd_soc_dapm_nc_pin(dapm, "LINE2L"); |
287 | snd_soc_dapm_nc_pin(codec, "LINE2R"); | 287 | snd_soc_dapm_nc_pin(dapm, "LINE2R"); |
288 | 288 | ||
289 | /* Add N810 specific controls */ | 289 | /* Add N810 specific controls */ |
290 | err = snd_soc_add_controls(codec, aic33_n810_controls, | 290 | err = snd_soc_add_controls(codec, aic33_n810_controls, |
@@ -293,13 +293,13 @@ static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) | |||
293 | return err; | 293 | return err; |
294 | 294 | ||
295 | /* Add N810 specific widgets */ | 295 | /* Add N810 specific widgets */ |
296 | snd_soc_dapm_new_controls(codec, aic33_dapm_widgets, | 296 | snd_soc_dapm_new_controls(dapm, aic33_dapm_widgets, |
297 | ARRAY_SIZE(aic33_dapm_widgets)); | 297 | ARRAY_SIZE(aic33_dapm_widgets)); |
298 | 298 | ||
299 | /* Set up N810 specific audio path audio_map */ | 299 | /* Set up N810 specific audio path audio_map */ |
300 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 300 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); |
301 | 301 | ||
302 | snd_soc_dapm_sync(codec); | 302 | snd_soc_dapm_sync(dapm); |
303 | 303 | ||
304 | return 0; | 304 | return 0; |
305 | } | 305 | } |