summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-pcm-rpmsg.c
AgeCommit message (Collapse)Author
2020-10-27MA-17777 ASoC: imx-pcm-rpmsg: Move i2s rpmsg driver to individual fileJindong
Move i2s rpmsg driver to a new file: imx-i2s-rpmsg.c This new driver should be probed after fsl_rpmsg_i2s, which calls imx_rpmsg_platform_register (in imx-pcm-rpmsg) to fill global variable: i2s_info_g. Signed-off-by: Jindong <jindong.yue@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-31MLK-23702-2: ASoC: imx-pcm-rpmsg: Don't register codec driver if it is from DTShengjiu Wang
Don't register codec driver if it is from DT. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2019-11-25ASoC: imx-pcm-rpmsg: Remove the prtdShengjiu Wang
prtd is not needed by this driver. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25ASoC: imx-pcm-rpmsg: Fix writecombine/wc build errorLeonard Crestez
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
2019-11-25ASoC: fsl_rpmsg: Merge changes from imx_4.19.yShengjiu Wang
77be7d36a525 ("MLK-22400-1: ASoC: fsl_rpmsg_i2s: Add rpmsg i2s for imx8mn") 31d5dfa44c20 ("MLK-22340-5: ASoC: imx-pcm-rpmsg: enable ignore_suspend for LPA") c5c41138d5c8 ("MLK-22340-4: ASoC: fsl_rpmsg_i2s: add lock to protect the resource") adb4b596d2ba ("MLK-22340-3: ASoC: imx-pcm-rpmsg: refine the timer") a5e80bf012c3 ("MLK-22340-2: ASoC: imx-pcm-rpmsg: drop the cmd I2S_TX_POINTER") 404367d9316b ("MLK-21980: ASoC: imx-pcm-rpmsg: add debugfs_prefix for platform") 971faf095246 ("MLK-21450: ASoC: fsl_rpmsg: fix timer issue for updating to 4.19") edbbcdc07bf1 ("MLK-21461: ASoC: fsl_rpmsg_i2s: clear buffer pointer in i2s_send_message") f5f2f38018d8 ("MLK-21447: ASoC: fsl_rpmsg_i2s: underrun in m4 for msg delayed") d9410ace757f ("MLK-21307: ASoC: fsl_rpmsg_i2s: optimize the message sent to m4") 98633a4cd35b ("MLK-21440-1: ASoC: fsl_rpmsg_i2s: init spin lock") 7bf6d3131863 ("MLK-21107-1: ASoC: Fix timer wake up system after suspend") eb422681ffa4 ("MLK-20661: ASoC: imx-pcm-rpmsg: remove the nonblock constraint") e36957e97ca9 ("MLK-21002-1: ASoC: imx-pcm-rpmsg: fix data consumed faster with pause") bc828e61693f ("MLK-19565-1: ASoC: fsl_rpmsg_i2s: support rpmsg on imx8qm") e56bedf71ae4 ("MLK-21107-2: ASoC: Drop msg if msg queue is full") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 31def064871336af7780d01a6ed8c5ed075b7e48)
2019-11-25MLK-20661: ASoC: imx-pcm-rpmsg: remove the nonblock constraintShengjiu Wang
we can call the snd_pcm_period_elapsed in timer's callback to achieve pseudo period wake up, so the nonblock constraint can be removed Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25MLK-20277-3: ASoC: imx-pcm-rpmsg: change the state of substream in resumeShengjiu Wang
In LPA mode, the system will be resumed by audio notification, when the period size is small, there will be occasion that when notification the underrun is happen, but the substream runtime state is not running so the aplay won't trigger stop first, then start. just only trigger the start, which don't comply with the convention. So in this patch, we change the substream runtime state to running, when the notification happened at resume. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25MLK-20277-1: ASoC: imx-pcm-rpmsg: reset the period index at stopShengjiu Wang
With the case that underrun happened, the aplay will trigger stop and start, if the period index is not reset at stop, the counter of period will be wrong Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2019-11-25MLK-19760: ASoC: imx-pcm-rpmsg: fix resume back quickly after resumeShengjiu Wang
With LPA mode, if the period size is small, the timer for query buffer pointer will be triggered immediately after suspend, the MU interrupt will resume the system quickly. This patch is to disable timer when suspend. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 9c5e78cf50855bd73f2b5c3dc8bc48f8a0907b39)
2019-11-25MLK-19581-4: ASoC: imx-pcm-rpmsg: support rpmsg_ak4497Shengjiu Wang
register the codec when needed. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 241b6b3275924f3dc63be26d1442b55b80ac53ef)
2019-11-25MLK-19168-3: ASoC: imx-pcm-rpmsg: register rpmsg wm8960 and cs42xx8 codecShengjiu Wang
register rpmsg wm8960 and cs42xx8 codec Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit c49f8d20c6fd4479ad45d76290bb5c57d4800d9e)
2019-11-25MLK-19155: ASoC: fsl_rpmsg: fix the volume is low for S24_LEShengjiu Wang
The format send to M4 through rpmsg is wrong, that make the driver treat the data as S32_LE, it looks like data is right shift 8 bit. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 508550b70e80339d3d49594ffc23946dd80b0c82)
2019-11-25MLK-19042-2: ASoC: imx-pcm-rpmsg: support low power audioShengjiu Wang
Add ack function, which is to info M4 side how many data has been writen to buffer. Add timer, which is to get the position of hw pointer in m4. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 0fd349fbab28d97f8c5501ec635bff053e3b1470)
2019-11-25MLK-17156-6: ASoC: imx-pcm-rpmsg: fix get codec data failedShengjiu Wang
Receive message is only used when the type is B. originally we copy the receive message to revg_msg all the time, when the message type is C, which will overide the revg_msg, which cause the get codec data command return wrong value. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-25MLK-17156-5: ASoC: imx-pcm-rpmsg: register rpmsg codecShengjiu Wang
register rpmsg codec after the rpmsg-audio-channel is ready. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-25MLK-14528: ASoC: sdma: Update period/segment max bytes (part 2)Daniel Baluta
Commit 665ced16cf044 ("MLK-10050 dma: imx-sdma: add support for sdma memory copy") enforces maximum SDMA buffer descriptor length at 65532, but doesn't update period_bytes_max or max_segment size in DMA drivers. Thus, resulting in the following bug: $ arecord -Dhw:0,0 -r 192000 -f S20_3LE -c 1 -d 10 audio192k20b1c.wav imx-sdma: SDMA channel 5: maximum period size exceeded: 65534 > 65532 Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> [ Aisheng: split asrc change ] Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2019-11-25MLK-14582: ASoC: imx-pcm-rpmsg: fix audio noise issue with pulseaudioShengjiu Wang
The pulse audio will set a wrong buffer size which is not the integral multiple of period size, it will cause the DMA can't work correctly in M4 side. The reason is that we always need to add a constraint for SNDRV_PCM_HW_PARAM_PERIODS, which make it integer. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 54a10a6c2130a69aca4c1923dac3a15137911146)
2019-11-25MLK-14258: ASoC: imx-pcm-rpmsg: sync sample rate with tx and rxShengjiu Wang
In suspend and resume, the M4 side will reset hw parameter for tx and rx, when only tx is working, the parameter of rx is a old value, which will cause the parameter is not sync with tx and rx. currently the M4 audio can only work in sync mode, so set both parameter in same time. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2019-11-25MLK-14254: ASoC: imx_pcm_rpmsg: fix cmd dropped by work queueShengjiu Wang
The test case is to playback a bitstream, then repeat ctrl+z and fg, several times later, the playback is failed to continue. The reason is if the work is pending in work queue, send second time of this work, the second work is dropped by work queue. so use one work for one cmd is not fit for audio case. use a work loop for audio cmd to fix this issue. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2019-11-25MLK-13992: ASoC: fsl_rpmsg_i2s: add flush workqueueShengjiu Wang
some cmd is sent by workqueue, others are sent by call send message function directly, for workqueue may have delay, so there is occasion that cmd is not sent in order. Add flush_workqueue before the CLOSE and SUSPEND to make sure previous cmd is finished in that time. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2019-11-25MLK-13904-2: ASoC: fsl: add audio platform driver base on rpmsgShengjiu Wang
Add platform driver, each step like set hw param, trigger start trigger stop, and so on, will call the rpmsg api. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> Acked-by: Robin Gong <yibin.gong@nxp.com> [Aisheng: clean for a new base ] Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>