Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18bd2c44 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
parent de6c74f3
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -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 via_spec *spec = codec->spec;
	struct nid_path *path;
	struct nid_path *path;
	bool check_dac;
	int err;
	int err;


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


	if (spec->hp_dac_nid && !spec->hp_indep_shared)
	if (spec->hp_dac_nid && !spec->hp_indep_shared) {
		path = &spec->hp_path;
		path = &spec->hp_path;
	else
		check_dac = true;
	} else {
		path = &spec->hp_dep_path;
		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)
	if (err < 0)
		return err;
		return err;
	if (spec->hp_dac_nid) {
	if (spec->hp_dac_nid) {