This is a note to let you know that I've just added the patch titled ALSA: hda - Introduce the bitmask for excluding output volume to the 3.12-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch and it can be found in the queue-3.12 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From a1114a8c681b0724d6ad905f53ff06aa756f5fb8 Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Mon, 4 Nov 2013 16:32:01 +0100 Subject: ALSA: hda - Introduce the bitmask for excluding output volume From: Takashi Iwai <tiwai@xxxxxxx> commit a1114a8c681b0724d6ad905f53ff06aa756f5fb8 upstream. Add a bitmask to hda_gen_spec indicating NIDs to exclude from the possible volume controls. That is, when the bit is set, the NID corresponding to the bit won't be picked as an output volume control any longer. Basically this is just a band-aid for working around the issue found with CS4208 codec, where only the headphone pin has a volume AMP with different dB steps. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=60811 Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/pci/hda/hda_generic.c | 8 ++++++-- sound/pci/hda/hda_generic.h | 3 +++ sound/pci/hda/patch_cirrus.c | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) --- 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(s 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; } --- 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; --- a/sound/pci/hda/patch_cirrus.c +++ b/sound/pci/hda/patch_cirrus.c @@ -684,6 +684,8 @@ static int patch_cs4208(struct hda_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); Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-3.12/alsa-hda-check-keep_eapd_on-before-inv_eapd.patch queue-3.12/alsa-hda-don-t-clear-the-power-state-at-snd_hda_codec_reset.patch queue-3.12/alsa-hda-add-support-for-cx20952.patch queue-3.12/alsa-hda-enable-spdif-for-acer-travelmate-6293.patch queue-3.12/alsa-hda-fix-the-headphone-jack-detection-on-sony-vaio-tx.patch queue-3.12/alsa-hda-provide-missing-pin-configs-for-vaio-with-alc260.patch queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions.patch queue-3.12/alsa-hda-introduce-the-bitmask-for-excluding-output-volume.patch queue-3.12/alsa-hda-apply-gpio-setup-for-macbooks-with-cs4208.patch queue-3.12/thinkpad_acpi-fix-build-error-when-config_snd_max_cards-32.patch queue-3.12/alsa-hda-force-buffer-alignment-for-haswell-hdmi-controllers.patch queue-3.12/alsa-hda-apply-macbook-fixups-for-cs4208-correctly.patch queue-3.12/alsa-compress-fix-drain-calls-blocking-other-compress-functions-v6.patch queue-3.12/alsa-hda-add-pincfg-fixup-for-asus-w5a.patch queue-3.12/alsa-hda-add-support-of-alc255-codecs.patch queue-3.12/alsa-6fire-fix-probe-of-multiple-cards.patch queue-3.12/alsa-hda-make-sure-mute-leds-stay-on-during-runtime-suspend-realtek.patch queue-3.12/alsa-msnd-avoid-duplicated-driver-name.patch queue-3.12/alsa-hda-fix-line-out-automute-on-realtek-multifunction-jacks.patch queue-3.12/alsa-pcsp-fix-the-order-of-input-device-unregistration.patch queue-3.12/alsa-hda-add-headset-quirk-for-dell-inspiron-3135.patch queue-3.12/alsa-hda-don-t-turn-off-eapd-for-headphone-on-lenovo-n100.patch queue-3.12/alsa-hda-fix-unbalanced-runtime-pm-notification-at-resume.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html