28 Apr, 2016

1 commit

  • dmaengine_pcm currently only supports setups where FIFO reads/writes
    correspond to exactly one sample, eg 16-bit sample data is transferred
    via 16-bit FIFO accesses, 32-bit data via 32-bit accesses.

    This patch adds support for setups with fixed width FIFOs where
    multiple samples are packed into a larger word.

    For example setups with a 32-bit wide FIFO register that expect
    16-bit sample transfers to be done with the left+right sample data
    packed into a 32-bit word.

    Support for packed transfers is controlled via the
    SND_DMAENGINE_PCM_DAI_FLAG_PACK flag in snd_dmaengine_dai_dma_data.flags

    If this flag is set dmaengine_pcm doesn't put any restriction on the
    supported formats and sets the DMA transfer width to undefined.

    This means control over the constraints is now transferred to the DAI
    driver and it's responsible to provide proper configuration and
    check for possible corner cases that aren't handled by the ALSA core.

    Signed-off-by: Matthias Reichl
    Acked-by: Lars-Peter Clausen
    Tested-by: Martin Sperl
    Signed-off-by: Mark Brown

    Matthias Reichl
     

16 Nov, 2015

1 commit

  • Use the new dmaengine_synchronize() function to make sure that all complete
    callbacks have finished running before the runtime data, which is accessed
    in the completed callback, is freed.

    This fixes a long standing use-after-free race condition that has been
    observed on some systems.

    Signed-off-by: Lars-Peter Clausen
    Reviewed-by: Takashi Iwai
    Signed-off-by: Vinod Koul

    Lars-Peter Clausen
     

04 Mar, 2015

1 commit


05 Jul, 2014

2 commits

  • In case of _3LE/_3BE formats the samples are stored in 3 consecutive bytes
    without padding it to 4 bytes. This means that the DMA needs to be able to
    support 3 bytes word length in order to read/write the samples from memory
    correctly. Originally the code treated 24 bits physical length samples as
    they were 32 bits which leads to corruption when playing or recording audio.

    The hw.formats field has already been prepared to exclude formats not
    supported by the DMA engine in use, which means that only on platforms where
    3 bytes is supported by the DMA will be able to use this format.

    Signed-off-by: Peter Ujfalusi
    Acked-by: Vinod Koul
    Acked-by: Takashi Iwai
    Signed-off-by: Mark Brown

    Peter Ujfalusi
     
  • params_physical_width() is available via pcm_params.h

    Signed-off-by: Peter Ujfalusi
    Acked-by: Lars-Peter Clausen
    Acked-by: Vinod Koul
    Acked-by: Takashi Iwai
    Signed-off-by: Mark Brown

    Peter Ujfalusi
     

19 May, 2014

1 commit

  • Currently snd_dmaengine_pcm_trigger() calls dmaengine_pause()
    unconditinally during device suspend. In case where DMA controller
    doesn't support PAUSE/RESUME functionality, this call is not able
    to stop the DMA controller. In this scenario, audio playback doesn't
    resume after device resume.

    Calling dmaengine_pause/dmaengine_terminate_all conditionally fixes
    the issue.

    It has been tested with audio playback on Samsung platform having
    PL330 DMA controller which doesn't support PAUSE/RESUME.

    Signed-off-by: Tushar Behera
    Acked-by: Lars-Peter Clausen
    Signed-off-by: Takashi Iwai

    Tushar Behera
     

28 Oct, 2013

1 commit

  • Use the standard PCM helper function to figure out the sample bytes
    instead of hardcodec PCM format checks in
    snd_hwparams_to_dma_slave_config().

    The patch also extends the format check for 8 bytes formats although
    no one should match so far.

    Acked-by: Lars-Peter Clausen
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

15 Aug, 2013

1 commit