diff options
Diffstat (limited to 'sound/soc/omap/rx51.c')
-rw-r--r-- | sound/soc/omap/rx51.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index 04b5723bf89b..09fb0df8d416 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c | |||
@@ -30,14 +30,12 @@ | |||
30 | #include <sound/jack.h> | 30 | #include <sound/jack.h> |
31 | #include <sound/pcm.h> | 31 | #include <sound/pcm.h> |
32 | #include <sound/soc.h> | 32 | #include <sound/soc.h> |
33 | #include <sound/soc-dapm.h> | ||
34 | #include <plat/mcbsp.h> | 33 | #include <plat/mcbsp.h> |
35 | 34 | ||
36 | #include <asm/mach-types.h> | 35 | #include <asm/mach-types.h> |
37 | 36 | ||
38 | #include "omap-mcbsp.h" | 37 | #include "omap-mcbsp.h" |
39 | #include "omap-pcm.h" | 38 | #include "omap-pcm.h" |
40 | #include "../codecs/tlv320aic3x.h" | ||
41 | 39 | ||
42 | #define RX51_TVOUT_SEL_GPIO 40 | 40 | #define RX51_TVOUT_SEL_GPIO 40 |
43 | #define RX51_JACK_DETECT_GPIO 177 | 41 | #define RX51_JACK_DETECT_GPIO 177 |
@@ -58,19 +56,21 @@ static int rx51_jack_func; | |||
58 | 56 | ||
59 | static void rx51_ext_control(struct snd_soc_codec *codec) | 57 | static void rx51_ext_control(struct snd_soc_codec *codec) |
60 | { | 58 | { |
59 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
60 | |||
61 | if (rx51_spk_func) | 61 | if (rx51_spk_func) |
62 | snd_soc_dapm_enable_pin(codec, "Ext Spk"); | 62 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); |
63 | else | 63 | else |
64 | snd_soc_dapm_disable_pin(codec, "Ext Spk"); | 64 | snd_soc_dapm_disable_pin(dapm, "Ext Spk"); |
65 | if (rx51_dmic_func) | 65 | if (rx51_dmic_func) |
66 | snd_soc_dapm_enable_pin(codec, "DMic"); | 66 | snd_soc_dapm_enable_pin(dapm, "DMic"); |
67 | else | 67 | else |
68 | snd_soc_dapm_disable_pin(codec, "DMic"); | 68 | snd_soc_dapm_disable_pin(dapm, "DMic"); |
69 | 69 | ||
70 | gpio_set_value(RX51_TVOUT_SEL_GPIO, | 70 | gpio_set_value(RX51_TVOUT_SEL_GPIO, |
71 | rx51_jack_func == RX51_JACK_TVOUT); | 71 | rx51_jack_func == RX51_JACK_TVOUT); |
72 | 72 | ||
73 | snd_soc_dapm_sync(codec); | 73 | snd_soc_dapm_sync(dapm); |
74 | } | 74 | } |
75 | 75 | ||
76 | static int rx51_startup(struct snd_pcm_substream *substream) | 76 | static int rx51_startup(struct snd_pcm_substream *substream) |
@@ -244,12 +244,13 @@ static const struct snd_kcontrol_new aic34_rx51_controls[] = { | |||
244 | static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) | 244 | static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) |
245 | { | 245 | { |
246 | struct snd_soc_codec *codec = rtd->codec; | 246 | struct snd_soc_codec *codec = rtd->codec; |
247 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
247 | int err; | 248 | int err; |
248 | 249 | ||
249 | /* Set up NC codec pins */ | 250 | /* Set up NC codec pins */ |
250 | snd_soc_dapm_nc_pin(codec, "MIC3L"); | 251 | snd_soc_dapm_nc_pin(dapm, "MIC3L"); |
251 | snd_soc_dapm_nc_pin(codec, "MIC3R"); | 252 | snd_soc_dapm_nc_pin(dapm, "MIC3R"); |
252 | snd_soc_dapm_nc_pin(codec, "LINE1R"); | 253 | snd_soc_dapm_nc_pin(dapm, "LINE1R"); |
253 | 254 | ||
254 | /* Add RX-51 specific controls */ | 255 | /* Add RX-51 specific controls */ |
255 | err = snd_soc_add_controls(codec, aic34_rx51_controls, | 256 | err = snd_soc_add_controls(codec, aic34_rx51_controls, |
@@ -258,13 +259,13 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) | |||
258 | return err; | 259 | return err; |
259 | 260 | ||
260 | /* Add RX-51 specific widgets */ | 261 | /* Add RX-51 specific widgets */ |
261 | snd_soc_dapm_new_controls(codec, aic34_dapm_widgets, | 262 | snd_soc_dapm_new_controls(dapm, aic34_dapm_widgets, |
262 | ARRAY_SIZE(aic34_dapm_widgets)); | 263 | ARRAY_SIZE(aic34_dapm_widgets)); |
263 | 264 | ||
264 | /* Set up RX-51 specific audio path audio_map */ | 265 | /* Set up RX-51 specific audio path audio_map */ |
265 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 266 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); |
266 | 267 | ||
267 | snd_soc_dapm_sync(codec); | 268 | snd_soc_dapm_sync(dapm); |
268 | 269 | ||
269 | /* AV jack detection */ | 270 | /* AV jack detection */ |
270 | err = snd_soc_jack_new(codec, "AV Jack", | 271 | err = snd_soc_jack_new(codec, "AV Jack", |