Skip to content

Commit

Permalink
ALSA: hda - Create HP-vol control properly for VIA codecs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Iwai committed Jul 4, 2011
1 parent de6c74f commit 18bd2c4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -1855,6 +1855,7 @@ static int via_auto_create_hp_ctls(struct hda_codec *codec, hda_nid_t pin)
{
struct via_spec *spec = codec->spec;
struct nid_path *path;
bool check_dac;
int err;

if (!pin)
Expand All @@ -1875,11 +1876,14 @@ static int via_auto_create_hp_ctls(struct hda_codec *codec, hda_nid_t pin)
!spec->hp_dac_nid)
return 0;

if (spec->hp_dac_nid && !spec->hp_indep_shared)
if (spec->hp_dac_nid && !spec->hp_indep_shared) {
path = &spec->hp_path;
else
check_dac = true;
} else {
path = &spec->hp_dep_path;
err = create_ch_ctls(codec, "Headphone", 3, false, path);
check_dac = false;
}
err = create_ch_ctls(codec, "Headphone", 3, check_dac, path);
if (err < 0)
return err;
if (spec->hp_dac_nid) {
Expand Down

0 comments on commit 18bd2c4

Please sign in to comment.