Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 059ad760 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: Change spitz_ext_control to take dapm as argument.



This fixes below build warning:
  CC      sound/soc/pxa/spitz.o
sound/soc/pxa/spitz.c: In function 'spitz_startup':
sound/soc/pxa/spitz.c:116: warning: passing argument 1 of 'spitz_ext_control' from incompatible pointer type
sound/soc/pxa/spitz.c:47: note: expected 'struct snd_soc_card *' but argument is of type 'struct snd_soc_codec *'

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent a1fa9213
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -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
@@ -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);

@@ -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;
}

@@ -199,7 +197,7 @@ static int spitz_set_spk(struct snd_kcontrol *kcontrol,
		return 0;

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