aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-06 06:10:41 -0500
committerTakashi Iwai <tiwai@suse.de>2009-03-06 06:10:41 -0500
commit139e071b0ff37800ed0a68b10c4bb325f51786eb (patch)
tree01ba52e59549344c64064022cfc3eab43a873a84 /sound/pci/hda/patch_sigmatel.c
parentee58a7ca21b2acf0d7ad0e1eb2f8d916ecf9fadc (diff)
ALSA: hda - Assign HP and speaker DACs before mic/line-in
Assign DACs to HP and speaker before mic-in/line-in shared outputs. This improves the usability as it results in more intuitive mixer names. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index ee119259183c..123bcf7c3b24 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -2921,6 +2921,26 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec)
2921 add_spec_dacs(spec, dac); 2921 add_spec_dacs(spec, dac);
2922 } 2922 }
2923 2923
2924 for (i = 0; i < cfg->hp_outs; i++) {
2925 nid = cfg->hp_pins[i];
2926 dac = get_unassigned_dac(codec, nid);
2927 if (dac) {
2928 if (!spec->multiout.hp_nid)
2929 spec->multiout.hp_nid = dac;
2930 else
2931 add_spec_extra_dacs(spec, dac);
2932 }
2933 spec->hp_dacs[i] = dac;
2934 }
2935
2936 for (i = 0; i < cfg->speaker_outs; i++) {
2937 nid = cfg->speaker_pins[i];
2938 dac = get_unassigned_dac(codec, nid);
2939 if (dac)
2940 add_spec_extra_dacs(spec, dac);
2941 spec->speaker_dacs[i] = dac;
2942 }
2943
2924 /* add line-in as output */ 2944 /* add line-in as output */
2925 nid = check_line_out_switch(codec); 2945 nid = check_line_out_switch(codec);
2926 if (nid) { 2946 if (nid) {
@@ -2948,26 +2968,6 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec)
2948 } 2968 }
2949 } 2969 }
2950 2970
2951 for (i = 0; i < cfg->hp_outs; i++) {
2952 nid = cfg->hp_pins[i];
2953 dac = get_unassigned_dac(codec, nid);
2954 if (dac) {
2955 if (!spec->multiout.hp_nid)
2956 spec->multiout.hp_nid = dac;
2957 else
2958 add_spec_extra_dacs(spec, dac);
2959 }
2960 spec->hp_dacs[i] = dac;
2961 }
2962
2963 for (i = 0; i < cfg->speaker_outs; i++) {
2964 nid = cfg->speaker_pins[i];
2965 dac = get_unassigned_dac(codec, nid);
2966 if (dac)
2967 add_spec_extra_dacs(spec, dac);
2968 spec->speaker_dacs[i] = dac;
2969 }
2970
2971 snd_printd("stac92xx: dac_nids=%d (0x%x/0x%x/0x%x/0x%x/0x%x)\n", 2971 snd_printd("stac92xx: dac_nids=%d (0x%x/0x%x/0x%x/0x%x/0x%x)\n",
2972 spec->multiout.num_dacs, 2972 spec->multiout.num_dacs,
2973 spec->multiout.dac_nids[0], 2973 spec->multiout.dac_nids[0],