static int spdif_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_dai *cpu_dai = snd_kcontrol_chip(kcontrol); struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai); if (host->saved_params.mute == ucontrol->value.integer.value[0]) return 0; spdif_digital_mute(cpu_dai, ucontrol->value.integer.value[0]); return 1; }
static int spdif_mute_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); struct snd_soc_card *card = codec->card; struct snd_soc_pcm_runtime *rtd = card->rtd; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; struct spdif_out_dev *host = snd_soc_dai_get_drvdata(cpu_dai); if (host->saved_params.mute == ucontrol->value.integer.value[0]) return 0; spdif_digital_mute(cpu_dai, ucontrol->value.integer.value[0]); return 1; }