1. 01 Nov, 2021 2 commits
  2. 29 Oct, 2021 1 commit
  3. 28 Oct, 2021 5 commits
  4. 27 Oct, 2021 1 commit
  5. 26 Oct, 2021 5 commits
  6. 21 Oct, 2021 2 commits
  7. 19 Oct, 2021 3 commits
  8. 18 Oct, 2021 5 commits
    • Takashi Iwai's avatar
      ALSA: uapi: Fix a C++ style comment in asound.h · 5aec579e
      Takashi Iwai authored
      UAPI header should have no C++ style comment but only in the
      traditional C style comment, but there is still one place we used it
      mistakenly.  This patch corrects it.
      
      Fixes: 54228356 ("ALSA: ctl: remove unused macro for timestamping of elem_value")
      Reviewed-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20211018114035.18433-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5aec579e
    • Takashi Iwai's avatar
      ALSA: firewire: Fix C++ style comments in uapi header · b1570647
      Takashi Iwai authored
      UAPI headers are built with -std=c90 and C++ style comments are
      explicitly prohibited.  The recent commit overlooked the rule and
      caused the error at header installation.  This patch corrects those.
      
      Fixes: bea36afa ("ALSA: firewire-motu: add message parser to gather meter information in register DSP model")
      Fixes: 90b28f3b ("ALSA: firewire-motu: add message parser for meter information in command DSP model")
      Fixes: 634ec0b2 ("ALSA: firewire-motu: notify event for parameter change in register DSP model")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Link: https://lore.kernel.org/r/20211018113812.0a16efb0@canb.auug.org.au
      Link: https://lore.kernel.org/r/20211018063700.30834-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b1570647
    • Takashi Iwai's avatar
      ALSA: memalloc: Convert x86 SG-buffer handling with non-contiguous type · 2d9ea399
      Takashi Iwai authored
      We've had an x86-specific SG-buffer handling code, but now it can be
      merged gracefully with the standard non-contiguous DMA pages.
      
      After the migration, SNDRV_DMA_TYPE_DMA_SG becomes identical with
      SNDRV_DMA_TYPE_NONCONTIG on x86, while others still fall back to
      SNDRV_DMA_TYPE_DEV.
      
      The remaining problem is about the SG-buffer with WC pages: the DMA
      core stuff on x86 doesn't treat it well, so we still need some special
      handling to manipulate the page attribute manually.  The mmap handler
      for SNDRV_DMA_TYPE_DEV_SG_WC still returns -ENOENT intentionally for
      the fallback to the default handler.
      
      Link: https://lore.kernel.org/r/20211017074859.24112-4-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      2d9ea399
    • Takashi Iwai's avatar
      ALSA: memalloc: Support for non-coherent page allocation · 73325f60
      Takashi Iwai authored
      Following to the addition of non-contiguous pages, this patch adds the
      new contiguous non-coherent page allocation to the standard memalloc
      helper.  Like the previous non-contig type, this non-coherent type is
      also directional and requires the explicit sync, too.  Hence the
      driver using this type of buffer may need to set
      SNDRV_PCM_INFO_EXPLICIT_SYNC flag to the PCM hardware.info as well,
      unless it's set up in the managed mode.
      
      Link: https://lore.kernel.org/r/20211017074859.24112-3-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      73325f60
    • Takashi Iwai's avatar
      ALSA: memalloc: Support for non-contiguous page allocation · a25684a9
      Takashi Iwai authored
      This patch adds the support for allocation of non-contiguous DMA pages
      in the common memalloc helper.  It's another SG-buffer type, but
      unlike the existing one, this is directional and requires the explicit
      sync / invalidation of dirty pages on non-coherent architectures.
      
      For this enhancement, the following points are changed:
      - snd_dma_device stores the DMA direction.
      - snd_dma_device stores need_sync flag indicating whether the explicit
        sync is required or not.
      - A new variant of helper functions, snd_dma_alloc_dir_pages() and
        *_all() are introduced; the old snd_dma_alloc_pages() and *_all()
        kept as just wrappers with DMA_BIDIRECTIONAL.
      - A new helper snd_dma_buffer_sync() is introduced; this gets called
        in the appropriate places.
      - A new allocation type, SNDRV_DMA_TYPE_NONCONTIG, is introduced.
      
      When the driver allocates pages with this new type, and it may require
      the SNDRV_PCM_INFO_EXPLICIT_SYNC flag set to the PCM hardware.info for
      taking the full control of PCM applptr and hwptr changes (that implies
      disabling the mmap of control/status data).  When the buffer
      allocation is managed by snd_pcm_set_managed_buffer(), this flag is
      automatically set depending on the result of dma_need_sync()
      internally.  Otherwise, if the buffer is managed manually, the driver
      has to set the flag explicitly, too.
      
      The explicit sync between CPU and device for non-coherent memory is
      performed at the points before and after read/write transfer as well
      as the applptr/hwptr syncptr ioctl.  In the case of mmap mode,
      user-space is supposed to call the syncptr ioctl with the hwptr flag
      to update and fetch the status at first; this corresponds to CPU-sync.
      Then user-space advances the applptr via syncptr ioctl again with
      applptr flag, and this corresponds to the device sync with flushing.
      
      Other than the DMA direction and the explicit sync, the usage of this
      new buffer type is almost equivalent with the existing
      SNDRV_DMA_TYPE_DEV_SG; you can get the page and the address via
      snd_sgbuf_get_page() and snd_sgbuf_get_addr(), also calculate the
      continuous pages via snd_sgbuf_get_chunk_size().
      
      For those SG-page handling, the non-contig type shares the same ops
      with the vmalloc handler.  As we do always vmap the SG pages at first,
      the actual address can be deduced from the vmapped address easily
      without iterating the SG-list.
      
      Link: https://lore.kernel.org/r/20211017074859.24112-2-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a25684a9
  9. 17 Oct, 2021 1 commit
    • Randy Dunlap's avatar
      ALSA: ISA: not for M68K · 3c05f147
      Randy Dunlap authored
      On m68k, compiling drivers under SND_ISA causes build errors:
      
      ../sound/core/isadma.c: In function 'snd_dma_program':
      ../sound/core/isadma.c:33:17: error: implicit declaration of function 'claim_dma_lock' [-Werror=implicit-function-declaration]
         33 |         flags = claim_dma_lock();
            |                 ^~~~~~~~~~~~~~
      ../sound/core/isadma.c:41:9: error: implicit declaration of function 'release_dma_lock' [-Werror=implicit-function-declaration]
         41 |         release_dma_lock(flags);
            |         ^~~~~~~~~~~~~~~~
      
      ../sound/isa/sb/sb16_main.c: In function 'snd_sb16_playback_prepare':
      ../sound/isa/sb/sb16_main.c:253:72: error: 'DMA_AUTOINIT' undeclared (first use in this function)
        253 |         snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
            |                                                                        ^~~~~~~~~~~~
      ../sound/isa/sb/sb16_main.c:253:72: note: each undeclared identifier is reported only once for each function it appears in
      ../sound/isa/sb/sb16_main.c: In function 'snd_sb16_capture_prepare':
      ../sound/isa/sb/sb16_main.c:322:71: error: 'DMA_AUTOINIT' undeclared (first use in this function)
        322 |         snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
            |                                                                       ^~~~~~~~~~~~
      
      and more...
      Signed-off-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Cc: alsa-devel@alsa-project.org
      Cc: linux-m68k@lists.linux-m68k.org
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Link: https://lore.kernel.org/r/20211016062602.3588-1-rdunlap@infradead.orgSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3c05f147
  10. 15 Oct, 2021 14 commits
  11. 14 Oct, 2021 1 commit