aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-02-19 02:15:49 -0500
committerTakashi Iwai <tiwai@suse.de>2009-02-19 02:15:49 -0500
commit7e0e44d430281d398769f1d7864e161203252760 (patch)
treebfda230cab7307a76393e2ffe265e13ddf2543bf /sound/pci/hda/patch_realtek.c
parentab9fec099b796b002b6996c4c5845167d8fe6dbd (diff)
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: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index df32f9353e71..169b3837af52 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -11824,9 +11824,14 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
11824 alc268_ignore); 11824 alc268_ignore);
11825 if (err < 0) 11825 if (err < 0)
11826 return err; 11826 return err;
11827 if (!spec->autocfg.line_outs) 11827 if (!spec->autocfg.line_outs) {
11828 if (spec->autocfg.dig_outs || spec->autocfg.dig_in_pin) {
11829 spec->multiout.max_channels = 2;
11830 spec->no_analog = 1;
11831 goto dig_only;
11832 }
11828 return 0; /* can't find valid BIOS pin config */ 11833 return 0; /* can't find valid BIOS pin config */
11829 11834 }
11830 err = alc268_auto_create_multi_out_ctls(spec, &spec->autocfg); 11835 err = alc268_auto_create_multi_out_ctls(spec, &spec->autocfg);
11831 if (err < 0) 11836 if (err < 0)
11832 return err; 11837 return err;
@@ -11836,10 +11841,12 @@ static int alc268_parse_auto_config(struct hda_codec *codec)
11836 11841
11837 spec->multiout.max_channels = 2; 11842 spec->multiout.max_channels = 2;
11838 11843
11844 dig_only:
11839 /* digital only support output */ 11845 /* digital only support output */
11840 if (spec->autocfg.dig_outs) 11846 if (spec->autocfg.dig_outs) {
11841 spec->multiout.dig_out_nid = ALC268_DIGOUT_NID; 11847 spec->multiout.dig_out_nid = ALC268_DIGOUT_NID;
11842 11848 spec->dig_out_type = spec->autocfg.dig_out_type[0];
11849 }
11843 if (spec->kctls.list) 11850 if (spec->kctls.list)
11844 add_mixer(spec, spec->kctls.list); 11851 add_mixer(spec, spec->kctls.list);
11845 11852
@@ -12140,7 +12147,7 @@ static int patch_alc268(struct hda_codec *codec)
12140 (0 << AC_AMPCAP_MUTE_SHIFT)); 12147 (0 << AC_AMPCAP_MUTE_SHIFT));
12141 } 12148 }
12142 12149
12143 if (!spec->adc_nids && spec->input_mux) { 12150 if (!spec->no_analog && !spec->adc_nids && spec->input_mux) {
12144 /* check whether NID 0x07 is valid */ 12151 /* check whether NID 0x07 is valid */
12145 unsigned int wcap = get_wcaps(codec, 0x07); 12152 unsigned int wcap = get_wcaps(codec, 0x07);
12146 int i; 12153 int i;
@@ -12764,7 +12771,7 @@ static int alc269_parse_auto_config(struct hda_codec *codec)
12764 if (err < 0) 12771 if (err < 0)
12765 return err; 12772 return err;
12766 12773
12767 if (!spec->cap_mixer) 12774 if (!spec->cap_mixer && !spec->no_analog)
12768 set_capture_mixer(spec); 12775 set_capture_mixer(spec);
12769 12776
12770 store_pin_configs(codec); 12777 store_pin_configs(codec);