~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise-security

« back to all changes in this revision

Viewing changes to sound/soc/samsung/rx1950_uda1380.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2011-12-06 15:56:07 UTC
  • Revision ID: package-import@ubuntu.com-20111206155607-pcf44kv5fmhk564f
Tags: 3.2.0-1401.1
[ Paolo Pisati ]

* Rebased on top of Ubuntu-3.2.0-3.8
* Tilt-tracking @ ef2487af4bb15bdd0689631774b5a5e3a59f74e2
* Delete debian.ti-omap4/control, it shoudln't be tracked
* Fix architecture spelling (s/armel/armhf/)
* [Config] Update configs following 3.2 import
* [Config] Fix compilation: disable CODA and ARCH_OMAP3
* [Config] Fix compilation: disable Ethernet Faraday
* Update series to precise

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *
18
18
 */
19
19
 
 
20
#include <linux/types.h>
20
21
#include <linux/gpio.h>
 
22
#include <linux/module.h>
21
23
 
22
24
#include <sound/soc.h>
23
25
#include <sound/jack.h>
89
91
        },
90
92
};
91
93
 
92
 
static struct snd_soc_card rx1950_asoc = {
93
 
        .name = "rx1950",
94
 
        .dai_link = rx1950_uda1380_dai,
95
 
        .num_links = ARRAY_SIZE(rx1950_uda1380_dai),
96
 
};
97
 
 
98
94
/* rx1950 machine dapm widgets */
99
95
static const struct snd_soc_dapm_widget uda1380_dapm_widgets[] = {
100
96
        SND_SOC_DAPM_HP("Headphone Jack", NULL),
116
112
        {"VINM", NULL, "Mic Jack"},
117
113
};
118
114
 
 
115
static struct snd_soc_card rx1950_asoc = {
 
116
        .name = "rx1950",
 
117
        .dai_link = rx1950_uda1380_dai,
 
118
        .num_links = ARRAY_SIZE(rx1950_uda1380_dai),
 
119
 
 
120
        .dapm_widgets = uda1380_dapm_widgets,
 
121
        .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets),
 
122
        .dapm_routes = audio_map,
 
123
        .num_dapm_routes = ARRAY_SIZE(audio_map),
 
124
};
 
125
 
119
126
static struct platform_device *s3c24xx_snd_device;
120
127
 
121
128
static int rx1950_startup(struct snd_pcm_substream *substream)
219
226
        struct snd_soc_dapm_context *dapm = &codec->dapm;
220
227
        int err;
221
228
 
222
 
        /* Add rx1950 specific widgets */
223
 
        err = snd_soc_dapm_new_controls(dapm, uda1380_dapm_widgets,
224
 
                                  ARRAY_SIZE(uda1380_dapm_widgets));
225
 
 
226
 
        if (err)
227
 
                return err;
228
 
 
229
 
        /* Set up rx1950 specific audio path audio_mapnects */
230
 
        err = snd_soc_dapm_add_routes(dapm, audio_map,
231
 
                                      ARRAY_SIZE(audio_map));
232
 
 
233
 
        if (err)
234
 
                return err;
235
 
 
236
229
        snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
237
230
        snd_soc_dapm_enable_pin(dapm, "Speaker");
238
231
        snd_soc_dapm_enable_pin(dapm, "Mic Jack");
239
232
 
240
 
        snd_soc_dapm_sync(dapm);
241
 
 
242
233
        snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
243
234
                &hp_jack);
244
235