Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 854493d

Browse files
tiwaigregkh
authored andcommitted
ALSA: hda/generic: Unconditionally prefer preferred_dacs pairs
[ Upstream commit 1c801e7 ] Some time ago, we introduced the obey_preferred_dacs flag for choosing the DAC/pin pairs specified by the driver instead of parsing the paths. This works as expected, per se, but there have been a few cases where we forgot to set this flag while preferred_dacs table is already set up. It ended up with incorrect wiring and made us wondering why it doesn't work. Basically, when the preferred_dacs table is provided, it means that the driver really wants to wire up to follow that. That is, the presence of the preferred_dacs table itself is already a "do-it" flag. In this patch, we simply replace the evaluation of obey_preferred_dacs flag with the presence of preferred_dacs table for fixing the misbehavior. Another patch to drop of the obsoleted flag will follow. Fixes: 242d990 ("ALSA: hda/generic: Add option to enforce preferred_dacs pairs") Link: https://bugzilla.suse.com/show_bug.cgi?id=1219803 Link: https://patch.msgid.link/20241001121439.26060-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 90e3756 commit 854493d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/pci/hda/hda_generic.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,7 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,
13831383
struct nid_path *path;
13841384
hda_nid_t pin = pins[i];
13851385

1386-
if (!spec->obey_preferred_dacs) {
1386+
if (!spec->preferred_dacs) {
13871387
path = snd_hda_get_path_from_idx(codec, path_idx[i]);
13881388
if (path) {
13891389
badness += assign_out_path_ctls(codec, path);
@@ -1395,7 +1395,7 @@ static int try_assign_dacs(struct hda_codec *codec, int num_outs,
13951395
if (dacs[i]) {
13961396
if (is_dac_already_used(codec, dacs[i]))
13971397
badness += bad->shared_primary;
1398-
} else if (spec->obey_preferred_dacs) {
1398+
} else if (spec->preferred_dacs) {
13991399
badness += BAD_NO_PRIMARY_DAC;
14001400
}
14011401

0 commit comments

Comments
 (0)