diff options
author | Takashi Iwai <tiwai@suse.de> | 2018-06-12 16:09:57 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-06-13 07:44:06 +0200 |
commit | c7273bd6c1922adcfd3ed5783c1fa69aa075f0f8 (patch) | |
tree | 86c5af0569ec59eff42891c378f9faa8390fecf4 /sound | |
parent | 5ebf6b1e459606d7fbf4fc67d2c28a6540953d93 (diff) |
ALSA: hda/realtek - Add shutup hint
The pin shutup callback seems working well on some devices while it
does harm on some other devices; e.g. Lenovo laptops show often the
noises at (runtime) PM with the pin shutup enabled.
Currently, the only way to disable the pin shutup is to hard-code
spec->shutup = alc_no_shutup;
in the fixup, and this makes the debugging harder for normal users.
For allowing users to test the similar effect without recompiling the
kernel, this patch adds a new hint string "shutup". It's a boolean
value, and by passing false to this, user can turn off the pin shutup
call.
For example, to turn off the shutup on Lenovo P50, create a "firmware
patch" file (e.g. /lib/firmware/alsa/lenovo-p50) containing the
following lines:
[codec]
0x10ec0298 0x17aa222e 0
[hint]
shutup = no
and pass the file via patch option of snd-hda-intel module
(e.g. patch=alsa/lenovo-p50).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index d64dcb9a4c99..e9bd33ea538f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -793,6 +793,9 @@ static inline void alc_shutup(struct hda_codec *codec) { struct alc_spec *spec = codec->spec; + if (!snd_hda_get_bool_hint(codec, "shutup")) + return; /* disabled explicitly by hints */ + if (spec && spec->shutup) spec->shutup(codec); else |