Commit 7e0e44d4 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: hda - Add digital-only mode for ALC268

ALC268 can be configured as digital-only, e.g. for HDMI, on some
machines.  Allow the parser to set up the digital-only mode.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ab9fec09
...@@ -11824,9 +11824,14 @@ static int alc268_parse_auto_config(struct hda_codec *codec) ...@@ -11824,9 +11824,14 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
alc268_ignore); alc268_ignore);
if (err < 0) if (err < 0)
return err; return err;
if (!spec->autocfg.line_outs) if (!spec->autocfg.line_outs) {
if (spec->autocfg.dig_outs || spec->autocfg.dig_in_pin) {
spec->multiout.max_channels = 2;
spec->no_analog = 1;
goto dig_only;
}
return 0; /* can't find valid BIOS pin config */ return 0; /* can't find valid BIOS pin config */
}
err = alc268_auto_create_multi_out_ctls(spec, &spec->autocfg); err = alc268_auto_create_multi_out_ctls(spec, &spec->autocfg);
if (err < 0) if (err < 0)
return err; return err;
...@@ -11836,10 +11841,12 @@ static int alc268_parse_auto_config(struct hda_codec *codec) ...@@ -11836,10 +11841,12 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
spec->multiout.max_channels = 2; spec->multiout.max_channels = 2;
dig_only:
/* digital only support output */ /* digital only support output */
if (spec->autocfg.dig_outs) if (spec->autocfg.dig_outs) {
spec->multiout.dig_out_nid = ALC268_DIGOUT_NID; spec->multiout.dig_out_nid = ALC268_DIGOUT_NID;
spec->dig_out_type = spec->autocfg.dig_out_type[0];
}
if (spec->kctls.list) if (spec->kctls.list)
add_mixer(spec, spec->kctls.list); add_mixer(spec, spec->kctls.list);
...@@ -12140,7 +12147,7 @@ static int patch_alc268(struct hda_codec *codec) ...@@ -12140,7 +12147,7 @@ static int patch_alc268(struct hda_codec *codec)
(0 << AC_AMPCAP_MUTE_SHIFT)); (0 << AC_AMPCAP_MUTE_SHIFT));
} }
if (!spec->adc_nids && spec->input_mux) { if (!spec->no_analog && !spec->adc_nids && spec->input_mux) {
/* check whether NID 0x07 is valid */ /* check whether NID 0x07 is valid */
unsigned int wcap = get_wcaps(codec, 0x07); unsigned int wcap = get_wcaps(codec, 0x07);
int i; int i;
...@@ -12764,7 +12771,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec) ...@@ -12764,7 +12771,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
if (err < 0) if (err < 0)
return err; return err;
if (!spec->cap_mixer) if (!spec->cap_mixer && !spec->no_analog)
set_capture_mixer(spec); set_capture_mixer(spec);
store_pin_configs(codec); store_pin_configs(codec);
......
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