diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/pxa/corgi.c | 7 | ||||
-rw-r--r-- | sound/soc/pxa/e740_wm9705.c | 10 | ||||
-rw-r--r-- | sound/soc/pxa/e750_wm9705.c | 10 | ||||
-rw-r--r-- | sound/soc/pxa/e800_wm9712.c | 19 | ||||
-rw-r--r-- | sound/soc/pxa/magician.c | 4 | ||||
-rw-r--r-- | sound/soc/pxa/mioa701_wm9713.c | 19 | ||||
-rw-r--r-- | sound/soc/pxa/poodle.c | 7 | ||||
-rw-r--r-- | sound/soc/pxa/spitz.c | 7 | ||||
-rw-r--r-- | sound/soc/pxa/tosa.c | 4 | ||||
-rw-r--r-- | sound/soc/pxa/zylonite.c | 17 |
10 files changed, 28 insertions, 76 deletions
diff --git a/sound/soc/pxa/corgi.c b/sound/soc/pxa/corgi.c index 9d9c8ad57f0e..5a88136aa800 100644 --- a/sound/soc/pxa/corgi.c +++ b/sound/soc/pxa/corgi.c | |||
@@ -101,14 +101,9 @@ static void corgi_ext_control(struct snd_soc_dapm_context *dapm) | |||
101 | static int corgi_startup(struct snd_pcm_substream *substream) | 101 | static int corgi_startup(struct snd_pcm_substream *substream) |
102 | { | 102 | { |
103 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 103 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
104 | struct snd_soc_codec *codec = rtd->codec; | ||
105 | |||
106 | mutex_lock(&codec->mutex); | ||
107 | 104 | ||
108 | /* check the jack status at stream startup */ | 105 | /* check the jack status at stream startup */ |
109 | corgi_ext_control(&codec->dapm); | 106 | corgi_ext_control(&rtd->card->dapm); |
110 | |||
111 | mutex_unlock(&codec->mutex); | ||
112 | 107 | ||
113 | return 0; | 108 | return 0; |
114 | } | 109 | } |
diff --git a/sound/soc/pxa/e740_wm9705.c b/sound/soc/pxa/e740_wm9705.c index 44b5c09d296b..c29fedab2f49 100644 --- a/sound/soc/pxa/e740_wm9705.c +++ b/sound/soc/pxa/e740_wm9705.c | |||
@@ -103,11 +103,6 @@ static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd) | |||
103 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); | 103 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); |
104 | snd_soc_dapm_nc_pin(dapm, "MIC2"); | 104 | snd_soc_dapm_nc_pin(dapm, "MIC2"); |
105 | 105 | ||
106 | snd_soc_dapm_new_controls(dapm, e740_dapm_widgets, | ||
107 | ARRAY_SIZE(e740_dapm_widgets)); | ||
108 | |||
109 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
110 | |||
111 | return 0; | 106 | return 0; |
112 | } | 107 | } |
113 | 108 | ||
@@ -136,6 +131,11 @@ static struct snd_soc_card e740 = { | |||
136 | .owner = THIS_MODULE, | 131 | .owner = THIS_MODULE, |
137 | .dai_link = e740_dai, | 132 | .dai_link = e740_dai, |
138 | .num_links = ARRAY_SIZE(e740_dai), | 133 | .num_links = ARRAY_SIZE(e740_dai), |
134 | |||
135 | .dapm_widgets = e740_dapm_widgets, | ||
136 | .num_dapm_widgets = ARRAY_SIZE(e740_dapm_widgets), | ||
137 | .dapm_routes = audio_map, | ||
138 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct gpio e740_audio_gpios[] = { | 141 | static struct gpio e740_audio_gpios[] = { |
diff --git a/sound/soc/pxa/e750_wm9705.c b/sound/soc/pxa/e750_wm9705.c index c34e447eb991..ee36aba88063 100644 --- a/sound/soc/pxa/e750_wm9705.c +++ b/sound/soc/pxa/e750_wm9705.c | |||
@@ -85,11 +85,6 @@ static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd) | |||
85 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); | 85 | snd_soc_dapm_nc_pin(dapm, "PCBEEP"); |
86 | snd_soc_dapm_nc_pin(dapm, "MIC2"); | 86 | snd_soc_dapm_nc_pin(dapm, "MIC2"); |
87 | 87 | ||
88 | snd_soc_dapm_new_controls(dapm, e750_dapm_widgets, | ||
89 | ARRAY_SIZE(e750_dapm_widgets)); | ||
90 | |||
91 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
92 | |||
93 | return 0; | 88 | return 0; |
94 | } | 89 | } |
95 | 90 | ||
@@ -119,6 +114,11 @@ static struct snd_soc_card e750 = { | |||
119 | .owner = THIS_MODULE, | 114 | .owner = THIS_MODULE, |
120 | .dai_link = e750_dai, | 115 | .dai_link = e750_dai, |
121 | .num_links = ARRAY_SIZE(e750_dai), | 116 | .num_links = ARRAY_SIZE(e750_dai), |
117 | |||
118 | .dapm_widgets = e750_dapm_widgets, | ||
119 | .num_dapm_widgets = ARRAY_SIZE(e750_dapm_widgets), | ||
120 | .dapm_routes = audio_map, | ||
121 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
122 | }; | 122 | }; |
123 | 123 | ||
124 | static struct gpio e750_audio_gpios[] = { | 124 | static struct gpio e750_audio_gpios[] = { |
diff --git a/sound/soc/pxa/e800_wm9712.c b/sound/soc/pxa/e800_wm9712.c index 3137f800b43f..24c2078ce70b 100644 --- a/sound/soc/pxa/e800_wm9712.c +++ b/sound/soc/pxa/e800_wm9712.c | |||
@@ -71,19 +71,6 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
71 | {"MIC2", NULL, "Mic (Internal2)"}, | 71 | {"MIC2", NULL, "Mic (Internal2)"}, |
72 | }; | 72 | }; |
73 | 73 | ||
74 | static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd) | ||
75 | { | ||
76 | struct snd_soc_codec *codec = rtd->codec; | ||
77 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
78 | |||
79 | snd_soc_dapm_new_controls(dapm, e800_dapm_widgets, | ||
80 | ARRAY_SIZE(e800_dapm_widgets)); | ||
81 | |||
82 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
83 | |||
84 | return 0; | ||
85 | } | ||
86 | |||
87 | static struct snd_soc_dai_link e800_dai[] = { | 74 | static struct snd_soc_dai_link e800_dai[] = { |
88 | { | 75 | { |
89 | .name = "AC97", | 76 | .name = "AC97", |
@@ -92,7 +79,6 @@ static struct snd_soc_dai_link e800_dai[] = { | |||
92 | .codec_dai_name = "wm9712-hifi", | 79 | .codec_dai_name = "wm9712-hifi", |
93 | .platform_name = "pxa-pcm-audio", | 80 | .platform_name = "pxa-pcm-audio", |
94 | .codec_name = "wm9712-codec", | 81 | .codec_name = "wm9712-codec", |
95 | .init = e800_ac97_init, | ||
96 | }, | 82 | }, |
97 | { | 83 | { |
98 | .name = "AC97 Aux", | 84 | .name = "AC97 Aux", |
@@ -109,6 +95,11 @@ static struct snd_soc_card e800 = { | |||
109 | .owner = THIS_MODULE, | 95 | .owner = THIS_MODULE, |
110 | .dai_link = e800_dai, | 96 | .dai_link = e800_dai, |
111 | .num_links = ARRAY_SIZE(e800_dai), | 97 | .num_links = ARRAY_SIZE(e800_dai), |
98 | |||
99 | .dapm_widgets = e800_dapm_widgets, | ||
100 | .num_dapm_widgets = ARRAY_SIZE(e800_dapm_widgets), | ||
101 | .dapm_routes = audio_map, | ||
102 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
112 | }; | 103 | }; |
113 | 104 | ||
114 | static struct gpio e800_audio_gpios[] = { | 105 | static struct gpio e800_audio_gpios[] = { |
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 31242be08823..41ab6678b65d 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
@@ -77,13 +77,9 @@ static int magician_startup(struct snd_pcm_substream *substream) | |||
77 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 77 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
78 | struct snd_soc_codec *codec = rtd->codec; | 78 | struct snd_soc_codec *codec = rtd->codec; |
79 | 79 | ||
80 | mutex_lock(&codec->mutex); | ||
81 | |||
82 | /* check the jack status at stream startup */ | 80 | /* check the jack status at stream startup */ |
83 | magician_ext_control(codec); | 81 | magician_ext_control(codec); |
84 | 82 | ||
85 | mutex_unlock(&codec->mutex); | ||
86 | |||
87 | return 0; | 83 | return 0; |
88 | } | 84 | } |
89 | 85 | ||
diff --git a/sound/soc/pxa/mioa701_wm9713.c b/sound/soc/pxa/mioa701_wm9713.c index 160c5245448f..595eee341e90 100644 --- a/sound/soc/pxa/mioa701_wm9713.c +++ b/sound/soc/pxa/mioa701_wm9713.c | |||
@@ -127,16 +127,8 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
127 | static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) | 127 | static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) |
128 | { | 128 | { |
129 | struct snd_soc_codec *codec = rtd->codec; | 129 | struct snd_soc_codec *codec = rtd->codec; |
130 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
131 | unsigned short reg; | 130 | unsigned short reg; |
132 | 131 | ||
133 | /* Add mioa701 specific widgets */ | ||
134 | snd_soc_dapm_new_controls(dapm, mioa701_dapm_widgets, | ||
135 | ARRAY_SIZE(mioa701_dapm_widgets)); | ||
136 | |||
137 | /* Set up mioa701 specific audio path audio_mapnects */ | ||
138 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
139 | |||
140 | /* Prepare GPIO8 for rear speaker amplifier */ | 132 | /* Prepare GPIO8 for rear speaker amplifier */ |
141 | reg = codec->driver->read(codec, AC97_GPIO_CFG); | 133 | reg = codec->driver->read(codec, AC97_GPIO_CFG); |
142 | codec->driver->write(codec, AC97_GPIO_CFG, reg | 0x0100); | 134 | codec->driver->write(codec, AC97_GPIO_CFG, reg | 0x0100); |
@@ -145,12 +137,6 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) | |||
145 | reg = codec->driver->read(codec, AC97_3D_CONTROL); | 137 | reg = codec->driver->read(codec, AC97_3D_CONTROL); |
146 | codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000); | 138 | codec->driver->write(codec, AC97_3D_CONTROL, reg | 0xc000); |
147 | 139 | ||
148 | snd_soc_dapm_enable_pin(dapm, "Front Speaker"); | ||
149 | snd_soc_dapm_enable_pin(dapm, "Rear Speaker"); | ||
150 | snd_soc_dapm_enable_pin(dapm, "Front Mic"); | ||
151 | snd_soc_dapm_enable_pin(dapm, "GSM Line In"); | ||
152 | snd_soc_dapm_enable_pin(dapm, "GSM Line Out"); | ||
153 | |||
154 | return 0; | 140 | return 0; |
155 | } | 141 | } |
156 | 142 | ||
@@ -183,6 +169,11 @@ static struct snd_soc_card mioa701 = { | |||
183 | .owner = THIS_MODULE, | 169 | .owner = THIS_MODULE, |
184 | .dai_link = mioa701_dai, | 170 | .dai_link = mioa701_dai, |
185 | .num_links = ARRAY_SIZE(mioa701_dai), | 171 | .num_links = ARRAY_SIZE(mioa701_dai), |
172 | |||
173 | .dapm_widgets = mioa701_dapm_widgets, | ||
174 | .num_dapm_widgets = ARRAY_SIZE(mioa701_dapm_widgets), | ||
175 | .dapm_routes = audio_map, | ||
176 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
186 | }; | 177 | }; |
187 | 178 | ||
188 | static int mioa701_wm9713_probe(struct platform_device *pdev) | 179 | static int mioa701_wm9713_probe(struct platform_device *pdev) |
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c index c93e138d8dc3..c6bdc6c0eff6 100644 --- a/sound/soc/pxa/poodle.c +++ b/sound/soc/pxa/poodle.c | |||
@@ -74,14 +74,9 @@ static void poodle_ext_control(struct snd_soc_dapm_context *dapm) | |||
74 | static int poodle_startup(struct snd_pcm_substream *substream) | 74 | static int poodle_startup(struct snd_pcm_substream *substream) |
75 | { | 75 | { |
76 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 76 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
77 | struct snd_soc_codec *codec = rtd->codec; | ||
78 | |||
79 | mutex_lock(&codec->mutex); | ||
80 | 77 | ||
81 | /* check the jack status at stream startup */ | 78 | /* check the jack status at stream startup */ |
82 | poodle_ext_control(&codec->dapm); | 79 | poodle_ext_control(&rtd->card->dapm); |
83 | |||
84 | mutex_unlock(&codec->mutex); | ||
85 | 80 | ||
86 | return 0; | 81 | return 0; |
87 | } | 82 | } |
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index 04dbb5a38fa4..1373b017a951 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c | |||
@@ -111,14 +111,9 @@ static void spitz_ext_control(struct snd_soc_dapm_context *dapm) | |||
111 | static int spitz_startup(struct snd_pcm_substream *substream) | 111 | static int spitz_startup(struct snd_pcm_substream *substream) |
112 | { | 112 | { |
113 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 113 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
114 | struct snd_soc_codec *codec = rtd->codec; | ||
115 | |||
116 | mutex_lock(&codec->mutex); | ||
117 | 114 | ||
118 | /* check the jack status at stream startup */ | 115 | /* check the jack status at stream startup */ |
119 | spitz_ext_control(&codec->dapm); | 116 | spitz_ext_control(&rtd->card->dapm); |
120 | |||
121 | mutex_unlock(&codec->mutex); | ||
122 | 117 | ||
123 | return 0; | 118 | return 0; |
124 | } | 119 | } |
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c index 2a4b438ce97c..cead1658d10a 100644 --- a/sound/soc/pxa/tosa.c +++ b/sound/soc/pxa/tosa.c | |||
@@ -84,13 +84,9 @@ static int tosa_startup(struct snd_pcm_substream *substream) | |||
84 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 84 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
85 | struct snd_soc_codec *codec = rtd->codec; | 85 | struct snd_soc_codec *codec = rtd->codec; |
86 | 86 | ||
87 | mutex_lock(&codec->mutex); | ||
88 | |||
89 | /* check the jack status at stream startup */ | 87 | /* check the jack status at stream startup */ |
90 | tosa_ext_control(codec); | 88 | tosa_ext_control(codec); |
91 | 89 | ||
92 | mutex_unlock(&codec->mutex); | ||
93 | |||
94 | return 0; | 90 | return 0; |
95 | } | 91 | } |
96 | 92 | ||
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c index db8aadf8932d..23bf991e95d5 100644 --- a/sound/soc/pxa/zylonite.c +++ b/sound/soc/pxa/zylonite.c | |||
@@ -71,22 +71,10 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
71 | 71 | ||
72 | static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd) | 72 | static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd) |
73 | { | 73 | { |
74 | struct snd_soc_codec *codec = rtd->codec; | ||
75 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
76 | |||
77 | if (clk_pout) | 74 | if (clk_pout) |
78 | snd_soc_dai_set_pll(rtd->codec_dai, 0, 0, | 75 | snd_soc_dai_set_pll(rtd->codec_dai, 0, 0, |
79 | clk_get_rate(pout), 0); | 76 | clk_get_rate(pout), 0); |
80 | 77 | ||
81 | snd_soc_dapm_new_controls(dapm, zylonite_dapm_widgets, | ||
82 | ARRAY_SIZE(zylonite_dapm_widgets)); | ||
83 | |||
84 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); | ||
85 | |||
86 | /* Static setup for now */ | ||
87 | snd_soc_dapm_enable_pin(dapm, "Headphone"); | ||
88 | snd_soc_dapm_enable_pin(dapm, "Headset Earpiece"); | ||
89 | |||
90 | return 0; | 78 | return 0; |
91 | } | 79 | } |
92 | 80 | ||
@@ -256,6 +244,11 @@ static struct snd_soc_card zylonite = { | |||
256 | .resume_pre = &zylonite_resume_pre, | 244 | .resume_pre = &zylonite_resume_pre, |
257 | .dai_link = zylonite_dai, | 245 | .dai_link = zylonite_dai, |
258 | .num_links = ARRAY_SIZE(zylonite_dai), | 246 | .num_links = ARRAY_SIZE(zylonite_dai), |
247 | |||
248 | .dapm_widgets = zylonite_dapm_widgets, | ||
249 | .num_dapm_widgets = ARRAY_SIZE(zylonite_dapm_widgets), | ||
250 | .dapm_routes = audio_map, | ||
251 | .num_dapm_routes = ARRAY_SIZE(audio_map), | ||
259 | }; | 252 | }; |
260 | 253 | ||
261 | static struct platform_device *zylonite_snd_ac97_device; | 254 | static struct platform_device *zylonite_snd_ac97_device; |