diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-07-04 09:55:44 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-07-04 09:55:44 -0400 |
commit | 18bd2c44b9c7f0ee775e756dd59e12e0939f7ab9 (patch) | |
tree | 24f78db2bebcd2812fcbde5cb02aa69b2be71ed4 /sound | |
parent | de6c74f3e323b132caec898d224e0e3253d92eaf (diff) |
ALSA: hda - Create HP-vol control properly for VIA codecs
When the individual DAC is available for the headphone output, the driver
should create the DAC for its volume control.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_via.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 0a5a02ac2b2..8d46a0f937a 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -1855,6 +1855,7 @@ static int via_auto_create_hp_ctls(struct hda_codec *codec, hda_nid_t pin) | |||
1855 | { | 1855 | { |
1856 | struct via_spec *spec = codec->spec; | 1856 | struct via_spec *spec = codec->spec; |
1857 | struct nid_path *path; | 1857 | struct nid_path *path; |
1858 | bool check_dac; | ||
1858 | int err; | 1859 | int err; |
1859 | 1860 | ||
1860 | if (!pin) | 1861 | if (!pin) |
@@ -1875,11 +1876,14 @@ static int via_auto_create_hp_ctls(struct hda_codec *codec, hda_nid_t pin) | |||
1875 | !spec->hp_dac_nid) | 1876 | !spec->hp_dac_nid) |
1876 | return 0; | 1877 | return 0; |
1877 | 1878 | ||
1878 | if (spec->hp_dac_nid && !spec->hp_indep_shared) | 1879 | if (spec->hp_dac_nid && !spec->hp_indep_shared) { |
1879 | path = &spec->hp_path; | 1880 | path = &spec->hp_path; |
1880 | else | 1881 | check_dac = true; |
1882 | } else { | ||
1881 | path = &spec->hp_dep_path; | 1883 | path = &spec->hp_dep_path; |
1882 | err = create_ch_ctls(codec, "Headphone", 3, false, path); | 1884 | check_dac = false; |
1885 | } | ||
1886 | err = create_ch_ctls(codec, "Headphone", 3, check_dac, path); | ||
1883 | if (err < 0) | 1887 | if (err < 0) |
1884 | return err; | 1888 | return err; |
1885 | if (spec->hp_dac_nid) { | 1889 | if (spec->hp_dac_nid) { |