OSDN Git Service

ALSA: hda/realtek - Allow skipping spec->init_amp detection
authorTakashi Iwai <tiwai@suse.de>
Thu, 21 Jun 2018 14:37:54 +0000 (16:37 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 25 Jun 2018 08:04:22 +0000 (10:04 +0200)
commit1c76aa5fb48d8357f38fb2f1d2cef742a617d695
tree146dd3c9798516ac7ae16b8b87dae2a61f5f7e19
parentab1bcc93b73dda48a618adbf9d94bef111fd15db
ALSA: hda/realtek - Allow skipping spec->init_amp detection

Some devices have the overrides of spec->init_amp at
HDA_FIXUP_ACT_PROBE just because alc_ssid_check() gives the
false-positive values from the SSID.

For more consistent behavior, define the logic in the following way:

- Define ALC_INIT_UNDEFINED as the default value before calling
  alc_ssid_check()
- Each fixup may set up spec->init_amp with another value at
  HDA_FIXUP_ACT_PRE_PROBE
- At detection, check whether spec->init_amp is ALC_INIT_UNDEFINED or
  not; if it's different, we skip the detection

Also, it turned out that ASUS TX300 requires the spec->init_amp
override, too; currently it ignores the GPIO bits implicitly by its
static init verb, but this will be changed in the later patchset.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c