Date: Saturday, December 30, 2017 @ 08:33:40
  Author: anthraxx
Revision: 276961

upgpkg: linux-hardened 4.14.10.a-1

Deleted:
  
linux-hardened/trunk/ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch

------------------------------------------------------------+
 ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch |   76 -----------
 1 file changed, 76 deletions(-)

Deleted: ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch
===================================================================
--- ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch  2017-12-30 
08:32:55 UTC (rev 276960)
+++ ALSA-usb-audio-Fix-the-missing-ctl-name-suffix-at-pa.patch  2017-12-30 
08:33:40 UTC (rev 276961)
@@ -1,76 +0,0 @@
-From 5a15f289ee87eaf33f13f08a4909ec99d837ec5f Mon Sep 17 00:00:00 2001
-From: Takashi Iwai <[email protected]>
-Date: Mon, 18 Dec 2017 23:36:57 +0100
-Subject: [PATCH] ALSA: usb-audio: Fix the missing ctl name suffix at parsing
- SU
-
-The commit 89b89d121ffc ("ALSA: usb-audio: Add check return value for
-usb_string()") added the check of the return value from
-snd_usb_copy_string_desc(), which is correct per se, but it introduced
-a regression.  In the original code, either the "Clock Source",
-"Playback Source" or "Capture Source" suffix is added after the
-terminal string, while the commit changed it to add the suffix only
-when get_term_name() is failing.  It ended up with an incorrect ctl
-name like "PCM" instead of "PCM Capture Source".
-
-Also, even the original code has a similar bug: when the ctl name is
-generated from snd_usb_copy_string_desc() for the given iSelector, it
-also doesn't put the suffix.
-
-This patch addresses these issues: the suffix is added always when no
-static mapping is found.  Also the patch tries to put more comments
-and cleans up the if/else block for better readability in order to
-avoid the same pitfall again.
-
-Fixes: 89b89d121ffc ("ALSA: usb-audio: Add check return value for 
usb_string()")
-Reported-and-tested-by: Mauro Santos <[email protected]>
-Cc: <[email protected]>
-Signed-off-by: Takashi Iwai <[email protected]>
----
- sound/usb/mixer.c | 27 ++++++++++++++++-----------
- 1 file changed, 16 insertions(+), 11 deletions(-)
-
-diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
-index afc208e1c756..60ebc99ae323 100644
---- a/sound/usb/mixer.c
-+++ b/sound/usb/mixer.c
-@@ -2173,20 +2173,25 @@ static int parse_audio_selector_unit(struct 
mixer_build *state, int unitid,
-       kctl->private_value = (unsigned long)namelist;
-       kctl->private_free = usb_mixer_selector_elem_free;
- 
--      nameid = uac_selector_unit_iSelector(desc);
-+      /* check the static mapping table at first */
-       len = check_mapped_name(map, kctl->id.name, sizeof(kctl->id.name));
--      if (len)
--              ;
--      else if (nameid)
--              len = snd_usb_copy_string_desc(state, nameid, kctl->id.name,
--                                       sizeof(kctl->id.name));
--      else
--              len = get_term_name(state, &state->oterm,
--                                  kctl->id.name, sizeof(kctl->id.name), 0);
--
-       if (!len) {
--              strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
-+              /* no mapping ? */
-+              /* if iSelector is given, use it */
-+              nameid = uac_selector_unit_iSelector(desc);
-+              if (nameid)
-+                      len = snd_usb_copy_string_desc(state, nameid,
-+                                                     kctl->id.name,
-+                                                     sizeof(kctl->id.name));
-+              /* ... or pick up the terminal name at next */
-+              if (!len)
-+                      len = get_term_name(state, &state->oterm,
-+                                  kctl->id.name, sizeof(kctl->id.name), 0);
-+              /* ... or use the fixed string "USB" as the last resort */
-+              if (!len)
-+                      strlcpy(kctl->id.name, "USB", sizeof(kctl->id.name));
- 
-+              /* and add the proper suffix */
-               if (desc->bDescriptorSubtype == UAC2_CLOCK_SELECTOR)
-                       append_ctl_name(kctl, " Clock Source");
-               else if ((state->oterm.type & 0xff00) == 0x0100)
--- 
-2.15.1
-

Reply via email to