{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream);
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(rtd->card);
snd_pcm_hw_constraint_single(runtime, SNDRV_PCM_HW_PARAM_CHANNELS, 2);
- n810_ext_control(&rtd->card->dapm);
+ n810_ext_control(dapm);
return clk_prepare_enable(sys_clkout2);
}
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
if (n810_spk_func == ucontrol->value.enumerated.item[0])
return 0;
n810_spk_func = ucontrol->value.enumerated.item[0];
- n810_ext_control(&card->dapm);
+ n810_ext_control(dapm);
return 1;
}
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
if (n810_jack_func == ucontrol->value.enumerated.item[0])
return 0;
n810_jack_func = ucontrol->value.enumerated.item[0];
- n810_ext_control(&card->dapm);
+ n810_ext_control(dapm);
return 1;
}
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_card *card = snd_kcontrol_chip(kcontrol);
+ struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(card);
if (n810_dmic_func == ucontrol->value.enumerated.item[0])
return 0;
n810_dmic_func = ucontrol->value.enumerated.item[0];
- n810_ext_control(&card->dapm);
+ n810_ext_control(dapm);
return 1;
}