summaryrefslogtreecommitdiff
path: root/sound/soc/omap
AgeCommit message (Collapse)AuthorFilesLines
2012-09-12ARM: OMAP: Move gpio.h to include/linux/platform_dataTony Lindgren1-0/+1
This way we can remove includes of plat/gpio.h which won't work with the single zImage support. Note that we also remove the cpu_class_is_omap2() check in gpio-omap.c as the drivers should not call it as we need to make it local to arch/arm/mach-omap2 for single zImage support. While at it, arrange the related includes in the standard way. Cc: Grant Likely <grant.likely@secretlab.ca> Cc: linux-mtd@lists.infradead.org Cc: alsa-devel@alsa-project.org Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-08-07ASoC: omap-mcbsp: Fix 6pin mux configurationPeter Ujfalusi1-1/+1
The check for the mux_signal callback was wrong which prevents us to configure the 6pin port's FSR/CLKR signal mux. Reported-by: CF Adad <cfadad@rocketmail.com> 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> Cc: stable@vger.kernel.org (3.4+)
2012-07-26ASoC: omap: Add missing modules aliases to get sound working on omap devicesGuillaume Gardet2-0/+2
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-07-06ASoC: omap-mcpdm: Add missing MODULE_ALIASPeter Ujfalusi1-0/+1
The MODULE_ALIAS() was missing from the driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-22ASoC: OMAP: HDMI: Rename sound card source fileRicardo Neri2-2/+2
Rename sound card driver source file to encompass not only OMAP4 but future OMAP versions that feature HDMI. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Make sound card naming more genericRicardo Neri1-14/+14
Rename all the relevant structures, variables and functions to not make specific reference to OMAP4. This is to make the driver encompass future OMAP versions that feature HDMI and not only OMAP4. These changes are only in naming. There are not functional changes. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Make build config options more genericRicardo Neri2-4/+4
Make Kconfig and Makefile more generic to encompass not only OMAP4 but other OMAP processors featuring HDMI. Also, relax the dependency list to depend only on any OMAP processor supporting OMAP2_DSS and OMAP4_DSS_HDMI. As HDMI support for future OMAP versions is added, the dependency list must change accordingly. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Expand capabilities of the HDMI DAIRicardo Neri2-2/+4
According to the HDMI specification, a source is permitted to transmit L-PCM audio in the following sample rates: 32kHz, 44.1kHz, 48kHz, 88.2kHz, 96kHz, 176.4kHz or 192kHz. It also supports up to 8 audio channels. The sink may not necessarily support all these sample rates and channels. However, as this CPU DAI describes the HDMI source, it makes sense to include them. The limitation of capabilities as supported by the sink should be done in the ASoC HDMI codec. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Improve how the display state is verifiedRicardo Neri2-35/+8
Before starting to play audio, we need to make sure that the display is active and the current video mode supports audio. instead of using the overlay manager in the machine driver, we use the DSS audio interface's audio_supported function. As we already have a pointer to the correct dssdev, we do not have to look for it every time audio is to be played. Also, the CPU DAI startup function is called earlier than the card hw_param function. Hence and we can detect the state of the display earlier. While there, add a error message if the constraint cannot be applied. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> squash to improve err Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Expand configuration of hw_paramsRicardo Neri1-1/+115
Expand the configuration of the hw_params to include the IEC-60958 channel status word and the CEA-861 audio infoframe. The configuration of such structures depends on the snd_pcm_hw_params received. A omap_dss_audio is used to pass the configuration parameters to DSS. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Use the DSS audio interfaceRicardo Neri2-0/+78
Instead of accessing the HDMI IP directly, the CPU DAI driver takes advantage of the audio interface provided by the DSS device driver. The ASoC driver will link the DSS audio functionality with ALSA by calling the appropriate DSS device driver functions at the relevant moments. For this, three new DAI operations are added: trigger, prepare and shutdown operations. At the moment, it is assumed that only one HDMI display is available in the system, as it is the case in OMAP4. However, in the future, one DAI for each HDMI display should be provided. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Create a structure for private data of the CPU DAIRicardo Neri1-9/+19
Create a struct hdmi_priv to store the relevant data of the CPU DAI driver. As more data is added to the driver, having all the data in the same location eases its handling. At the moment, only the DMA configuration parameters are included in the structure. Also, the required memory is allocated using devm_kzalloc rather than using a static global variable. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Change error values in HDMI CPU DAIRicardo Neri1-2/+2
When getting the needed resources fails, return -ENODEV. This is more in line with other drivers do and it gives a more descriptive error. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: OMAP: HDMI: Update the platform device namesRicardo Neri2-6/+6
In order to utilize the new OMAP HDMI codec and the updated name of the device of the CPU DAI, update the names at the drivers accordingly. While there, also update the name of the machine driver to be more generic and encompass more OMAP processors featuring HDMI and not only OMAP4. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: omap-abe-twl6040: Introduce driver data for runtime parametersPeter Ujfalusi1-4/+21
In preparation to Device Tree support. With DT booted kernel we can not rely on pdata which used to hold information needed for the driver at runtime. Use the card's driver data to hold these informations from now on. 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-05-22ASoC: omap-abe-twl6040: Move Digital Mic widget into dapm tablePeter Ujfalusi1-10/+3
The needed change in routing will be done runtime for the non twl6040 connected widgets, like the Digital microphone. 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-05-22ASoC: omap-abe-twl6040: Keep only one snd_soc_dai_link structurePeter Ujfalusi1-21/+9
There is no need to have two snd_soc_dai_link structure for the two setup the machine driver supports. We can just tell core to register only the first link if the DMIC link is not in use on the device. 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-05-22ASoC: omap-dmic: Add device tree bindingsPeter Ujfalusi1-0/+8
Device tree support for OMAP4+ dmic cpu dai driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: omap-mcpdm: Add device tree bindingsPeter Ujfalusi1-0/+8
Device tree support for OMAP4+ McPDM cpu dai driver. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-05-22ASoC: omap-mcbsp: buffer size constraint only applies to playback streamPeter Ujfalusi1-6/+8
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: Use the common interrupt line if supported by the SoCPeter Ujfalusi2-25/+95
With the common irq the driver only needs to use one interrupt line, and it provides better debugging possibilites compared to the legacy TX/RX interrupt lines. 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-05-22ASoC: omap-mcbsp: Remove unused FRAME dma_op_modePeter Ujfalusi3-3/+1
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 Ujfalusi1-13/+17
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-05-18ASoC: OMAP: HDMI: Introduce codecRicardo Neri1-0/+1
Introduce codec for HDMI. At the moment, this is a dummy codec. In the future it will parse the EDID to modify the supported parameters, such as the number of channels and the sample rates. At the moment, it blindly supports all the sample rates and audio channels described in the HDMI 1.4a specification. Signed-off-by: Ricardo Neri <ricardo.neri@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-05-05Merge tag 'sound-3.4' of ↵Linus Torvalds1-0/+4
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound sound fixes from Takashi Iwai: "As good as nothing exciting here; just a few trivial fixes for various ASoC stuff." * tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: omap-pcm: Free dma buffers in case of error. ASoC: s3c2412-i2s: Fix dai registration ASoC: wm8350: Don't use locally allocated codec struct ASoC: tlv312aic23: unbreak resume ASoC: bf5xx-ssm2602: Set DAI format ASoC: core: check of_property_count_strings failure ASoC: dt: sgtl5000.txt: Add description for 'reg' field ASoC: wm_hubs: Make sure we don't disable differential line outputs
2012-05-04ASoC: omap-pcm: Free dma buffers in case of error.Oleg Matcovschi1-0/+4
Signed-off-by: Oleg Matcovschi <oleg.matcovschi@ti.com> Acked-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-04-16mfd: Convert twl6040 to i2c driver, and separate it from twl corePeter Ujfalusi1-1/+1
Complete the separation of the twl6040 from the twl core since it is a separate chip, not part of the twl6030 PMIC. Make the needed Kconfig changes for the depending drivers at the same time to avoid breaking the kernel build (vibra, ASoC components). Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Mark Brown <broonie@opensource.wolfsonicro.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2012-03-27Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-socLinus Torvalds1-33/+1
Pull "ARM: board specific updates" from Arnd Bergmann/Olof Johansson: "These changes are all specific to one board only. We're trying to keep the number of board files low, but generally board level updates are ok on platforms that are working on moving towards DT based probing, which will eventually lead to removing them. The board-ams-delta.c board file gets a conflict between the removal of ams_delta_config and the addition of a lot of other data. The Kconfig file has two changes in the same line, and in exynos, the power domain cleanup conflicts with the addition of the image sensor device. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: Amended a fix for a mismerge to board-omap4panda.c] Signed-off-by: Olof Johansson <olof@lixom.net>" Fixed up some fairly trivial conflicts manually. * tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (82 commits) i.MX35-PDK: Add Camera support ARM : mx35: 3ds-board: add framebuffer device pxa/hx4700: Remove pcmcia platform_device structure ARM: pxa/hx4700: Reduce sleep mode battery discharge by 35% ARM: pxa/hx4700: Remove unwanted request for GPIO105 ARM: EXYNOS: support Exynos4210-bus Devfreq driver on Nuri board ARM: EXYNOS: Register JPEG on nuri ARM: EXYNOS: Register JPEG on universal_c210 ARM: S5PV210: Enable JPEG on SMDKV210 ARM: S5PV210: Add JPEG board definition ARM: EXYNOS: Enable JPEG on Origen ARM: EXYNOS: Enable JPEG on SMDKV310 ARM: EXYNOS: Add __init attribute to universal_camera_init() ARM: EXYNOS: Add __init attribute to nuri_camera_init() ARM: S5PV210: Enable FIMC on SMDKC110 ARM: S5PV210: Enable FIMC on SMDKV210 ARM: S5PV210: Enable MFC on SMDKC110 ARM: S5PV210: Enable MFC on SMDKV210 ARM: EXYNOS: Enable G2D on SMDKV310 ARM: tegra: update defconfig ...
2012-03-27Merge tag 'asoc-3.4' of ↵Arnd Bergmann11-318/+390
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/boards The asoc branch that was already merged into v3.4 contains some board-level changes that conflict with patches we already have here, so pull in that branch to resolve the conflicts. Conflicts: arch/arm/mach-imx/mach-imx27_visstrim_m10.c arch/arm/mach-omap2/board-omap4panda.c Signed-off-by: Arnd Bergmann <arnd@arndb.de> [olof: Amended fix for mismerge as reported by Kevin Hilman] Signed-off-by: Olof Johansson <olof@lixom.net>
2012-03-12ASoC: OMAP: Build config cleanup for McBSPPeter Ujfalusi2-8/+1
The McBSP driver stack has been moved, and rewritten resulting a single driver - selected by CONFIG_SND_OMAP_SOC_MCBSP. There is no longer need to have CONFIG_OMAP_MCBSP anymore. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonoie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: fix snd_pcm_hw_rule_add argumentsGrazvydas Ignotas1-2/+2
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 Ujfalusi2-24/+19
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 Ujfalusi3-39/+32
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-12ARM/ASoC: OMAP McBSP: Move remainig defines from arch to ASoC headerPeter Ujfalusi1-0/+12
Clock signal muxing, and functional clock related defines are only needed in ASoC drivers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Mark Brown <broonoie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap McBSP: Clear rx_irq at probe time for OMAP4Peter Ujfalusi1-1/+3
On OMAP4 we have one interrupt line per McBSP port. At probe time tx, and rx irq value will be -ENXIO, and only the tx irq will get corrected. In omap_mcbsp_request if the rx_irq is not 0 we proceed, and try to request the interrupt, which will fail on OMAP4 (rx_irq == -6). To avoid this error, clear the rx_irq at probe time on OMAP4. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> 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: When closing the port select PRCM source for CLKS signalPeter Ujfalusi1-0/+10
If external source for the CLKS signal selection kept after the port is no longer in use the system might refuse to go suspend. There is also a chance that the external clock is not running when next time the McBSP port is started which can result errors when we try to access McBSP registers. Reset the CLKS source back to PRCM source unconditionally. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap-mcbsp: Configure wakeup in later phasePeter Ujfalusi1-4/+3
Configure the WAKEUPEN register at the same time we configure the rest of the McBSP registers. In case of OMAP3+, if the sysclock has been reconfigured we are going to disable McBSP for the duration of the clock change, which will reset the McBSP registers. The WAKEUPEN register need to be configured later, so the changes will be effective during runtime. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicrocom> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-12ASoC: omap: mcbsp: Remove redundant checks for the st_data pointerPeter Ujfalusi1-2/+2
The parent functions of omap_st_start/stop also checks the validity of the st_data pointer so we do not need to do it again inside of omap_st_start/stop 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: Use uniform st_data pointer initializationPeter Ujfalusi1-16/+5
In this way we can save few lines, and have uniform way of initializing the st_data in all functions. 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: Simplify DMA configurationPeter Ujfalusi3-34/+10
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 Ujfalusi2-48/+38
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 Ujfalusi3-106/+85
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 Ujfalusi3-48/+5
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.h: Clean up bit definitionsPeter Ujfalusi1-97/+97
Use BIT() for bit position, correct field definition by adding mask to them, and also adding the missing spaces around '<<' 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 Ujfalusi17-391/+234
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 Ujfalusi3-0/+304
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>
2012-03-12OMAP: mcbsp: Move core driver under sound/soc/omapPeter Ujfalusi3-0/+1369
In order to consolidate the McBSP driver move it out from arch/arm/plat-omap directory under sound/soc/omap/ Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Grazvydas Ignotas <notasas@gmail.com> Tested-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Liam Girdwood <lrg@ti.com>
2012-03-05ASoC: OMAP: ams-delta: drop .set_bias_level callbackJanusz Krzysztofik1-32/+0
This functionality has already been implemented in the cx20442 codec driver (commit f75a8ff67d161b5166a2c2360bb2ffaefd5eb853, "ASoC: cx20442: add bias control over a platform provided regulator"), no need to keep it here duplicated. Once done, remove the no longer used AMS_DELTA_LATCH2_MODEM_NRESET symbol from the board header file and a call to the regulator_toggle() helper function from the old API wrapper found in the board file. While being at it, simplify the way the modem .pm callback handles the regulator and drop that helper function and its related consumer setup completely. Depends on patches 1/3 and 2/3 for clean apply and keep things working. Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-03-05Merge tag 'asoc-3.4' of ↵Takashi Iwai5-28/+26
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/asoc This has been a very active release for ASoC, as well as the usual raft of bugfixes and driver updates there's quite a few framework enhancements. Most are either small or are laying the groundwork for user visible features (especially dynamic PCM), the most directly visible change is the dmaengine library. There's also a bunch of regmap API enhancements pulled into the tree so that either the framework or drivers can take advantage of the new features. Changes include: - Support for widgets not associated with a CODEC, an important part of the dynamic PCM framework. - A library factoring out the common code shared by dmaengine based DMA drivers contributed by Lars-Peter Clausen. This will save a lot of code and make it much easier to deploy enhancements to dmaengine. - Support for binary controls, used for providing runtime configuration of algorithm coefficients. - A new DAPM widget type for regulator supplies allowing drivers for devices that can power down unused supplies while active to do without any per-driver code. - DAPM widgets for DAIs, initially giving a speed boost for playback startup and shutdown and also the basis for CODEC<->CODEC DAI link support. - Support for specifying the number of significant bits on audio interfaces, useful for allowing applications to know how much effort to put into generating data for a larger sample format. - Conversion of the FSI driver used on some SH processors to DMAEngine. - New CODEC drivers for Maxim MAX9768 and Wolfson Microelectronics WM2200.
2012-02-10ASoC: Fix build error in sound/soc/omap/n810.cAxel Lin1-1/+1
Fix below build error which is introduced by commit 022658 "ASoC: core: Add support for DAI and machine kcontrols". CC [M] sound/soc/omap/n810.o sound/soc/omap/n810.c: In function 'n810_set_input': sound/soc/omap/n810.c:194: error: 'codec' undeclared (first use in this function) sound/soc/omap/n810.c:194: error: (Each undeclared identifier is reported only once sound/soc/omap/n810.c:194: error: for each function it appears in.) sound/soc/omap/n810.c:188: warning: unused variable 'card' make[3]: *** [sound/soc/omap/n810.o] Error 1 make[2]: *** [sound/soc/omap] Error 2 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>