aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/fsl/imx-hdmi-dma.c
Commit message (Collapse)AuthorAge
* ENGR00317636 ASoC: fsl: hdmi: Disable NEON optimizationShengjiu Wang2014-06-10
| | | | | | | | Enable NEON optimization will cause pulseaudio crash in the user space. Which is caused by using the NEON instruction, if only use "VPUSH, VPOP" in the function, crash will be happened also. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
* ENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl ↵Nicolin Chen2014-04-16
| | | | | | | | | | | | | | | | | | | pointer" After change the pointer, ALSA lib would re-copy the initial data to DMA buffer because the pointer is pointing the zero position at the beginning, which results an audiable duplicated playback at the first eight periods. Even though dropping this patch would cause pointer being incorrectly estimated. But to maintain the sanity of basic playback, we revert the previous patch. This reverts commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit cb6cd68b00fbb52852101ca2f3bc93ae45310b66)
* ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointerNicolin Chen2014-04-16
| | | | | | | | | | | | We might not be able to get appl_ptr, so we estimated it by using hw_ptr, while the distance between then should not be 2 * priv->period_bytes initially but 8 * priv->period_bytes as we pri-filled one entire buffer size at the beginning. The driver's memory access might be overlapped with ALSA's buffer updating. So this patch fixes this inaccurate distance. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775)
* ENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy functionNicolin Chen2014-04-16
| | | | | | | | | | Use neon data copy function as default to improve data copy performance so that we can prevent some noise issue happening to HDMI audio due to the performance issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit aca6d0c4c96d658021bda4b5a4e454076e27e9f2)
* ENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQNicolin Chen2014-04-16
| | | | | | | | | | | | The HDMI IP in i.MX6DQ has a bug that it limits the dma period size within 8K. Patch 'ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes' doubled the period size which works great with Dual Lite but broke the HDMI audio function on DQ. Thus fix it for 6DQ case. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 5b5f5e3f7b1dd41022e6e587460fd912fcd481d0)
* ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger initNicolin Chen2014-04-16
| | | | | | | | | | The offset reflects the current position of DMA access in the ALSA ring buffer. So we should clear it before re-start DMA engine becasue the DMA access should re-start its job from the 0 position. If we don't do this, the driver might get a wrong idea about current position of DMA access. Thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
* ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizesNicolin Chen2014-04-16
| | | | | | | | | | | | | | | | We found HDMI Audio has a performance issue when playback 8 channels 192KHz files, CPU might lag its interrupt responsing while SDMA continues updating HDMI internal AHB DMA's address and restarting AHB DMA, which resulted the noise when AHB DMA access overlaps with the data copy procedures in this driver. Thus we here double the buffer size and period size of HDMI Audio to chop the CPU interrupt to its half in the same span of time so that we can keep the data copy procedures safe and provent it from overlapping access with AHB DMA. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
* ENGR00281859-3 ASoC: fsl: Prepare dmaengine before submit itNicolin Chen2014-04-16
| | | | | | | | | | | | | | | | ASRC and HDMI audio might meet unexpected stop, 'ctrl+z' for example, and then disable its sdma channel. But after 'fg' resume, because sdma channel's status has already been set into DMA_ERROR, we need to prepare dmaengine again to clear its error state, otherwise sdma driver would bypass its channel enabling and 'Input/Output error' would happen to ALSA lib. The combined prepare and submit are also being used in soc-dmaengine, the common ASoC dmaengine driver. And since we already use a proper way to handle sdma channel status, there's no need to make an exception for HDMI any more, so drop it. Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00281859-2 ASoC: fsl: Use priv instead of params for imx-hdmi-dmaNicolin Chen2014-04-16
| | | | | | 'params' might be confused with snd_pcm_hw_params, so use 'priv' instead. Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00280852 ASoC: fsl: Use generic function dmaengine_prep_dma_cyclic()Nicolin Chen2014-04-16
| | | | | | Use generic dmaengine_prep_dma_cyclic() in imx-hdmi-dma.c and fsl-asrc.c Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00278967 ASoC: fsl: Fix null pointer when rmmod snd-soc-imx-hdmiNicolin Chen2014-04-16
| | | | | | | | | | | When rmmod snd-soc-imx-hdmi if loadable module feature of HDMI audio is being used, there would be a kernel dump promt: Unable to handle kernel NULL pointer dereference at virtual address This was caused by inappropriate priv pointer fetching, thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
* ENGR00277299-3 ASoC: fsl: Add dma driver for hdmi audioNicolin Chen2014-04-16
i.MX HDMI audio uses its own AHB DMA while there's also an extra SDMA channel to update its buffer addresses. Thus add a new driver for HDMI audio. Signed-off-by: Nicolin Chen <b42378@freescale.com>