From: Greg Kroah-Hartman Date: Fri, 22 Mar 2013 21:47:27 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.71~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca4a2cf9ec1d709f62b3ea2c8838e01112ade979;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: alsa-hda-cirrus-fix-the-digital-beep-registration.patch alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch --- diff --git a/queue-3.4/alsa-hda-cirrus-fix-the-digital-beep-registration.patch b/queue-3.4/alsa-hda-cirrus-fix-the-digital-beep-registration.patch new file mode 100644 index 00000000000..a3f12ccadaa --- /dev/null +++ b/queue-3.4/alsa-hda-cirrus-fix-the-digital-beep-registration.patch @@ -0,0 +1,57 @@ +From a86b1a2cd2f81f74e815e07f756edd7bc5b6f034 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Mon, 18 Mar 2013 11:00:44 +0100 +Subject: ALSA: hda/cirrus - Fix the digital beep registration + +From: Takashi Iwai + +commit a86b1a2cd2f81f74e815e07f756edd7bc5b6f034 upstream. + +The argument passed to snd_hda_attach_beep_device() is a widget NID +while spec->beep_amp holds the composed value for amp controls. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_conexant.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/sound/pci/hda/patch_conexant.c ++++ b/sound/pci/hda/patch_conexant.c +@@ -1177,7 +1177,7 @@ static int patch_cxt5045(struct hda_code + } + + if (spec->beep_amp) +- snd_hda_attach_beep_device(codec, spec->beep_amp); ++ snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp)); + + return 0; + } +@@ -1960,7 +1960,7 @@ static int patch_cxt5051(struct hda_code + } + + if (spec->beep_amp) +- snd_hda_attach_beep_device(codec, spec->beep_amp); ++ snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp)); + + return 0; + } +@@ -3151,7 +3151,7 @@ static int patch_cxt5066(struct hda_code + } + + if (spec->beep_amp) +- snd_hda_attach_beep_device(codec, spec->beep_amp); ++ snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp)); + + return 0; + } +@@ -4501,7 +4501,7 @@ static int patch_conexant_auto(struct hd + spec->capture_stream = &cx_auto_pcm_analog_capture; + codec->patch_ops = cx_auto_patch_ops; + if (spec->beep_amp) +- snd_hda_attach_beep_device(codec, spec->beep_amp); ++ snd_hda_attach_beep_device(codec, get_amp_nid_(spec->beep_amp)); + + /* Some laptops with Conexant chips show stalls in S3 resume, + * which falls into the single-cmd mode. diff --git a/queue-3.4/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch b/queue-3.4/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch new file mode 100644 index 00000000000..d406ed53e3c --- /dev/null +++ b/queue-3.4/alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch @@ -0,0 +1,32 @@ +From a686fd141e20244ad75f80ad54706da07d7bb90a Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Wed, 20 Mar 2013 15:42:00 +0100 +Subject: ALSA: hda - Fix typo in checking IEC958 emphasis bit + +From: Takashi Iwai + +commit a686fd141e20244ad75f80ad54706da07d7bb90a upstream. + +There is a typo in convert_to_spdif_status() about checking the +emphasis IEC958 status bit. It should check the given value instead +of the resultant value. + +Reported-by: Martin Weishart +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_codec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/hda_codec.c ++++ b/sound/pci/hda/hda_codec.c +@@ -2910,7 +2910,7 @@ static unsigned int convert_to_spdif_sta + if (val & AC_DIG1_PROFESSIONAL) + sbits |= IEC958_AES0_PROFESSIONAL; + if (sbits & IEC958_AES0_PROFESSIONAL) { +- if (sbits & AC_DIG1_EMPHASIS) ++ if (val & AC_DIG1_EMPHASIS) + sbits |= IEC958_AES0_PRO_EMPHASIS_5015; + } else { + if (val & AC_DIG1_EMPHASIS) diff --git a/queue-3.4/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch b/queue-3.4/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch new file mode 100644 index 00000000000..bbd29e9e65c --- /dev/null +++ b/queue-3.4/alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch @@ -0,0 +1,57 @@ +From 83ea5d18d74f032a760fecde78c0210f66f7f70c Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 19 Mar 2013 21:09:25 +0100 +Subject: ALSA: snd-usb: mixer: ignore -EINVAL in snd_usb_mixer_controls() + +From: Daniel Mack + +commit 83ea5d18d74f032a760fecde78c0210f66f7f70c upstream. + +Creation of individual mixer controls may fail, but that shouldn't cause +the entire mixer creation to fail. Even worse, if the mixer creation +fails, that will error out the entire device probing. + +All the functions called by parse_audio_unit() should return -EINVAL if +they find descriptors that are unsupported or believed to be malformed, +so we can safely handle this error code as a non-fatal condition in +snd_usb_mixer_controls(). + +That fixes a long standing bug which is commonly worked around by +adding quirks which make the driver ignore entire interfaces. Some of +them might now be unnecessary. + +Signed-off-by: Daniel Mack +Reported-and-tested-by: Rodolfo Thomazelli +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/mixer.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/sound/usb/mixer.c ++++ b/sound/usb/mixer.c +@@ -2027,7 +2027,7 @@ static int snd_usb_mixer_controls(struct + state.oterm.type = le16_to_cpu(desc->wTerminalType); + state.oterm.name = desc->iTerminal; + err = parse_audio_unit(&state, desc->bSourceID); +- if (err < 0) ++ if (err < 0 && err != -EINVAL) + return err; + } else { /* UAC_VERSION_2 */ + struct uac2_output_terminal_descriptor *desc = p; +@@ -2039,12 +2039,12 @@ static int snd_usb_mixer_controls(struct + state.oterm.type = le16_to_cpu(desc->wTerminalType); + state.oterm.name = desc->iTerminal; + err = parse_audio_unit(&state, desc->bSourceID); +- if (err < 0) ++ if (err < 0 && err != -EINVAL) + return err; + + /* for UAC2, use the same approach to also add the clock selectors */ + err = parse_audio_unit(&state, desc->bCSourceID); +- if (err < 0) ++ if (err < 0 && err != -EINVAL) + return err; + } + } diff --git a/queue-3.4/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch b/queue-3.4/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch new file mode 100644 index 00000000000..2c2ea84aede --- /dev/null +++ b/queue-3.4/alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch @@ -0,0 +1,47 @@ +From 4d7b86c98e445b075c2c4c3757eb6d3d6efbe72e Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Tue, 19 Mar 2013 21:09:24 +0100 +Subject: ALSA: snd-usb: mixer: propagate errors up the call chain + +From: Daniel Mack + +commit 4d7b86c98e445b075c2c4c3757eb6d3d6efbe72e upstream. + +In check_input_term() and parse_audio_feature_unit(), propagate the +error value that has been returned by a failing function instead of +-EINVAL. That helps cleaning up the error pathes in the mixer. + +Signed-off-by: Daniel Mack +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/usb/mixer.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +--- a/sound/usb/mixer.c ++++ b/sound/usb/mixer.c +@@ -711,8 +711,9 @@ static int check_input_term(struct mixer + case UAC2_CLOCK_SELECTOR: { + struct uac_selector_unit_descriptor *d = p1; + /* call recursively to retrieve the channel info */ +- if (check_input_term(state, d->baSourceID[0], term) < 0) +- return -ENODEV; ++ err = check_input_term(state, d->baSourceID[0], term); ++ if (err < 0) ++ return err; + term->type = d->bDescriptorSubtype << 16; /* virtual type */ + term->id = id; + term->name = uac_selector_unit_iSelector(d); +@@ -1263,8 +1264,9 @@ static int parse_audio_feature_unit(stru + return err; + + /* determine the input source type and name */ +- if (check_input_term(state, hdr->bSourceID, &iterm) < 0) +- return -EINVAL; ++ err = check_input_term(state, hdr->bSourceID, &iterm); ++ if (err < 0) ++ return err; + + master_bits = snd_usb_combine_bytes(bmaControls, csize); + /* master configuration quirks */ diff --git a/queue-3.4/series b/queue-3.4/series index 481fe602399..edb873b060a 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -28,3 +28,7 @@ sfc-fix-efx_rx_buf_offset-in-the-presence-of-swiotlb.patch sfc-detach-net-device-when-stopping-queues-for-reconfiguration.patch sfc-disable-soft-interrupt-handling-during-efx_device_detach_sync.patch sfc-only-use-tx-push-if-a-single-descriptor-is-to-be-written.patch +alsa-hda-cirrus-fix-the-digital-beep-registration.patch +alsa-hda-fix-typo-in-checking-iec958-emphasis-bit.patch +alsa-snd-usb-mixer-propagate-errors-up-the-call-chain.patch +alsa-snd-usb-mixer-ignore-einval-in-snd_usb_mixer_controls.patch