Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273564
b: refs/heads/master
c: 51e4152
h: refs/heads/master
v: v3
  • Loading branch information
Takashi Iwai committed Nov 3, 2011
1 parent 075fdc9 commit 9959522
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9009b0e41c1e81e1a30acdb5d4ffbb6dc5e1345f
refs/heads/master: 51e4152a969aa6d2306492ebf143932dcb535c9b
12 changes: 7 additions & 5 deletions trunk/sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -1604,27 +1604,29 @@ static void alc_auto_init_digital(struct hda_codec *codec)
static void alc_auto_parse_digital(struct hda_codec *codec)
{
struct alc_spec *spec = codec->spec;
int i, err;
int i, err, nums;
hda_nid_t dig_nid;

/* support multiple SPDIFs; the secondary is set up as a slave */
nums = 0;
for (i = 0; i < spec->autocfg.dig_outs; i++) {
hda_nid_t conn[4];
err = snd_hda_get_connections(codec,
spec->autocfg.dig_out_pins[i],
conn, ARRAY_SIZE(conn));
if (err < 0)
if (err <= 0)
continue;
dig_nid = conn[0]; /* assume the first element is audio-out */
if (!i) {
if (!nums) {
spec->multiout.dig_out_nid = dig_nid;
spec->dig_out_type = spec->autocfg.dig_out_type[0];
} else {
spec->multiout.slave_dig_outs = spec->slave_dig_outs;
if (i >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
if (nums >= ARRAY_SIZE(spec->slave_dig_outs) - 1)
break;
spec->slave_dig_outs[i - 1] = dig_nid;
spec->slave_dig_outs[nums - 1] = dig_nid;
}
nums++;
}

if (spec->autocfg.dig_in_pin) {
Expand Down

0 comments on commit 9959522

Please sign in to comment.