1. 15 Aug, 2019 1 commit
  2. 14 Aug, 2019 5 commits
  3. 13 Aug, 2019 1 commit
  4. 12 Aug, 2019 1 commit
    • Takashi Iwai's avatar
      ALSA: hda: Set fifo_size for both playback and capture streams · 7da20788
      Takashi Iwai authored
      Currently we set hdac_stream.fifo_size field only for the playback
      stream by some odd reason I forgot, while this field isn't referred in
      any places.  Actually this fifo_size field would have been required in
      the position report correction for VIA chipset, but due to the lack of
      the fifo_size set for capture streams, snd-hda-intel driver fetches
      the register by itself.
      
      This patch straightens and simplifies the code by setting the
      fifo_size field for both playback and capture streams, and use it in
      the HD-audio controller driver.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7da20788
  5. 09 Aug, 2019 7 commits
  6. 08 Aug, 2019 4 commits
    • Takashi Iwai's avatar
      Merge branch 'topic/hda-bus-ops-cleanup' into for-next · 3a76a41f
      Takashi Iwai authored
      Pull HD-audio bus ops cleanups.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      3a76a41f
    • Takashi Iwai's avatar
      ASoC: SOF: Intel: Initialize hdaudio bus properly · d4ff1b39
      Takashi Iwai authored
      The SOF HD-audio bus has its house-made initialization code.  It's
      supposedly for making the code independent from HD-audio bus drivers.
      However, this is error-prone, and above all, the SOF driver has
      already dependency on HD-audio bus driver when CONFIG_SND_SOF_HDA is
      set.  That is, if this Kconfig is set, there is no reason to avoid the
      call to the proper bus init function.
      
      Also, the ext_ops that is set at bus initialization can be better
      handled inside sof_hda_bus_init().  We don't need to refer this
      outside the bus initialization.
      
      So this patch addresses these issues:
      - sof_hda_bus_init() calls nothing but snd_hdac_ext_bus_init()
        when CONFIG_SND_SOF_HDA is set.  Otherwise some fields are
        initialized locally like before for avoiding the dependency.
      - ext_ops is referred inside sof_hda_bus_init().  The ext_ops argument
        of snd_hda_bus_init() is dropped.
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      d4ff1b39
    • Takashi Iwai's avatar
      ALSA: hda: Direct MMIO accesses · 19abfefd
      Takashi Iwai authored
      HD-audio drivers access to the mmio registers indirectly via the
      corresponding bus->io_ops callbacks.  This is because some platform
      (notably Tegra SoC) requires the word-aligned access.  But it's rather
      a rare case, and other platforms suffer from the penalties by indirect
      calls unnecessarily.
      
      This patch is an attempt to optimize and cleanup for this situation.
      Now the special aligned access is used only when a new kconfig
      CONFIG_SND_HDA_ALIGNED_MMIO is set.  And the HD-audio core itself
      provides the aligned MMIO access helpers instead of the driver side.
      If Kconfig isn't set (as default), the standard helpers like readl()
      or writel() are used directly.
      
      A couple of places in ASoC Intel drivers have the access via io_ops
      reg_writel(), and they are replaced with the direct writel() calls.
      
      And now with this patch, the whole bus->io_ops becomes empty, so it's
      dropped completely.  The bus initialization functions are changed
      accordingly as well to drop the whole bus->io_ops.
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      19abfefd
    • Takashi Iwai's avatar
      ALSA: hda: Remove page allocation redirection · 619a1f19
      Takashi Iwai authored
      The HD-audio core allocates and releases pages via driver's specific
      dma_alloc_pages and dma_free_pages ops defined in bus->io_ops.  This
      was because some platforms require the uncached pages and the handling
      of page flags had to be done locally in the driver code.
      
      Since the recent change in ALSA core memory allocator, we can simply
      pass SNDRV_DMA_TYPE_DEV_UC for the uncached pages, and the only
      difference became about this type to be passed to the core allocator.
      That is, it's good time for cleaning up the mess.
      
      This patch changes the allocation code in HD-audio core to call the
      core allocator directly so that we get rid of dma_alloc_pages and
      dma_free_pages io_ops.  If a driver needs the uncached pages, it has
      to set bus->dma_type right after the bus initialization.
      
      This is merely a code refactoring and shouldn't bring any behavior
      changes.
      Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      619a1f19
  7. 06 Aug, 2019 9 commits
  8. 05 Aug, 2019 12 commits