27 Mar, 2019

1 commit

  • Because we are re-initializing the proxy at close it might
    happen that work is still pending which causes the following crash:

    [ 94.699835] Unable to handle kernel NULL pointer dereference at virtual address 00000008
    [ 94.707923] Mem abort info:
    [ 94.710722] Exception class = DABT (current EL), IL = 32 bits
    [ 94.716637] SET = 0, FnV = 0
    [ 94.719686] EA = 0, S1PTW = 0
    [ 94.722822] Data abort info:
    [ 94.725698] ISV = 0, ISS = 0x00000005
    [ 94.729530] CM = 0, WnR = 0
    [ 94.732504] user pgtable: 4k pages, 48-bit VAs, pgd = ffff8008d9ba3000
    [ 94.739035] [0000000000000008] *pgd=0000000938419003, *pud=0000000000000000
    [ 94.746015] Internal error: Oops: 96000005 [#1] PREEMPT SMP
    [ 94.751589] Modules linked in:
    [ 94.754652] CPU: 0 PID: 2068 Comm: kworker/0:2 Not tainted 4.14.98-dirty #75
    [ 94.761700] Hardware name: Freescale i.MX8QM MEK (DT)
    [ 94.766768] task: ffff8008f23ae200 task.stack: ffff000014378000
    [ 94.772705] PC is at process_one_work+0x34/0x414
    [ 94.777325] LR is at process_one_work+0x1e0/0x414

    In order to fix this, we make sure that no work is pending before starting
    the re-initialization.

    Signed-off-by: Daniel Baluta
    Reviewed-by: Shengjiu Wang
    (cherry picked from commit 2c00c24be5f8b63636e3f9005e15a3de42058438)

    Daniel Baluta
     

13 Mar, 2019

3 commits

  • The channel num (9 - 15) should not be supported in tdm & daisy chain
    mode for there is two dataline, this channel number can't be
    symmetrically distributed on two dataline (the first one is fixed to
    be 8 channel)

    Fixes commit 8d29874365c3 ("MLK-17817-2: ASoC: imx-ak4458: enable 16
    channels in TDM mode")

    Signed-off-by: Shengjiu Wang
    (cherry picked from commit 0bc47b31660efd3dbbeee7e51fca6f75e7ecb69f)

    Shengjiu Wang
     
  • We designed length of msg queue to be 0x18, which is too
    small if the period size = 512bytes, sometimes the queue
    will be full, which cause the msg is replaced by new one.
    which is not acceptable.

    So we need to enlarge the length of msg queue and add
    protection when msg queue is full, if the msg queue is full
    with the cmd (START, STOP, PAUSE...), driver will return
    error, with the cmd (I2S_TX_POINTER, I2S_TX_PERIOD_DONE)
    driver will drop the cmd.

    Signed-off-by: Shengjiu Wang
    (cherry picked from commit 31def064871336af7780d01a6ed8c5ed075b7e48)

    Shengjiu Wang
     
  • Fixes commit 4028bd0f76fd ("MLK-21002-2: ASoC: imx-pcm-rpmsg: don't
    remove timer at suspend")

    if the timer isn't removed at suspend, there will be interrupt
    from M4 side when the period size is small to wake up system quickly
    So we need to revert the previous fix and add timer in resume state

    Signed-off-by: Shengjiu Wang
    (cherry picked from commit a23d1df081f1ed33bc8dc7fffc42d1dfa3db2366)

    Shengjiu Wang
     

01 Mar, 2019

2 commits

  • If timer is deleted in suspend, when the suspend is resumed
    by pressing the power key, there will be no timer until the buffer
    empty, and the hw_ptr will not be updated.

    So the timer should not be removed at suspend.

    Signed-off-by: Shengjiu Wang
    (cherry picked from commit 9a17ce36ecef46ea5ec88d4b89b117abe8eebf8f)

    Shengjiu Wang
     
  • In LPA, we use the timer to simulate the interrupt, if the period time
    is 1s, the timer is 500ms, which means the interrupt is more frequent
    than actual.

    With pause ALSA will update the hw_ptr_jiffies, because the interrupt
    is more frequent, so sometimes in snd_pcm_update_hw_ptr0, the condition
    delta > new_hw_ptr will be true, then the new_hw_ptr will be added whole
    buffer_size, which cause the whole buffer be flushed.

    if (in_interrupt) {
    /* we know that one period was processed */
    /* delta = "expected next hw_ptr" for in_interrupt != 0 */
    delta = runtime->hw_ptr_interrupt + runtime->period_size;
    if (delta > new_hw_ptr) {
    /* check for double acknowledged interrupts */
    hdelta = curr_jiffies - runtime->hw_ptr_jiffies;
    if (hdelta > runtime->hw_ptr_buffer_jiffies/2 + 1) {
    hw_base += runtime->buffer_size;
    if (hw_base >= runtime->boundary) {
    hw_base = 0;
    crossed_boundary++;
    }
    new_hw_ptr = hw_base + pos;
    goto __delta;
    }
    }
    }

    So even we use the timer to simulate the interrupt, the timer should
    be same as the period time, otherwise will cause issue.

    Signed-off-by: Shengjiu Wang
    (cherry picked from commit 9a9af932118774083119dba72c5c6133852ba926)

    Shengjiu Wang
     

22 Feb, 2019

1 commit


12 Feb, 2019

33 commits