1. 06 Mar, 2020 3 commits
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix missing braces in some struct inits · d0ee674b
      Takashi Iwai authored
      The struct s1810c_state_packet contains the array in the first field
      hence zero-initialization requires a more couple of braces.  Fix the
      compile warning pointing it out:
         sound/usb/mixer_s1810c.c: In function 'snd_sc1810c_get_status_field':
         sound/usb/mixer_s1810c.c:178:9: warning: missing braces around initializer [-Wmissing-braces]
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Fixes: 8dc5efe3 ("ALSA: usb-audio: Add support for Presonus Studio 1810c")
      Link: https://lore.kernel.org/r/202002210251.WgMfvKJP%lkp@intel.com
      Link: https://lore.kernel.org/r/20200306081231.7940-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d0ee674b
    • Alexander Tsoy's avatar
      ALSA: usb-audio: Add support for MOTU MicroBook IIc · 2edb84e3
      Alexander Tsoy authored
      MicroBook IIc operates in UAC2 mode by default. This patch addresses
      several issues with it:
      
      - MicroBook II and IIc shares the same USB ID. We can distinguish them
        by interface class.
      - MaxPacketsOnly attribute is erroneously set in endpoint descriptors.
        As a result this card produces noise with all sample rates other than
        96 KHz. This also causes issues like IOMMU page faults and other
        problems with host controller.
      - Sample rate changes takes more than 2 seconds for this device. Clock
        validity request returns false during that period, so the clock validity
        quirk is required.
      Signed-off-by: default avatarAlexander Tsoy <alexander@tsoy.me>
      Link: https://lore.kernel.org/r/20200229151815.14199-1-alexander@tsoy.meSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2edb84e3
    • Randy Dunlap's avatar
      ALSA: korg1212: fix if-statement empty body warnings · 66db2958
      Randy Dunlap authored
      Fix gcc warnings when -Wextra is used by using an empty do-while
      block instead of <nothing>.  Fixes these build warnings:
      
      ../sound/pci/korg1212/korg1212.c:674:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:708:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:730:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:853:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1013:44: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1035:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1052:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1066:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1087:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1094:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:1208:43: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      ../sound/pci/korg1212/korg1212.c:2360:102: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Link: https://lore.kernel.org/r/91fb1e97-a773-5790-3f65-8198403341e1@infradead.orgSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      66db2958
  2. 17 Feb, 2020 3 commits
  3. 15 Feb, 2020 1 commit
  4. 14 Feb, 2020 5 commits
  5. 13 Feb, 2020 2 commits
  6. 12 Feb, 2020 6 commits
  7. 11 Feb, 2020 3 commits
    • Arvind Sankar's avatar
      ALSA: usb-audio: Apply sample rate quirk for Audioengine D1 · 93f9d1a4
      Arvind Sankar authored
      The Audioengine D1 (0x2912:0x30c8) does support reading the sample rate,
      but it returns the rate in byte-reversed order.
      
      When setting sampling rate, the driver produces these warning messages:
      [168840.944226] usb 3-2.2: current rate 4500480 is different from the runtime rate 44100
      [168854.930414] usb 3-2.2: current rate 8436480 is different from the runtime rate 48000
      [168905.185825] usb 3-2.1.2: current rate 30465 is different from the runtime rate 96000
      
      As can be seen from the hexadecimal conversion, the current rate read
      back is byte-reversed from the rate that was set.
      
      44100 == 0x00ac44, 4500480 == 0x44ac00
      48000 == 0x00bb80, 8436480 == 0x80bb00
      96000 == 0x017700,   30465 == 0x007701
      
      Rather than implementing a new quirk to reverse the order, just skip
      checking the rate to avoid spamming the log.
      Signed-off-by: default avatarArvind Sankar <nivedita@alum.mit.edu>
      Cc: <stable@vger.kernel.org>
      Link: https://lore.kernel.org/r/20200211162235.1639889-1-nivedita@alum.mit.eduSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      93f9d1a4
    • Takashi Iwai's avatar
      ALSA: usb-audio: Fix UAC2/3 effect unit parsing · d75a170f
      Takashi Iwai authored
      We've got a regression report about M-Audio Fast Track C400 device,
      and the git bisection resulted in the commit e0ccdef9 ("ALSA:
      usb-audio: Clean up check_input_term()").  This commit was about the
      rewrite of the input terminal parser, and it's not too obvious from
      the change what really broke.  The answer is: it's the interpretation
      of UAC2/3 effect units.
      
      In the original code, UAC2 effect unit is as if through UAC1
      processing unit because both UAC1 PU and UAC2/3 EU share the same
      number (0x07).  The old code went through a complex switch-case
      fallthrough, finally bailing out in the middle:
      
        if (protocol == UAC_VERSION_2 &&
            hdr[2] == UAC2_EFFECT_UNIT) {
               /* UAC2/UAC1 unit IDs overlap here in an
                * uncompatible way. Ignore this unit for now.
                */
               return 0;
         }
      
      ... and this special handling was missing in the new code; the new
      code treats UAC2/3 effect unit as if it were equivalent with the
      processing unit.
      
      Actually, the old code was too confusing.  The effect unit has an
      incompatible unit description with the processing unit, so we
      shouldn't have dealt with EU in the same way.
      
      This patch addresses the regression by changing the effect unit
      handling to the own parser function.  The own parser function makes
      the clear distinct with PU, so it improves the readability, too.
      
      The EU parser just sets the type and the id like the old kernels.
      Once when the proper effect unit support is added, we can revisit this
      parser function, but for now, let's keep this simple setup as is.
      
      Fixes: e0ccdef9 ("ALSA: usb-audio: Clean up check_input_term()")
      Cc: <stable@vger.kernel.org>
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206147
      Link: https://lore.kernel.org/r/20200211160521.31990-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d75a170f
    • Takashi Iwai's avatar
      ALSA: usb-audio: Apply 48kHz fixed rate playback for Jabra Evolve 65 headset · 74f73476
      Takashi Iwai authored
      Jabra Evolve 65 headset appears as if supporting lower rates than
      48kHz, but it actually doesn't work but with 48kHz for playback.
      
      This patch applies a workaround to enforce the 48kHz like LINE6
      devices already did.  The workaround is put in a unified helper
      function, set_fixed_rate(), to be called from both places now.
      
      BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=206149
      Link: https://lore.kernel.org/r/20200211111419.5895-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      74f73476
  8. 10 Feb, 2020 17 commits