aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:32:54 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:32:54 -0500
commit66dc918d42eaaa9afe42a47d07526765162017a9 (patch)
tree947411841773dfb076f1aa78bc5be868bc4281a6 /sound/soc/pxa
parentb2034d474b7e1e8578bd5c2977024b51693269d9 (diff)
parent6db9a0f326d3144d790d9479309df480a8f562e4 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits) ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO ALSA: oxygen: fix Xonar DG input ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low ALSA: hda - Fix missing EAPD for Acer 4930G ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs. ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser ALSA: hda - Don't refer ELD when unplugged ASoC: tpa6130a2: Fix compiler warning ASoC: tlv320dac33: Add DAPM selection for LOM invert ASoC: DMIC codec: Adding a generic DMIC codec ALSA: snd-usb-us122l: Fix missing NULL checks ALSA: snd-usb-us122l: Fix MIDI output ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() ASoC: Fix section mismatch in wm8995.c ALSA: oxygen: add S/PDIF source selection for Claro cards ALSA: oxygen: fix CD/MIDI for X-Meridian (2G) ASoC: fix migor audio build ALSA: include delay.h for msleep in Xonar DG support ...
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/corgi.c52
-rw-r--r--sound/soc/pxa/e740_wm9705.c30
-rw-r--r--sound/soc/pxa/e750_wm9705.c30
-rw-r--r--sound/soc/pxa/e800_wm9712.c8
-rw-r--r--sound/soc/pxa/em-x270.c1
-rw-r--r--sound/soc/pxa/magician.c36
-rw-r--r--sound/soc/pxa/mioa701_wm9713.c18
-rw-r--r--sound/soc/pxa/palm27x.c34
-rw-r--r--sound/soc/pxa/poodle.c26
-rw-r--r--sound/soc/pxa/raumfeld.c1
-rw-r--r--sound/soc/pxa/saarb.c18
-rw-r--r--sound/soc/pxa/spitz.c70
-rw-r--r--sound/soc/pxa/tavorevb3.c18
-rw-r--r--sound/soc/pxa/tosa.c38
-rw-r--r--sound/soc/pxa/z2.c16
-rw-r--r--sound/soc/pxa/zylonite.c12
16 files changed, 208 insertions, 200 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c
index f451acd4935b..fc592f0d5fc7 100644
--- a/sound/soc/pxa/corgi.c
+++ b/sound/soc/pxa/corgi.c
@@ -23,7 +23,6 @@
23#include <sound/core.h> 23#include <sound/core.h>
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include <sound/soc.h> 25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27 26
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <mach/corgi.h> 28#include <mach/corgi.h>
@@ -48,51 +47,53 @@ static int corgi_spk_func;
48 47
49static void corgi_ext_control(struct snd_soc_codec *codec) 48static void corgi_ext_control(struct snd_soc_codec *codec)
50{ 49{
50 struct snd_soc_dapm_context *dapm = &codec->dapm;
51
51 /* set up jack connection */ 52 /* set up jack connection */
52 switch (corgi_jack_func) { 53 switch (corgi_jack_func) {
53 case CORGI_HP: 54 case CORGI_HP:
54 /* set = unmute headphone */ 55 /* set = unmute headphone */
55 gpio_set_value(CORGI_GPIO_MUTE_L, 1); 56 gpio_set_value(CORGI_GPIO_MUTE_L, 1);
56 gpio_set_value(CORGI_GPIO_MUTE_R, 1); 57 gpio_set_value(CORGI_GPIO_MUTE_R, 1);
57 snd_soc_dapm_disable_pin(codec, "Mic Jack"); 58 snd_soc_dapm_disable_pin(dapm, "Mic Jack");
58 snd_soc_dapm_disable_pin(codec, "Line Jack"); 59 snd_soc_dapm_disable_pin(dapm, "Line Jack");
59 snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 60 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
60 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 61 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
61 break; 62 break;
62 case CORGI_MIC: 63 case CORGI_MIC:
63 /* reset = mute headphone */ 64 /* reset = mute headphone */
64 gpio_set_value(CORGI_GPIO_MUTE_L, 0); 65 gpio_set_value(CORGI_GPIO_MUTE_L, 0);
65 gpio_set_value(CORGI_GPIO_MUTE_R, 0); 66 gpio_set_value(CORGI_GPIO_MUTE_R, 0);
66 snd_soc_dapm_enable_pin(codec, "Mic Jack"); 67 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
67 snd_soc_dapm_disable_pin(codec, "Line Jack"); 68 snd_soc_dapm_disable_pin(dapm, "Line Jack");
68 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 69 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
69 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 70 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
70 break; 71 break;
71 case CORGI_LINE: 72 case CORGI_LINE:
72 gpio_set_value(CORGI_GPIO_MUTE_L, 0); 73 gpio_set_value(CORGI_GPIO_MUTE_L, 0);
73 gpio_set_value(CORGI_GPIO_MUTE_R, 0); 74 gpio_set_value(CORGI_GPIO_MUTE_R, 0);
74 snd_soc_dapm_disable_pin(codec, "Mic Jack"); 75 snd_soc_dapm_disable_pin(dapm, "Mic Jack");
75 snd_soc_dapm_enable_pin(codec, "Line Jack"); 76 snd_soc_dapm_enable_pin(dapm, "Line Jack");
76 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 77 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
77 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 78 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
78 break; 79 break;
79 case CORGI_HEADSET: 80 case CORGI_HEADSET:
80 gpio_set_value(CORGI_GPIO_MUTE_L, 0); 81 gpio_set_value(CORGI_GPIO_MUTE_L, 0);
81 gpio_set_value(CORGI_GPIO_MUTE_R, 1); 82 gpio_set_value(CORGI_GPIO_MUTE_R, 1);
82 snd_soc_dapm_enable_pin(codec, "Mic Jack"); 83 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
83 snd_soc_dapm_disable_pin(codec, "Line Jack"); 84 snd_soc_dapm_disable_pin(dapm, "Line Jack");
84 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 85 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
85 snd_soc_dapm_enable_pin(codec, "Headset Jack"); 86 snd_soc_dapm_enable_pin(dapm, "Headset Jack");
86 break; 87 break;
87 } 88 }
88 89
89 if (corgi_spk_func == CORGI_SPK_ON) 90 if (corgi_spk_func == CORGI_SPK_ON)
90 snd_soc_dapm_enable_pin(codec, "Ext Spk"); 91 snd_soc_dapm_enable_pin(dapm, "Ext Spk");
91 else 92 else
92 snd_soc_dapm_disable_pin(codec, "Ext Spk"); 93 snd_soc_dapm_disable_pin(dapm, "Ext Spk");
93 94
94 /* signal a DAPM event */ 95 /* signal a DAPM event */
95 snd_soc_dapm_sync(codec); 96 snd_soc_dapm_sync(dapm);
96} 97}
97 98
98static int corgi_startup(struct snd_pcm_substream *substream) 99static int corgi_startup(struct snd_pcm_substream *substream)
@@ -279,10 +280,11 @@ static const struct snd_kcontrol_new wm8731_corgi_controls[] = {
279static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd) 280static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
280{ 281{
281 struct snd_soc_codec *codec = rtd->codec; 282 struct snd_soc_codec *codec = rtd->codec;
283 struct snd_soc_dapm_context *dapm = &codec->dapm;
282 int err; 284 int err;
283 285
284 snd_soc_dapm_nc_pin(codec, "LLINEIN"); 286 snd_soc_dapm_nc_pin(dapm, "LLINEIN");
285 snd_soc_dapm_nc_pin(codec, "RLINEIN"); 287 snd_soc_dapm_nc_pin(dapm, "RLINEIN");
286 288
287 /* Add corgi specific controls */ 289 /* Add corgi specific controls */
288 err = snd_soc_add_controls(codec, wm8731_corgi_controls, 290 err = snd_soc_add_controls(codec, wm8731_corgi_controls,
@@ -291,13 +293,13 @@ static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
291 return err; 293 return err;
292 294
293 /* Add corgi specific widgets */ 295 /* Add corgi specific widgets */
294 snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets, 296 snd_soc_dapm_new_controls(dapm, wm8731_dapm_widgets,
295 ARRAY_SIZE(wm8731_dapm_widgets)); 297 ARRAY_SIZE(wm8731_dapm_widgets));
296 298
297 /* Set up corgi specific audio path audio_map */ 299 /* Set up corgi specific audio path audio_map */
298 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));
299 301
300 snd_soc_dapm_sync(codec); 302 snd_soc_dapm_sync(dapm);
301 return 0; 303 return 0;
302} 304}
303 305
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c
index c82cedb602fd..28333e7d9c50 100644
--- a/sound/soc/pxa/e740_wm9705.c
+++ b/sound/soc/pxa/e740_wm9705.c
@@ -16,7 +16,6 @@
16#include <sound/core.h> 16#include <sound/core.h>
17#include <sound/pcm.h> 17#include <sound/pcm.h>
18#include <sound/soc.h> 18#include <sound/soc.h>
19#include <sound/soc-dapm.h>
20 19
21#include <mach/audio.h> 20#include <mach/audio.h>
22#include <mach/eseries-gpio.h> 21#include <mach/eseries-gpio.h>
@@ -92,23 +91,24 @@ static const struct snd_soc_dapm_route audio_map[] = {
92static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd) 91static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd)
93{ 92{
94 struct snd_soc_codec *codec = rtd->codec; 93 struct snd_soc_codec *codec = rtd->codec;
95 94 struct snd_soc_dapm_context *dapm = &codec->dapm;
96 snd_soc_dapm_nc_pin(codec, "HPOUTL"); 95
97 snd_soc_dapm_nc_pin(codec, "HPOUTR"); 96 snd_soc_dapm_nc_pin(dapm, "HPOUTL");
98 snd_soc_dapm_nc_pin(codec, "PHONE"); 97 snd_soc_dapm_nc_pin(dapm, "HPOUTR");
99 snd_soc_dapm_nc_pin(codec, "LINEINL"); 98 snd_soc_dapm_nc_pin(dapm, "PHONE");
100 snd_soc_dapm_nc_pin(codec, "LINEINR"); 99 snd_soc_dapm_nc_pin(dapm, "LINEINL");
101 snd_soc_dapm_nc_pin(codec, "CDINL"); 100 snd_soc_dapm_nc_pin(dapm, "LINEINR");
102 snd_soc_dapm_nc_pin(codec, "CDINR"); 101 snd_soc_dapm_nc_pin(dapm, "CDINL");
103 snd_soc_dapm_nc_pin(codec, "PCBEEP"); 102 snd_soc_dapm_nc_pin(dapm, "CDINR");
104 snd_soc_dapm_nc_pin(codec, "MIC2"); 103 snd_soc_dapm_nc_pin(dapm, "PCBEEP");
105 104 snd_soc_dapm_nc_pin(dapm, "MIC2");
106 snd_soc_dapm_new_controls(codec, e740_dapm_widgets, 105
106 snd_soc_dapm_new_controls(dapm, e740_dapm_widgets,
107 ARRAY_SIZE(e740_dapm_widgets)); 107 ARRAY_SIZE(e740_dapm_widgets));
108 108
109 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 109 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
110 110
111 snd_soc_dapm_sync(codec); 111 snd_soc_dapm_sync(dapm);
112 112
113 return 0; 113 return 0;
114} 114}
diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c
index 4c143803a75e..01bf31675c55 100644
--- a/sound/soc/pxa/e750_wm9705.c
+++ b/sound/soc/pxa/e750_wm9705.c
@@ -16,7 +16,6 @@
16#include <sound/core.h> 16#include <sound/core.h>
17#include <sound/pcm.h> 17#include <sound/pcm.h>
18#include <sound/soc.h> 18#include <sound/soc.h>
19#include <sound/soc-dapm.h>
20 19
21#include <mach/audio.h> 20#include <mach/audio.h>
22#include <mach/eseries-gpio.h> 21#include <mach/eseries-gpio.h>
@@ -74,23 +73,24 @@ static const struct snd_soc_dapm_route audio_map[] = {
74static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd) 73static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd)
75{ 74{
76 struct snd_soc_codec *codec = rtd->codec; 75 struct snd_soc_codec *codec = rtd->codec;
77 76 struct snd_soc_dapm_context *dapm = &codec->dapm;
78 snd_soc_dapm_nc_pin(codec, "LOUT"); 77
79 snd_soc_dapm_nc_pin(codec, "ROUT"); 78 snd_soc_dapm_nc_pin(dapm, "LOUT");
80 snd_soc_dapm_nc_pin(codec, "PHONE"); 79 snd_soc_dapm_nc_pin(dapm, "ROUT");
81 snd_soc_dapm_nc_pin(codec, "LINEINL"); 80 snd_soc_dapm_nc_pin(dapm, "PHONE");
82 snd_soc_dapm_nc_pin(codec, "LINEINR"); 81 snd_soc_dapm_nc_pin(dapm, "LINEINL");
83 snd_soc_dapm_nc_pin(codec, "CDINL"); 82 snd_soc_dapm_nc_pin(dapm, "LINEINR");
84 snd_soc_dapm_nc_pin(codec, "CDINR"); 83 snd_soc_dapm_nc_pin(dapm, "CDINL");
85 snd_soc_dapm_nc_pin(codec, "PCBEEP"); 84 snd_soc_dapm_nc_pin(dapm, "CDINR");
86 snd_soc_dapm_nc_pin(codec, "MIC2"); 85 snd_soc_dapm_nc_pin(dapm, "PCBEEP");
87 86 snd_soc_dapm_nc_pin(dapm, "MIC2");
88 snd_soc_dapm_new_controls(codec, e750_dapm_widgets, 87
88 snd_soc_dapm_new_controls(dapm, e750_dapm_widgets,
89 ARRAY_SIZE(e750_dapm_widgets)); 89 ARRAY_SIZE(e750_dapm_widgets));
90 90
91 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 91 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
92 92
93 snd_soc_dapm_sync(codec); 93 snd_soc_dapm_sync(dapm);
94 94
95 return 0; 95 return 0;
96} 96}
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c
index d42e5fe832c5..c6a37c6ef23b 100644
--- a/sound/soc/pxa/e800_wm9712.c
+++ b/sound/soc/pxa/e800_wm9712.c
@@ -16,7 +16,6 @@
16#include <sound/core.h> 16#include <sound/core.h>
17#include <sound/pcm.h> 17#include <sound/pcm.h>
18#include <sound/soc.h> 18#include <sound/soc.h>
19#include <sound/soc-dapm.h>
20 19
21#include <asm/mach-types.h> 20#include <asm/mach-types.h>
22#include <mach/audio.h> 21#include <mach/audio.h>
@@ -75,12 +74,13 @@ static const struct snd_soc_dapm_route audio_map[] = {
75static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd) 74static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd)
76{ 75{
77 struct snd_soc_codec *codec = rtd->codec; 76 struct snd_soc_codec *codec = rtd->codec;
77 struct snd_soc_dapm_context *dapm = &codec->dapm;
78 78
79 snd_soc_dapm_new_controls(codec, e800_dapm_widgets, 79 snd_soc_dapm_new_controls(dapm, e800_dapm_widgets,
80 ARRAY_SIZE(e800_dapm_widgets)); 80 ARRAY_SIZE(e800_dapm_widgets));
81 81
82 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 82 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
83 snd_soc_dapm_sync(codec); 83 snd_soc_dapm_sync(dapm);
84 84
85 return 0; 85 return 0;
86} 86}
diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c
index eadf9d351a04..fc22e6eefc98 100644
--- a/sound/soc/pxa/em-x270.c
+++ b/sound/soc/pxa/em-x270.c
@@ -26,7 +26,6 @@
26#include <sound/core.h> 26#include <sound/core.h>
27#include <sound/pcm.h> 27#include <sound/pcm.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29#include <sound/soc-dapm.h>
30 29
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32#include <mach/audio.h> 31#include <mach/audio.h>
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
index 5ef0526924b9..67dcc36cd621 100644
--- a/sound/soc/pxa/magician.c
+++ b/sound/soc/pxa/magician.c
@@ -26,7 +26,6 @@
26#include <sound/pcm.h> 26#include <sound/pcm.h>
27#include <sound/pcm_params.h> 27#include <sound/pcm_params.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29#include <sound/soc-dapm.h>
30#include <sound/uda1380.h> 29#include <sound/uda1380.h>
31 30
32#include <mach/magician.h> 31#include <mach/magician.h>
@@ -44,27 +43,29 @@ static int magician_in_sel = MAGICIAN_MIC;
44 43
45static void magician_ext_control(struct snd_soc_codec *codec) 44static void magician_ext_control(struct snd_soc_codec *codec)
46{ 45{
46 struct snd_soc_dapm_context *dapm = &codec->dapm;
47
47 if (magician_spk_switch) 48 if (magician_spk_switch)
48 snd_soc_dapm_enable_pin(codec, "Speaker"); 49 snd_soc_dapm_enable_pin(dapm, "Speaker");
49 else 50 else
50 snd_soc_dapm_disable_pin(codec, "Speaker"); 51 snd_soc_dapm_disable_pin(dapm, "Speaker");
51 if (magician_hp_switch) 52 if (magician_hp_switch)
52 snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 53 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
53 else 54 else
54 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 55 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
55 56
56 switch (magician_in_sel) { 57 switch (magician_in_sel) {
57 case MAGICIAN_MIC: 58 case MAGICIAN_MIC:
58 snd_soc_dapm_disable_pin(codec, "Headset Mic"); 59 snd_soc_dapm_disable_pin(dapm, "Headset Mic");
59 snd_soc_dapm_enable_pin(codec, "Call Mic"); 60 snd_soc_dapm_enable_pin(dapm, "Call Mic");
60 break; 61 break;
61 case MAGICIAN_MIC_EXT: 62 case MAGICIAN_MIC_EXT:
62 snd_soc_dapm_disable_pin(codec, "Call Mic"); 63 snd_soc_dapm_disable_pin(dapm, "Call Mic");
63 snd_soc_dapm_enable_pin(codec, "Headset Mic"); 64 snd_soc_dapm_enable_pin(dapm, "Headset Mic");
64 break; 65 break;
65 } 66 }
66 67
67 snd_soc_dapm_sync(codec); 68 snd_soc_dapm_sync(dapm);
68} 69}
69 70
70static int magician_startup(struct snd_pcm_substream *substream) 71static int magician_startup(struct snd_pcm_substream *substream)
@@ -399,15 +400,16 @@ static const struct snd_kcontrol_new uda1380_magician_controls[] = {
399static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd) 400static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd)
400{ 401{
401 struct snd_soc_codec *codec = rtd->codec; 402 struct snd_soc_codec *codec = rtd->codec;
403 struct snd_soc_dapm_context *dapm = &codec->dapm;
402 int err; 404 int err;
403 405
404 /* NC codec pins */ 406 /* NC codec pins */
405 snd_soc_dapm_nc_pin(codec, "VOUTLHP"); 407 snd_soc_dapm_nc_pin(dapm, "VOUTLHP");
406 snd_soc_dapm_nc_pin(codec, "VOUTRHP"); 408 snd_soc_dapm_nc_pin(dapm, "VOUTRHP");
407 409
408 /* FIXME: is anything connected here? */ 410 /* FIXME: is anything connected here? */
409 snd_soc_dapm_nc_pin(codec, "VINL"); 411 snd_soc_dapm_nc_pin(dapm, "VINL");
410 snd_soc_dapm_nc_pin(codec, "VINR"); 412 snd_soc_dapm_nc_pin(dapm, "VINR");
411 413
412 /* Add magician specific controls */ 414 /* Add magician specific controls */
413 err = snd_soc_add_controls(codec, uda1380_magician_controls, 415 err = snd_soc_add_controls(codec, uda1380_magician_controls,
@@ -416,13 +418,13 @@ static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd)
416 return err; 418 return err;
417 419
418 /* Add magician specific widgets */ 420 /* Add magician specific widgets */
419 snd_soc_dapm_new_controls(codec, uda1380_dapm_widgets, 421 snd_soc_dapm_new_controls(dapm, uda1380_dapm_widgets,
420 ARRAY_SIZE(uda1380_dapm_widgets)); 422 ARRAY_SIZE(uda1380_dapm_widgets));
421 423
422 /* Set up magician specific audio path interconnects */ 424 /* Set up magician specific audio path interconnects */
423 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 425 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
424 426
425 snd_soc_dapm_sync(codec); 427 snd_soc_dapm_sync(dapm);
426 return 0; 428 return 0;
427} 429}
428 430
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c
index f284cc54bc80..0d70fc8c12bd 100644
--- a/sound/soc/pxa/mioa701_wm9713.c
+++ b/sound/soc/pxa/mioa701_wm9713.c
@@ -50,7 +50,6 @@
50#include <sound/core.h> 50#include <sound/core.h>
51#include <sound/pcm.h> 51#include <sound/pcm.h>
52#include <sound/soc.h> 52#include <sound/soc.h>
53#include <sound/soc-dapm.h>
54#include <sound/initval.h> 53#include <sound/initval.h>
55#include <sound/ac97_codec.h> 54#include <sound/ac97_codec.h>
56 55
@@ -130,13 +129,14 @@ static const struct snd_soc_dapm_route audio_map[] = {
130static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) 129static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
131{ 130{
132 struct snd_soc_codec *codec = rtd->codec; 131 struct snd_soc_codec *codec = rtd->codec;
132 struct snd_soc_dapm_context *dapm = &codec->dapm;
133 unsigned short reg; 133 unsigned short reg;
134 134
135 /* Add mioa701 specific widgets */ 135 /* Add mioa701 specific widgets */
136 snd_soc_dapm_new_controls(codec, ARRAY_AND_SIZE(mioa701_dapm_widgets)); 136 snd_soc_dapm_new_controls(dapm, ARRAY_AND_SIZE(mioa701_dapm_widgets));
137 137
138 /* Set up mioa701 specific audio path audio_mapnects */ 138 /* Set up mioa701 specific audio path audio_mapnects */
139 snd_soc_dapm_add_routes(codec, ARRAY_AND_SIZE(audio_map)); 139 snd_soc_dapm_add_routes(dapm, ARRAY_AND_SIZE(audio_map));
140 140
141 /* Prepare GPIO8 for rear speaker amplifier */ 141 /* Prepare GPIO8 for rear speaker amplifier */
142 reg = codec->driver->read(codec, AC97_GPIO_CFG); 142 reg = codec->driver->read(codec, AC97_GPIO_CFG);
@@ -146,12 +146,12 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
146 reg = codec->driver->read(codec, AC97_3D_CONTROL); 146 reg = codec->driver->read(codec, AC97_3D_CONTROL);
147 codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000); 147 codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000);
148 148
149 snd_soc_dapm_enable_pin(codec, "Front Speaker"); 149 snd_soc_dapm_enable_pin(dapm, "Front Speaker");
150 snd_soc_dapm_enable_pin(codec, "Rear Speaker"); 150 snd_soc_dapm_enable_pin(dapm, "Rear Speaker");
151 snd_soc_dapm_enable_pin(codec, "Front Mic"); 151 snd_soc_dapm_enable_pin(dapm, "Front Mic");
152 snd_soc_dapm_enable_pin(codec, "GSM Line In"); 152 snd_soc_dapm_enable_pin(dapm, "GSM Line In");
153 snd_soc_dapm_enable_pin(codec, "GSM Line Out"); 153 snd_soc_dapm_enable_pin(dapm, "GSM Line Out");
154 snd_soc_dapm_sync(codec); 154 snd_soc_dapm_sync(dapm);
155 155
156 return 0; 156 return 0;
157} 157}
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 13f6d485d571..857db96d4a4f 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -21,7 +21,6 @@
21#include <sound/core.h> 21#include <sound/core.h>
22#include <sound/pcm.h> 22#include <sound/pcm.h>
23#include <sound/soc.h> 23#include <sound/soc.h>
24#include <sound/soc-dapm.h>
25#include <sound/jack.h> 24#include <sound/jack.h>
26 25
27#include <asm/mach-types.h> 26#include <asm/mach-types.h>
@@ -77,37 +76,38 @@ static struct snd_soc_card palm27x_asoc;
77static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) 76static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
78{ 77{
79 struct snd_soc_codec *codec = rtd->codec; 78 struct snd_soc_codec *codec = rtd->codec;
79 struct snd_soc_dapm_context *dapm = &codec->dapm;
80 int err; 80 int err;
81 81
82 /* add palm27x specific widgets */ 82 /* add palm27x specific widgets */
83 err = snd_soc_dapm_new_controls(codec, palm27x_dapm_widgets, 83 err = snd_soc_dapm_new_controls(dapm, palm27x_dapm_widgets,
84 ARRAY_SIZE(palm27x_dapm_widgets)); 84 ARRAY_SIZE(palm27x_dapm_widgets));
85 if (err) 85 if (err)
86 return err; 86 return err;
87 87
88 /* set up palm27x specific audio path audio_map */ 88 /* set up palm27x specific audio path audio_map */
89 err = snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 89 err = snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
90 if (err) 90 if (err)
91 return err; 91 return err;
92 92
93 /* connected pins */ 93 /* connected pins */
94 if (machine_is_palmld()) 94 if (machine_is_palmld())
95 snd_soc_dapm_enable_pin(codec, "MIC1"); 95 snd_soc_dapm_enable_pin(dapm, "MIC1");
96 snd_soc_dapm_enable_pin(codec, "HPOUTL"); 96 snd_soc_dapm_enable_pin(dapm, "HPOUTL");
97 snd_soc_dapm_enable_pin(codec, "HPOUTR"); 97 snd_soc_dapm_enable_pin(dapm, "HPOUTR");
98 snd_soc_dapm_enable_pin(codec, "LOUT2"); 98 snd_soc_dapm_enable_pin(dapm, "LOUT2");
99 snd_soc_dapm_enable_pin(codec, "ROUT2"); 99 snd_soc_dapm_enable_pin(dapm, "ROUT2");
100 100
101 /* not connected pins */ 101 /* not connected pins */
102 snd_soc_dapm_nc_pin(codec, "OUT3"); 102 snd_soc_dapm_nc_pin(dapm, "OUT3");
103 snd_soc_dapm_nc_pin(codec, "MONOOUT"); 103 snd_soc_dapm_nc_pin(dapm, "MONOOUT");
104 snd_soc_dapm_nc_pin(codec, "LINEINL"); 104 snd_soc_dapm_nc_pin(dapm, "LINEINL");
105 snd_soc_dapm_nc_pin(codec, "LINEINR"); 105 snd_soc_dapm_nc_pin(dapm, "LINEINR");
106 snd_soc_dapm_nc_pin(codec, "PCBEEP"); 106 snd_soc_dapm_nc_pin(dapm, "PCBEEP");
107 snd_soc_dapm_nc_pin(codec, "PHONE"); 107 snd_soc_dapm_nc_pin(dapm, "PHONE");
108 snd_soc_dapm_nc_pin(codec, "MIC2"); 108 snd_soc_dapm_nc_pin(dapm, "MIC2");
109 109
110 err = snd_soc_dapm_sync(codec); 110 err = snd_soc_dapm_sync(dapm);
111 if (err) 111 if (err)
112 return err; 112 return err;
113 113
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index 84edd0385a21..6298ee115e27 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -23,7 +23,6 @@
23#include <sound/core.h> 23#include <sound/core.h>
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include <sound/soc.h> 25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27 26
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <asm/hardware/locomo.h> 28#include <asm/hardware/locomo.h>
@@ -46,6 +45,8 @@ static int poodle_spk_func;
46 45
47static void poodle_ext_control(struct snd_soc_codec *codec) 46static void poodle_ext_control(struct snd_soc_codec *codec)
48{ 47{
48 struct snd_soc_dapm_context *dapm = &codec->dapm;
49
49 /* set up jack connection */ 50 /* set up jack connection */
50 if (poodle_jack_func == POODLE_HP) { 51 if (poodle_jack_func == POODLE_HP) {
51 /* set = unmute headphone */ 52 /* set = unmute headphone */
@@ -53,23 +54,23 @@ static void poodle_ext_control(struct snd_soc_codec *codec)
53 POODLE_LOCOMO_GPIO_MUTE_L, 1); 54 POODLE_LOCOMO_GPIO_MUTE_L, 1);
54 locomo_gpio_write(&poodle_locomo_device.dev, 55 locomo_gpio_write(&poodle_locomo_device.dev,
55 POODLE_LOCOMO_GPIO_MUTE_R, 1); 56 POODLE_LOCOMO_GPIO_MUTE_R, 1);
56 snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 57 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
57 } else { 58 } else {
58 locomo_gpio_write(&poodle_locomo_device.dev, 59 locomo_gpio_write(&poodle_locomo_device.dev,
59 POODLE_LOCOMO_GPIO_MUTE_L, 0); 60 POODLE_LOCOMO_GPIO_MUTE_L, 0);
60 locomo_gpio_write(&poodle_locomo_device.dev, 61 locomo_gpio_write(&poodle_locomo_device.dev,
61 POODLE_LOCOMO_GPIO_MUTE_R, 0); 62 POODLE_LOCOMO_GPIO_MUTE_R, 0);
62 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 63 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
63 } 64 }
64 65
65 /* set the enpoints to their new connetion states */ 66 /* set the enpoints to their new connetion states */
66 if (poodle_spk_func == POODLE_SPK_ON) 67 if (poodle_spk_func == POODLE_SPK_ON)
67 snd_soc_dapm_enable_pin(codec, "Ext Spk"); 68 snd_soc_dapm_enable_pin(dapm, "Ext Spk");
68 else 69 else
69 snd_soc_dapm_disable_pin(codec, "Ext Spk"); 70 snd_soc_dapm_disable_pin(dapm, "Ext Spk");
70 71
71 /* signal a DAPM event */ 72 /* signal a DAPM event */
72 snd_soc_dapm_sync(codec); 73 snd_soc_dapm_sync(dapm);
73} 74}
74 75
75static int poodle_startup(struct snd_pcm_substream *substream) 76static int poodle_startup(struct snd_pcm_substream *substream)
@@ -244,11 +245,12 @@ static const struct snd_kcontrol_new wm8731_poodle_controls[] = {
244static int poodle_wm8731_init(struct snd_soc_pcm_runtime *rtd) 245static int poodle_wm8731_init(struct snd_soc_pcm_runtime *rtd)
245{ 246{
246 struct snd_soc_codec *codec = rtd->codec; 247 struct snd_soc_codec *codec = rtd->codec;
248 struct snd_soc_dapm_context *dapm = &codec->dapm;
247 int err; 249 int err;
248 250
249 snd_soc_dapm_nc_pin(codec, "LLINEIN"); 251 snd_soc_dapm_nc_pin(dapm, "LLINEIN");
250 snd_soc_dapm_nc_pin(codec, "RLINEIN"); 252 snd_soc_dapm_nc_pin(dapm, "RLINEIN");
251 snd_soc_dapm_enable_pin(codec, "MICIN"); 253 snd_soc_dapm_enable_pin(dapm, "MICIN");
252 254
253 /* Add poodle specific controls */ 255 /* Add poodle specific controls */
254 err = snd_soc_add_controls(codec, wm8731_poodle_controls, 256 err = snd_soc_add_controls(codec, wm8731_poodle_controls,
@@ -257,13 +259,13 @@ static int poodle_wm8731_init(struct snd_soc_pcm_runtime *rtd)
257 return err; 259 return err;
258 260
259 /* Add poodle specific widgets */ 261 /* Add poodle specific widgets */
260 snd_soc_dapm_new_controls(codec, wm8731_dapm_widgets, 262 snd_soc_dapm_new_controls(dapm, wm8731_dapm_widgets,
261 ARRAY_SIZE(wm8731_dapm_widgets)); 263 ARRAY_SIZE(wm8731_dapm_widgets));
262 264
263 /* Set up poodle specific audio path audio_map */ 265 /* Set up poodle specific audio path audio_map */
264 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));
265 267
266 snd_soc_dapm_sync(codec); 268 snd_soc_dapm_sync(dapm);
267 return 0; 269 return 0;
268} 270}
269 271
diff --git a/sound/soc/pxa/raumfeld.c b/sound/soc/pxa/raumfeld.c
index 2cda82bc5d2e..0fd60f423036 100644
--- a/sound/soc/pxa/raumfeld.c
+++ b/sound/soc/pxa/raumfeld.c
@@ -22,7 +22,6 @@
22#include <linux/gpio.h> 22#include <linux/gpio.h>
23#include <sound/pcm.h> 23#include <sound/pcm.h>
24#include <sound/soc.h> 24#include <sound/soc.h>
25#include <sound/soc-dapm.h>
26 25
27#include <asm/mach-types.h> 26#include <asm/mach-types.h>
28 27
diff --git a/sound/soc/pxa/saarb.c b/sound/soc/pxa/saarb.c
index d63cb474b4e1..9595189fc681 100644
--- a/sound/soc/pxa/saarb.c
+++ b/sound/soc/pxa/saarb.c
@@ -18,7 +18,6 @@
18#include <sound/pcm.h> 18#include <sound/pcm.h>
19#include <sound/pcm_params.h> 19#include <sound/pcm_params.h>
20#include <sound/soc.h> 20#include <sound/soc.h>
21#include <sound/soc-dapm.h>
22#include <sound/jack.h> 21#include <sound/jack.h>
23 22
24#include <asm/mach-types.h> 23#include <asm/mach-types.h>
@@ -133,20 +132,21 @@ static struct snd_soc_card snd_soc_card_saarb = {
133static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd) 132static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd)
134{ 133{
135 struct snd_soc_codec *codec = rtd->codec; 134 struct snd_soc_codec *codec = rtd->codec;
135 struct snd_soc_dapm_context *dapm = &codec->dapm;
136 int ret; 136 int ret;
137 137
138 snd_soc_dapm_new_controls(codec, saarb_dapm_widgets, 138 snd_soc_dapm_new_controls(dapm, saarb_dapm_widgets,
139 ARRAY_SIZE(saarb_dapm_widgets)); 139 ARRAY_SIZE(saarb_dapm_widgets));
140 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 140 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
141 141
142 /* connected pins */ 142 /* connected pins */
143 snd_soc_dapm_enable_pin(codec, "Ext Speaker"); 143 snd_soc_dapm_enable_pin(dapm, "Ext Speaker");
144 snd_soc_dapm_enable_pin(codec, "Ext Mic 1"); 144 snd_soc_dapm_enable_pin(dapm, "Ext Mic 1");
145 snd_soc_dapm_enable_pin(codec, "Ext Mic 3"); 145 snd_soc_dapm_enable_pin(dapm, "Ext Mic 3");
146 snd_soc_dapm_disable_pin(codec, "Headset Mic 2"); 146 snd_soc_dapm_disable_pin(dapm, "Headset Mic 2");
147 snd_soc_dapm_disable_pin(codec, "Headset Stereophone"); 147 snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
148 148
149 ret = snd_soc_dapm_sync(codec); 149 ret = snd_soc_dapm_sync(dapm);
150 if (ret) 150 if (ret)
151 return ret; 151 return ret;
152 152
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index 0b30d7de24ec..c2acb69b957a 100644
--- a/sound/soc/pxa/spitz.c
+++ b/sound/soc/pxa/spitz.c
@@ -23,7 +23,6 @@
23#include <sound/core.h> 23#include <sound/core.h>
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include <sound/soc.h> 25#include <sound/soc.h>
26#include <sound/soc-dapm.h>
27 26
28#include <asm/mach-types.h> 27#include <asm/mach-types.h>
29#include <mach/spitz.h> 28#include <mach/spitz.h>
@@ -46,61 +45,63 @@ static int spitz_spk_func;
46 45
47static void spitz_ext_control(struct snd_soc_codec *codec) 46static void spitz_ext_control(struct snd_soc_codec *codec)
48{ 47{
48 struct snd_soc_dapm_context *dapm = &codec->dapm;
49
49 if (spitz_spk_func == SPITZ_SPK_ON) 50 if (spitz_spk_func == SPITZ_SPK_ON)
50 snd_soc_dapm_enable_pin(codec, "Ext Spk"); 51 snd_soc_dapm_enable_pin(dapm, "Ext Spk");
51 else 52 else
52 snd_soc_dapm_disable_pin(codec, "Ext Spk"); 53 snd_soc_dapm_disable_pin(dapm, "Ext Spk");
53 54
54 /* set up jack connection */ 55 /* set up jack connection */
55 switch (spitz_jack_func) { 56 switch (spitz_jack_func) {
56 case SPITZ_HP: 57 case SPITZ_HP:
57 /* enable and unmute hp jack, disable mic bias */ 58 /* enable and unmute hp jack, disable mic bias */
58 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 59 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
59 snd_soc_dapm_disable_pin(codec, "Mic Jack"); 60 snd_soc_dapm_disable_pin(dapm, "Mic Jack");
60 snd_soc_dapm_disable_pin(codec, "Line Jack"); 61 snd_soc_dapm_disable_pin(dapm, "Line Jack");
61 snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 62 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
62 gpio_set_value(SPITZ_GPIO_MUTE_L, 1); 63 gpio_set_value(SPITZ_GPIO_MUTE_L, 1);
63 gpio_set_value(SPITZ_GPIO_MUTE_R, 1); 64 gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
64 break; 65 break;
65 case SPITZ_MIC: 66 case SPITZ_MIC:
66 /* enable mic jack and bias, mute hp */ 67 /* enable mic jack and bias, mute hp */
67 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 68 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
68 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 69 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
69 snd_soc_dapm_disable_pin(codec, "Line Jack"); 70 snd_soc_dapm_disable_pin(dapm, "Line Jack");
70 snd_soc_dapm_enable_pin(codec, "Mic Jack"); 71 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
71 gpio_set_value(SPITZ_GPIO_MUTE_L, 0); 72 gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
72 gpio_set_value(SPITZ_GPIO_MUTE_R, 0); 73 gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
73 break; 74 break;
74 case SPITZ_LINE: 75 case SPITZ_LINE:
75 /* enable line jack, disable mic bias and mute hp */ 76 /* enable line jack, disable mic bias and mute hp */
76 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 77 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
77 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 78 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
78 snd_soc_dapm_disable_pin(codec, "Mic Jack"); 79 snd_soc_dapm_disable_pin(dapm, "Mic Jack");
79 snd_soc_dapm_enable_pin(codec, "Line Jack"); 80 snd_soc_dapm_enable_pin(dapm, "Line Jack");
80 gpio_set_value(SPITZ_GPIO_MUTE_L, 0); 81 gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
81 gpio_set_value(SPITZ_GPIO_MUTE_R, 0); 82 gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
82 break; 83 break;
83 case SPITZ_HEADSET: 84 case SPITZ_HEADSET:
84 /* enable and unmute headset jack enable mic bias, mute L hp */ 85 /* enable and unmute headset jack enable mic bias, mute L hp */
85 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 86 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
86 snd_soc_dapm_enable_pin(codec, "Mic Jack"); 87 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
87 snd_soc_dapm_disable_pin(codec, "Line Jack"); 88 snd_soc_dapm_disable_pin(dapm, "Line Jack");
88 snd_soc_dapm_enable_pin(codec, "Headset Jack"); 89 snd_soc_dapm_enable_pin(dapm, "Headset Jack");
89 gpio_set_value(SPITZ_GPIO_MUTE_L, 0); 90 gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
90 gpio_set_value(SPITZ_GPIO_MUTE_R, 1); 91 gpio_set_value(SPITZ_GPIO_MUTE_R, 1);
91 break; 92 break;
92 case SPITZ_HP_OFF: 93 case SPITZ_HP_OFF:
93 94
94 /* jack removed, everything off */ 95 /* jack removed, everything off */
95 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 96 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
96 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 97 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
97 snd_soc_dapm_disable_pin(codec, "Mic Jack"); 98 snd_soc_dapm_disable_pin(dapm, "Mic Jack");
98 snd_soc_dapm_disable_pin(codec, "Line Jack"); 99 snd_soc_dapm_disable_pin(dapm, "Line Jack");
99 gpio_set_value(SPITZ_GPIO_MUTE_L, 0); 100 gpio_set_value(SPITZ_GPIO_MUTE_L, 0);
100 gpio_set_value(SPITZ_GPIO_MUTE_R, 0); 101 gpio_set_value(SPITZ_GPIO_MUTE_R, 0);
101 break; 102 break;
102 } 103 }
103 snd_soc_dapm_sync(codec); 104 snd_soc_dapm_sync(dapm);
104} 105}
105 106
106static int spitz_startup(struct snd_pcm_substream *substream) 107static int spitz_startup(struct snd_pcm_substream *substream)
@@ -281,16 +282,17 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = {
281static int spitz_wm8750_init(struct snd_soc_pcm_runtime *rtd) 282static int spitz_wm8750_init(struct snd_soc_pcm_runtime *rtd)
282{ 283{
283 struct snd_soc_codec *codec = rtd->codec; 284 struct snd_soc_codec *codec = rtd->codec;
285 struct snd_soc_dapm_context *dapm = &codec->dapm;
284 int err; 286 int err;
285 287
286 /* NC codec pins */ 288 /* NC codec pins */
287 snd_soc_dapm_nc_pin(codec, "RINPUT1"); 289 snd_soc_dapm_nc_pin(dapm, "RINPUT1");
288 snd_soc_dapm_nc_pin(codec, "LINPUT2"); 290 snd_soc_dapm_nc_pin(dapm, "LINPUT2");
289 snd_soc_dapm_nc_pin(codec, "RINPUT2"); 291 snd_soc_dapm_nc_pin(dapm, "RINPUT2");
290 snd_soc_dapm_nc_pin(codec, "LINPUT3"); 292 snd_soc_dapm_nc_pin(dapm, "LINPUT3");
291 snd_soc_dapm_nc_pin(codec, "RINPUT3"); 293 snd_soc_dapm_nc_pin(dapm, "RINPUT3");
292 snd_soc_dapm_nc_pin(codec, "OUT3"); 294 snd_soc_dapm_nc_pin(dapm, "OUT3");
293 snd_soc_dapm_nc_pin(codec, "MONO1"); 295 snd_soc_dapm_nc_pin(dapm, "MONO1");
294 296
295 /* Add spitz specific controls */ 297 /* Add spitz specific controls */
296 err = snd_soc_add_controls(codec, wm8750_spitz_controls, 298 err = snd_soc_add_controls(codec, wm8750_spitz_controls,
@@ -299,13 +301,13 @@ static int spitz_wm8750_init(struct snd_soc_pcm_runtime *rtd)
299 return err; 301 return err;
300 302
301 /* Add spitz specific widgets */ 303 /* Add spitz specific widgets */
302 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets, 304 snd_soc_dapm_new_controls(dapm, wm8750_dapm_widgets,
303 ARRAY_SIZE(wm8750_dapm_widgets)); 305 ARRAY_SIZE(wm8750_dapm_widgets));
304 306
305 /* Set up spitz specific audio paths */ 307 /* Set up spitz specific audio paths */
306 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 308 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
307 309
308 snd_soc_dapm_sync(codec); 310 snd_soc_dapm_sync(dapm);
309 return 0; 311 return 0;
310} 312}
311 313
diff --git a/sound/soc/pxa/tavorevb3.c b/sound/soc/pxa/tavorevb3.c
index 248c283fc4df..f881f65ec172 100644
--- a/sound/soc/pxa/tavorevb3.c
+++ b/sound/soc/pxa/tavorevb3.c
@@ -18,7 +18,6 @@
18#include <sound/pcm.h> 18#include <sound/pcm.h>
19#include <sound/pcm_params.h> 19#include <sound/pcm_params.h>
20#include <sound/soc.h> 20#include <sound/soc.h>
21#include <sound/soc-dapm.h>
22#include <sound/jack.h> 21#include <sound/jack.h>
23 22
24#include <asm/mach-types.h> 23#include <asm/mach-types.h>
@@ -133,20 +132,21 @@ static struct snd_soc_card snd_soc_card_evb3 = {
133static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd) 132static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd)
134{ 133{
135 struct snd_soc_codec *codec = rtd->codec; 134 struct snd_soc_codec *codec = rtd->codec;
135 struct snd_soc_dapm_context *dapm = &codec->dapm;
136 int ret; 136 int ret;
137 137
138 snd_soc_dapm_new_controls(codec, evb3_dapm_widgets, 138 snd_soc_dapm_new_controls(dapm, evb3_dapm_widgets,
139 ARRAY_SIZE(evb3_dapm_widgets)); 139 ARRAY_SIZE(evb3_dapm_widgets));
140 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 140 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
141 141
142 /* connected pins */ 142 /* connected pins */
143 snd_soc_dapm_enable_pin(codec, "Ext Speaker"); 143 snd_soc_dapm_enable_pin(dapm, "Ext Speaker");
144 snd_soc_dapm_enable_pin(codec, "Ext Mic 1"); 144 snd_soc_dapm_enable_pin(dapm, "Ext Mic 1");
145 snd_soc_dapm_enable_pin(codec, "Ext Mic 3"); 145 snd_soc_dapm_enable_pin(dapm, "Ext Mic 3");
146 snd_soc_dapm_disable_pin(codec, "Headset Mic 2"); 146 snd_soc_dapm_disable_pin(dapm, "Headset Mic 2");
147 snd_soc_dapm_disable_pin(codec, "Headset Stereophone"); 147 snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
148 148
149 ret = snd_soc_dapm_sync(codec); 149 ret = snd_soc_dapm_sync(dapm);
150 if (ret) 150 if (ret)
151 return ret; 151 return ret;
152 152
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 7b983f935454..f75804ef0897 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -26,7 +26,6 @@
26#include <sound/core.h> 26#include <sound/core.h>
27#include <sound/pcm.h> 27#include <sound/pcm.h>
28#include <sound/soc.h> 28#include <sound/soc.h>
29#include <sound/soc-dapm.h>
30 29
31#include <asm/mach-types.h> 30#include <asm/mach-types.h>
32#include <mach/tosa.h> 31#include <mach/tosa.h>
@@ -49,31 +48,33 @@ static int tosa_spk_func;
49 48
50static void tosa_ext_control(struct snd_soc_codec *codec) 49static void tosa_ext_control(struct snd_soc_codec *codec)
51{ 50{
51 struct snd_soc_dapm_context *dapm = &codec->dapm;
52
52 /* set up jack connection */ 53 /* set up jack connection */
53 switch (tosa_jack_func) { 54 switch (tosa_jack_func) {
54 case TOSA_HP: 55 case TOSA_HP:
55 snd_soc_dapm_disable_pin(codec, "Mic (Internal)"); 56 snd_soc_dapm_disable_pin(dapm, "Mic (Internal)");
56 snd_soc_dapm_enable_pin(codec, "Headphone Jack"); 57 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
57 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 58 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
58 break; 59 break;
59 case TOSA_MIC_INT: 60 case TOSA_MIC_INT:
60 snd_soc_dapm_enable_pin(codec, "Mic (Internal)"); 61 snd_soc_dapm_enable_pin(dapm, "Mic (Internal)");
61 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 62 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
62 snd_soc_dapm_disable_pin(codec, "Headset Jack"); 63 snd_soc_dapm_disable_pin(dapm, "Headset Jack");
63 break; 64 break;
64 case TOSA_HEADSET: 65 case TOSA_HEADSET:
65 snd_soc_dapm_disable_pin(codec, "Mic (Internal)"); 66 snd_soc_dapm_disable_pin(dapm, "Mic (Internal)");
66 snd_soc_dapm_disable_pin(codec, "Headphone Jack"); 67 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
67 snd_soc_dapm_enable_pin(codec, "Headset Jack"); 68 snd_soc_dapm_enable_pin(dapm, "Headset Jack");
68 break; 69 break;
69 } 70 }
70 71
71 if (tosa_spk_func == TOSA_SPK_ON) 72 if (tosa_spk_func == TOSA_SPK_ON)
72 snd_soc_dapm_enable_pin(codec, "Speaker"); 73 snd_soc_dapm_enable_pin(dapm, "Speaker");
73 else 74 else
74 snd_soc_dapm_disable_pin(codec, "Speaker"); 75 snd_soc_dapm_disable_pin(dapm, "Speaker");
75 76
76 snd_soc_dapm_sync(codec); 77 snd_soc_dapm_sync(dapm);
77} 78}
78 79
79static int tosa_startup(struct snd_pcm_substream *substream) 80static int tosa_startup(struct snd_pcm_substream *substream)
@@ -191,10 +192,11 @@ static const struct snd_kcontrol_new tosa_controls[] = {
191static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd) 192static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd)
192{ 193{
193 struct snd_soc_codec *codec = rtd->codec; 194 struct snd_soc_codec *codec = rtd->codec;
195 struct snd_soc_dapm_context *dapm = &codec->dapm;
194 int err; 196 int err;
195 197
196 snd_soc_dapm_nc_pin(codec, "OUT3"); 198 snd_soc_dapm_nc_pin(dapm, "OUT3");
197 snd_soc_dapm_nc_pin(codec, "MONOOUT"); 199 snd_soc_dapm_nc_pin(dapm, "MONOOUT");
198 200
199 /* add tosa specific controls */ 201 /* add tosa specific controls */
200 err = snd_soc_add_controls(codec, tosa_controls, 202 err = snd_soc_add_controls(codec, tosa_controls,
@@ -203,13 +205,13 @@ static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd)
203 return err; 205 return err;
204 206
205 /* add tosa specific widgets */ 207 /* add tosa specific widgets */
206 snd_soc_dapm_new_controls(codec, tosa_dapm_widgets, 208 snd_soc_dapm_new_controls(dapm, tosa_dapm_widgets,
207 ARRAY_SIZE(tosa_dapm_widgets)); 209 ARRAY_SIZE(tosa_dapm_widgets));
208 210
209 /* set up tosa specific audio path audio_map */ 211 /* set up tosa specific audio path audio_map */
210 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 212 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
211 213
212 snd_soc_dapm_sync(codec); 214 snd_soc_dapm_sync(dapm);
213 return 0; 215 return 0;
214} 216}
215 217
diff --git a/sound/soc/pxa/z2.c b/sound/soc/pxa/z2.c
index 4cc841b44182..2d4f896d7fec 100644
--- a/sound/soc/pxa/z2.c
+++ b/sound/soc/pxa/z2.c
@@ -21,7 +21,6 @@
21#include <sound/core.h> 21#include <sound/core.h>
22#include <sound/pcm.h> 22#include <sound/pcm.h>
23#include <sound/soc.h> 23#include <sound/soc.h>
24#include <sound/soc-dapm.h>
25#include <sound/jack.h> 24#include <sound/jack.h>
26 25
27#include <asm/mach-types.h> 26#include <asm/mach-types.h>
@@ -140,22 +139,23 @@ static const struct snd_soc_dapm_route audio_map[] = {
140static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd) 139static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
141{ 140{
142 struct snd_soc_codec *codec = rtd->codec; 141 struct snd_soc_codec *codec = rtd->codec;
142 struct snd_soc_dapm_context *dapm = &codec->dapm;
143 int ret; 143 int ret;
144 144
145 /* NC codec pins */ 145 /* NC codec pins */
146 snd_soc_dapm_disable_pin(codec, "LINPUT3"); 146 snd_soc_dapm_disable_pin(dapm, "LINPUT3");
147 snd_soc_dapm_disable_pin(codec, "RINPUT3"); 147 snd_soc_dapm_disable_pin(dapm, "RINPUT3");
148 snd_soc_dapm_disable_pin(codec, "OUT3"); 148 snd_soc_dapm_disable_pin(dapm, "OUT3");
149 snd_soc_dapm_disable_pin(codec, "MONO"); 149 snd_soc_dapm_disable_pin(dapm, "MONO");
150 150
151 /* Add z2 specific widgets */ 151 /* Add z2 specific widgets */
152 snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets, 152 snd_soc_dapm_new_controls(dapm, wm8750_dapm_widgets,
153 ARRAY_SIZE(wm8750_dapm_widgets)); 153 ARRAY_SIZE(wm8750_dapm_widgets));
154 154
155 /* Set up z2 specific audio paths */ 155 /* Set up z2 specific audio paths */
156 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 156 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
157 157
158 ret = snd_soc_dapm_sync(codec); 158 ret = snd_soc_dapm_sync(dapm);
159 if (ret) 159 if (ret)
160 goto err; 160 goto err;
161 161
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index d27e05af7759..b222a7d72027 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -20,7 +20,6 @@
20#include <sound/pcm.h> 20#include <sound/pcm.h>
21#include <sound/pcm_params.h> 21#include <sound/pcm_params.h>
22#include <sound/soc.h> 22#include <sound/soc.h>
23#include <sound/soc-dapm.h>
24 23
25#include "../codecs/wm9713.h" 24#include "../codecs/wm9713.h"
26#include "pxa2xx-ac97.h" 25#include "pxa2xx-ac97.h"
@@ -73,21 +72,22 @@ static const struct snd_soc_dapm_route audio_map[] = {
73static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd) 72static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd)
74{ 73{
75 struct snd_soc_codec *codec = rtd->codec; 74 struct snd_soc_codec *codec = rtd->codec;
75 struct snd_soc_dapm_context *dapm = &codec->dapm;
76 76
77 if (clk_pout) 77 if (clk_pout)
78 snd_soc_dai_set_pll(rtd->codec_dai, 0, 0, 78 snd_soc_dai_set_pll(rtd->codec_dai, 0, 0,
79 clk_get_rate(pout), 0); 79 clk_get_rate(pout), 0);
80 80
81 snd_soc_dapm_new_controls(codec, zylonite_dapm_widgets, 81 snd_soc_dapm_new_controls(dapm, zylonite_dapm_widgets,
82 ARRAY_SIZE(zylonite_dapm_widgets)); 82 ARRAY_SIZE(zylonite_dapm_widgets));
83 83
84 snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); 84 snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
85 85
86 /* Static setup for now */ 86 /* Static setup for now */
87 snd_soc_dapm_enable_pin(codec, "Headphone"); 87 snd_soc_dapm_enable_pin(dapm, "Headphone");
88 snd_soc_dapm_enable_pin(codec, "Headset Earpiece"); 88 snd_soc_dapm_enable_pin(dapm, "Headset Earpiece");
89 89
90 snd_soc_dapm_sync(codec); 90 snd_soc_dapm_sync(dapm);
91 return 0; 91 return 0;
92} 92}
93 93