summaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci
Commit message (Collapse)AuthorAgeFilesLines
*-. Merge remote-tracking branches 'asoc/topic/davinci', 'asoc/topic/dmic', ↵Mark Brown2014-10-062-21/+60
|\ \ | | | | | | | | | 'asoc/topic/drivers', 'asoc/topic/es8328' and 'asoc/topic/fsl' into asoc-next
| * | ASoC: davinvi-mcasp: Proper suspend/resume support while audio is activePeter Ujfalusi2014-10-011-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the board is sent to suspend (deep sleep) the McASP context will be lost. In case when suspend happens during active audio we need to save and restore more registers, which was configured during hw_param times as well. We need to add more config registers, AFIFO control registers and we also need to save and restore the serializer configuration as well. Since the number of serializers depends on the SoC we need to allocate the memory for it based on the num_serializer for the given McASP instance. With this patch the ongoing stream will resume after resuming from deep sleep. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: davinci-mcasp: Convert the context save/restore to use arrayPeter Ujfalusi2014-10-011-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of individual values use an array to store the registers need to be saved on suspend and restored on resume. It is going to be easier to add more registers to save and restore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| * | ASoC: edma-pcm: Include edma-pcm.hLars-Peter Clausen2014-08-171-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | edma_pcm_platform_register() is declared in edma-pcm.h and defined in edma-pcm.c. To make sure that the function signature matches for both edma-pcm.c should include edma-pcm.h Fixes the following sparse warning: sound/soc/davinci/edma-pcm.c:48:5: warning: symbol 'edma_pcm_platform_register' was not declared. Should it be static? Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/fix/davinci' and 'asoc/fix/max98090' ↵Mark Brown2014-10-061-1/+2
|\ \ \ | | |/ | | | | | | into asoc-linus
| * | ASoC: davinci: vcif must be a module if SND_DAVINCI_SOC isArnd Bergmann2014-09-291-1/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible to configure a kernel with SND_DAVINCI_SOC=m and SND_DM365_VOICE_CODEC=y, which results in a link error: sound/built-in.o: In function `davinci_vcif_probe': sound/soc/davinci/davinci-vcif.c:223: undefined reference to `davinci_soc_platform_register' The best way to avoid this is to make SND_DM365_VOICE_CODEC a tristate option that depends on SND_DAVINCI_SOC, so it can only be a module or disabled when the base driver is a loadable module Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| |
| \
*-. \ Merge remote-tracking branches 'asoc/fix/cs4265', 'asoc/fix/davinci', ↵Mark Brown2014-09-151-1/+10
|\ \ \ | | |/ | |/| | | | 'asoc/fix/rockchip', 'asoc/fix/samsung' and 'asoc/fix/tlv320aic31xx' into asoc-linus
| | * ASoC: davinci-mcasp: Correct rx format unit configurationPeter Ujfalusi2014-09-041-1/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case of capture we should not use rotation. The reverse and mask is enough to get the data align correctly from the bus to MCU: Format data from bus after reverse (XRBUF) S16_LE: |LSB|MSB|xxx|xxx| |xxx|xxx|MSB|LSB| S24_3LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| S24_LE: |LSB|DAT|MSB|xxx| |xxx|MSB|DAT|LSB| S32_LE: |LSB|DAT|DAT|MSB| |MSB|DAT|DAT|LSB| With this patch all supported formats will work for playback and capture. Reported-by: Jyri Sarha <jsarha@ti.com> (broken S24_3LE capture) Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
* | ASoC: mcasp: Fix implicit BLCK divider settingJyri Sarha2014-08-121-3/+11
|/ | | | | | | | | | | The implicit BLCK divider setting was broken by "ASoC: mcasp: don't override bclk divider if it was provided by the machine"-patch. After the BCLK divider is implicitly set for the first time the mcasp->bclk_div gets a non zero value and the implicit setting is "turned off". Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci: Enable menuconfig entry for McASPPeter Ujfalusi2014-08-041-1/+7
| | | | | | | | In order to be able to use simple-card with McASP on TI SoC based boards we need to be able to select the McASP via menuconfig. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: mcasp: don't override bclk divider if it was provided by the machineDaniel Mack2014-07-161-2/+7
| | | | | | | | | | | | | If a machine driver provides an BCLK divider to the McASP driver, skip the automatic calculation. This fixes machines on which the physical sample transport always works in 32 bits, even though not all of them are actually used. snd_soc_params_to_bclk() will fail to address such cases properly. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Use dmaengine based platform driver for AM335x/447xPeter Ujfalusi2014-07-163-6/+25
| | | | | | | | | | Use the edma-pcm with AM335x and AM437x SoCs. Keep using the davinci-pcm for daVinci devices, they can be switched to use the dmaengine based driver later when they are verified to work correctly. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: edma-pcm: Add empty functions for !CONFIG_SND_EDMA_SOC buildsPeter Ujfalusi2014-07-161-0/+7
| | | | | | | | | So drivers mixing with other platform drivers, like davinci-mcasp do not need to fiddle with CONFIG_SND_EDMA_SOC in their code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: edma-pcm: Remove PCM_INFO_BATCH and add PCM_INFO_NO_PERIOD_WAKEUP flagPeter Ujfalusi2014-07-161-1/+1
| | | | | | | | | | | | | The SNDRV_PCM_INFO_BATCH will be added back based on the dmaengine driver's capabilities. Patches for edma dmaengine driver has been prepared to suppress the interrupts. We can add this flag right away and have the benefit of not having interrupts during audio activity when the edma and ASoC patches are in the same tree. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* Merge remote-tracking branch 'asoc/fix/davinci' into asoc-davinciMark Brown2014-07-162-0/+13
|\
| * ASoC: davinci-mcasp: Fix S24_LE and U24_LE supportPeter Ujfalusi2014-06-301-0/+4
| | | | | | | | | | | | | | | | | | | | In case of S24_LE/U24_LE modes we expect 24bits on the bus while the samples are stored and transferred in memory on 32bits (lower 3 bytes of the 4 bytes). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>
| * ASoC: davinci-mcasp: Add dependecy to SND_DAVINCI_SOC or SND_OMAP_SOCJyri Sarha2014-06-212-0/+9
| | | | | | | | | | | | | | | | Fixes build with SND_DAVINCI_SOC or SND_OMAP_SOC alone and adds build dependecy to SND_DAVINCI_SOC or SND_OMAP_SOC. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Allow best effort in selecting BCLK dividerJyri Sarha2014-06-211-5/+9
| | | | | | | | | | | | | | | | | | Do not fail if the exact BLCK rate can not be produced, just print a warning. Check that sysclk frequency is set before implicitly setting the BCLK divider. Signed-off-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: set up channel status bits for S/PDIF modeDaniel Mack2014-06-181-2/+47
|/ | | | | | | | | In DIT (S/PDIF) mode, program the transmitted user bits to reflect the configured sample rate, along with some other details. Signed-off-by: Daniel Mack <zonque@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
*-. Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into ↵Mark Brown2014-06-031-1/+1
|\ \ | | | | | | | | | asoc-next
| * | ASoC: omap-pcm: Move omap-pcm under include/soundJyri Sarha2014-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make including the omap-pcm.h outside sound/soc/omap more convenient. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | ASoC: davinci-evm: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen2014-05-261-5/+4
|/ / | | | | | | | | | | | | | | | | No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci: add dependencies for SND_SOC_TLV320AIC3XArnd Bergmann2014-04-301-5/+5
| | | | | | | | | | | | | | | | | | This codec requires I2C to be enabled, so any other option that selects it should also depend on I2C. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Convert to use devm_snd_soc_register_component()Peter Ujfalusi2014-04-221-10/+7
| | | | | | | | | | | | | | It allows to remove code from the cleanup paths. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-pcm: Convert to use devm_snd_soc_register_platform()Peter Ujfalusi2014-04-225-28/+1
| | | | | | | | | | | | | | | | Remove the cleanup code related to the platform from the DAI drivers at the same time to avoid breakage. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Update MCASP_VERSION_4 platform driver registrationPeter Ujfalusi2014-04-181-6/+31
| | | | | | | | | | | | | | | | Version 4 of McASP is using omap-pcm as platform driver and the omap-pcm platform need to be registered using the cpu dai's device. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Do not touch 0x04 register above McASP_VERSION_2Peter Ujfalusi2014-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This register is not defined in TI81xx and on AM335x/AM437x it is the SYSCONFIG register which should not be touched by drivers since it is related to PM and handled by the generic PM code. This register write was there since the first time the davinci-mcasp driver was appeared in the kernel. The reason why it did not caused any issues on AM335x/AM437x is that it sets bit 1 in SYSCONFIG register which in turn will enable the smart-idle mode. This is the default mode and this is the mode McASP should be in also when in use. On TI81xx the register is not defined. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Remove excess empty lines from davinci_mcasp_set_dai_fmt()Peter Ujfalusi2014-04-141-8/+0
| | | | | | | | | | | | | | To make the code look uniform. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Support for LEFT_J formatPeter Ujfalusi2014-04-141-0/+7
| | | | | | | | | | | | | | Configuration for LEFT_J format. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Add support for I2S formatPeter Ujfalusi2014-04-141-1/+10
| | | | | | | | | | | | | | | | | | | | The FS needs to be inverted in McASP compared to other supported formats. Use a flag to indicate if the FS needs to be inverted. At the same time fail when non supported format is asked since the default case was anyways configuring McASP to a not valid format. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Move the FS polarity change out from the switch casePeter Ujfalusi2014-04-141-13/+14
| | | | | | | | | | | | | | | | | | | | FS polarity can be either rising or falling edge in McASP. Instead of accessing the registers in every switch/case set a flag and write the registers after the switch for the invert configuration. This change will help when adding support for more formats also. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Support for DSP_A formatPeter Ujfalusi2014-04-141-0/+7
| | | | | | | | | | | | | | DSP_A is like DSP_B mode but with one bit delay after the FS. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Format data delay configuration enhancementPeter Ujfalusi2014-04-141-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Use intermediate variable for the data delay needed for the specific format and write the register after the format configuration at once. This will help to control the number of lines as support for more formats going to be added. Also fixes a case when we switch between two formats with different delay requirements. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Fine tune and correct the DMA burst configurationPeter Ujfalusi2014-04-141-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | When the AFIFO is not enabled but more than one serializers are used the DMA need to transfer number of words equal to active serializers when a DMA request is generated. When configuring the burst for the DMA avoid using value '1' for the burst since it is going to enable additional logic in the DMA drivers. Burst '1' means that the DMA should send/receive one word per DMA requests. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinic-mcasp: Adopt the AFIFO/DMA configuration to the stream ↵Peter Ujfalusi2014-04-141-7/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (dynamic depth) Configure the AFIFO numevt parameter based on the requested tx/rx_numevt, active serializers and period size in words. In this way McASP can adopt it's (and the DMA) configuration runtime and can pick the most optimal setup which satisfy the parameters. This way we do not need to place any constraint on the stream itself, allowing application greater freedom on how they want to set up ALSA. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Configure the AFIFO and DMA burst size at the same placePeter Ujfalusi2014-04-141-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the dma_params->fifo_level and dma_data->maxburst configuration to the mcasp_common_hw_param() function where we configure the AFIFO registers. It makes the code regarding to AFIFO and DMA configuration more easy to follow since it is now clear how the AFIFO and how the DMA is going to be configured. Previously this has been done in two functions using a bit different calculation form - which ended up with the same result in both case at the end, but it was confusing. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Simplify and clean up the AFIFO configuration codePeter Ujfalusi2014-04-142-24/+25
| | | | | | | | | | | | | | | | We can have more linear code flow by using variables in mcasp_common_hw_param() related to the AFIFO configuration. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Fix debug typo in davinci_mcasp_hw_params()Peter Ujfalusi2014-04-141-1/+1
| | | | | | | | | | | | | | requred -> required Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-mcasp: Assign the dma_data earlier in dai_probe callbackPeter Ujfalusi2014-04-141-15/+21
| | | | | | | | | | | | | | | | | | Set up the playback_dma_data/capture_dma_data for the dai at probe time since the generic dmaengine PCM stack needs to have access to this information early. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | ASoC: davinci-pcm: Add empty functions for !CONFIG_SND_DAVINCI_SOC buildsPeter Ujfalusi2014-04-141-0/+10
|/ | | | | | | | To save drivers using davinci-pcm and edma-pcm the need to fiddle with !CONFIG_SND_DAVINCI_SOC in their code. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Fix bit clock polarity settingsPeter Ujfalusi2014-04-081-3/+3
| | | | | | | | IB_NF, NB_IF and IB_IF configured the bc polarity incorrectly. The receive polarity was set to the same edge as the TX in these cases. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Provide correct filter_data for dmaengine for non-DT bootPeter Ujfalusi2014-03-171-5/+16
| | | | | | | | | | When we boot with non-DT mode the damengine will need the channel number and a filter function in order to get the channel. The filter_data is filled in the DAI driver while the filter_function will be provided by the edma-pcm driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci: Add edma dmaengine platform driverPeter Ujfalusi2014-03-172-0/+82
| | | | | | | | | | | Platform driver glue for SoC using eDMA3 to use dmaengine PCM. The maximum number of periods need to be limited to 19 since the edma dmaengine driver limits the paRAM slot use for audio at in cyclic mode. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-evm: Register machine level DAPM elements with the cardLars-Peter Clausen2014-03-131-14/+8
| | | | | | | | | | | | | Machine level DAPM widgets and routes should be registered in the card's DAPM context, rather than in the CODEC's context. While we are at it also drop the snd_soc_dapm_enable_pin() calls, since pins are enabled by default and also turn the snd_soc_dapm_disable_pin() calls into snd_soc_dapm_nc_pin() calls for unconnected pins. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Rename the pointer to davinci dma_params as dma_paramsPeter Ujfalusi2014-03-091-22/+22
| | | | | | | | It is quite confusing to name the pointer to davinci_pcm_dma_params as dma_data. Rename the pointer to avoid confusion. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Remove long lines from suspend/resume callbacksPeter Ujfalusi2014-02-031-24/+28
| | | | | | | | Move the context register storage behind of a struct and use a pointer to it in the suspend/resume callbacks to remove the long lines. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Rename platform data structPeter Ujfalusi2014-02-031-8/+8
| | | | | | | | | | | | Rename the struct for the platform data: snd_platform_data -> davinci_mcasp_pdata Since we have users under arch/arm/mach-davinci/ for this struct add temporary define to avoid breakage. The arch code can be updated later to use the new struct name. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Code cleanup in davinci_mcasp_hw_params()Peter Ujfalusi2014-02-031-12/+8
| | | | | | | Rearrange the code in the function for readability. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Move pm callbacks from platform device to soc_dai_driverPeter Ujfalusi2014-01-311-37/+37
| | | | | | | Handle the PM callbacks via the ASoC core instead of device core. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: davinci-mcasp: Return value handling cleanup for mcasp_common_hw_param()Peter Ujfalusi2014-01-311-2/+4
| | | | | | | | Take the return value from mcasp_common_hw_param() and use that in case of error. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud