We use knew->index for adc_idx when we create "Capture Volume" and
"Capture Switch", so use the same to retrieve adc_idx.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hda_gen_spec *spec = codec->spec;
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hda_gen_spec *spec = codec->spec;
- unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+ unsigned int adc_idx = kcontrol->id.index;
ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx];
return 0;
ucontrol->value.enumerated.item[0] = spec->cur_mux[adc_idx];
return 0;
struct snd_ctl_elem_value *ucontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_ctl_elem_value *ucontrol)
{
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
- unsigned int adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+ unsigned int adc_idx = kcontrol->id.index;
return mux_select(codec, adc_idx,
ucontrol->value.enumerated.item[0]);
}
return mux_select(codec, adc_idx,
ucontrol->value.enumerated.item[0]);
}
int i, adc_idx, err = 0;
imux = &spec->input_mux;
int i, adc_idx, err = 0;
imux = &spec->input_mux;
- adc_idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id);
+ adc_idx = kcontrol->id.index;
mutex_lock(&codec->control_mutex);
/* we use the cache-only update at first since multiple input paths
* may shared the same amp; by updating only caches, the redundant
mutex_lock(&codec->control_mutex);
/* we use the cache-only update at first since multiple input paths
* may shared the same amp; by updating only caches, the redundant