Commit 7670dc41 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Use snd_hda_codec_get_pincfg() in patch_ca0110.c

Use the new function to reduce the access and allow the user setup
via sysfs, too.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 67667263
...@@ -408,8 +408,7 @@ static void parse_line_outs(struct hda_codec *codec) ...@@ -408,8 +408,7 @@ static void parse_line_outs(struct hda_codec *codec)
n = 0; n = 0;
for (i = 0; i < cfg->line_outs; i++) { for (i = 0; i < cfg->line_outs; i++) {
nid = cfg->line_out_pins[i]; nid = cfg->line_out_pins[i];
def_conf = snd_hda_codec_read(codec, nid, 0, def_conf = snd_hda_codec_get_pincfg(codec, nid);
AC_VERB_GET_CONFIG_DEFAULT, 0);
if (!def_conf) if (!def_conf)
continue; /* invalid pin */ continue; /* invalid pin */
if (snd_hda_get_connections(codec, nid, &spec->dacs[i], 1) != 1) if (snd_hda_get_connections(codec, nid, &spec->dacs[i], 1) != 1)
...@@ -432,8 +431,7 @@ static void parse_hp_out(struct hda_codec *codec) ...@@ -432,8 +431,7 @@ static void parse_hp_out(struct hda_codec *codec)
if (!cfg->hp_outs) if (!cfg->hp_outs)
return; return;
nid = cfg->hp_pins[0]; nid = cfg->hp_pins[0];
def_conf = snd_hda_codec_read(codec, nid, 0, def_conf = snd_hda_codec_get_pincfg(codec, nid);
AC_VERB_GET_CONFIG_DEFAULT, 0);
if (!def_conf) { if (!def_conf) {
cfg->hp_outs = 0; cfg->hp_outs = 0;
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment