1
0
Fork 0
Commit Graph

314 Commits (39ffb9218e41b1ef4920432776791f5e9ed2eff3)

Author SHA1 Message Date
Lars-Peter Clausen 85e7652d89 ASoC: Constify snd_soc_dai_ops structs
Commit 1ee46ebd("ASoC: Make the DAI ops constant in the DAI structure")
introduced the possibility to have constant DAI ops structures, yet this is
barley used in both existing drivers and also new drivers being submitted,
although none of them modifies its DAI ops structure. The later is not
surprising since existing drivers are often used as templates for new drivers.
So this patch just constifies all existing snd_soc_dai_ops structs to eliminate
the issue altogether.

The patch was generated with the following coccinelle semantic patch:
// <smpl>
@@
identifier ops;
@@
-struct snd_soc_dai_ops ops =
+const struct snd_soc_dai_ops ops =
{ ... };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-11-23 10:40:46 +00:00
Paul Gortmaker da155d5b40 sound: Add module.h to the previously silent sound users
Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-10-31 19:31:21 -04:00
Peter Ujfalusi f8cf149f3e ASoC: sdp3430: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:12 +01:00
Peter Ujfalusi 93b4d790b7 ASoC: osk5912: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core. With this change we do not need the init function
since the remaining snd_soc_dapm_enable_pin calls are
not needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:12 +01:00
Peter Ujfalusi 8966c2dd51 ASoC: n810: Let the core to register DAPM widgets/routes and controls
Pass the DAPM widgets/routes and static controls via the
snd_soc_card struct to core. In this way the machine driver
does not need to handle the DAPM widgets/routes.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi d2266025ea ASoC: am3517evm: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core. With this change we do not need the init function
since the remaining snd_soc_dapm_enable_pin calls are
not needed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Anuj Aggarwal <anuj.aggarwal@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi d805846960 ASoC: sdp4430: No need to call dapm_pin_enable at init time
Widgets are connected by default.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi fc8e5b4c6b ASoC: sdp4430: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi cd4a3d5d0d ASoC: zoom2: No need to call dapm_pin_enable at init time
Widgets are connected by default.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi 1083dbd1d7 ASoC: zoom2: Let core to deal with the DAPM widgets
Pass the DAPM widgets/routes via the snd_soc_card struct
to core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:11 +01:00
Peter Ujfalusi cb4248779d ASoC: OMAP machines: Remove soc_dapm_sync() call from init
No need to call soc_dapm_sync at init time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Anuj Aggarwal <anuj.aggarwal@ti.com>
Cc: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Cc: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: GraÅžvydas Ignotas <notasas@gmail.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 16:18:10 +01:00
Michael Opdenacker 6179b772ac ASoC: fix checkpatch.pl error in omap-mcbsp
Signed-off-by: Michael Opdenacker <michael.opdenacker@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-10 10:31:59 +01:00
Peter Ujfalusi b1b6cffeb7 ASoC: omap-pcm: Fix the no period wakeup implementation
After omap_request_dma the BLOCK_IRQ is enabled as default
configuration for the channel.
If we are requested for no period wakeup, we need to disable
the BLOCK_IRQ in order to not receive any interrupts.

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>
2011-10-04 12:03:50 +01:00
Jarkko Nikula a3c6dac201 ASoC: omap: Use single hw_params callback in sdp3430 and zoom2
There is no need to use two hw_params callbacks in sdp3430 and zoom2 as
thet are now identical. Use instead the same snd_soc_ops structure and
hw_params callback for both DAI links.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02 19:57:08 +01:00
Jarkko Nikula cf9feff28f ASoC: omap: Convert bunch of machine drivers to use init time DAI format
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02 19:57:07 +01:00
Jarkko Nikula 4dd0417253 ASoC: omap-mcbsp: Prepare for init time DAI format setting
Before commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the
dai_link") expectation for omap-mcbsp was that snd_soc_dai_set_fmt is to be
called first in machine hw_params callback before other CPU DAI functions.
Thus it was enough that only omap_mcbsp_dai_set_dai_fmt cleared the
mcbsp->regs structure.  [Note that this was pure convention, it's always
been OK to set things on init -- broonie]

Now this doesn't hold anymore since machine drivers can set the DAI format
only once on init time and thus mcbsp->regs may get out of sync when other
CPU DAI functions are modifying them dynamically with different values
between the calls. Therefore clear the accessed mcbsp->regs bits and
bitfields in other functions too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-10-02 19:57:07 +01:00
Jarkko Nikula 91a18ae8ff ASoC: omap-mcbsp: Fix FS polarity for LEFT_J, DSP_A and DSP_B formats
Commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the dai_link")
changed DAI format flag values and we cannot simply invert anymore e.g.
frame-sync with ^= SND_SOC_DAIFMT_NB_IF (which was anyway misuse) as there
is no anymore fixed bit position for bit-clock or frame-sync inversion.

Fix this by relying only on DAI format flag values passed to us and by not
making any assumption on individual bit positions.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-30 12:56:17 +01:00
Ujfalusi, Peter 5382ffbb17 ASoC: sdp4430: Fix string for FM input name
The name contains invalid valid character (/), which
causes problems when trying to create the debugfs
directory structure:
ASoC: Failed to create Aux/FM Stereo In debugfs file

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-30 12:56:12 +01:00
Peter Ujfalusi 7bf3d92cdd ASoC: sdp4430: Configure McPDM offset cancellation
Based on the values from twl6040 codec (HSOTRIM L/R) we can configure
the McPDM offset cancellation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi 89b0d550a6 ASoC: omap-mcpdm: API to configure offset cancellation
The offset cancellation values can be different from board to board, even
on the same HW platform.
Provide a way for the machine drivers to configure the McPDM offset
cancellation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-26 22:23:32 +01:00
Peter Ujfalusi 141947e6ce ASoC: omap-mcbsp: Fix compile time warning about ambiguous ‘else’
Fixes the following compile time warning:
omap-mcbsp.c:519: warning: suggest explicit braces to avoid ambiguous ‘else’

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>
2011-09-26 09:57:35 +01:00
Peter Ujfalusi 3b5b516fbf ASoC: omap-mcpdm: Correct the supported number of channels
OMAP4 McPDM supports 5 downlink (playback), and
3 uplink (capture) channels.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-23 11:52:32 +01:00
Mark Brown ebca813cf0 Merge branch 'for-3.1' into for-3.2 2011-09-23 11:52:09 +01:00
Jarkko Nikula 34c869855a ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
Attempt to change McBSP CLKS source while another stream is active is not
safe after commit d135865 ("OMAP: McBSP: implement functional clock
switching via clock framework") in 2.6.37.

CLKS parent clock switching using clock framework have to idle the McBSP
before switching and then activate it again. This short break can cause a
DMA transaction error to already running stream which halts and recovers
only by closing and restarting the stream.

This goes more fatal after commit e2fa61d ("OMAP3: l3: Introduce
l3-interconnect error handling driver") in 2.6.39 where l3 driver detects a
severe timeout error and does BUG_ON().

Fix this by not changing any configuration in omap_mcbsp_dai_set_dai_sysclk
if the McBSP is already active. This test should have been here just from
the beginning anyway.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-09-23 11:48:55 +01:00
Peter Ujfalusi d13f1fe044 ASoC: twl6040/sdp4430: Change legacy DAI name
Change the legacy DAI name from "twl6040-hifi" to "twl6040-legacy" to
be more intuitive.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-22 17:20:22 +01:00
Misael Lopez Cruz f5f9d7bf6e ASoC: omap-mcpdm: Replace legacy driver
Reasons for the replacement:
The current driver for McPDM was developed to support the legacy mode only.
In preparation for the ABE support the current driver stack need the be
replaced.
The new driver is much simpler, easier to extend, and it also fixes some of the
issues with the old stack.

Main changes:
- single file for omap-mcpdm (mcpdm.c/h removed)
- Define names for registers, bits cleaned up, prefixed
- Full-duplex audio operation (arecord | aplay) has been fixed
- Less code

McPDM need to be turned off after all streams has been stopped.
This might cause pop noise on the output, if the codec's DAC is
still powered at this time.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-09-22 09:22:50 +03:00
Peter Ujfalusi 3a98cd6b2b ASoC: OMAP4: McPDM: Convert to hwmod/omap_device
In order to probe, and operate correctly, the OMAP McPDM driver needs to
be converted to use hwmod.
The device name has been changed to probe the driver.
Replace the clk_* with pm_runtime_* calls to manage the clocks correctly.
Missing request_mem_region/release_mem_region added.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-22 09:19:15 +03:00
Peter Ujfalusi b199adfdff ASoC: omap-mcpdm: Fix threshold and dma configuration
DMA packet_size must be configured based on the McPDM FIFO threshold
value, number of channels.
Due to the FIFO operation the DMA muse be configured differently for
playback, and capture.
At the same time fix the McPDM threshold values used for playback, and
capture to avoid broken code.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-09-22 09:19:15 +03:00
Jarkko Nikula e574044acb ASoC: omap: Fix build errors in ams-delta
Fix "error: too few arguments to function 'ams_delta_set_bias_level'"
build errors in ams-delta.c that were introduced after commit d4c6005 ("ASoC:
Add context parameter to card DAPM callbacks") by adding dapm context
to ams_delta_set_bias_level calls.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-19 01:19:45 +09:00
Jarkko Nikula 7ec41ee5ad ASoC: omap: Update e-mail address of Jarkko Nikula
My gmail account got disabled and I'm not going to reopen it.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-08-12 11:45:10 +09:00
Linus Torvalds b0189cd087 Merge branch 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (47 commits)
  OMAP: Add debugfs node to show the summary of all clocks
  OMAP2+: hwmod: Follow the recommended PRCM module enable sequence
  OMAP2+: clock: allow per-SoC clock init code to prevent clockdomain calls from clock code
  OMAP2+: clockdomain: Add per clkdm lock to prevent concurrent state programming
  OMAP2+: PM: idle clkdms only if already in idle
  OMAP2+: clockdomain: add clkdm_in_hwsup()
  OMAP2+: clockdomain: Add 2 APIs to control clockdomain from hwmod framework
  OMAP: clockdomain: Remove redundant call to pwrdm_wait_transition()
  OMAP4: hwmod: Introduce the module control in hwmod control
  OMAP4: cm: Add two new APIs for modulemode control
  OMAP4: hwmod data: Add modulemode entry in omap_hwmod structure
  OMAP4: hwmod data: Add PRM context register offset
  OMAP4: prm: Remove deprecated functions
  OMAP4: prm: Replace warm reset API with the offset based version
  OMAP4: hwmod: Replace RSTCTRL absolute address with offset macros
  OMAP: hwmod: Wait the idle status to be disabled
  OMAP4: hwmod: Replace CLKCTRL absolute address with offset macros
  OMAP2+: hwmod: Init clkdm field at boot time
  OMAP4: hwmod data: Add clock domain attribute
  OMAP4: clock data: Add missing divider selection for auxclks
  ...
2011-07-26 17:42:18 -07:00
Linus Torvalds d3ec4844d4 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits)
  fs: Merge split strings
  treewide: fix potentially dangerous trailing ';' in #defined values/expressions
  uwb: Fix misspelling of neighbourhood in comment
  net, netfilter: Remove redundant goto in ebt_ulog_packet
  trivial: don't touch files that are removed in the staging tree
  lib/vsprintf: replace link to Draft by final RFC number
  doc: Kconfig: `to be' -> `be'
  doc: Kconfig: Typo: square -> squared
  doc: Konfig: Documentation/power/{pm => apm-acpi}.txt
  drivers/net: static should be at beginning of declaration
  drivers/media: static should be at beginning of declaration
  drivers/i2c: static should be at beginning of declaration
  XTENSA: static should be at beginning of declaration
  SH: static should be at beginning of declaration
  MIPS: static should be at beginning of declaration
  ARM: static should be at beginning of declaration
  rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check
  Update my e-mail address
  PCIe ASPM: forcedly -> forcibly
  gma500: push through device driver tree
  ...

Fix up trivial conflicts:
 - arch/arm/mach-ep93xx/dma-m2p.c (deleted)
 - drivers/gpio/gpio-ep93xx.c (renamed and context nearby)
 - drivers/net/r8169.c (just context changes)
2011-07-25 13:56:39 -07:00
Peter Ujfalusi af958c72af ASoC: twl6040: Move PLL selection to codec driver
It is better if the selection between the Low power,
and High performance PLL is handled within the codec
driver, not in machine driver(s) to avoid duplicated
code, and also to have consistent tracking of the selected
PLL, and the resulting differences in supported sample
rates.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-07 14:23:44 +03:00
Takashi Iwai 56aa533910 Merge branch 'for-3.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-07-05 07:33:23 +02:00
Misael Lopez Cruz fb34d3d505 ASoC: twl6040: Convert into TWL6040 MFD child
Convert TWL6040 CODEC driver into a TWL6040 MFD child, it implies
that MFD-level operations like register accesses, clock setting
and power management are done through MFD APIs, not directly by
CODEC driver anymore. To avoid conflicts with the other MFD child,
vibrator registers are skipped in CODEC driver.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-04 19:35:06 +03:00
Peter Ujfalusi 57fe7251f5 MFD: twl4030-codec -> twl4030-audio: Rename the driver
Rename the driver, and header file from twl4030-codec to
twl4030-audio.
To avoid breakage change depending drivers at the same time.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
CC: Misael Lopez Cruz <misael.lopez@ti.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
2011-07-04 18:43:56 +03:00
Joe Perches dbc6221be7 treewide: Fix recieve/receive typos
Just spelling fixes.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-06-24 11:18:57 +02:00
Liam Girdwood 552d1ef6b5 ASoC: core - Optimise and refactor pcm_new() to pass only rtd
Currently pcm_new() passes in 3 arguments :- card, pcm and DAI.

Refactor this to only pass in 1 argument (i.e. the rtd) since struct rtd contains
card, pcm and DAI along with other members too that are useful too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-06-07 18:38:27 +01:00
Mark Brown d4c6005f8e ASoC: Add context parameter to card DAPM callbacks
The card callback will get called for each DAPM context in the card so it
can be useful for it to know which device is currently undergoing a
transition.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2011-06-06 21:46:45 +01:00
Ricardo Neri 68d1c4a73c ASoC: OMAP: Update Makefile and Kconfig for HDMI audio
Update Makefile and Kconfig to build HDMI audio support for
OMAP4 SDP and Panda boards.

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>
2011-06-03 13:43:46 +01:00
Ricardo Neri 55b95e0e60 ASoC: OMAP4: Add HDMI Audio machine driver for OMAP4 boards
Add machine driver for HDMI audio on OMAP4 boards. This driver is
in charge of putting together the HDMI audio codec and the CPU DAI
and register the HDMI sound card with ALSA.

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>
2011-06-03 13:43:45 +01:00
Ricardo Neri bca2e41d31 ASoC: OMAP: Add CPU DAI driver for HDMI
Addition of the HDMI CPU DAI driver for OMAP4. This driver is in
charge of configuring DMA settings for HDMI. Also, it finds
the HDMI video device and determines if audio playback can proceed.

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>
2011-06-03 13:43:45 +01:00
Linus Torvalds 829ae27329 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (33 commits)
  OMAP3: PM: Boot message is not an error, and not helpful, remove it
  OMAP3: cpuidle: change the power domains modes determination logic
  OMAP3: cpuidle: code rework for improved readability
  OMAP3: cpuidle: re-organize the C-states data
  OMAP3: clean-up mach specific cpuidle data structures
  OMAP3 cpuidle: remove useless SDP specific timings
  usb: otg: OMAP4430: Powerdown the internal PHY when USB is disabled
  usb: otg: OMAP4430: Fixing the omap4430_phy_init function
  usb: musb: am35x: fix compile error when building am35x
  usb: musb: OMAP4430: Power down the PHY during board init
  omap: drop board-igep0030.c
  omap: igep0020: add support for IGEP3
  omap: igep0020: minor refactoring
  omap: igep0020: name refactoring for future merge with IGEP3
  omap: Remove support for omap2evm
  arm: omap2plus: GPIO cleanup
  omap: musb: introduce default board config
  omap: move detection of NAND CS to common-board-devices
  omap: use common initialization for PMIC i2c bus
  omap: consolidate touch screen initialization among different boards
  ...
2011-05-26 12:11:54 -07:00
Tony Lindgren 91d94af56a omap: Remove support for omap2evm
The board support has never been merged for it as noticed
by Russell King <linux@arm.linux.org.uk>. So let's remove the
related dead code.

Cc: linux-fbdev@vger.kernel.org
Cc: alsa-devel@alsa-project.org
Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-05-13 04:41:32 -07:00
Sanjeev Premi d491297752 ASoC: omap-mcbsp: Remove restrictive checks for cpu type
Current checks for cpu type were too restrictive leading
to failures for other silicons in same family.

The problem was found while testing audio playback on
AM37x and AM35x processors. But should exist on OMAP36xx
as well.

Signed-off-by: Sanjeev Premi <premi@ti.com>
cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
cc: Liam Girdwood <lrg@ti.com>
cc: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@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>
2011-05-13 12:00:15 +01:00
Peter Ujfalusi b417382419 ASoC: omap-pcm: Period wakeup disabling on OMAP2+
Allow disabling ALSA period wakeup interrupts.
This can only be done on OMAP2+ (2/3/4), since there
we can chain the DMA.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-13 12:00:14 +01:00
Peter Ujfalusi 0ac3a014b8 ASoC: RX51: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:52:02 +01:00
Peter Ujfalusi 1c7687b995 ASoC: omap-pcm: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:15:18 +01:00
Peter Ujfalusi 56a8742916 ASoC: omap-mcbsp: Update e-mail address
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-05-11 16:12:57 +01:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Linus Torvalds d3e458d781 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (308 commits)
  ALSA: sound/pci/asihpi: check adapter index in hpi_ioctl
  ALSA: aloop - Fix possible IRQ lock inversion
  ALSA: sound/core: merge list_del()/list_add_tail() to list_move_tail()
  ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
  ALSA: firewire - msleep needs delay.h
  ALSA: firewire-lib, firewire-speakers: handle packet queueing errors
  ALSA: firewire-lib: allocate DMA buffer separately
  ALSA: firewire-lib: use no-info SYT for packets without SYT sample
  ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver
  ALSA: hda - Remove an unused variable in patch_realtek.c
  ALSA: hda - pin-adc-mux-dmic auto-configuration of 92HD8X codecs
  ALSA: hda - fix digital mic selection in mixer on 92HD8X codecs
  ALSA: hda - Move default input-src selection to init part
  ALSA: hda - Initialize special cases for input src in init phase
  ALSA: ctxfi - Clear input settings before initialization
  ALSA: ctxfi - Fix SPDIF status retrieval
  ALSA: ctxfi - Fix incorrect SPDIF status bit mask
  ALSA: ctxfi - Fix microphone boost codes/comments
  ALSA: atiixp - Fix wrong time-out checks during ac-link reset
  ALSA: intel8x0m: append 'm' to "r_intel8x0"
  ...
2011-03-18 10:46:37 -07:00
Linus Torvalds 0df0914d41 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits)
  omap: zoom: host should not pull up wl1271's irq line
  arm: plat-omap: iommu: fix request_mem_region() error path
  OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430
  omap4: mux: Remove duplicate mux modes
  omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag
  omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set
  omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected
  omap4: board-omap4panda: Initialise the serial pads
  omap3: board-3430sdp: Initialise the serial pads
  omap4: board-4430sdp: Initialise the serial pads
  omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init
  omap2+: mux: Remove the use of IDLE flag
  omap2+: Add separate list for dynamic pads to mux
  perf: add OMAP support for the new power events
  OMAP4: Add IVA OPP enteries.
  OMAP4: Update Voltage Rail Values for MPU, IVA and CORE
  OMAP4: Enable 800 MHz and 1 GHz MPU-OPP
  OMAP3+: OPP: Replace voltage values with Macros
  OMAP3: wdtimer: Fix CORE idle transition
  Watchdog: omap_wdt: add fine grain runtime-pm
  ...

Fix up various conflicts in
 - arch/arm/mach-omap2/board-omap3evm.c
 - arch/arm/mach-omap2/clock3xxx_data.c
 - arch/arm/mach-omap2/usb-musb.c
 - arch/arm/plat-omap/include/plat/usb.h
 - drivers/usb/musb/musb_core.h
2011-03-17 19:28:15 -07:00
Abhilash K V ffd6eae2a0 ASoC: AM3517: Update codec name after multi-component update
The i2c client device name (".2-001a" in this case, including
the separator period) for the AIC23 codec on the TI AM3517-EVM
was appended to the codec_name member of am3517evm_dai to
resolve the names mismatch happening in soc_bind_dai_link(),
due to which the card was not getting registered.

Signed-off-by: Abhilash K V <abhilash.kv@ti.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 11:48:55 +00:00
Jarkko Nikula fa4d1f595a ASoC: omap: rx51: Enable McBSP2 sidetone
McBSP sidetone is needed in telephony applications. McBSP sidetone is a
configurable FIR filter that forms a loopback from McBSP input to output.
This patch enables the McBSP2 sidetone ALSA controls so that it can be used
on Nokia RX-51/N900.

Sidetone feature can be tested with following commands:

	(set up codec input and output paths)
	# Enable and configure sidetone
	amixer -D hw:0 set 'McBSP2 Sidetone' on
	amixer set -D hw:0 'McBSP2 Sidetone Channel 0' 32767
	echo 32767 >/sys/devices/platform/omap-mcbsp.2/st_taps
	# Do not loop audio via CPU
	arecord -f dat >/dev/null |aplay /dev/zero

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-09 10:52:28 +00:00
Kishon Vijay Abraham I 2686e07b3e ASoC: McBSP: get hw params from McBSP driver
Removed the use of macros to obtain base address and DMA channel number.
Instead use the McBSP driver API's that passes base address and DMA
channel number to the client driver.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-02-24 13:04:13 -08:00
Jarkko Nikula 9d7e584b3f ASoC: omap: rx51: Add FM transmitter support
Si4713 FM transmitter on Nokia RX-51/N900 is connected to same Line out
signals of TLV320AIC34 than TPA6130 headphone amplifier.

This patch adds route to transmitter and "FM Transmitter" control to keep
route active when needed.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-22 09:38:50 +00:00
Tony Lindgren 9238b6d8e8 Merge branches 'devel-cleanup', 'devel-board', 'devel-early-init' and 'devel-ti816x' into omap-for-linus 2011-02-16 11:32:38 -08:00
Jarkko Nikula 1784061957 ASoC: omap: rx51: Report headset insertion instead of video out cable
It is more usefull to report headset instead of video out cable in response
to jack insertion as this is more usual use-case and because now the headset
feature is supported. Automatic accessory detection is not possible at the
moment so most sensible static accessory type have to be used.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Jarkko Nikula 31164c7cf1 ASoC: omap: rx51: Add headset support
This patch adds support for headset microphone in Nokia RX-51/N900. The mic
signal from audio jack is routed to codec A LINE1L via two switches and the
mic bias is coming from codec B part.

First switch is the tv-out switch that is already supported and the second
switch selects between voltage detection circuit and codecs. As there is
no use for voltage detection at the moment the second switch is connected
statically to codecs in rx51_soc_init.

Headset can be active when control "Jack Function" is set to "Headset".

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Jarkko Nikula d8ec598e5d ASoC: omap: rx51: Use gpio_request_one to configure tvout_sel gpio
Just slight cleanup to be sync with upcoming change.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-15 21:53:59 +00:00
Mark Brown 273de37655 Merge branch 'for-2.6.39' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into for-2.6.39 2011-02-01 14:55:10 +00:00
Janusz Krzysztofik acd6227677 ASoC: Amstrad Delta: fix const related build error
The Amstrad Delta ASoC driver used to override the digital_mute()
callback, expected to be not provided by the on-board CX20442 CODEC
driver, with its own implementation. While this is still posssible when
substituting the whole empty snd_soc_dai_driver.ops member (the CX20442
case), replacing snd_soc_dai_ops.digital_mute only is no longer correct
after the snd_soc_dai_driver.ops member has been constified, and results
in build error.

Drop this actually not used code path in hope the CX20442 driver never
provides its own snd_soc_dai_ops structure.

Created and tested against linux-2.6.38-rc2

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-02-01 14:13:47 +00:00
Jarkko Nikula 8cda975174 ASoC: omap: rx51: Add earphone support
Earphone in Nokia RX-51/N900 is connected to left HP output of B part of the
TLV320AIC34 dual codec. In RX-51 the codec A is used as a traditional codec
and the codec B as an auxiliary device.

Audio from codec A goes via the codec B to earphone:
MONO_LOUT of A -> LINE2R of B (B interconnects) -> HPLOUT of B -> Earphone.

Take earphone into use by utilizing the recent ASoC auxiliary and
cross-device support.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-02-01 13:58:52 +00:00
Tony Lindgren 59b479e098 omap: Start using CONFIG_SOC_OMAP
We want to have just CONFIG_ARCH_OMAP2, 3 and 4. The rest
are nowadays just subcategories of these.

Search and replace the following:

ARCH_OMAP2420		SOC_OMAP2420
ARCH_OMAP2430		SOC_OMAP2430
ARCH_OMAP3430		SOC_OMAP3430

No functional changes.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Sourav Poddar <sourav.poddar@ti.com>
2011-01-27 16:39:40 -08:00
Jarkko Nikula 48529b3b7c ASoC: omap: rx51: Add stereo output support to audio jack
Audio jack in Nokia RX-51/N900 is driven by TPA6130 headphone amplifier.
This patch adds support for it and stereo output can be active when
"Jack Function" == "TV-OUT" || "Headphone".

As the TPA6130 can output very high volume levels the output is limited
with snd_soc_limit_volume. Limiting value is found from Maemo kernel sources.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-27 20:48:46 +00:00
Takashi Iwai 2f55eaab56 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2011-01-12 07:20:30 +01:00
Jarkko Nikula 5e79d64b03 ASoC: Remove needless inclusion of tlv320aic3x.h from machine drivers
After multi-component conversion these machine drivers don't actually need
anything from sound/soc/codecs/tlv320aic3x.h so don't include it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-01-05 11:28:50 +00:00
Jorge Eduardo Candelaria d4686c654b ASoC: mcbsp: Add McBSP support for OMAP4
This patch adds McBSP support for the OMAP4 CPU

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-23 14:38:05 +00:00
Takashi Iwai 991e02b446 Merge branch 'for-2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asoc 2010-12-17 16:43:17 +01:00
Jorge Eduardo Candelaria 96dc227c90 ASoC: sdp4430: Add Jack support
Use jack framework to enable detection for the headset microphone
and stereo output in the sdp4430.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: David Anders <x0132446@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-14 20:31:55 +00:00
Jorge Eduardo Candelaria 23ac3b6133 ASoC: sdp4430: Enable FM stereo pins
Add FM stereo pins to the machine driver and add them as a
dapm widget.

Signed-off-by: Jorge Eduardo Candelaria <jorge.candelaria@ti.com>
Signed-off-by: Margarita Olaya Cabrera <magi.olaya@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-09 09:46:05 +00:00
Mark Brown 28216bf48b Merge branch 'for-2.6.37' into for-2.6.38 2010-12-03 17:28:29 +00:00
Jarkko Nikula 0ffd22b694 ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependency
Not all omap boards use kernel based pin multiplexing so
CONFIG_SND_OMAP_SOC_N810 should not select it by default as it can make
harm to other boards in multi-board kernels.

Therefore put CONFIG_OMAP_MUX as a dependency to N810 ASoC machine driver.

Thanks to Tony Lindgren <tony@atomide.com> for noticing.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02 11:42:30 +00:00
Mark Brown fdc1f5d060 Merge branch 'for-2.6.37' into for-2.6.38 2010-11-25 21:16:52 +00:00
Axel Lin 25436180ee ASoC: Fix resource reclaim for osk5912
In current implementation, there are resources leak in the error path.
This patch properly reclaims the allocated resources in the error path.

Also adds a missing clk_put in osk_soc_exit.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-25 21:15:49 +00:00
Mark Brown ab4e57446f Merge branch 'for-2.6.37' into for-2.6.38 2010-11-24 11:57:43 +00:00
Mark Brown 59e2102028 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into for-2.6.37 2010-11-24 11:22:55 +00:00
Axel Lin 5c12d20145 ASoC: Return proper error for omap3pandora_soc_init
Return PTR_ERR(omap3pandora_dac_reg) instead of 0 if regulator_get failed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-24 11:22:45 +00:00
Jarkko Nikula 505fb824e7 ASoC: Do not include soc-dapm.h
There is no need to include soc-dapm.h since soc.h includes it.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-22 14:04:41 +00:00
Liam Girdwood ce6120cca2 ASoC: Decouple DAPM from CODECs
Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
required when developing ASoC further. Such as for other ASoC components to
have DAPM widgets or when extending DAPM to handle cross-device paths.

This patch decouples DAPM related variables from struct snd_soc_codec and
moves them to new struct snd_soc_dapm_context that is used to encapsulate
DAPM context of a device. ASoC core and API of DAPM functions are modified
to use DAPM context instead of codec.

This patch does not change current functionality and a large part of changes
come because of structure and internal API changes.

Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some
minor core changes, codecs and machine driver conversions from
Jarkko Nikula <jhnikula@gmail.com>.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Timur Tabi <timur@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Jassi Brar <jassi.brar@samsung.com>
Cc: Daniel Gloeckner <dg@emlix.com>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-06 11:28:29 -04:00
Janusz Krzysztofik 233538501f ASoC: OMAP: fix OMAP1 compilation problem
In the new code introduced with commit cf4c87abe2,
"OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c",
the way omap1 build is supposed to bypass omap2 specific functionality doesn't
optimize out all omap2 specific stuff. This breaks linking phase for omap1
machines, giving "undefined reference to `omap2_mcbsp1_mux_clkr_src'"
and "undefined reference to `omap2_mcbsp1_mux_fsr_src'" errors. Fix it.

Created and tested against linux-2.6.37-rc1.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-11-03 14:11:50 +00:00
Linus Torvalds 7b6181e068 Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (163 commits)
  omap: complete removal of machine_desc.io_pg_offst and .phys_io
  omap: UART: fix wakeup registers for OMAP24xx UART2
  omap: Fix spotty MMC voltages
  ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h
  serial: omap-serial: fix signess error
  OMAP3: DMA: Errata i541: sDMA FIFO draining does not finish
  omap: dma: Fix buffering disable bit setting for omap24xx
  omap: serial: Fix the boot-up crash/reboot without CONFIG_PM
  OMAP3: PM: fix scratchpad memory accesses for off-mode
  omap4: pandaboard: enable the ehci port on pandaboard
  omap4: pandaboard: Fix the init if CONFIG_MMC_OMAP_HS is not set
  omap4: pandaboard: remove unused hsmmc definition
  OMAP: McBSP: Remove null omap44xx ops comment
  OMAP: McBSP: Swap CLKS source definition
  OMAP: McBSP: Fix CLKR and FSR signal muxing
  OMAP2+: clock: reduce the amount of standard debugging while disabling unused clocks
  OMAP: control: move plat-omap/control.h to mach-omap2/control.h
  OMAP: split plat-omap/common.c
  OMAP: McBSP: implement functional clock switching via clock framework
  OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c
  ...

Fixed up trivial conflicts in arch/arm/mach-omap2/
{board-zoom-peripherals.c,devices.c} as per Tony
2010-10-25 13:46:56 -07:00
Anand Gadiyar 4de43a6b4c ASoC: OMAP4: MCPDM: Remove unnecessary include of plat/control.h
Commit 346a5c890 (OMAP: control: move plat-omap/control.h
to mach-omap2/control.h) in the linux-omap tree removed
plat/control.h and most of its callers. This one slipped
through - breaking the build as below when
CONFIG_SND_OMAP_SOC_MCPDM is defined. Fix this.

  CC      sound/soc/omap/omap-mcpdm.o
sound/soc/omap/omap-mcpdm.c:35: fatal error: plat/control.h: No such file or directory
compilation terminated.
make[3]: *** [sound/soc/omap/omap-mcpdm.o] Error 1
make[2]: *** [sound/soc/omap] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2

Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
Cc: Misael Lopez Cruz <misael.lopez@ti.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Paul Walmsley <paul@pwsan.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
2010-10-12 13:25:31 -07:00
Jarkko Nikula ec588ae6c2 ASoC: omap: Remove needless prints from machine drivers
It is currently completely normal to execute these machine drivers code on
different boards if the kernel includes support for multiple boards so no
error message should be printed if the machine_is_xxx does not match with
the machine driver.

Therefore remove these pr_err and pr_debug prints in those cases.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-10-10 11:37:20 +01:00
Paul Walmsley d13586574d OMAP: McBSP: implement functional clock switching via clock framework
Previously the OMAP McBSP ASoC driver implemented CLKS switching by
using omap_ctrl_{read,write}l() directly.  This is against policy; the OMAP
System Control Module functions are not intended to be exported to drivers.
These symbols are no longer exported, so as a result, the OMAP McBSP ASoC
driver does not build as a module.

Resolve the CLKS clock changing portion of this problem by creating a
clock parent changing function that lives in
arch/arm/mach-omap2/mcbsp.c, and modify the ASoC driver to use it.
Due to the unfortunate way that McBSP support is implemented in ASoC
and the OMAP tree, this symbol must be exported for use by
sound/soc/omap/omap-mcbsp.c.

Going forward, the McBSP device driver should be moved from
arch/arm/*omap* into drivers/ or sound/soc/* and the CPU DAI driver
should be implemented as a platform_driver as many other ASoC CPU DAI
drivers are.  These two steps should resolve many of the layering
problems, which will rapidly reappear during a McBSP hwmod/PM runtime
conversions.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-08 11:40:19 -06:00
Paul Walmsley cf4c87abe2 OMAP: McBSP: implement McBSP CLKR and FSR signal muxing via mach-omap2/mcbsp.c
The OMAP ASoC McBSP code implemented CLKR and FSR signal muxing via
direct System Control Module writes on OMAP2+.  This required the
omap_ctrl_{read,write}l() functions to be exported, which is against
policy: the only code that should call those functions directly is
OMAP core code, not device drivers.  omap_ctrl_{read,write}*() are no
longer exported, so the driver no longer builds as a module.

Fix the pinmuxing part of the problem by removing calls to
omap_ctrl_{read,write}l() from the OMAP ASoC McBSP code and
implementing signal muxing functions in arch/arm/mach-omap2/mcbsp.c.
Due to the unfortunate way that McBSP support is implemented in ASoC
and the OMAP tree, these symbols must be exported for use by
sound/soc/omap/omap-mcbsp.c.

Going forward, the McBSP device driver should be moved from
arch/arm/*omap* into drivers/ or sound/soc/*, and the CPU DAI driver
should be implemented as a platform_driver as many other ASoC CPU DAI
drivers are.  These two steps should resolve many of the layering
problems, which will rapidly reappear during a McBSP hwmod/PM runtime
conversion.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-10-08 11:40:19 -06:00
G, Manjunath Kondaiah 3484457fc5 OMAP: McBSP: Fix static function warning
This patch fixes sparse warning due non declaration of static function

sound/soc/omap/omap-mcbsp.c:783:5: warning: symbol 'omap_mcbsp_st_info_volsw' was not declared. Should it be static?

Signed-off-by: G, Manjunath Kondaiah <manjugk@ti.com>
Cc: alsa-devel@alsa-project.org
Cc: Jarkko Nikula <jhnikula@gmail.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Nishanth Menon <nm@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-09-08 12:14:02 +01:00
Liam Girdwood 97e15b1fcf Merge remote branch 'broonie-asoc/for-2.6.37' into for-2.6.37 2010-08-23 12:58:01 +01:00
Jarkko Nikula 4fff7a5ccc ASoC: omap: rx51: Use gpio_set_value_cansleep for speaker amp control
Speaker amplifier is controlled by TWL4030 GPIO which may sleep. Therefore
use gpio_set_value_cansleep to get rid of runtime warning that is introduced
after the commit 9c4ba94 and to get a stack trace if ever executing this
code in atomic context.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-23 12:03:09 +01:00
Janusz Krzysztofik 5394637a24 ASoC: Use a more adequate name for the CX20442 codec DAI
In the process of unification of codec DAI names while implementing
multi-component, the CX20442 codec DAI has been renamed to "cx20442-hifi".
This new name seems not adequate for a 8kHz voice codec.

Use a better name, "cx20442-voice", as suggested by Liam Girdwood.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-08-19 15:30:43 +01:00
Liam Girdwood f0fba2ad1b ASoC: multi-component - ASoC Multi-Component Support
This patch extends the ASoC API to allow sound cards to have more than one
CODEC and more than one platform DMA controller. This is achieved by dividing
some current ASoC structures that contain both driver data and device data into
structures that only either contain device data or driver data. i.e.

 struct snd_soc_codec    --->  struct snd_soc_codec (device data)
                          +->  struct snd_soc_codec_driver (driver data)

 struct snd_soc_platform --->  struct snd_soc_platform (device data)
                          +->  struct snd_soc_platform_driver (driver data)

 struct snd_soc_dai      --->  struct snd_soc_dai (device data)
                          +->  struct snd_soc_dai_driver (driver data)

 struct snd_soc_device   --->  deleted

This now allows ASoC to be more tightly aligned with the Linux driver model and
also means that every ASoC codec, platform and (platform) DAI is a kernel
device. ASoC component private data is now stored as device private data.

The ASoC sound card struct snd_soc_card has also been updated to store lists
of it's components rather than a pointer to a codec and platform. The PCM
runtime struct soc_pcm_runtime now has pointers to all its components.

This patch adds DAPM support for ASoC multi-component and removes struct
snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
or runtime PCM level basis rather than using snd_soc_socdev.

Other notable multi-component changes:-

 * Stream operations now de-reference less structures.
 * close_delayed work() now runs on a DAI basis rather than looping all DAIs
   in a card.
 * PM suspend()/resume() operations can now handle N CODECs and Platforms
   per sound card.
 * Added soc_bind_dai_link() to bind the component devices to the sound card.
 * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
   DAI link components.
 * sysfs entries can now be registered per component per card.
 * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
 * snd_soc_register_codec() now does all the codec list and mutex init.

This patch changes the probe() and remove() of the CODEC drivers as follows:-

 o Make CODEC driver a platform driver
 o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
 o Removed all static codec pointers (drivers now support > 1 codec dev)
 o snd_soc_register_pcms() now done by core.
 o snd_soc_register_dai() folded into snd_soc_register_codec().

CS4270 portions:
Acked-by: Timur Tabi <timur@freescale.com>

Some TLV320aic23 and Cirrus platform fixes.
Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>

TI CODEC and OMAP fixes
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>

Samsung platform and misc fixes :-
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Seungwhan Youn <sw.youn@samsung.com>

MPC8610 and PPC fixes.
Signed-off-by: Timur Tabi <timur@freescale.com>

i.MX fixes and some core fixes.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

J4740 platform fixes:-
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

CC: Tony Lindgren <tony@atomide.com>
CC: Nicolas Ferre <nicolas.ferre@atmel.com>
CC: Kevin Hilman <khilman@deeprootsystems.com>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
CC: Daniel Gloeckner <dg@emlix.com>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>
CC: Mike Frysinger <vapier.adi@gmail.com>
CC: Arnaud Patard <apatard@mandriva.com>
CC: Wan ZongShun <mcuos.com@gmail.com>

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-12 14:00:00 +01:00
Peter Ujfalusi 998a8a69f3 ASoC: omap-mcbsp: Remove period size constraint in THRESHOLD mode
The use of sDMA packet mode in THRESHOLD mode removes the restriction on the
period size.
With the extended THRESHOLD mode user space can ask for any
period size it wishes, and the driver will configure the
sDMA and McBSP FIFO accordingly.

Replace the hw_rule for the period size with static constraint,
which will make sure that the period size will be always
even (to avoid prime period size, which could be possible in
mono stream)

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi cf80e15860 ASoC: omap-mcbsp: Support for sDMA packet mode
Utilize the sDMA controller's packet syncronization mode, when
the McBSP FIFO is in use (by extending the THRESHOLD mode).
When the sDMA is configured for packet mode, the sDMA frame size
does not need to match with the McBSP threshold configuration.
Uppon DMA request the sDMA will transfer packet size number of
words, and still trigger interrupt on frame boundary.

The patch extends the original THRESHOLD mode by doing the
following:

if (period_words <= max_threshold)
Current THRESHOLD mode configuration

Otherwise (period_words > max_threshold)
McBSP threshold = sDMA packet size
sDMA frame size = period size

With the extended THRESHOLD mode we can remove the constraint
for the maximum period size, since if the period size is
bigger than the maximum allowed threshold, than the driver
will switch to packet mode, and picks the best (biggest)
threshold value, which can divide evenly the period size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi 15d0143007 ASoC: omap-mcbsp: Code cleanup in omap_mcbsp_dai_hw_params
To make the code a bit more readable, change the indexed
references to the omap_mcbsp_dai_dma_params elements with
pointer.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:38:16 +01:00
Peter Ujfalusi 81ec027e64 ASoC: omap-mcbsp: Restructure the code within omap_mcbsp_dai_hw_params
In preparation for the extended threshold mode (sDMA packet mode
support), the code need to be restructured.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-08-02 10:37:43 +01:00
Jarkko Nikula 8c523115ae ASoC: RX-51: Add basic jack detection
This patch adds GPIO jack detection to Nokia N900/RX-51. At the moment only
SND_JACK_VIDEOOUT type is reported. More types could be reported after
getting more audio features supported and necessary drivers integrated for
implementing automated accessory detection.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:14 +01:00
Jarkko Nikula 4eb5470326 ASoC: RX-51: Add Jack Function kcontrol
Nokia RX-51/N900 has multifunction 4-pole audio-video jack that can be used
as headphone, headset or audio-video connector. This patch implements the
control 'Jack Function' which is used to select the desired function.
At the moment only TV-out without audio is supported.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-23 11:29:08 +01:00
Grazvydas Ignotas 4b94dba029 ASoC: pandora: fix CLKX polarity
After mass production started it was found that several boards exhibit
noise problems during sound playback. After some investigation it was
determined that CLKX polarity is set incorrectly, and even if most boards
can tolerate the wrong setting, there are some that don't.

Fix polarity setup in the board file. As the clock settings for input and
output now match, merge in and out functions and structures to simplify
code.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-21 18:16:17 +01:00
Peter Ujfalusi ddc29b0104 ASoC: omap-mcbsp: Place correct constraints for streams
OMAP McBSP FIFO is word structured:
McBSP2 has 1024 + 256 = 1280 word long buffer,
McBSP1,3,4,5 has 128 word long buffer

This means, that the size of the FIFO
depends on the McBSP word size configuration.
For example on McBSP3:
16bit samples: size is 128 * 2 = 256 bytes
32bit samples: size is 128 * 4 = 512 bytes
It is simpler to place constraint for buffer and period based on channels.
McBSP3 as example again (16 or 32 bit samples):
1 channel (mono): size is 128 frames (128 words)
2 channels (stereo): size is 128 / 2 = 64 frames (2 * 64 words)
4 channels: size is 128 / 4 = 32 frames (4 * 32 words)

Use the second method to place hw_rule on buffer size, and in threshold
mode to period size.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolsfonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-03 16:12:40 +01:00
Peter Ujfalusi 3f024039e0 ASoC: omap-mcbsp: Save, and use wlen for threshold configuration
Save the word length configuration of McBSP, and use that information
to calculate, and configure the threshold in McBSP.
Previously the calculation was only correct when the stream had 16bit
audio.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolsfonmicro.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-06-03 16:12:40 +01:00