summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek/mtk-afe-pcm.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: mediatek: HDMI audio LR channel swappedPC Liao2016-04-261-0/+2
| | | | | | | | Because LRCK of TDM use High to Low as default setting, this patch changes the TDM setting to inverse LRCK. Signed-off-by: PC Liao <pc.liao@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Add I03/I04 widgets and corresponding routesKoro Chen2016-02-261-0/+11
| | | | | | | | Add these widgets to allow another path from I2S input. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: PC Liao <pc.liao@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: remove soft reset and add second I2S clockPC Liao2016-02-261-8/+6
| | | | | | | | To improve I2S flow, this patch removes soft reset and adds second I2S clock to use. Signed-off-by: PC Liao <pc.liao@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Enable 33bit memory address to support 4GB DRAMPC Liao2016-01-151-1/+21
| | | | | | | | | | If platform is embedded with memory more than 3GB, the address will go out of the scope that 32-bit can handle with. This patch sets the dma_mask and MSB properly to describe its address to 33-bit. Signed-off-by: Hidalgo Huang <hidalgo.huang@mediatek.com> Signed-off-by: PC Liao <pc.liao@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Turn AFE on/off in runtime resume/suspendKoro Chen2015-12-221-18/+6
| | | | | | | | | | AFE is actually allowed to be turn on before configuration of DAIs since each DAI has its own enabling control. Turn on/off AFE in runtime resume/suspend to avoid AFE being shut down when closing a DAI while other DAIs are still active. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Use current HW pointer for pointer callbackKoro Chen2015-12-081-11/+11
| | | | | | | | | | | | | | Previously we recorded "last interrupt position" and used it in pointer callback. This is not correct implementation, and it causes underruns when user space monitors buffer level to decide when to send next data chunk in low latency application. Remove position recording in IRQ handler and also hw_ptr in struct mtk_afe_memif used to record that, and let pointer callback reports current HW pointer instead. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Move 22M/24M clock control into I2S opsKoro Chen2015-11-171-7/+6
| | | | | | | | 22M/24M clocks are only required for I2S, so move the control to I2S DAI ops. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Increase periods_min in captureKoro Chen2015-09-141-0/+17
| | | | | | | | | | | | | | | | | In capture, there is chance that hw_ptr reported at IRQ is a little smaller than period_size due to internal AFE buffer. In the case of ping-pong buffer: |xxxxxxxxxxxxxxxxxxxxxxxxxxxx--|-----------------------------| hw_ptr < period_size This available buffer will not be read since its size is smaller than avail_min (which is period_size by default), and read thread continues to sleep. If the next hw_ptr is just a little larger than buffer_size, overrun occurs. One more period can hold the possible unread buffer. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
*---. Merge remote-tracking branches 'asoc/topic/mediatek', 'asoc/topic/mtk', ↵Mark Brown2015-08-301-12/+77
|\ \ \ | | | | | | | | | | | | 'asoc/topic/nuc900', 'asoc/topic/of-name' and 'asoc/topic/omap' into asoc-next
| | * | ASoC: mediatek: Remove AIF widgets for backend DAIsKoro Chen2015-08-171-11/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DAPM core already creates widgets for DAIs. It is not necessary to declare them by SND_SOC_DAPM_AIF_IN/SND_SOC_DAPM_AIF_OUT. Furthermore, original codes use backend DAI's stream name to be the AIF widget name. It causes the same widget to be created twice, and after commit 92fa12426741 ("ASoC: dapm: Add new widgets to the end of the widget list") the first created widget (by snd_soc_dapm_new_controls) is used, not the 2nd created one (by snd_soc_dapm_new_dai_widgets), so audio path is broken. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: mediatek: Add suspend/resume callbacksKoro Chen2015-07-221-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds suspend/resume callbacks, which are common for each DAI. To be able to continue the last playback/capture after resume when suspend was done during a playback/capture, in the callbacks we do backup/restore of registers which were set before prepare stage. Registers to be backup/restore are defined in a backup list array. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: mediatek: Drop owner assignment from platform_driverKrzysztof Kozlowski2015-07-141-1/+0
| |/ | | | | | | | | | | | | | | | | platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: mediatek: Fix unbalanced calls to runtime suspend/resumeKoro Chen2015-06-231-0/+2
|/ | | | | | | | | This adds call to runtime suspend in dev remove. It fixs the problem that suspend is not called in the case of CONFIG_PM=n. It also fixs build warning when CONFIG_PM=n. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: mediatek: Add AFE platform driverKoro Chen2015-06-161-0/+1233
This is the DPCM based platform driver of AFE (Audio Front End) unit. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud