1. 07 Jun, 2017 2 commits
    • Takashi Sakamoto's avatar
      ALSA: fireface: constify ALSA specific operations · d2dc2a96
      Takashi Sakamoto authored
      ALSA fireface driver has ALSA specific operations for MIDI/PCM data.
      Structured data for the operations can be constified. Additionally,
      The structured data can be function local.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d2dc2a96
    • Takashi Sakamoto's avatar
      ALSA: firewire: process packets in 'struct snd_pcm_ops.ack' callback · 875becf8
      Takashi Sakamoto authored
      In recent commit for ALSA PCM core, some arrangement is done for
      'struct snd_pcm_ops.ack' callback. This is called when appl_ptr is
      explicitly moved in intermediate buffer for PCM frames, except for
      some cases described later.
      
      For drivers in ALSA firewire stack, usage of this callback has a merit to
      reduce latency between time of PCM frame queueing and handling actual
      packets in recent isochronous cycle, because no need to wait for software
      IRQ context from isochronous context of OHCI 1394.
      
      If this works well in a case that mapped page frame is used for the
      intermediate buffer, user process should execute some commands for ioctl(2)
      to tell the number of handled PCM frames in the intermediate buffer just
      after handling them. Therefore, at present, with a combination of below
      conditions, this doesn't work as expected and user process should wait for
      the software IRQ context as usual:
       - when ALSA PCM core judges page frame mapping is available for status
         data (struct snd_pcm_mmap_status) and control data
         (struct snd_pcm_mmap_control).
       - user process handles PCM frames by loop just with 'snd_pcm_mmap_begin()'
         and 'snd_pcm_mmap_commit()'.
       - user process uses PCM hw plugin in alsa-lib to operate I/O without
         'sync_ptr_ioctl' option.
      
      Unfortunately, major use case include these three conditions.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      875becf8
  2. 02 Jun, 2017 26 commits
  3. 30 May, 2017 2 commits
    • Colin Ian King's avatar
      ALSA: pcm: include pcm_local.h and remove some extraneous tabs · 7421a167
      Colin Ian King authored
      We need to include pcm_local.h to clean up some smatch warnings:
      
      symbol 'snd_pcm_timer_done' was not declared. Should it be static?
      symbol 'snd_pcm_timer_init' was not declared. Should it be static?
      symbol 'snd_pcm_timer_resolution_change' was not declared. Should
        it be static?
      
      Also remove some extraneous tabs on empty lines and replace space
      intentation with a tab.
      Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7421a167
    • Bhumika Goyal's avatar
      ALSA: declare snd_kcontrol_new structures as const · 905e46ac
      Bhumika Goyal authored
      Declare snd_kcontrol_new structures as const as they are only passed an
      argument to the function snd_ctl_new1. This argument is of type const,
      so snd_kcontrol_new structures having this property can be made const.
      Done using Coccinelle:
      
      @r disable optional_qualifier@
      identifier x;
      position p;
      @@
      static struct snd_kcontrol_new x@p={...};
      
      @ok@
      identifier r.x;
      position p;
      @@
      snd_ctl_new1(&x@p,...)
      
      @bad@
      position p != {r.p,ok.p};
      identifier r.x;
      @@
      x@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.x;
      @@
      +const
      struct snd_kcontrol_new x;
      
      Cross compiled these files:
      sound/aoa/codecs/tas.c - powerpc
      sound/mips/{hal2.c/sgio2audio.c} - mips
      sound/ppc/{awacs.c/beep.c/tumbler.c} - powerpc
      sound/soc/sh/siu_dai.c - sh
      Could not find an architecture to compile sound/sh/aica.c.
      Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      905e46ac
  4. 26 May, 2017 1 commit
  5. 25 May, 2017 7 commits
  6. 24 May, 2017 2 commits
    • Takashi Sakamoto's avatar
      ALSA: sb: remove needless evaluation in implementation for copy callback · 6dbaf8b9
      Takashi Sakamoto authored
      In design of ALSA pcm core, 'struct snd_pcm_ops.copy' is expected to
      copy PCM frames, according to frame alignment on intermediate buffer for
      userspace and dedicated buffer for data transmission. In this callback,
      value of 'channel' argument depends on the frame alignment, which drivers
      registers to runtime of PCM substream. When target devices can handle
      non-interleaved buffer, this value has positive value, otherwise negative.
      
      ALSA driver for PCM component of EMU8000 chip is programmed with local
      macro to switch the frame alignment. The 'copy' operation in
      non-interleaved side has evaluation of the 'channel' argument (actually
      it's 'voice' argument). This is useless.
      
      This commit remove the evaluation.
      
      [tiwai: the negative channel argument was the inheritance from the old
       code where -1 was meant for interleaved mode.  The mix-up was dropped
       meanwhile, thus it's correct to assume that we receive no longer -1
       there, and it's safe to cleanup the relevant code.
      
       Also, voice=0 for channel==1 is trivial, and it can be dropped, too.]
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      6dbaf8b9
    • Takashi Sakamoto's avatar
      ALSA: gus: remove unused local flag · 097a7fe3
      Takashi Sakamoto authored
      ALSA driver series for devices of Gravis Ultra Sound includes local
      variable 'snd_gf1_pcm_use_dma'. Although this is a flag to change
      behaviours of local implementations for 'struct snd_pcm_ops.copy' and
      'struct snd_pcm_ops.silence', it's invariable during module lifetime.
      
      This commit removes this local variable and the relevant operations.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      097a7fe3