This is a note to let you know that I've just added the patch titled ALSA: hda - Mute all aamix inputs as default 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-mute-all-aamix-inputs-as-default.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 ebb93c057dda376414fbc499ad6ace9b527dff5a Mon Sep 17 00:00:00 2001 From: Takashi Iwai <tiwai@xxxxxxx> Date: Tue, 10 Dec 2013 17:33:49 +0100 Subject: ALSA: hda - Mute all aamix inputs as default From: Takashi Iwai <tiwai@xxxxxxx> commit ebb93c057dda376414fbc499ad6ace9b527dff5a upstream. Not all channels have been initialized, so far, especially when aamix NID itself doesn't have amps but its leaves have. This patch fixes these holes. Otherwise you might get unexpected loopback inputs, e.g. from surround channels. Signed-off-by: Takashi Iwai <tiwai@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- sound/pci/hda/hda_generic.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -4318,6 +4318,26 @@ static unsigned int snd_hda_gen_path_pow return AC_PWRST_D3; } +/* mute all aamix inputs initially; parse up to the first leaves */ +static void mute_all_mixer_nid(struct hda_codec *codec, hda_nid_t mix) +{ + int i, nums; + const hda_nid_t *conn; + bool has_amp; + + nums = snd_hda_get_conn_list(codec, mix, &conn); + has_amp = nid_has_mute(codec, mix, HDA_INPUT); + for (i = 0; i < nums; i++) { + if (has_amp) + snd_hda_codec_amp_stereo(codec, mix, + HDA_INPUT, i, + 0xff, HDA_AMP_MUTE); + else if (nid_has_volume(codec, conn[i], HDA_OUTPUT)) + snd_hda_codec_amp_stereo(codec, conn[i], + HDA_OUTPUT, 0, + 0xff, HDA_AMP_MUTE); + } +} /* * Parse the given BIOS configuration and set up the hda_gen_spec @@ -4456,6 +4476,10 @@ int snd_hda_gen_parse_auto_config(struct } } + /* mute all aamix input initially */ + if (spec->mixer_nid) + mute_all_mixer_nid(codec, spec->mixer_nid); + dig_only: parse_digital(codec); Patches currently in stable-queue which might be from tiwai@xxxxxxx are queue-3.12/alsa-hda-hdmi-fix-iec958-ctl-indexes-for-some-simple-hdmi-devices.patch queue-3.12/alsa-hda-add-static-dac-pin-mapping-for-ad1986a-codec.patch queue-3.12/alsa-compress-fix-64bit-abi-incompatibility.patch queue-3.12/alsa-memalloc.h-fix-wrong-truncation-of-dma_addr_t.patch queue-3.12/alsa-hda-mute-all-aamix-inputs-as-default.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