04 Jan, 2012

1 commit

  • The original code does not cover the case that two DAIs(CPU) have different
    ASoC core PCM operations(like mmap, pointer...). Currently we have only one
    global soc_pcm_ops for ASoC core PCM operation. When two DAIs have different
    pointer functions, second DAI's pointer function is set for both first DAI
    and second DAI in case of original code.

    This patch uses runtime's pcm_ops instead of global pcm_ops for each DAIs. So
    each DAIs can have different ASoC core PCM operations. This is needed to
    support multiple DAIs.

    Signed-off-by: Sangsu Park
    Signed-off-by: Mark Brown

    Sangsu Park
     

08 Dec, 2011

1 commit

  • Every device that implements runtime power management for DAIs is doing
    it in pretty much the same way: in the startup callback they take a
    runtime PM reference and then in the shutdown callback they release that
    reference, keeping the device active while the DAI is active. Given the
    frequency with which this is done and the obviousness of the need to keep
    the device active in this period factor the code out into the core, taking
    references on the device for each CPU DAI, CODEC DAI and DMA device in the
    core.

    As runtime PM is reference counted this shouldn't interfere with any
    other reference holding by the drivers, and since (in common with the
    existing implementations) we don't check for errors on enabling it
    shouldn't matter if the device actually has runtime PM enabled or not.

    Signed-off-by: Mark Brown
    Tested-by: Peter Ujfalusi

    Mark Brown
     

05 Nov, 2011

1 commit

  • There's no point in adding unlikely() annotations outside of hot paths
    and on systems using these features the annotation will always be wrong
    (as opposed to being something that only comes up once in a while) so
    the annotation may even be harmful.

    Signed-off-by: Mark Brown

    Mark Brown
     

27 Oct, 2011

1 commit


15 Oct, 2011

1 commit


21 Sep, 2011

1 commit

  • The orginal code does not cover the case that one DAI such as codec
    may be shared between other two DAIs(CPU).
    When do symmetry checking, altough the codec DAI requires symmetry,
    the two CPU DAIs may still be configured to run on different rates.

    We change to check each DAI's state separately instead of only checking
    the dai link to prevent this issue.

    Signed-off-by: Dong Aisheng
    Tested-by: Wolfram Sang
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Dong Aisheng
     

17 Aug, 2011

2 commits

  • Mark Brown
     
  • The ASoC core tries to not enforce symmetric rates when
    two streams open simultaneously. It does so by checking
    rtd->rate being zero. This works exactly once after booting
    because it is not set to zero again when the streams close.
    Fix this by setting rtd->rate when no active stream is left.

    [This leads to lots of warnings about not enforcing the symmetry in some
    situations as there's a race in the userspace API where we know we've
    got two applications but don't know what rates they want to set.
    -- broonie ]

    Signed-off-by: Sascha Hauer
    Signed-off-by: Mark Brown

    Sascha Hauer
     

15 Aug, 2011

1 commit


10 Jun, 2011

2 commits

  • Make sure we follow naming convention for all PCM ops.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Liam Girdwood
     
  • In preparation for the new ASoC Dynamic PCM support (AKA DSP support).

    The new ASoC Dynamic PCM core allows DAIs to be dynamically re-routed
    at runtime between the PCM device end (or Frontend - FE) and the physical DAI
    (Backend - BE) using regular kcontrols (just like a hardware CODEC routes
    audio in the analog domain). The Dynamic PCM core therefore must be
    able to call PCM operations for both the Frontend and Backend(s) DAIs at
    the same time.

    Currently we have a global pcm_mutex that is used to serialise
    the ASoC PCM operations. This patch removes the global mutex
    and adds a mutex per RTD allowing the PCM operations to be reentrant and
    allow control of more than one DAI at at time. e.g. a frontend PCM hw_params()
    could configure multiple backend DAI hw_params() with similar or different
    hw parameters at the same time.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Liam Girdwood
     

09 Jun, 2011

1 commit

  • In preparation for Dynamic PCM support (AKA DSP support).

    There will be future patches that add support to allow PCMs to be dynamically
    routed to multiple DAIs at startup and also during stream runtime. This patch
    moves the ASoC core PCM operaitions into a new file called soc-pcm.c. This will
    in simplify the ASoC core features into distinct files.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Liam Girdwood