]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/generic: Add option to enforce preferred_dacs pairs
authorTakashi Iwai <tiwai@suse.de>
Fri, 27 Nov 2020 14:11:03 +0000 (15:11 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 28 Nov 2020 08:29:52 +0000 (09:29 +0100)
commit7314dd8e1faaf4e241037dfa2f3b74d09e717b72
treee4640cd9fe9e1eb84ebfcf95d740d51f5162ce75
parentf1721eeb3fcd1b6310acba938c62f1ae8487d749
ALSA: hda/generic: Add option to enforce preferred_dacs pairs

The generic parser accepts the preferred_dacs[] pairs as a hint for
assigning a DAC to each pin, but this hint doesn't work always
effectively.  Currently it's merely a secondary choice after the trial
with the path index failed.  This made sometimes it difficult to
assign DACs without mimicking the connection list and/or the badness
table.

This patch adds a new flag, obey_preferred_dacs, that changes the
behavior of the parser.  As its name stands, the parser obeys the
given preferred_dacs[] pairs by skipping the path index matching and
giving a high penalty if no DAC is assigned by the pairs.  This mode
will help for assigning the fixed DACs forcibly from the codec
driver.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20201127141104.11041-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c
sound/pci/hda/hda_generic.h