1. 28 Apr, 2024 1 commit
  2. 26 Apr, 2024 1 commit
  3. 24 Apr, 2024 3 commits
  4. 21 Apr, 2024 1 commit
    • Nathan Chancellor's avatar
      ALSA: scarlett2: Zero initialize ret in scarlett2_ag_target_ctl_get() · 3a56855b
      Nathan Chancellor authored
      Clang warns (or errors with CONFIG_WERROR):
      
        sound/usb/mixer_scarlett2.c:3697:6: error: variable 'err' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
         3697 |         if (private->autogain_updated) {
              |             ^~~~~~~~~~~~~~~~~~~~~~~~~
        sound/usb/mixer_scarlett2.c:3707:9: note: uninitialized use occurs here
         3707 |         return err;
              |                ^~~
        sound/usb/mixer_scarlett2.c:3697:2: note: remove the 'if' if its condition is always true
         3697 |         if (private->autogain_updated) {
              |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        sound/usb/mixer_scarlett2.c:3688:9: note: initialize the variable 'err' to silence this warning
         3688 |         int err;
              |                ^
              |                 = 0
        1 error generated.
      
      Initialize ret to zero to ensure ret is initialized in all paths within
      scarlett2_ag_target_ctl_get(), which matches the style of other
      functions in this driver.
      
      Fixes: e30ea534 ("ALSA: scarlett2: Add autogain target controls")
      Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
      Message-ID: <20240419-alsa-scarlett2-fix-wsometimes-uninitialized-v1-1-e2ace8642e08@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3a56855b
  5. 19 Apr, 2024 1 commit
    • Takashi Iwai's avatar
      ALSA: seq: dummy: Allow UMP conversion · 32cb23a0
      Takashi Iwai authored
      Although the purpose of dummy seq client is a direct pass-through,
      it's sometimes helpful for debugging if it can convert to a certain
      UMP MIDI version.  This patch adds an option to specify the UMP event
      conversion.  As default, it skips the conversion and does
      passthrough, while user can pass ump=1 or ump=2 to enforce the
      conversion to UMP MIDI1 or MIDI2 format.
      
      Message-ID: <20240419101105.15571-1-tiwai@suse.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      32cb23a0
  6. 18 Apr, 2024 29 commits
  7. 07 Apr, 2024 4 commits
    • Takashi Iwai's avatar
      Merge branch 'topic/emu10k1-fix' into for-next · a9b16d59
      Takashi Iwai authored
      Pull emu10k1 fix patch series
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a9b16d59
    • Oswald Buddenhagen's avatar
      ALSA: emux: simplify snd_sf_list.callback handling · 4c4cbe66
      Oswald Buddenhagen authored
      Both drivers provide both sample_new and sample_free, and it makes no
      sense to pretend that they could not. In fact, load_data() would already
      crash if sample_new was null. So remove the remaining null checks.
      
      Contrary to that, the emu10k1 driver actually has a null sample_reset,
      though I'm not convinced that this inconsistency is justified.
      Signed-off-by: default avatarOswald Buddenhagen <oswald.buddenhagen@gmx.de>
      Message-ID: <20240406064830.1029573-18-oswald.buddenhagen@gmx.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      4c4cbe66
    • Oswald Buddenhagen's avatar
      ALSA: emu10k1: shrink blank space in front of wavetable samples · 62001ad1
      Oswald Buddenhagen authored
      There is no need for it to be 32 samples - 3 will do just fine (which is
      the interpolator's epsilon). The old size was presumably meant to
      compensate for the cache's presence, but we're now handling that
      properly.
      Signed-off-by: default avatarOswald Buddenhagen <oswald.buddenhagen@gmx.de>
      Message-ID: <20240406064830.1029573-17-oswald.buddenhagen@gmx.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      62001ad1
    • Oswald Buddenhagen's avatar
      ALSA: emu10k1: fix wavetable playback position and caching, take 2 · d0440680
      Oswald Buddenhagen authored
      Compensate for the cache lag of 64 frames, and actually populate the
      cache. Without these, the playback would start with garbage (which
      would be (mostly?) masqueraded by the note's attack phase).
      
      Note that we set the starting address only 61 frames ahead, to
      compensate for the interpolator's epsilon. Unlike for PCM playback, we
      don't even need to manually silence-fill the first frames in the cache,
      because we insert some silence in front of each sample anyway.
      
      A challenge are extremely short samples with a loop end below the cache
      size, because a) we'd have to wrap the current address to be within the
      loop and b) automatic pre-filling of the cache with the right data does
      not work in this case.
      
      We could pre-fill the cache manually, but that's slow, requires
      additional code for each sample width, and is made even more complex by
      the driver's virtual address space having no contiguous mapping for the
      CPU.
      
      We could have the engine fill the cache piece-wise (which is really what
      happens when playback is running), but that would also be complex, and
      we'd need to wait for the engine to handle each piece, so it wouldn't be
      that much faster than the manual fill.
      
      For the case of requiring only one loop iteration prior to reaching the
      cache size, we could leverage the engine's looping mechanism around
      CCR_CACHELOOPFLAG, but this special case doesn't seem worth the
      complexity.
      
      So we just unroll the loop as far as necessary to be able to play back
      the sample without any fiddling.
      
      Pedantically, this would be incorrect for loop-until-release samples
      with a low loop end which are released very quickly, but that would be
      relatively harmless, is not a plausible use case in the first place, and
      SoundFont sample mode 3 isn't actually implemented anyway (it's
      conflated with mode 1, infinite looping).
      Signed-off-by: default avatarOswald Buddenhagen <oswald.buddenhagen@gmx.de>
      Message-ID: <20240406064830.1029573-16-oswald.buddenhagen@gmx.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d0440680