Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 293367
b: refs/heads/master
c: 059ad76
h: refs/heads/master
i:
  293365: 30bf3e7
  293363: 6bd33ff
  293359: 841e2bd
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Feb 17, 2012
1 parent 8d00261 commit e56f468
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a1fa92130c12c6a5abcfc8b960e442f87ebea475
refs/heads/master: 059ad7602889aa724adb84298dccae92534b7697
12 changes: 5 additions & 7 deletions trunk/sound/soc/pxa/spitz.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ static int spitz_jack_func;
static int spitz_spk_func;
static int spitz_mic_gpio;

static void spitz_ext_control(struct snd_soc_card *card)
static void spitz_ext_control(struct snd_soc_dapm_context *dapm)
{
struct snd_soc_dapm_context *dapm = &card->dapm;

if (spitz_spk_func == SPITZ_SPK_ON)
snd_soc_dapm_enable_pin(dapm, "Ext Spk");
else
Expand Down Expand Up @@ -113,7 +111,7 @@ static int spitz_startup(struct snd_pcm_substream *substream)
mutex_lock(&codec->mutex);

/* check the jack status at stream startup */
spitz_ext_control(codec);
spitz_ext_control(&codec->dapm);

mutex_unlock(&codec->mutex);

Expand Down Expand Up @@ -179,7 +177,7 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol,
return 0;

spitz_jack_func = ucontrol->value.integer.value[0];
spitz_ext_control(card);
spitz_ext_control(&card->dapm);
return 1;
}

Expand All @@ -193,13 +191,13 @@ static int spitz_get_spk(struct snd_kcontrol *kcontrol,
static int spitz_set_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);

if (spitz_spk_func == ucontrol->value.integer.value[0])
return 0;

spitz_spk_func = ucontrol->value.integer.value[0];
spitz_ext_control(card);
spitz_ext_control(&card->dapm);
return 1;
}

Expand Down

0 comments on commit e56f468

Please sign in to comment.