summaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/omap-mcbsp.c
AgeCommit message (Collapse)Author
2018-12-17ASoC: omap-mcbsp: Fix latency value calculation for pm_qosPeter Ujfalusi
[ Upstream commit dd2f52d8991af9fe0928d59ec502ba52be7bc38d ] The latency number is in usec for the pm_qos. Correct the calculation to give us the time in usec Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-05-09ASoC: omap-mcbsp: Convert to use the sdma-pcm instead of omap-pcmPeter Ujfalusi
Use the new platform driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-01ASoC: omap-mcbsp: Add PM QoS support for McBSP to prevent glitchesMatt Ranostay
We can get audio errors if hitting deeper idle states on omaps: [alsa.c:230] error: Fatal problem with alsa output, error -5. [audio.c:614] error: Error in writing audio (Input/output error?)! This seems to happen with off mode idle enabled as power for the whole SoC may get cut off between filling the McBSP fifo using DMA. While active DMA blocks deeper idle states in hardware, McBSP activity does not seem to do so. Basing the QoS latency calculation on the FIFO size, threshold, sample rate, and channels. Based on the original patch by Tony Lindgren Link: https://patchwork.kernel.org/patch/9305867/ Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Liam Breck <kernel@networkimprov.net> Tested-by: Tony Lindgren <tony@atomide.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-06-10ASoC: omap-mcbsp: sidetone: Use the new callback for iclk handlingPeter Ujfalusi
The McBSP sidetone (in OMAP3 McBSP2 and 3 module) is working with the module's interface clock. When the sidetone is enabled the iclk must not idle because it will result in choppy sidetone. Switch to use the new callback for handling the iclk allow/deny idle configuration. For this the driver needs to get the module's ick clock and pass the clk pointer to the callback. In DT boot, the pdata-quirk is going to set up the callback for the driver so save it if it is set in the pdata of the device. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2016-06-10ASoC: omap-mcbsp: Rename omap_mcbsp_sysfs_remove() to omap_mcbsp_cleanup()Peter Ujfalusi
The function will do more then removing the sysfs files in the future. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-02-26ASoC: OMAP: mcbsp: Fix CLKX and CLKR pinmux when used as inputsThomas Niederprüm
This patch fixes faulty behaviour in a setup where the input clock for the SRG is fed through the CLKR/CLKX pin but the McBSP is configured to be master (SND_SOC_DAIFMT_CBS_CFS). In that case of course CLKR/CLKX must not be configured as output pin. Otherwise the input clock is messed up horribly. This patch makes it possible to use the CLKR/CLKX pin rather than CLKS to inject a reference clock in setups where McBSP is master and not both rx and tx are used. However for this to work it has to be ensured that set_dai_sysclk() is called after set_dai_fmt(). This was tested on a beagleboard-xm using McBSP1 to drive a i2s DAC through the tx lines (CLKX,FSX,DX). Using this patch the CLKR pin is used to inject an external reference clock. Signed-off-by: Thomas Niederprüm <niederp@physik.uni-kl.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-16ASoC: omap-mcbsp: Correct CBM_CFS dai format configurationPeter Ujfalusi
We should select FSR also to be driven by McBSP, not only FSX. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2014-10-20ASoC: omap: drop owner assignment from platform_driversWolfram Sang
A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
2014-07-09ASoC: omap-mcbsp: Use devm_snd_soc_register_componentManish Badarkhe
Replaced snd_soc_register_component with its devres equivalent, devm_snd_soc_register_component. Signed-off-by: Manish Badarkhe <badarkhe.manish@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: omap-pcm: Move omap-pcm under include/soundJyri Sarha
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>
2014-05-01ASoC: omap: rx51: omap_mcbsp_st_add_controls: add id parameterSebastian Reichel
This is a preparation for DT based booting where the McBSP id is set to -1 for all McBSP instances. Signed-off-by: Sebastian Reichel <sre@kernel.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18ASoC: omap-mcbsp: Bind the platform driver to the dai driver when loadingPeter Ujfalusi
Use the same device for the platform driver when registering as the dai driver. This will enable us to clean up some DT booted cases. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-04-18ASoC: omap-mcbsp: Assign the dai DMA data at earlier timePeter Ujfalusi
Assign the dai dma data at dai driver probe time, not in startup. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-07-22ASoC: omap-mcbsp: Support SND_SOC_DAIFMT_CBM_CFS for omap3/4Michael Trimarchi
Add SND_SOC_DAIFMT_CBM_CFS support for omap3/omap4. The patch was tested on a pandaboard-es board connected to the pcm1792a codec. mcbspx_fsx must configured as output and mcbspx_clkx must be configured as input. Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-05-12ASoC: omap-mcbsp: Remove redundant platform_set_drvdata()Sachin Kamat
Commit 0998d06310 (device-core: Ensure drvdata = NULL when no driver is bound) removes the need to set driver data field to NULL. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-04-12Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown
2013-04-03ASoC: omap: Use common DAI DMA dataLars-Peter Clausen
Use the common DAI DMA data struct for omap, this allows us to use the common helper function to configure the DMA slave config based on the DAI DMA data. For omap-dmic and omap-mcpdm also move the DMA data from a global variable to the driver state struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: switch over to use snd_soc_register_component() on omap mcbspKuninori Morimoto
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2013-03-26ASoC: omap: Call omap_mcbsp_set_threshold() from mcbsp hw_paramsLars-Peter Clausen
The omap PCM driver provides a set_threshold callback which gets called by the PCM driver when either playback or capture is started. The only DAI driver which sets this callback is the mcbsp driver. This patch removes the callback from the PCM driver and moves the invocation of the omap_mcbsp_set_threshold() function to the mcbsp hw_params callback since this is the only place where the threshold size can change. Doing so allows us to use the default dmaengine PCM trigger callback in the omap PCM driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-12-10ASoC: OMAP: remove __dev* attributesBill Pemberton
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-11-27ASoC: OMAP: mcbsp fixes for enabling ARM multiplatform supportTony Lindgren
We cannot include any plat or mach headers for the multiplatform support. Fix the issue by defining local mcbsp_omap1(). Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-10-09Merge tag 'sound-3.7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This contains pretty many small commits covering fairly large range of files in sound/ directory. Partly because of additional API support and partly because of constantly developed ASoC and ARM stuff. Some highlights: - Introduced the helper function and documentation for exposing the channel map via control API, as discussed in Plumbers; most of PCI drivers are covered, will follow more drivers later - Most of drivers have been replaced with the new PM callbacks (if the bus is supported) - HD-audio controller got the support of runtime PM and the support of D3 clock-stop. Also changing the power_save option in sysfs kicks off immediately to enable / disable the power-save mode. - Another significant code change in HD-audio is the rewrite of firmware loading code. Other than that, most of changes in HD-audio are continued cleanups and standardization for the generic auto parser and bug fixes (HBR, device-specific fixups), in addition to the support of channel-map API. - Addition of ASoC bindings for the compressed API, used by the mid-x86 drivers. - Lots of cleanups and API refreshes for ASoC codec drivers and DaVinci. - Conversion of OMAP to dmaengine. - New machine driver for Wolfson Microelectronics Bells. - New CODEC driver for Wolfson Microelectronics WM0010. - Enhancements to the ux500 and wm2000 drivers - A new driver for DA9055 and the support for regulator bypass mode." Fix up various arm soc header file reorg conflicts. * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (339 commits) ALSA: hda - Add new codec ALC283 ALC290 support ALSA: hda - avoid unneccesary indices on "Headphone Jack" controls ALSA: hda - fix indices on boost volume on Conexant ALSA: aloop - add locking to timer access ALSA: hda - Fix hang caused by race during suspend. sound: Remove unnecessary semicolon ALSA: hda/realtek - Fix detection of ALC271X codec ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310 ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event ALSA: hda - make a generic unsol event handler ASoC: codecs: Add DA9055 codec driver ASoC: eukrea-tlv320: Convert it to platform driver ALSA: ASoC: add DT bindings for CS4271 ASoC: wm_hubs: Ensure volume updates are handled during class W startup ASoC: wm5110: Adding missing volume update bits ASoC: wm5110: Add OUT3R support ASoC: wm5110: Add AEC loopback support ASoC: wm5110: Rename EPOUT to HPOUT3 ASoC: arizona: Add more clock rates ASoC: arizona: Add more DSP options for mixer input muxes ...
2012-09-22ASoC: OMAP: mcbsp, mcpdm, dmic, hdmi: Set dma_data at startup timePeter Ujfalusi
Set the dma_data for the stream (snd_soc_dai_set_dma_data) at dai_startup time so omap-pcm will have access to the needed information regarding to the DMA channel earlier. This is needed for the clean dmaengine support. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22ASoC: OMAP: mcbsp, mcpdm, dmic: Let omap-pcm to pick the dma_typePeter Ujfalusi
omap-pcm can figure out the correct dma_type based on the stream's format. In this way we can get rid of the plat/dma.h include from these drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22ASoC: OMAP: Remove sync_mode from omap_pcm_dma_data structPeter Ujfalusi
The omap-pcm platform driver no longer needs this parameter to select between ELEMENT and PACKET mode. The selection is based on the configured packet_size. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-22ASoC: omap-mcbsp: Use sDMA packet mode instead of frame modePeter Ujfalusi
When McBSP is configured in threshold mode we can use sDMA packet mode in all cases. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-09-19ARM: omap: move platform_data definitionsArnd Bergmann
Platform data for device drivers should be defined in include/linux/platform_data/*.h, not in the architecture and platform specific directories. This moves such data out of the omap include directories Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Nicolas Pitre <nico@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@ti.com> Cc: "Benoît Cousson" <b-cousson@ti.com> Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Omar Ramirez Luna <omar.ramirez@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com> Cc: Jarkko Nikula <jarkko.nikula@bitmer.com> Cc: Liam Girdwood <lrg@ti.com> Cc: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: Jean Pihet <j-pihet@ti.com> Cc: J Keerthy <j-keerthy@ti.com> Cc: linux-omap@vger.kernel.org
2012-09-12ARM: OMAP2+: Prepare for irqs.h removalTony Lindgren
As the interrupts should only be defined in the platform_data, and eventually coming from device tree, there's no need to define them in header files. Let's remove the hardcoded references to irqs.h and fix up the includes so we don't rely on headers included in irqs.h. Note that we're defining OMAP_INTC_START as 0 to the interrupts. This will be needed when we enable SPARSE_IRQ. For some drivers we need to add #include <plat/cpu.h> for now until these drivers are fixed to remove cpu_is_omapxxxx() usage. While at it, sort som of the includes the standard way, and add the trailing commas where they are missing in the related data structures. Note that for drivers/staging/tidspbridge we just define things locally. Cc: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-25Merge branch 'asoc-omap' into for-3.7Mark Brown
2012-08-25ASoC: omap-mcbsp: Single macro for st channel volume set/getPeter Ujfalusi
Since we always need to have set and get callbacks for McBSP sidetone it makes sense to combine the two macro to create the two callbacks. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: omap-mcbsp: Use macro to create the McBSP2/3 ST controlsPeter Ujfalusi
To remove duplicated code from the driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: omap-mcbsp: Only print warning if the st_data is missing for the portPeter Ujfalusi
When asked to add the ST controls warn only if the st_data is missing. In this way we do not block the otherwise functional card to probe. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controlsPeter Ujfalusi
In ddevice tree booted kernel all device have unique name and their device id is set to 0. Use the mcbsp->id for checking to decide which control set we should add for McBSP sidetone handling. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22Merge branch 'asoc-omap' into for-3.7Mark Brown
2012-08-22ASoC: omap-mcbsp: Add device tree bindingsPeter Ujfalusi
Device tree support for McBSP modules on OMAP2+ SoC. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22ASoC: omap-mcbsp: Remove cpu_is_omap* checks from the codePeter Ujfalusi
We can use the has_ccr flag to replace the cpu_is_omap* checks. This provides future proof implementation and we do not need to update the code if new OMAP revision starts to use the McBSP driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-22ARM/ASoC: omap-mcbsp: Remove CLKR/FSR mux configuration codePeter Ujfalusi
Remove the feature to configure the CLKR/FSR mux on McBSP port with 6pin configuration. When moving to devicetree these callback can no longer be used in a clean way anymore. If a board require to change the 6pin port to work in 4pin setup it needs to set up the mux in the board file. For OMAP2/3: u32 devconf0; /* McBSP1 CLKR/FSR signal to be connected to CLKX/FSX pin */ devconf0 = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); devconf0 |= OMAP2_MCBSP1_CLKR_MASK | OMAP2_MCBSP1_FSR_MASK; omap_ctrl_writel(devconf0, OMAP2_CONTROL_DEVCONF0); For OMAP4: u32 mcbsp_pad; /* McBSP4 CLKR/FSR signal to be connected to CLKX/FSX pin */ mcbsp_pad = omap4_ctrl_pad_readl(OMAP2_CONTROL_DEVCONF0); mcbsp_pad |= ((1 << 31) | (1 << 30)); omap4_ctrl_pad_writel(mcbsp_pad, OMAP2_CONTROL_DEVCONF0); In case when the kernel is booted with DT blob the pinctrl-single will be provided as soon as it is enabled on the platform. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-26ASoC: omap: Add missing modules aliases to get sound working on omap devicesGuillaume Gardet
This patch add missing modules aliases to get sound working on omap devices. Tested on Beagleboard xM rev. B. This patch is against 3.5-rc6 vanilla. Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr> Signed-off-by: Mans Rullgard <mans.rullgard@linaro.org> From 18b1ba8becc3dd256bdaad2d825f46b551debda3 Mon Sep 17 00:00:00 2001 From: Guillaume GARDET <guillaume.gardet@oliseo.fr> Date: Tue, 10 Jul 2012 13:47:16 +0200 Subject: [PATCH] Add missing modules aliases to fix audio on omap devices Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-22ASoC: omap-mcbsp: buffer size constraint only applies to playback streamPeter Ujfalusi
In capture stream the buffer size does not need to be constrained to be bigger then the McBSP FIFO. In capture the FIFO content is taken out in period length burst, this enusres that the FIFO is not going to overflow. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: omap-mcbsp: Remove unused FRAME dma_op_modePeter Ujfalusi
The frame dma_op_mode has never been used, and it is just creating confusion for users/developers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: omap-mcbsp: Use DMA packet mode for non mono streams on OMAP3+Peter Ujfalusi
Take the DMA packet mode into use when the McBSP is configured in element dma_op_mode if the stream is not mono. In this way we transfer one sample from/to McBSP FIFO upon DMA request. This change only affects OMAP3+ versions, where the McBSP ports have FIFO. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: fix snd_pcm_hw_rule_add argumentsGrazvydas Ignotas
We are setting SNDRV_PCM_HW_PARAM_BUFFER_SIZE based on SNDRV_PCM_HW_PARAM_CHANNELS, not vice versa. This bug didn't have much impact because the rules are evaluated multiple times by the core, and intended value got set eventually. Signed-off-by: Grazvydas Ignotas <notasas@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Correct clock muxing for CLKR/FSR signalsPeter Ujfalusi
Remove the no longer valid check for McBSP1 regarding to signal mux selection (on OMAP4 McBSP4 has 6 pin setup). Only clear the srgr2, pcr0 register configuration if the requested clock configuration will actually going to touch it. In this way we can avoid issues if the CLKR/FSR mux has been configured after the clock selection. We are going to check for the valid McBSP port in the omap_mcbsp_6pin_src_mux() function based on the validity of the mux_signal callback (which is only valid for ports having 6 pin setup). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Single function CLKR/FSR source mux configurationPeter Ujfalusi
Use single function for the CLKR/FSR mux configuration. OMAP2/3 has 6 pin configuration on McBSP1 instance, while on OMAP4 McBSP4 instance have the 6 pin configuration so the omap2_mcbsp1_mux_* is not correct name for all support OMAP versions Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Simplify DMA configurationPeter Ujfalusi
Configure the DMA request line, port address, and stream name at probe time instead of every time we start a stream. These settings are static in the system. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Merge the omap_mcbsp_data into omap_mcbsp structurePeter Ujfalusi
Since the drivers has been merged, merge the two structures together. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Cleanup of module probe/remove codePeter Ujfalusi
Use devm_* where it is possible to save on cleanup path. Start merging the two mcbsp file content. Move pm_runtime_enable/disable calls to ASoC probe, remove from module probe/remove time. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: OMAP McBSP: Remove redundant accessorsPeter Ujfalusi
We no longer need accessor functions for max_tx/rx_threshold, dma_op_mode or for the FIFO size. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Create a single driver for McBSPPeter Ujfalusi
The OMAP McBSP driver stack used to contain two different drivers. One of them was used as kind low-level access to the IP, while the other driver was the ASoC DAI driver. There were global, shared structures, in different places, the McBSP instances are reffered with id numbers (sometimes 0 based, in other cases 1 based id numbers). Create one single driver for OMAP McBSP with name: omap-mcbsp. Convert the old omap-mcbsp driver initially to be a library for the omap-mcbsp DAI driver. With this change we can get rid of all global variables, structures. Further cleanup is coming... Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: OMAP: McBSP: Consolidate plat/mcbsp.h contentPeter Ujfalusi
Move most of the content of the plat/mcbsp.h header file under sound/soc/omap/ to help further cleanups. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>