aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/tosa.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/pxa/tosa.c')
-rw-r--r--sound/soc/pxa/tosa.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index c77194f74c9b..dbbd3e9d1637 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -30,8 +30,6 @@
30 30
31#include <asm/mach-types.h> 31#include <asm/mach-types.h>
32#include <mach/tosa.h> 32#include <mach/tosa.h>
33#include <mach/pxa-regs.h>
34#include <mach/hardware.h>
35#include <mach/audio.h> 33#include <mach/audio.h>
36 34
37#include "../codecs/wm9712.h" 35#include "../codecs/wm9712.h"
@@ -82,7 +80,7 @@ static void tosa_ext_control(struct snd_soc_codec *codec)
82static int tosa_startup(struct snd_pcm_substream *substream) 80static int tosa_startup(struct snd_pcm_substream *substream)
83{ 81{
84 struct snd_soc_pcm_runtime *rtd = substream->private_data; 82 struct snd_soc_pcm_runtime *rtd = substream->private_data;
85 struct snd_soc_codec *codec = rtd->socdev->codec; 83 struct snd_soc_codec *codec = rtd->socdev->card->codec;
86 84
87 /* check the jack status at stream startup */ 85 /* check the jack status at stream startup */
88 tosa_ext_control(codec); 86 tosa_ext_control(codec);
@@ -188,18 +186,16 @@ static const struct snd_kcontrol_new tosa_controls[] = {
188 186
189static int tosa_ac97_init(struct snd_soc_codec *codec) 187static int tosa_ac97_init(struct snd_soc_codec *codec)
190{ 188{
191 int i, err; 189 int err;
192 190
193 snd_soc_dapm_nc_pin(codec, "OUT3"); 191 snd_soc_dapm_nc_pin(codec, "OUT3");
194 snd_soc_dapm_nc_pin(codec, "MONOOUT"); 192 snd_soc_dapm_nc_pin(codec, "MONOOUT");
195 193
196 /* add tosa specific controls */ 194 /* add tosa specific controls */
197 for (i = 0; i < ARRAY_SIZE(tosa_controls); i++) { 195 err = snd_soc_add_controls(codec, tosa_controls,
198 err = snd_ctl_add(codec->card, 196 ARRAY_SIZE(tosa_controls));
199 snd_soc_cnew(&tosa_controls[i],codec, NULL)); 197 if (err < 0)
200 if (err < 0) 198 return err;
201 return err;
202 }
203 199
204 /* add tosa specific widgets */ 200 /* add tosa specific widgets */
205 snd_soc_dapm_new_controls(codec, tosa_dapm_widgets, 201 snd_soc_dapm_new_controls(codec, tosa_dapm_widgets,