mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
Merge branch 'fix/hda' into topic/hda
This commit is contained in:
commit
a3daf68931
3 changed files with 23 additions and 21 deletions
|
@ -3754,7 +3754,7 @@ static int ad1884a_mobile_master_sw_put(struct snd_kcontrol *kcontrol,
|
|||
int mute = (!ucontrol->value.integer.value[0] &&
|
||||
!ucontrol->value.integer.value[1]);
|
||||
/* toggle GPIO1 according to the mute state */
|
||||
snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
|
||||
snd_hda_codec_write_cache(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
|
||||
mute ? 0x02 : 0x0);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -10389,6 +10389,18 @@ static void alc262_lenovo_3000_unsol_event(struct hda_codec *codec,
|
|||
alc262_lenovo_3000_automute(codec, 1);
|
||||
}
|
||||
|
||||
static int amp_stereo_mute_update(struct hda_codec *codec, hda_nid_t nid,
|
||||
int dir, int idx, long *valp)
|
||||
{
|
||||
int i, change = 0;
|
||||
|
||||
for (i = 0; i < 2; i++, valp++)
|
||||
change |= snd_hda_codec_amp_update(codec, nid, i, dir, idx,
|
||||
HDA_AMP_MUTE,
|
||||
*valp ? 0 : HDA_AMP_MUTE);
|
||||
return change;
|
||||
}
|
||||
|
||||
/* bind hp and internal speaker mute (with plug check) */
|
||||
static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
|
@ -10397,13 +10409,8 @@ static int alc262_fujitsu_master_sw_put(struct snd_kcontrol *kcontrol,
|
|||
long *valp = ucontrol->value.integer.value;
|
||||
int change;
|
||||
|
||||
change = snd_hda_codec_amp_stereo(codec, 0x14, HDA_OUTPUT, 0,
|
||||
HDA_AMP_MUTE,
|
||||
valp ? 0 : HDA_AMP_MUTE);
|
||||
change |= snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
|
||||
HDA_AMP_MUTE,
|
||||
valp ? 0 : HDA_AMP_MUTE);
|
||||
|
||||
change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
|
||||
change |= amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
|
||||
if (change)
|
||||
alc262_fujitsu_automute(codec, 0);
|
||||
return change;
|
||||
|
@ -10438,10 +10445,7 @@ static int alc262_lenovo_3000_master_sw_put(struct snd_kcontrol *kcontrol,
|
|||
long *valp = ucontrol->value.integer.value;
|
||||
int change;
|
||||
|
||||
change = snd_hda_codec_amp_stereo(codec, 0x1b, HDA_OUTPUT, 0,
|
||||
HDA_AMP_MUTE,
|
||||
valp ? 0 : HDA_AMP_MUTE);
|
||||
|
||||
change = amp_stereo_mute_update(codec, 0x1b, HDA_OUTPUT, 0, valp);
|
||||
if (change)
|
||||
alc262_lenovo_3000_automute(codec, 0);
|
||||
return change;
|
||||
|
@ -11612,12 +11616,7 @@ static int alc268_acer_master_sw_put(struct snd_kcontrol *kcontrol,
|
|||
long *valp = ucontrol->value.integer.value;
|
||||
int change;
|
||||
|
||||
change = snd_hda_codec_amp_update(codec, 0x14, 0, HDA_OUTPUT, 0,
|
||||
HDA_AMP_MUTE,
|
||||
valp[0] ? 0 : HDA_AMP_MUTE);
|
||||
change |= snd_hda_codec_amp_update(codec, 0x14, 1, HDA_OUTPUT, 0,
|
||||
HDA_AMP_MUTE,
|
||||
valp[1] ? 0 : HDA_AMP_MUTE);
|
||||
change = amp_stereo_mute_update(codec, 0x14, HDA_OUTPUT, 0, valp);
|
||||
if (change)
|
||||
alc268_acer_automute(codec, 0);
|
||||
return change;
|
||||
|
|
|
@ -2378,6 +2378,7 @@ static struct snd_pci_quirk stac9205_cfg_tbl[] = {
|
|||
SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0228,
|
||||
"Dell Vostro 1500", STAC_9205_DELL_M42),
|
||||
/* Gateway */
|
||||
SND_PCI_QUIRK(0x107b, 0x0560, "Gateway T6834c", STAC_9205_EAPD),
|
||||
SND_PCI_QUIRK(0x107b, 0x0565, "Gateway T1616", STAC_9205_EAPD),
|
||||
{} /* terminator */
|
||||
};
|
||||
|
@ -4065,7 +4066,7 @@ static int stac92xx_add_jack(struct hda_codec *codec,
|
|||
jack->nid = nid;
|
||||
jack->type = type;
|
||||
|
||||
sprintf(name, "%s at %s %s Jack",
|
||||
snprintf(name, sizeof(name), "%s at %s %s Jack",
|
||||
snd_hda_get_jack_type(def_conf),
|
||||
snd_hda_get_jack_connectivity(def_conf),
|
||||
snd_hda_get_jack_location(def_conf));
|
||||
|
@ -5870,6 +5871,8 @@ static unsigned int *stac9872_brd_tbl[STAC_9872_MODELS] = {
|
|||
};
|
||||
|
||||
static struct snd_pci_quirk stac9872_cfg_tbl[] = {
|
||||
SND_PCI_QUIRK_MASK(0x104d, 0xfff0, 0x81e0,
|
||||
"Sony VAIO F/S", STAC_9872_VAIO),
|
||||
{} /* terminator */
|
||||
};
|
||||
|
||||
|
@ -5882,6 +5885,8 @@ static int patch_stac9872(struct hda_codec *codec)
|
|||
if (spec == NULL)
|
||||
return -ENOMEM;
|
||||
codec->spec = spec;
|
||||
spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
|
||||
spec->pin_nids = stac9872_pin_nids;
|
||||
|
||||
spec->board_config = snd_hda_check_board_config(codec, STAC_9872_MODELS,
|
||||
stac9872_models,
|
||||
|
@ -5893,8 +5898,6 @@ static int patch_stac9872(struct hda_codec *codec)
|
|||
stac92xx_set_config_regs(codec,
|
||||
stac9872_brd_tbl[spec->board_config]);
|
||||
|
||||
spec->num_pins = ARRAY_SIZE(stac9872_pin_nids);
|
||||
spec->pin_nids = stac9872_pin_nids;
|
||||
spec->multiout.dac_nids = spec->dac_nids;
|
||||
spec->num_adcs = ARRAY_SIZE(stac9872_adc_nids);
|
||||
spec->adc_nids = stac9872_adc_nids;
|
||||
|
|
Loading…
Reference in a new issue