Lines 474-479
static void invalidate_nid_path(struct hda_codec *codec, int idx)
Link Here
|
474 |
memset(path, 0, sizeof(*path)); |
474 |
memset(path, 0, sizeof(*path)); |
475 |
} |
475 |
} |
476 |
|
476 |
|
|
|
477 |
static hda_nid_t get_preferred_dac(struct hda_codec *codec, hda_nid_t pin) |
478 |
{ |
479 |
struct hda_gen_spec *spec = codec->spec; |
480 |
const hda_nid_t *list = spec->preferred_dacs; |
481 |
|
482 |
if (!list) |
483 |
return 0; |
484 |
for (; *list; list += 2) |
485 |
if (*list == pin) |
486 |
return list[1]; |
487 |
return 0; |
488 |
} |
489 |
|
477 |
/* look for an empty DAC slot */ |
490 |
/* look for an empty DAC slot */ |
478 |
static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, |
491 |
static hda_nid_t look_for_dac(struct hda_codec *codec, hda_nid_t pin, |
479 |
bool is_digital) |
492 |
bool is_digital) |
Lines 1192-1198
static int try_assign_dacs(struct hda_codec *codec, int num_outs,
Link Here
|
1192 |
continue; |
1205 |
continue; |
1193 |
} |
1206 |
} |
1194 |
|
1207 |
|
1195 |
dacs[i] = look_for_dac(codec, pin, false); |
1208 |
dacs[i] = get_preferred_dac(codec, pin); |
|
|
1209 |
if (dacs[i]) { |
1210 |
if (is_dac_already_used(codec, dacs[i])) |
1211 |
badness += bad->no_dac; |
1212 |
} |
1213 |
|
1214 |
if (!dacs[i]) |
1215 |
dacs[i] = look_for_dac(codec, pin, false); |
1196 |
if (!dacs[i] && !i) { |
1216 |
if (!dacs[i] && !i) { |
1197 |
/* try to steal the DAC of surrounds for the front */ |
1217 |
/* try to steal the DAC of surrounds for the front */ |
1198 |
for (j = 1; j < num_outs; j++) { |
1218 |
for (j = 1; j < num_outs; j++) { |