mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
Merge branch 'for-linus'
This commit is contained in:
commit
ebd6a199d0
@ -180,7 +180,7 @@ static int ac97_bus_reset(struct ac97_controller *ac97_ctrl)
|
||||
|
||||
/**
|
||||
* snd_ac97_codec_driver_register - register an AC97 codec driver
|
||||
* @dev: AC97 driver codec to register
|
||||
* @drv: AC97 driver codec to register
|
||||
*
|
||||
* Register an AC97 codec driver to the ac97 bus driver, aka. the AC97 digital
|
||||
* controller.
|
||||
@ -196,7 +196,7 @@ EXPORT_SYMBOL_GPL(snd_ac97_codec_driver_register);
|
||||
|
||||
/**
|
||||
* snd_ac97_codec_driver_unregister - unregister an AC97 codec driver
|
||||
* @dev: AC97 codec driver to unregister
|
||||
* @drv: AC97 codec driver to unregister
|
||||
*
|
||||
* Unregister a previously registered ac97 codec driver.
|
||||
*/
|
||||
@ -338,6 +338,7 @@ static int ac97_add_adapter(struct ac97_controller *ac97_ctrl)
|
||||
* @dev: the device providing the ac97 DC function
|
||||
* @slots_available: mask of the ac97 codecs that can be scanned and probed
|
||||
* bit0 => codec 0, bit1 => codec 1 ... bit 3 => codec 3
|
||||
* @codecs_pdata: codec platform data
|
||||
*
|
||||
* Register a digital controller which can control up to 4 ac97 codecs. This is
|
||||
* the controller side of the AC97 AC-link, while the slave side are the codecs.
|
||||
|
@ -3613,25 +3613,22 @@ static void alc256_init(struct hda_codec *codec)
|
||||
|
||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||
|
||||
if (hp_pin_sense)
|
||||
if (hp_pin_sense) {
|
||||
msleep(2);
|
||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
|
||||
|
||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
|
||||
if (hp_pin_sense || spec->ultra_low_power)
|
||||
msleep(85);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT);
|
||||
|
||||
if (hp_pin_sense || spec->ultra_low_power)
|
||||
msleep(100);
|
||||
msleep(75);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
|
||||
|
||||
msleep(75);
|
||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
|
||||
}
|
||||
alc_update_coef_idx(codec, 0x46, 3 << 12, 0);
|
||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x4); /* Hight power */
|
||||
alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 1 << 15); /* Clear bit */
|
||||
alc_update_coefex_idx(codec, 0x53, 0x02, 0x8000, 0 << 15);
|
||||
/*
|
||||
@ -3655,29 +3652,28 @@ static void alc256_shutup(struct hda_codec *codec)
|
||||
alc_update_coefex_idx(codec, 0x57, 0x04, 0x0007, 0x1); /* Low power */
|
||||
hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
|
||||
|
||||
if (hp_pin_sense)
|
||||
if (hp_pin_sense) {
|
||||
msleep(2);
|
||||
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE);
|
||||
|
||||
if (hp_pin_sense || spec->ultra_low_power)
|
||||
msleep(85);
|
||||
msleep(75);
|
||||
|
||||
/* 3k pull low control for Headset jack. */
|
||||
/* NOTE: call this before clearing the pin, otherwise codec stalls */
|
||||
/* If disable 3k pulldown control for alc257, the Mic detection will not work correctly
|
||||
* when booting with headset plugged. So skip setting it for the codec alc257
|
||||
*/
|
||||
if (spec->en_3kpull_low)
|
||||
alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
|
||||
if (spec->en_3kpull_low)
|
||||
alc_update_coef_idx(codec, 0x46, 0, 3 << 12);
|
||||
|
||||
if (!spec->no_shutup_pins)
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
if (!spec->no_shutup_pins)
|
||||
snd_hda_codec_write(codec, hp_pin, 0,
|
||||
AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0);
|
||||
|
||||
if (hp_pin_sense || spec->ultra_low_power)
|
||||
msleep(100);
|
||||
msleep(75);
|
||||
}
|
||||
|
||||
alc_auto_setup_eapd(codec, false);
|
||||
alc_shutup_pins(codec);
|
||||
|
Loading…
Reference in New Issue
Block a user