27 May, 2011

1 commit


26 May, 2011

5 commits

  • We do not have to free a resource that is not allocated yet.

    Signed-off-by: Nicolas Ferre
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Nicolas Ferre
     
  • Signed-off-by: Nicolas Ferre
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Nicolas Ferre
     
  • Signed-off-by: Nicolas Ferre
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Nicolas Ferre
     
  • For cards that have two or more DAIs, snd_soc_resume's loop over all
    DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
    Since this is the same work item each time, the 2nd and subsequent
    calls return 0 (work item already queued), and trigger the dev_err
    message below stating that a work item may have been lost.

    Solve this by adjusting the loop to simply calculate whether to run the
    resume work immediately or defer it, and then call schedule work (or not)
    one time based on that.

    Note: This has not been tested in mainline, but only in chromeos-2.6.38;
    mainline doesn't support suspend/resume on Tegra, nor does the mainline
    Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
    mainline.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Stephen Warren
     
  • The comment does not reflect reality anymore since the multi-component
    monster patch landed. Things are matched by names now, and not by
    exporting and referencing a struct. Fix it to avoid confusion.

    Signed-off-by: Daniel Mack
    Acked-by: Liam Girdwood
    Acked-by: Timur Tabi
    Signed-off-by: Mark Brown

    Daniel Mack
     

25 May, 2011

7 commits

  • In the previous commit 'ASoC: davinci-pcm: convert to BATCH mode', the phase
    offset of 2 was mentioned in the commit message but not well commented in the
    source.

    Add descriptive comments of the phase offset with and without ping-pong
    buffers enabled.

    Signed-off-by: Ben Gardiner
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The davinci-pcm driver's snd_pcm_ops pointer function currently calls into
    the edma controller driver to read the current positions of the edma channels
    to determine pos to return to the ALSA framework. In particular,
    davinci_pcm_pointer() calls edma_get_position() and the latter has a comment
    indicating that "Its channel should not be active when this is called" whereas
    the channel is surely active when snd_pcm_ops.pointer is called.

    The operation of davinci-pcm in capture and playback appears to follow close
    the other pcm drivers who export SNDRV_PCM_INFO_BATCH except that davinci-pcm
    does not report it's positions from pointer() using the last transferred
    chunk. Instead it peeks directly into the edma controller to determine the
    current position as discussed above.

    Convert the davinci-pcm driver to BATCH mode: count the periods elapsed in the
    prtd->period member and use its value to report the 'pos' to the alsa
    framework in the davinci_pcm_pointer function.

    There is a phase offset of 2 periods between the position used by dma setup
    and the position reported in the pointer function. Either +2 in the dma
    setup or -2 in the pointer function (with wrapping, both) accounts for this
    offset -- I opted for the latter since it makes the first-time setup clearer.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Extract functions that modify the prtd->period member in preparation for
    conversion to BATCH mode playback.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The release of the dma channels was being performed in prepare and there was a
    edma_resume call for the asp-channel only being executed on START, RESUME and
    PAUSE_RELEASE.

    The mcasp on da850evm with ping-pong buffers enabled was exhibiting an audible
    glitch on every playback after the first. It was determined through trial and
    error that the following two changes fix this problem:

    1) Move the edma_start calls from prepare to trigger and 2) reverse the order
    of starting the asp and ram channels.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Based on the registration of davinci-mcasp.1 in the davinci-evm platform
    setup for da830 and dm6467, davinci-pcm can handle more than the currently
    reported maximum channels of 2.

    Increase the maximum channels to 384 to match the maximum reported by
    davinci-mcasp.1.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • Based on the data_type test in ping_pong_dma_setup, davinci-pcm is capable of
    handling data of width up to and including 32bits.

    "
    if ((data_type == 0) || (data_type > 4)) {
    printk(KERN_ERR "%s: data_type=%i\n", __func__, data_type);
    return -EINVAL;
    }
    "

    Update the .format member of the snd_pcm_hardware instances it registers to
    reflect this capability.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     
  • The setup of the pong channel uses EDMA_CHAN_SLOT instead of & 0x3f as the
    setup of the ping channel does.

    Make the setup of ping and pong symmetric. There is no functional change
    introduced by this patch.

    Signed-off-by: Ben Gardiner
    Reviewed-by: Steven Faludi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Ben Gardiner
     

24 May, 2011

10 commits


20 May, 2011

2 commits

  • Whenever we are doing a read or a write through the rbtree code, we'll
    cache a pointer to the rbnode. To avoid looking up the register
    everytime we do a read or a write, we first check if it can be found in
    the cached register block, otherwise we traverse the rbtree and finally
    cache the rbnode for future use.

    Signed-off-by: Dimitris Papastamos
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Dimitris Papastamos
     
  • This patch prepares the ground for the actual rbtree optimization patch
    which will save a pointer to the last accessed rbnode that was used
    in either the read() or write() functions.

    Each rbnode manages a variable length block of registers. There can be no
    two nodes with overlapping blocks. Each block has a base register and a
    currently top register, all the other registers, if any, lie in between these
    two and in ascending order.

    The reasoning behind the construction of this rbtree is simple. In the
    snd_soc_rbtree_cache_init() function, we iterate over the register defaults
    provided by the driver. For each register value that is non-zero we
    insert it in the rbtree. In order to determine in which rbnode we need
    to add the register, we first look if there is another register already
    added that is adjacent to the one we are about to add. If that is the case
    we append it in that rbnode block, otherwise we create a new rbnode
    with a single register in its block and add it to the tree.

    In the next patch, where a cached rbnode is used by both the write() and the
    read() functions, we also check if the register we are about to add is in the
    cached rbnode (the least recently accessed one) and if so we append it in that
    rbnode block.

    Signed-off-by: Dimitris Papastamos
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Dimitris Papastamos
     

10 May, 2011

4 commits


09 May, 2011

6 commits


08 May, 2011

5 commits