static int poodle_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; /* check the jack status at stream startup */ poodle_ext_control(&rtd->card->dapm); return 0; }
static int poodle_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->socdev->codec; /* check the jack status at stream startup */ poodle_ext_control(codec); return 0; }
static int poodle_set_spk(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); if (poodle_spk_func == ucontrol->value.integer.value[0]) return 0; poodle_spk_func = ucontrol->value.integer.value[0]; poodle_ext_control(&card->dapm); return 1; }
static int poodle_set_jack(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); if (poodle_jack_func == ucontrol->value.integer.value[0]) return 0; poodle_jack_func = ucontrol->value.integer.value[0]; poodle_ext_control(codec); return 1; }
static int poodle_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_codec *codec = rtd->codec; mutex_lock(&codec->mutex); /* */ poodle_ext_control(&codec->dapm); mutex_unlock(&codec->mutex); return 0; }