aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/tosa.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-28 16:29:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-28 16:29:51 -0400
commited40d0c472b136682b2fcba05f89762859c7374f (patch)
tree076b83a26bcd63d6158463735dd34c10bbc591dc /sound/soc/pxa/tosa.c
parent9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff)
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
Merge branch 'origin' into devel
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'sound/soc/pxa/tosa.c')
-rw-r--r--sound/soc/pxa/tosa.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index 050223d04e54..dbbd3e9d1637 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -80,7 +80,7 @@ static void tosa_ext_control(struct snd_soc_codec *codec)
80static int tosa_startup(struct snd_pcm_substream *substream) 80static int tosa_startup(struct snd_pcm_substream *substream)
81{ 81{
82 struct snd_soc_pcm_runtime *rtd = substream->private_data; 82 struct snd_soc_pcm_runtime *rtd = substream->private_data;
83 struct snd_soc_codec *codec = rtd->socdev->codec; 83 struct snd_soc_codec *codec = rtd->socdev->card->codec;
84 84
85 /* check the jack status at stream startup */ 85 /* check the jack status at stream startup */
86 tosa_ext_control(codec); 86 tosa_ext_control(codec);
@@ -186,18 +186,16 @@ static const struct snd_kcontrol_new tosa_controls[] = {
186 186
187static int tosa_ac97_init(struct snd_soc_codec *codec) 187static int tosa_ac97_init(struct snd_soc_codec *codec)
188{ 188{
189 int i, err; 189 int err;
190 190
191 snd_soc_dapm_nc_pin(codec, "OUT3"); 191 snd_soc_dapm_nc_pin(codec, "OUT3");
192 snd_soc_dapm_nc_pin(codec, "MONOOUT"); 192 snd_soc_dapm_nc_pin(codec, "MONOOUT");
193 193
194 /* add tosa specific controls */ 194 /* add tosa specific controls */
195 for (i = 0; i < ARRAY_SIZE(tosa_controls); i++) { 195 err = snd_soc_add_controls(codec, tosa_controls,
196 err = snd_ctl_add(codec->card, 196 ARRAY_SIZE(tosa_controls));
197 snd_soc_cnew(&tosa_controls[i],codec, NULL)); 197 if (err < 0)
198 if (err < 0) 198 return err;
199 return err;
200 }
201 199
202 /* add tosa specific widgets */ 200 /* add tosa specific widgets */
203 snd_soc_dapm_new_controls(codec, tosa_dapm_widgets, 201 snd_soc_dapm_new_controls(codec, tosa_dapm_widgets,