diff options
-rw-r--r-- | sound/pci/hda/hda_generic.c | 8 | ||||
-rw-r--r-- | sound/pci/hda/hda_generic.h | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_cirrus.c | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index b7c89df..276f6e7 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -549,11 +549,15 @@ static hda_nid_t look_for_out_mute_nid(struct hda_codec *codec, static hda_nid_t look_for_out_vol_nid(struct hda_codec *codec, struct nid_path *path) { + struct hda_gen_spec *spec = codec->spec; int i; for (i = path->depth - 1; i >= 0; i--) { - if (nid_has_volume(codec, path->path[i], HDA_OUTPUT)) - return path->path[i]; + hda_nid_t nid = path->path[i]; + if ((spec->out_vol_mask >> nid) & 1) + continue; + if (nid_has_volume(codec, nid, HDA_OUTPUT)) + return nid; } return 0; } diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 48d4402..7e45cb4 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -242,6 +242,9 @@ struct hda_gen_spec { /* additional mute flags (only effective with auto_mute_via_amp=1) */ u64 mute_bits; + /* bitmask for skipping volume controls */ + u64 out_vol_mask; + /* badness tables for output path evaluations */ const struct badness_table *main_out_badness; const struct badness_table *extra_out_badness; diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c index 18d9725..38d073e 100644 --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -660,6 +660,8 @@ static int patch_cs4208(struct hda_codec *codec) return -ENOMEM; spec->gen.automute_hook = cs_automute; + /* exclude NID 0x10 (HP) from output volumes due to different steps */ + spec->gen.out_vol_mask = 1ULL << 0x10; snd_hda_pick_fixup(codec, cs4208_models, cs4208_fixup_tbl, cs4208_fixups); |