Commit Graph

10026 Commits

Author SHA1 Message Date
Liam Girdwood
25ec3e86d2 ASoC: OMAP4 PCM - make sure self linked DMA is really stopped (fixme)
Make sure OMAP self linked DMA is really stopped.

FIXME: this needs a counter so we dont lock up.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
04ecb6286d ASoC: OMAP4 - set constraints for buffer size (fixme)
To be moved to DAI drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
0340c17c6b ASoC: OMAP4 - HDMI DAI driver
Add HDMI audio support for the OMAP4.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
4f856e6fb4 ASoC: OMAP4 - DMIC DAI driver
Add both legacy DMA and ABE support for Digital Microphones on the
OMAP4 platform.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
a8d99da4ad ASoC: OMAP4 ABE DSP - Add support for the OMAP4 ABE DSP
This patch adds the OMAP4 ABE platform driver. This driver defines and
exports control for the DSP Frontend and Backend routing.

TODO: cleanup

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
e708bea097 ASoC: OMAP4 ABE DAI - Add Makefile support
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:02 +02:00
Liam Girdwood
c60eacce27 ASoC: OMAP4 ABE DAI - Add OAMP4 ABE DAI support
This patch adds support for the OMAP4 ABE DSP Frontend DAIs.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
aaf93465a1 ASoC: McPDM - Add ABE McPDM support.
This driver replaces the legacy McPDM driver in that it supports both
legacy and ABE McPDM support.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
59c96f127c ASoC: dsp - add core support for bespoke trigger()
This allows the DSP core to call a beskope trigger() call
on DAIs and platforms that require it.

TODO: move into DSP patch series.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
f320fddc26 ASoC: core - add hostless DAI support
Allow DAI's to be hostless so that no PCM data is sent between DAI
and CPU. This allows for power savings as there is no DMA or CPU
interaction required.

TODO: we shouldn't need to allocate a PAGE for a dummy DMA buffer.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
8ccfb4a31f ALSA: pcm - reject calls to open backend PCMs (temporary)
This stops userspace opening backlemd PCMs.

TODO: rework for upstream.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:01 +02:00
Liam Girdwood
ad2581ef84 ALSA: pcm - add support for hostless audio
Allow some PCM devices to be hostless, i.e. there is no PCM data transferred
to or from the host CPU. This can be used to minimise power on systems since
the CPU can idle/sleep during the PCM device operation (e.g. a phone call
where the DAI is between a MODEM and DSP)

TODO: cleanup, look at adding a read/write blocker.

Singed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-07-24 21:32:01 +02:00
Liam Girdwood
a8f13d8879 ASoC: core - add dynamic kcontrols
TODO: First phase of dynamic kcontrols. More todo.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
e58384e5bd ALSA: core - make sure dynamic minors is enabled for OMAP4 ABE
OMAP4 ABE requires dynamic minors in order to support all its
PCM devices.

TODO: Move this into DSP core patch series.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
c0b7972c7b ASoC: core - module refcounting improvements fro DSP
DSP components can have DAIs that can exist in either the CODEC driver or
platform DAI driver. Simplify DAI refcounting logic by ref counting all
(CODEC and platform) DAIs in each sound card.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
13e13a31ef ASoC: dsp - add DSP support to ASoC core.
Add DSP support to ASoC core.

This adds a NULL CODEC driver allow binding and configuration of
DSP DAIs, configures the PCM for DSP, initilaises the DSP state
variables and managed the DSP DAI link registration.

TODO: come cleanup and refactor some variable names.
TODO: split out with previous patch into smaller patches.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
aecd10463c ASoC: dsp - build DSP core
Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
bfe7dc4032 ASoC: dsp - Add DSP support to core ASoC API/structures
Export inline DAI PCM operations to allow DSP core to individually call BE PCM
operations and ....

Allow machine drivers to specifify DSP FE and BE DAI links.
Add FE and BE state information to PCM rtd.

TODO: split out this into smaller patches.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
a00663bf80 ASoC: dsp - Add ASoC DSP core
This adds ASoC core support for internal and external DSPs and represents them
to the audio user as a CODEC like device with mixers, muxes and runtime audio
route changing.

The DSP core allows DSP DAIs to be dynamically re-routed at runtime between the
PCM device end (or Frontend - FE) and the physical DAI (Backend - BE) using
regular kcontrols (just like a hardware CODEC).

The DSP core also deal with DSP FE+BE suspend and resume PM ops.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:32:00 +02:00
Liam Girdwood
e002c98e5c ASoC: dapm - allow custom widgets to update power events.
In preparation for ASoC DSP support.

Allow for the operation of custom mixer and mux DAPM widgets that can call
snd_soc_dapm_mixer_update_power() and snd_soc_dapm_mux_update_power() directly
after updating their status.

This adds two previously static calls to the public DAPM API.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
ecc1a0d5f5 ASoC: dapm - FIXME -add locking to the DAPM power_widgets()
TODO: look into why _w is required.
FIXME: did oops in the past.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
ab1058a9b9 ASoC: dapm - Add API call to query valid DAPM paths.
In preparation for ASoC DSP support.

Add a DAPM API call to determine whether a DAPM audio path is valid between
source and sink widgets. This also takes into account all kcontrol mux and mixer
settings in between the source and sink widgets to validate the audio path.

This will be used by the DSP core to determine the runtime DAI mappings
between FE and BE DAIs in order to run PCM operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
7987a11891 ASoC: core - Add Platform driver DAPM widgets/kcontrols.
In preparation for ASoC DSP support.

Allow platform drivers to export widgets and kcontrols.

This is required to support DSP dynamic DAI routing and power management where
platform DSP drivers have kcontrols, DAPM widgets etc.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
35ca660cc0 ASoC: dapm - add widget IO functions
Add widget IO in preparation to support platform driver DAPM widgets with IO.

This provides a generic widget IO operation wrapper in preparation for
decouplement of register IO from CODEC drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
0f8bae9b9c ASoC: core - pcm mutex per rtd
In preparation for ASoC DSP support.

The new DSP core allows DSP DAIs to be dynamically re-routed at runtime
between the PCM device end (or Frontend - FE) and the physical DAI
(Backend - BE) using regular kcontrols (just like a hardware CODEC).
The DSP core therefore must be able to call PCM operations for both the
Frontend and Backend(s) DAIs at the same time.

Currently we have a global pcm_mutex that is used to serialise
the ASoC PCM operations. This patch removes the global mutex
and adds a mutex per RTD allowing the PCM operations to be reentrant and
allow control of more than one DAI at at time. e.g. a frontend DSP hw_params()
could configure multiple backend hw_params() with similar or different
hw parameters at the same time.

Also fix the naming of soc_pcm_close.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:59 +02:00
Liam Girdwood
670ff44b4a ASoC: dapm - Add DAPM stream completion event.
In preparation for ASoC DSP support.

This adds a callback function to be called at the completion of a DAPM stream
event.

This can be used by DSP components to perform calculations based on DAPM graphs.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
c6ac984059 ASoC: core - refactor pcm_new() to pass only rtd
In preparation for ASoC DSP support.

Currently pcm_new() passes in card, pcm and DAI. Refactor this to only pass
in rtd since rtd contains card, pcm and DAI. Struct rtd also contain other
members too that are useful to DSPs.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
0218408592 ASoC: core - Allow some components to probe/remove later or earlier.
Some ASoC components depend on other ASoC components to provide clocks and
power resources in order to probe().

Provide a method to allow some components to be probed() later and be also
removed() earlier.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
aff46a0cfb ASoC: core - set platform dapm context device
In preparation for ASoC DSP support.

Set the paltform DAPM device context.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
7038dfd975 ASoC: dapm - add method to get AIF widget from stream
In preparation for ASoC DSP support.

Provide a method to get the AIF widget name from the stream name.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
4d74b36431 ASoC: dapm - fix prefix for DAPM muxes
Make sure DAPM muxes have a valid kcontrol name instead of NULL.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:58 +02:00
Liam Girdwood
54cd5ccef4 ASoC: core - fix module reference counting for CPU DAIs
Currently CODEC and platform drivers have their module reference count
incremented soc_probe_dai_link() whilst CPU DAI drivers have their reference
count incremented in soc_bind_dai_link().

CPU DAIs should have their reference count incremented in soc_probe_dai_link()
just like the CODEC and platform drivers.

Signed-off-by: Liam Girdwood <lrg@ti.com>
2011-07-24 21:31:57 +02:00
Axel Castaneda Gonzalez
a956f9e398 ASoC: twl6040: Configure ramp step based on platform
Enable ramp down/up step to be configured based on
platform.

Signed-off-by: Axel Castaneda Gonzalez <x0055901@ti.com>
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-24 21:31:55 +02:00
Liam Girdwood
87ce3c5305 ASoC: twl6040: set default constraints.
Set default sysclk constraints to high performance mode.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-24 21:31:55 +02:00
Misael Lopez Cruz
93682b3233 ASoC: twl6040: Remove pll and headset mode dependency
Remove dependency between pll (hppll, lppll) and headset power
mode (low-power, high-performance), as headset power mode can
be used with any pll.

A new control is created to allow headset power mode configuration
from userspace. Changing headset power mode during earpiece related
usecases is not propagated down to the codec as earpiece requires
HS DAC in HP mode.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-07-24 21:31:55 +02:00
Liam Girdwood
19ddb8e9fa ASoC: twl6040: Support other sample rates in constraints.
Add other supported sample rates to LP and HP modes.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-24 21:31:55 +02:00
Liam Girdwood
8865ff9d25 ASoC: twl6040: add all ABE DAIs
Add all DAIs to fully support OMAP4 ABE.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-24 21:31:54 +02:00
Misael Lopez Cruz
f4b3dc3388 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-24 21:31:54 +02:00
Peter Ujfalusi
be206b3963 MFD: twl4030-audio: Rename platform data
Allign the platform data names for twl4030 audio submodule:
twl4030_audio_data: for the core MFD driver
twl4030_codec_data: for ASoC codec driver
twl4030_vibra_data: for the input/ForceFeedback driver

To avoid breakage, change all depending drivers, files
to use the new types.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
2011-07-24 21:31:53 +02:00
Peter Ujfalusi
d189dd57aa 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>
2011-07-24 21:31:53 +02:00
Linus Torvalds
524196d2ad Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: Correct WM8994 MICBIAS supply widget hookup
  ASoC: Fix shift in WM8958 accessory detection default implementation
  ASoC: sh: fsi-hdmi: fixup snd_soc_card name
  ASoC: sh: fsi-da7210: fixup snd_soc_card name
  ASoC: sh: fsi-ak4642: fixup snd_soc_card name
2011-07-18 09:05:59 -07:00
Mark Brown
b793eb60a0 ASoC: Correct WM8994 MICBIAS supply widget hookup
The WM8994 and WM8958 series of devices have two MICBIAS supplies rather
than one, the current widget actually manages the microphone detection
control register bit (which is managed separately by the relevant API).

Fix this, hooking the relevant supplies up to the MICBIAS1 and MICBIAS2
widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-17 18:24:29 +09:00
Mark Brown
b35e160a11 ASoC: Fix shift in WM8958 accessory detection default implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-15 22:41:38 +09:00
Kuninori Morimoto
2c7beb9285 ASoC: sh: fsi-hdmi: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch
special thanks to Takashi.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-09 19:06:16 +09:00
Kuninori Morimoto
f15c941331 ASoC: sh: fsi-da7210: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-09 19:06:05 +09:00
Kuninori Morimoto
505b04e0f8 ASoC: sh: fsi-ak4642: fixup snd_soc_card name
it shouldn't contain space letters and
special letters like parentheses.

aplay will be "Segmentation fault" without this patch.
special thanks to Takashi.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2011-07-09 19:05:55 +09:00
Takashi Iwai
e8fd86efaa Merge branch 'fix/asoc' into for-linus 2011-07-09 11:56:43 +02:00
Takashi Iwai
abaead6ac5 ALSA: hda - Fix a copmile warning
It's harmless but annyoing.
  sound/pci/hda/patch_realtek.c: In function ‘alc_cap_getput_caller’:
  sound/pci/hda/patch_realtek.c:2722:9: warning: ‘err’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-07-09 11:55:28 +02:00
Takashi Iwai
18361bbe31 Merge branch 'for-3.0' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into fix/asoc 2011-07-09 09:44:09 +02:00
Kuninori Morimoto
bd7fdbcaa2 ASoC: ak4642: fixup snd_soc_update_bits mask for PW_MGMT2
mask didn't cover update-data

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2011-07-07 09:46:06 -07:00