Commit Graph

119651 Commits

Author SHA1 Message Date
Troy Kisky a24f4f6826 ALSA: ASoC: tlv320aic3x add dsp_a
Add SND_SOC_DAIFMT_DSP_A mode option.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:38 +00:00
Troy Kisky 07d8d9dca4 ALSA: ASoC: DaVinci: document I2S limitations
DaVinci does not support true I2S or right justified
mode so not all I2S codecs will work with it when the codec is
master. Document this limitation.

Add dsp_a, dsp_b mode options

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:38 +00:00
Troy Kisky 69ab820c86 ALSA: ASoC: DaVinci: davinci-i2s clean up
Minor, just move a block of code to make next patch clearer.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:38 +00:00
Troy Kisky 21903c1c9e ALSA: ASoC: DaVinci: davinci-i2s clean up
Just at little cleanup of davinci_i2s_set_dai_fmt

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:38 +00:00
Troy Kisky 664b4af859 ALSA: ASoC: DaVinci: davinci-i2s add comments to explain polarity
Document the current polarity choices.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:38 +00:00
Troy Kisky 1152a1959f ALSA: ASoC: DaVinci: davinvi-evm, make requests explicit
Add constants with a value of 0 to show more explicitly
what is being requested.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:37 +00:00
Takashi Iwai 70043058a6 Merge branch 'fix/asoc' into topic/asoc 2008-12-19 15:36:58 +01:00
Stanley Miao 19b3f31609 ALSA: Fix a Oops bug in omap soc driver.
There will be a Oops or frequent underrun messages when playing music with
omap soc driver, this is because a data region is incorretly sized, other data
region will be overwriten when writing to this data region.

Signed-off-by: Stanley Miao <stanley.miao@windriver.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-19 15:36:35 +01:00
Mark Brown 40aa4a30d0 ASoC: Add WM8350 AudioPlus codec driver
The WM8350 is an integrated audio and power management subsystem which
provides a single-chip solution for portable audio and multimedia systems.

The integrated audio CODEC provides all the necessary functions for
high-quality stereo recording and playback. Programmable on-chip
amplifiers allow for the direct connection of headphones and microphones
with a minimum of external components. A programmable low-noise bias
voltage is available to feed one or more electret microphones.
Additional audio features include programmable high-pass filter in the
ADC input path.

This driver was originally written by Liam Girdwood with further updates
from me.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-18 17:21:07 +00:00
Mark Brown b8b33cb560 ASoC: Complain if we fail to create DAPM controls
This should never happen and it's helpful to identify the specific control
that failed when it does happen.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-18 17:21:07 +00:00
Mark Brown 0b34a3d03e ASoC: Ease merge difficulties from new architectures
Rather than listing lots of architectures per line in Kconfig and
Makefile, causing merge conflicts all the time, have one per line
in alphabetical order.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-18 17:21:01 +00:00
Alexander Beregalov 9cd28ab005 ASoC: switch davinci DPRINTK to pr_debug()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-14 11:33:08 +00:00
Stanley.Miao 49d92c7d5b ASoC: TWL4030: hands-free start-up sequence.
A special start-up sequence is required to reduce the pop-noise of Class D
amplifier when enable hands-free on TWL4030.

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-11 16:12:22 +00:00
Mark Brown 4544f8a22f ASoC: Fix variable name for Blackfin I2S DAI
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-11 16:12:14 +00:00
Takashi Iwai 6de45d5d77 ALSA: ASoC - Fix DAI registration in s3c2443-ac97.c
Fixed the registration of dais in s3c2443-ac97.c.
  sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_init':
  sound/soc/s3c24xx/s3c2443-ac97.c:401: warning: passing argument 1 of 'snd_soc_register_dai' from incompatible pointer type
  sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_exit':
  sound/soc/s3c24xx/s3c2443-ac97.c:407: warning: passing argument 1 of 'snd_soc_unregister_dai' from incompatible pointer type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-11 10:28:18 +01:00
Mark Brown 3b1228abc9 ASoC: Stop WM8903 SYSCLK when suspending
This will save some additional power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 19:47:45 +00:00
Mark Brown d58d5d5567 ASoC: Convert WM8903 driver to register at I2C probe time
The driver now registers the codec and DAI when probed as an I2C device.
Also convert the driver to use a single dynamic allocation to simplify
error handling.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 19:47:44 +00:00
Mark Brown 78e19a39d3 ASoC: Convert WM8900 to do more work at I2C probe time
Redo the instantiation of the WM8900 to do most of the initialisation
work when the I2C driver probes rather than when the ASoC device is
instantiated, registering the codec with the ASoC core when done.

Also move all dynamic allocations into a single kmalloc() to simplify
error handling and rename the I2C driver to make output more sensible.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 19:47:40 +00:00
Mark Brown 0d0cf00a7f ASoC: Add codec registration API
Another part of the backporting of Liam's ASoC v2 work. Using this is
more complicated than the other registration types since currently the
codec is instantiated during the probe of the ASoC device so we can't
currently readily wait for the codec to register.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 15:40:02 +00:00
Peter Ujfalusi 1e5fa31f96 ASoC: TWL4030: Change the name for the DACs
To avoid confusion the names for the DACs changed:
DACL1 -> DAC Left1
...

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 11:43:02 +00:00
Peter Ujfalusi d4a73131a5 ASoC: TWL4030: Small cleanup
The mux switch related texts fits to on line, no need to wrap
them.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 11:43:01 +00:00
Peter Ujfalusi 6a1bee4a9c ASoC: TWL4030: Add missing Carkit output
SND_SOC_DAPM_OUTPUT definition for carkitL/R was missing.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 11:43:01 +00:00
Mark Brown 1e297a1925 ASoC: Work around warnings from some build environments
BUG() should be marked as not returning but for at least some
configurations (including some widely deployed compilers) that's either
not happening or being forgotten by the compiler.  Add some extra return
statements to the affected paths.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10 11:08:33 +00:00
Takashi Iwai f73f2a6a23 ALSA: ASoC - Fix symbol conflicts in omac-mcbsp.c
Add snd_ prefix to avoid the conflict of symbols in omac-mcbsp.c:
  sound/soc/omap/omap-mcbsp.c:503: error: static declaration of 'omap_mcbsp_init' follows non-static declaration
  arch/arm/plat-omap/include/mach/mcbsp.h:373: error: previous declaration of 'omap_mcbsp_init' was here

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 07:59:33 +01:00
Takashi Iwai c9b3a40ff2 ALSA: ASoC - Fix wrong section types
The module init entries should be __init instead of __devinit.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 07:47:22 +01:00
Takashi Iwai 24e07db8cc ALSA: ASoC - Fix module init entry for twl4030.c
Fixed the function name of module init entry for twl4030.c, which
conflicted with the existing hardware init function:
  sound/soc/codecs/twl4030.c:1278: error: conflicting types for 'twl4030_init'
  sound/soc/codecs/twl4030.c:1187: error: previous definition of 'twl4030_init' was here

Also fixed the section type of init function.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-10 07:40:24 +01:00
Mark Brown 471716f7ea ASoC: Fix typos in Atmel module registration
I wish I had boards which work with unmodified kernels :/

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 14:47:07 +00:00
Mark Brown f0752331b8 ASoC: Convert WM8900 to allow registration by machine code
This makes use of the support for delayed DAI registration to allow the
WM8900 I2C device to be registered by general platform/architecture code
rather than as part of the ASoC device probe.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 13:30:05 +00:00
Mark Brown 6b05eda638 ASoC: Wait for non-AC97 codec DAIs before instantiating
This will allow codec drivers to be refactored to allow them to be
registered out of line with the ASoC device registration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 13:30:05 +00:00
Mark Brown 435c5e2588 ASoC: Initial framework for dynamic card instantiation
Use the lists of platforms, platform DAIs and cards to check to see that
everything has registered. Since relationships are still specified by
direct references to the structures in the drivers and the drivers all
register everything at modprobe there should be no practical effect yet.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 13:30:04 +00:00
Mark Brown 64089b84ab ASoC: Register non-AC97 codec DAIs
Currently this is done at module probe time since ASoC ties in codec
device probe to the instantiation of the entire ASoC device. Subsequent
patches will refactor the codec drivers to handle probing separately.
Note that the core does not yet use this information.

AC97 is special since the codec is controlled over the AC97 link but
we want to give the machine driver a chance to set up the system before
trying to instantiate since it may need to do configuration before the
AC97 link will operate

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:29 +00:00
Mark Brown 958e792c7c ASoC: Register platform drivers
This is done at modprobe time, mirroring current behaviour, except for
mpc5200_psc_i2s where we do registration at the same time as we register
with soc-of-simple. Since the core currently ignores registration this
has no practical impact.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:28 +00:00
Mark Brown 12a48a8c00 ASoC: Add platform registration API
ASoC v2 allows platform drivers to instantiate independantly of the
overall ASoC card. This API allows drivers to notify the core when
they are registered.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:27 +00:00
Mark Brown 3f4b783cfd ASoC: Register platform DAIs
Register all platform DAIs with the core.  In line with current behaviour
this is done at module probe time rather than when the devices are probed
(since currently that only happens as the entire ASoC card is registered
except for those drivers that currently implement some kind of hotplug).
Since the core currently ignores DAI registration this has no practical
effect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:27 +00:00
Mark Brown 9115171a6b ASoC: Add DAI registration API
Add API calls to register and unregister DAIs with the core.  Currently
these APIs are ineffective.  Since multiple DAIs for a given device are
a common case bulk variants are provided.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:26 +00:00
Mark Brown c5af3a2e19 ASoC: Add card registration API
ASoC v2 allows cards, codecs and platforms to instantiate separately,
with the overall ASoC device only being instantiated once all the
required components have registered. As part of backporting Liam's work
introduce an initial version of the card registration functions. At
present these do nothing active and are internal only, they will be
exposed to machine drivers after further backporting.  Adding this now
allows the datastructures used for dynamic card instantiation to be
built up gradually.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:26 +00:00
Peter Ujfalusi ca4513fe06 ASoC: TWL4030: Do not alter the Headset output volume on power-up/down
There is a separate gain control for the Headset output already.
Do not reset the gain to 0 dB at power up.
In power-down, there is no need to set the Headset output gain
to power-down mode, since if the CODECPDZ is in powered off this
setting has no effect.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:25 +00:00
Peter Ujfalusi df339804bb ASoC: TWL4030: DAPM mapping of the Handsfree outputs
Adds DAPM muxing, routing for the Handsfree outputs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:24 +00:00
Peter Ujfalusi 5152d8c28b ASoC: TWL4030: DAPM mapping of the Carkit outputs
Adds DAPM muxing, routing for the Carkit outputs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:24 +00:00
Peter Ujfalusi dfad21a26f ASoC: TWL4030: DAPM mapping of the Headset outputs
Adds DAPM muxing, routing for the Headset outputs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:23 +00:00
Peter Ujfalusi 2a6f5c5892 ASoC: TWL4030: DAPM mapping of the PreDriv outputs
Adds DAPM muxing, routing for the PreDrive outputs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:23 +00:00
Peter Ujfalusi 5e98a46449 ASoC: TWL4030: DAPM mapping of the Earpiece output
Adds DAPM muxing, routing for the Earpiece output.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:22 +00:00
Peter Ujfalusi e8ff9c417a ASoC: TWL4030: Add DAPM event handler for output MUX selection
DAPM event handler is set to filter out invalid MUX settings
for certain outputs.
Earpiece:
 - 0 = Off
 - 1 = DACL1
 - 2 = DACL2
 - 3 = *** Invalid ***
 - 4 = DACR1

PreDriveL/R:
 - 0 = Off/Off
 - 1 = DACL1/DACR1
 - 2 = DACL2/DACR2
 - 3 = *** Invalid/Invalid ***
 - 4 = DACR2/DACL2

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:49:21 +00:00
Peter Ujfalusi 44c5587035 ASoC: TWL4030: Add Analog PGA control switch to DAPM
Add all four APGA switch to DAPM routing and widgets.
Add user control for DA enable for all APGA as normal
control.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:05:03 +00:00
Peter Ujfalusi 53b5047d99 ASoC: TWL4030: Correct DAPM_DAC with power control
Add all four DACs to dapm_widgets with power switch.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-09 10:05:02 +00:00
Daniel Mack 28a1d86956 ASoC: tlv320aic3x: control additions and cleanups
- split "Line Playback Switch" into "LineL Playback Switch" and "LineR
  Playback Switch"
- split "Line PGA Bypass Playback Volume" into "LineL Left PGA Bypass
  Playback Volume" and "LineR Right PGA Bypass Playback Volume"
- split "Line Line2 Bypass Playback Volume" into "LineL Line2 Bypass
  Playback Volume" and "LineR Line2 Bypass Playback Volume"
- Added "HP Right PGA Bypass Playback Volume"

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-05 16:50:10 +00:00
Grazvydas Ignotas 68fb740774 ASoC: Add support for OMAP3 Pandora
This patch adds basic support for OMAP3 Pandora.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-05 16:27:48 +00:00
Mark Brown 32c8dabc97 ASoC: Remove obsolete declaration of struct snd_soc_clock_info
The struct is never defined.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-04 11:17:02 +00:00
Mark Brown dc7d7b830e ASoC: Remove platform device from DAI suspend and resume operations
None of the DAIs use it except s3c2412-i2s which only uses it for
dev_() printouts.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 19:19:10 +00:00
Mark Brown 07c84d0409 ASoC: Remove device from platform suspend and resume operations
None of the platforms are actually using the SoC device so remove it
(only atmel actually has a suspend method).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 18:27:10 +00:00