Skip to content

Commit

Permalink
ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c
Browse files Browse the repository at this point in the history
Use the new function to reduce the access and allow the user setup
via sysfs, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 20, 2009
1 parent 6766726 commit 7670dc4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sound/pci/hda/patch_ca0110.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ static void parse_line_outs(struct hda_codec *codec)
n = 0;
for (i = 0; i < cfg->line_outs; i++) {
nid = cfg->line_out_pins[i];
def_conf = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_CONFIG_DEFAULT, 0);
def_conf = snd_hda_codec_get_pincfg(codec, nid);
if (!def_conf)
continue; /* invalid pin */
if (snd_hda_get_connections(codec, nid, &spec->dacs[i], 1) != 1)
Expand All @@ -432,8 +431,7 @@ static void parse_hp_out(struct hda_codec *codec)
if (!cfg->hp_outs)
return;
nid = cfg->hp_pins[0];
def_conf = snd_hda_codec_read(codec, nid, 0,
AC_VERB_GET_CONFIG_DEFAULT, 0);
def_conf = snd_hda_codec_get_pincfg(codec, nid);
if (!def_conf) {
cfg->hp_outs = 0;
return;
Expand Down

0 comments on commit 7670dc4

Please sign in to comment.