Skip to content

Commit

Permalink
ALSA: hda - Fix double creation of SPDIF input controls
Browse files Browse the repository at this point in the history
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jul 6, 2009
1 parent 40c20fa commit 60e5388
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions sound/pci/hda/patch_cirrus.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,9 @@ static int parse_digital_input(struct hda_codec *codec)
struct auto_pin_cfg *cfg = &spec->autocfg;
int idx;

if (!cfg->dig_in_pin)
return 0;
spec->dig_in = get_adc(codec, cfg->dig_in_pin, &idx);
if (!spec->dig_in)
return 0;
return snd_hda_create_spdif_in_ctls(codec, spec->dig_in);
if (cfg->dig_in_pin)
spec->dig_in = get_adc(codec, cfg->dig_in_pin, &idx);
return 0;
}

/*
Expand Down

0 comments on commit 60e5388

Please sign in to comment.