ASoC: core: Add support for DAI and machine kcontrols.
[deliverable/linux.git] / sound / soc / pxa / corgi.c
index bc21944851c4c69f274fc4df418dd499e45a0bdd..863367ad89ce6aa1b173914f8c2541903d4f9846 100644 (file)
 static int corgi_jack_func;
 static int corgi_spk_func;
 
-static void corgi_ext_control(struct snd_soc_codec *codec)
+static void corgi_ext_control(struct snd_soc_dapm_context *dapm)
 {
-       struct snd_soc_dapm_context *dapm = &codec->dapm;
-
        /* set up jack connection */
        switch (corgi_jack_func) {
        case CORGI_HP:
@@ -104,7 +102,7 @@ static int corgi_startup(struct snd_pcm_substream *substream)
        mutex_lock(&codec->mutex);
 
        /* check the jack status at stream startup */
-       corgi_ext_control(codec);
+       corgi_ext_control(&codec->dapm);
 
        mutex_unlock(&codec->mutex);
 
@@ -173,13 +171,13 @@ static int corgi_get_jack(struct snd_kcontrol *kcontrol,
 static int corgi_set_jack(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
+       struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
 
        if (corgi_jack_func == ucontrol->value.integer.value[0])
                return 0;
 
        corgi_jack_func = ucontrol->value.integer.value[0];
-       corgi_ext_control(codec);
+       corgi_ext_control(&card->dapm);
        return 1;
 }
 
@@ -193,13 +191,13 @@ static int corgi_get_spk(struct snd_kcontrol *kcontrol,
 static int corgi_set_spk(struct snd_kcontrol *kcontrol,
        struct snd_ctl_elem_value *ucontrol)
 {
-       struct snd_soc_codec *codec =  snd_kcontrol_chip(kcontrol);
+       struct snd_soc_card *card =  snd_kcontrol_chip(kcontrol);
 
        if (corgi_spk_func == ucontrol->value.integer.value[0])
                return 0;
 
        corgi_spk_func = ucontrol->value.integer.value[0];
-       corgi_ext_control(codec);
+       corgi_ext_control(&card->dapm);
        return 1;
 }
 
This page took 0.040655 seconds and 5 git commands to generate.