ALSA: hda - Make single_cmd option to stop the fallback mechanism
authorTakashi Iwai <tiwai@suse.de>
Thu, 12 Jan 2017 16:13:21 +0000 (17:13 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sun, 15 Jan 2017 08:09:04 +0000 (09:09 +0100)
commit41438f1314b0f6f4d94edc56bb5bc77138445bb3
tree51798b8b53730b4d8d7de9d5384ba4fd6cd6b896
parent1753187e288aacabfa8d61e4465f234fd80599fe
ALSA: hda - Make single_cmd option to stop the fallback mechanism

HD-audio driver has a mechanism to fall back to the single cmd mode as
a last resort if the CORB/RIRB communication goes wrong even after
switching to the polling mode.  The switching has worked in the past
well, but Enrico Mioso reported that his system crashes when this
happens.

Although the actual cause of the crash isn't still fully analyzed yet,
it'd be in anyway good to provide an option to turn off the fallback
mode.  Now this patch extends the behavior of the existing single_cmd
option for that.  Namely,

- The option is changed from bool to bint.
- As default, it is the mode allowing the fallback to single cmd.
- Once when either true/false value is given to the option, the driver
  explicitly turns on/off the single cmd mode, but without the
  fallback.

That is, if you want to disable the fallback, just pass single_cmd=0
option.  Passing single_cmd=1 will keep working like before.

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