Commit Graph

734 Commits

Author SHA1 Message Date
Ian Molton
28796eaf80 ASoC: machine support for Toshiba e740 PDA
This patch provides suupport for the wm9705 AC97 codec on the Toshiba e740.

Note:
The e740 has a hard headphone switch that turns the speaker off and is not
software detectable or controlable. Also both headphone and speaker amps
share a common output enable.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-19 16:15:41 +00:00
Mark Brown
2c782f5981 ASoC: Implement support for CLK_POUT as MCLK on Zylonite
The Zylonite supports switching the MCLK for the WM9713 between the
AC97CLK and CLK_POUT outputs of the PXA processor via switch SW15 on
the board. This patch adds support for configuring the system to use
CLK_POUT.

Unfortunately it is not possible to read the state of SW15 from software
so this feature is controlled by a module option 'clk_pout' which should
be set to a non-zero value to enable the use of CLK_POUT.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-19 16:15:35 +00:00
Mark Brown
c42f69bb06 ASoC: Ignore output frequency for WM9713 PLL
The WM9713 driver does not support configuring the PLL output frequency
so the output frequency parameter is irrelevant. Allow users to set it
to zero by ignoring it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-16 18:00:33 +00:00
Mark Brown
2905a5df4a Merge branch 'for-2.6.29' into for-2.6.30 2009-01-16 16:40:35 +00:00
Ian Molton
0465c7aa6f ASoC: machine driver for Toshiba e800
This patch adds support for the wm9712 ac97 codec as used in the Toshiba e800
PDA. It includes support for powering up / down the external headphone and
speaker amplifiers on this machine.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-16 16:40:26 +00:00
Ian Molton
a7e2e735dc ASoC: machine driver for Toshiba e750
This patch adds support for the wm9705 ac97 codec as used in the Toshiba e750
PDA. It includes support for powering up / down the external headphone and
speaker amplifiers on this machine.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-16 16:40:26 +00:00
Ian Molton
2aceefefc8 ASoC: Driver for the WM9705 AC97 codec.
This driver adds support for the wm9705 ac97 codec. The driver supports
audio input and output.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-16 16:40:25 +00:00
Ben Nizette
591046cfc5 ASoC: atmel_pcm: Remove non-existant header
<mach/hardware.h> doesn't exist on AVR32 and therefore this driver won't
build on that arch.  AFAICT this driver doesn't actually use the content
of that header so easiest just to remove it.

Signed-off-by: Ben Nizette <bn@niasdigital.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-16 16:39:13 +00:00
Hugo Villeneuve
ac37373b64 ASoC: DaVinci: Fix SFFSDR compilation error.
Remove dependency on sffsdr_fpga_set_codec_fs() when the
SFFSDR FPGA module is not selected.

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-15 23:43:54 +00:00
Takashi Iwai
c0106d72b8 Merge branch 'topic/asoc' into next/asoc 2009-01-15 18:27:20 +01:00
Peter Ujfalusi
eff317d083 ASoC: Fix the power update function for snd_soc_dapm_value_mux
Modify the check for the mux type to also handle the
snd_soc_dapm_value_mux type in a same way as the snd_soc_dapm_mux.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-15 16:20:27 +01:00
Takashi Iwai
bd7dd77c2a ALSA: Convert to snd_card_create() in other sound/*
Convert from snd_card_new() to the new snd_card_create() function
in other sound subdirectories.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-01-12 15:21:19 +01:00
Takashi Iwai
9229f43f48 Merge branch 'topic/asoc' into for-linus 2009-01-12 14:05:50 +01:00
Mark Brown
5852973c12 Merge branch 'for-2.6.29' into for-2.6.30 2009-01-09 11:03:55 +00:00
Peter Ujfalusi
c6d1662b22 ASoC: TWL4030: Module unloading fix
Call the snd_soc_free_pcm and snd_soc_dapm_free when the
codec driver is unloaded.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 11:03:38 +00:00
Ian Molton
3e8e1952e3 ASoC: cleanup duplicated code.
Many codec drivers were implementing cookie-cutter copies of the function
that adds kcontrols to the codec.

This patch moves this code to a common function snd_soc_add_controls() in
soc-core.c and updates all drivers using copies of this function to use the
new common version.

[Edited to raise priority of error log message and document parameters.
 -- broonie]

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 10:39:49 +00:00
Mark Brown
a6ba2b2dab ASoC: Implement WM8350 headphone jack detection
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 10:31:32 +00:00
Mark Brown
8a2cd6180f ASoC: Add jack reporting interface
This patch adds a jack reporting interface to ASoC.  This wraps the ALSA
core jack detection functionality and provides integration with DAPM to
automatically update the power state of pins based on the jack state.

Since embedded platforms can have multiple detecton methods used for a
single jack (eg, separate microphone and headphone detection) the report
function allows specification of which bits are being updated on a given
report.

The expected usage is that machine drivers will create jack objects and
then configure jack detection methods to update that jack.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 10:31:31 +00:00
Mark Brown
1649923dd5 ASoC: Constify pin names for DAPM pin status APIs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09 10:31:30 +00:00
Fernando Carrijo
c19a28e119 remove lots of double-semicolons
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Theodore Ts'o <tytso@mit.edu>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: James Morris <jmorris@namei.org>
Acked-by: Casey Schaufler <casey@schaufler-ca.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-08 08:31:14 -08:00
Peter Ujfalusi
cb1ace04d7 ASoC: TWL4030: Change the soc_value_enum back to soc_enum
The soc_value_enum has been merged to soc_enum.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-08 13:09:52 +00:00
Peter Ujfalusi
741555568f ASoC: Merge the soc_value_enum to soc_enum struct
Merge the recently introduced soc_value_enum structure to the soc_enum.
The value based enums are still handled separately from the normal enum types,
but with the merge some of the newly introduced functions can be removed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-08 13:09:52 +00:00
Ian Molton
ca9c1aaec4 ASoC: dapm: Allow explictly named mixer controls
This patch allows you to define the mixer paths as having the same name as the
paths they represent.

This is required to support codecs such as the wm9705 neatly without extra
controls in the alsa mixer.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
2009-01-07 21:32:54 +00:00
Mark Brown
227b4dc643 ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses
For codecs that have both SPI and I2C support we need to ensure that we
don't try to make the codec driver built in when I2C is modular since
that won't link.  Do this by creating a helper variable which uses
conditional defaults to pick up the correct value for all combinations.

We don't need to do anything special for I2C-only codecs since a
conditional select passes on the full value for a tristate.

Reported-by: Ingo Molnar <mingo@elte.hu>
Tested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-06 14:23:10 +00:00
Mark Brown
8c0bad7fa5 ASoC: Use snd_soc_dapm_nc_pin() in at91sam9g20ek
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-06 09:52:18 +00:00
Peter Ujfalusi
2f42357722 ASoC: TWL4030: Convert the bitfield enums to VALUE_ENUM type
Convert the bitfield coded enums to the new VALUE_ENUM type.
Remove the enum check, since the VALUE_ENUM type can handle
the bitfield coding and also handles the 'holes' in the bitfield.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:17 +00:00
Peter Ujfalusi
2e72f8e371 ASoC: New enum type: value_enum
This patch introduces a new enum type.
In this enum type each enumerated items referred with a value.

This new enum type can handle enums encoded in bitfield, or any other
weird ways. twl4030 codec has several mux selection register, where the
input/output mux is coded in a bitfield. With the normal enum type this type
of mux can not be handled in a clean way.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:17 +00:00
David Brownell
05d5e991a7 ASoC: Clocking fixes for davinci-evm.c
Let's have audio playback not sound like chipmunks, 'k? :)

ASP1 on the DM355 EVM uses a 27 MHz external audio clock, not
the slower clock used with ASP0 on the DM6446 EVM.

Also, that slower ASP0 clock on the DM6446 is 12.288 MHz,
not 22.5792 MHz ... 48 KHz sample rate (x256), not a double
speed 44.1 KHz sample rate (which could be done, but isn't
what the board init code now sets up).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:17 +00:00
Grazvydas Ignotas
7f185340da ASoC: Mark non-connected TWL4030 pins for pandora
Pandora has all TWL4030 output pins floating, it uses
external DAC for playback. Mark those outputs as not
connected using DAPM calls.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:16 +00:00
Jarkko Nikula
d304c6ef6e ASoC: OMAP: Select OMAP pin multiplexing when using Nokia N810 ASoC drivers
N810 bootloader muxes I2S pins for OMAP2420 EAC block while N810 ASoC
drivers are using McBSP block so the kernel have to change configuration
runtime.

Author has not seen problems using kernel pin multiplexing on N810 but very
many times unworking audio after forgotten to enable it and spending
15 minutes each time to figure it out again...

This change makes it easier for other users as well. If problems arise, then
they are better to find and fix in OMAP pin multiplexing framework.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 17:47:16 +00:00
Takashi Iwai
cad9d90ec3 Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-01-05 18:31:38 +01:00
David Brownell
5cf1c00b0e ASoC: fix davinci-sffsdr buglet
Minor bugfix:  now that DaVinci kernels can support multiple
boards, board-specific ASoC components need to verify they're
running on the right board before initializing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-05 13:09:31 +00:00
Mark Brown
ac11a2b35c ASoC: Clean up kerneldoc warnings
Almost all parameters that have been misnamed in the comments.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-01 12:18:17 +00:00
Stephen Ware
9bef6489d7 ASoC: Fix pxa2xx-pcm checks for invalid DMA channels
Set the invalid dma channel to -1 (and check properly for it) in
pxa2xx_pcm_hw_free().  Was assuming 0 is an invalid channel number but 0
is a valid pxa dma channel num.

Signed-off-by: stephen <stephen.ware@eqware.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-01 11:52:48 +00:00
Peter Ujfalusi
276c62225a ASoC: TWL4030: DAPM based capture implementation
This patch adds DAPM implementaion for the capture path
on twlx030.

TWL has two physical ADC and two digital microphone (stereo) connections.
The CPU interface has four microphone channels.
For simplicity the microphone channel paths are named as:
TX1 (Left/Right) - when using i2s mode, only the TX1 data is valid
TX2 (Left/Right)

Input routing (simplified version):
There is two levels of mux settings for TWL in input path:
Analog input mux:
 ADCL <- {Off, Main mic, Headset mic, AUXL, Carkit mic}
 ADCR <- {Off, Sub mic, AUXR}

Analog/Digital mux:
TX1 Analog mode:
 TX1L <- ADCL
 TX1R <- ADCR
TX1 Digital mode:
 TX1L <- Digimic0 (Left)
 TX1R <- Digimic0 (Right)

TX2 Analog mode:
 TX2L <- ADCL
 TX2R <- ADCR
TX2 Digital mode:
 TX2L <- Digimic1 (Left)
 TX2R <- Digimic1 (Right)

The patch provides the following user controls for the capture path:
Mux settings:
"TX1 Capture Route": {Analog, Digimic0}
"TX2 Capture Route": {Analog, Digimic1}
"Analog Left Capture Route":  {Off, Main Mic, Headset Mic, AUXL, Carkit Mic}
"Analog Right Capture Route": {Off, Sub Mic, AUXR}

Volume/Gain controls:
"TX1 Digital Capture Volume": Stereo gain control for TX1 path
"TX2 Digital Capture Volume": Stereo gain control for TX2 path
"Analog Capture Volume":      Stereo gain control for the analog path only

Important things for the board files:
Microphone bias:
"Mic Bias 1":       Bias for Main mic or for digimic0 (analog or digital path)
"Mic Bias 2":       Bias for Sub mic or for digimic1 (analog or digital path)
"Headset Mic Bias": Bias for Headset mic

When the routing configured correctly only the needed components will be
powered/enabled.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-31 13:11:59 +00:00
Peter Ujfalusi
f9a3fba2ce ASoC: TWL4030: Make the enum filter generic for twl4030
Modify the enum filter to more generic that it will filter
out the enums with text "Invalid".
The enum filter also required for the capture path.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-31 13:11:59 +00:00
Linus Torvalds
14a3c4ab0e Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (407 commits)
  [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices
  [ARM] pxafb: cleanup of the timing checking code
  [ARM] pxafb: cleanup of the color format manipulation code
  [ARM] pxafb: add palette format support for LCCR4_PAL_FOR_3
  [ARM] pxafb: add support for FBIOPAN_DISPLAY by dma braching
  [ARM] pxafb: allow pxafb_set_par() to start from arbitrary yoffset
  [ARM] pxafb: allow video memory size to be configurable
  [ARM] pxa: add document on the MFP design and how to use it
  [ARM] sa1100_wdt: don't assume CLOCK_TICK_RATE to be a constant
  [ARM] rtc-sa1100: don't assume CLOCK_TICK_RATE to be a constant
  [ARM] pxa/tavorevb: update board support (smartpanel LCD + keypad)
  [ARM] pxa: Update eseries defconfig
  [ARM] 5352/1: add w90p910-plat config file
  [ARM] s3c: S3C options should depend on PLAT_S3C
  [ARM] mv78xx0: implement GPIO and GPIO interrupt support
  [ARM] Kirkwood: implement GPIO and GPIO interrupt support
  [ARM] Orion: share GPIO IRQ handling code
  [ARM] Orion: share GPIO handling code
  [ARM] s3c: define __io using the typesafe version
  [ARM] S3C64XX: Ensure CPU_V6 is selected
  ...
2008-12-30 17:36:49 -08:00
Roel Kluin
472346da9c ALSA: ASoC: fix a typo in omp-pcm.c
Fix a typo (& and &&)

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-22 18:33:26 +01:00
Jarkko Nikula
c691348587 ASoC: Fix DSP formats in SSM2602 audio codec
Thanks to Troy Kisky <troy.kisky@boundarydevices.com> for noticing.

- DSP_A format has 1-bit data delay which corresponds to SSM6202 submode 2
- DSP_B has 0-bit data delay which corresponds to submode 1
- Currently driver sets them opposite so swap the submode setting

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-22 16:23:22 +00:00
Jarkko Nikula
bd25867a6c ASoC: Fix incorrect DSP format in OMAP McBSP DAI and affected drivers
- OMAP McBSP DAI driver claims to support DSP_A format which has 1-bit data
  delay but configures link for 0-bit data delay which is in fact DSP_B
- Fix this by changing format from DSP_A to DSP_B
- Fix also TLV320AIC23 codec and OSK5912 machine drivers since the same
  error is populated also there

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-22 16:15:20 +00:00
Takashi Iwai
a31501d104 ALSA: ASoC - Add missing __devexit annotation to wm8350.c
Added the missing __devexit annotation to wm8350_codec_remove():
  sound/soc/codecs/wm8350.c:1546: warning: 'wm8350_codec_remove' defined but not used

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-20 16:50:53 +01:00
Troy Kisky
d6f833965e ALSA: ASoc: DaVinci: davinci-evm use dsp_b mode
Sense DaVinci does not support true I2S mode and
we don't have to use the hack, use dsp_b mode instead

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:39 +00:00
Troy Kisky
9e031624d5 ALSA: ASoC: DaVinci: i2s, evm, pass same value to codec and cpu_dai
Fix the meaning of SND_SOC_DAIFMT_NB_NF to match that
used in the codec.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-20 13:05:39 +00:00
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
Russell King
72aaf09fda Merge git://git.marvell.com/orion into devel 2008-12-13 09:12:51 +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
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
Mark Brown
384c89e2e4 ASoC: Push debugfs files out of the snd_soc_device structure
This is in preparation for the removal of struct snd_soc_device.

The pop time configuration should really be a property of the card not
the codec but since DAPM currently uses the codec rather than the card
using the codec is fine for now.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 18:27:04 +00:00
Daniel Mack
6f2a974bfc ASoC: tlv320aic3x: headset/button press support
- Add aic3x_set_headset_detection() function to define the headset
  detection mode for tlv32aic3x chips
- added aic3x_button_pressed()
- Read from the real-time registers in aic3x_headset_detected() to query
  headset presence without an occured interrupt

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 12:40:45 +00:00
Mark Brown
4b4fffdd9d ASoC: Fix WM8903 right mixer bypass path
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 12:40:28 +00:00
Grazvydas Ignotas
5920b45303 ASoC: TWL4030: Add input selection and gain controls
The TWL4030 codec device has two ADCs. Both of them can have
several inputs routed to them, but TRM says that only one source
can be selected for every ADC, even though every source has a
dedicated bit in the registers.

This patch adds input source controls. It modifies default register
values to have no inputs selected and ADCs disabled. When some
input is selected, control handlers enable apropriate input
amplifier and ADC. If a microphone is selected, bias power is
automatically enabled. When some input is deselected, unused
chip parts are disabled.

Microphone and line input recording tested on OMAP3 pandora board.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-03 12:40:28 +00:00
Russell King
c5b84b3bb0 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel
Conflicts:

	arch/arm/mach-pxa/pxa25x.c
2008-12-02 22:07:40 +00:00
Mark Brown
87689d567a ASoC: Push platform registration down into the card
As part of the deprecation of snd_soc_device push the registration of
the platform down into the card structure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-02 16:03:40 +00:00
Mark Brown
6308419a19 ASoC: Push workqueue data into snd_soc_card
ASoC v2 does not use the struct snd_soc_device at runtime, using struct
snd_soc_card as the root of the card.  Begin removing data from
snd_soc_device by pushing the workqueue data into snd_soc_card, using a
backpointer to the snd_soc_device to keep things going for the time
being.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-02 15:16:23 +00:00
Eric Miao
1f017a9964 [ARM] pxa: move AC97 register definitions into dedicated regs-ac97.h
The optimal change would be to move the AC97 register definitions into
the AC97 driver, unfortunately, the registers are shared between several
files. Move them into a dedicated regs-ac97.h first.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2008-12-02 14:42:39 +08:00
Mark Brown
0ecfe79878 ASoC: Don't free static data in WM9713
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:55 +00:00
Peter Ujfalusi
4290239cd0 ASoC: TWL4030: Add volume controls for outputs
All outputs have dedicated gain controls except the
HandsFree output.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:54 +00:00
Peter Ujfalusi
d889a72c5c ASoC: TWL4030: Change the common playback volume controls
Add Playback volume controls for all four DACs.
All four paths has three levels of volume controls:
Digital Fine gain, Digital Coarse gain, Analog gain.

The controls are named to reflect their connection to the DACs.
Per DAC volume can be performed, if needed:
amixer sset 'DAC1 Analog'  5,10
DACL1 analog gain to 5
DACR1 analog gain to 10

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:53 +00:00
Peter Ujfalusi
381a22b564 ASoC: TWL4030: Change the capture volume control to TLV
The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:52 +00:00
Mark Brown
fa5c76978c ASoC: Remove in-code changelog from AD73311 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:52 +00:00
Mark Brown
7d8c16a6f7 ASoC: Annotate core removal function
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:51 +00:00
Mark Brown
968a6025aa ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
Currently ASoC card initialisation is completed by a function called
snd_soc_register_card().  As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-01 19:58:50 +00:00
Takashi Iwai
682d5874f3 ALSA: ASoC: Fix old-style trigger callback in s3c2443-ac97.c
Fix the old-style trigger callback in s3c2443-ac97.c:
    sound/soc/s3c24xx/s3c2443-ac97.c:378: warning: initialization from incompatible pointer type

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:08:22 +01:00
Takashi Iwai
5220ed6b32 ALSA: ASoC: Fix compile warnings on corgi.c
Fix the wrong shutdown callback type.  Also removed the unused variables
there:

  sound/soc/pxa/corgi.c: In function 'corgi_shutdown':
  sound/soc/pxa/corgi.c:114: warning: unused variable 'codec'
  sound/soc/pxa/corgi.c: At top level:
  sound/soc/pxa/corgi.c:175: warning: initialization from incompatible pointer type

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:00:47 +01:00
Takashi Iwai
0bc286e2ac Revert "ALSA: soc - Fix compile warnings in wm8903.c"
This reverts commit 9171e5e6a2.

I can't reproduce the compile warnings any more.  The warnings
might be some weird cross-compiling set up.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 20:00:20 +01:00
Takashi Iwai
2caf6a1f9c ALSA: ASoC: Remove superfluous dependency on SND_SOC
The dependency on SND_SOC is already fulfilled in sound/soc/Kconfig,
thus no more need in Kconfig of each sub directory.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 18:02:33 +01:00
Takashi Iwai
3af4182cc5 Merge branch 'upstream' into topic/asoc 2008-12-01 18:02:17 +01:00
Takashi Iwai
f5d4c67e41 ALSA: soc - Remove obsoleted sound/driver.h inclusion
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 16:29:47 +01:00
Takashi Iwai
9171e5e6a2 ALSA: soc - Fix compile warnings in wm8903.c
Hide annoying uninitialized warnings:
  sound/soc/codecs/wm8903.c:382: warning: ‘reg’ may be used uninitialized in this function
  sound/soc/codecs/wm8903.c:383: warning: ‘shift’ may be used uninitialized in this function

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-01 15:39:13 +01:00
Russell King
fba670013d Merge branch 's3c-moves2' of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2008-11-29 19:35:07 +00:00
Daniel Mack
54f0191629 ASoC: Allow more routing features for tlv320aic3x
This patch enables more routing functions for tlv320aic3x codecs.
It is now possible to

 - control the volume of the PGA bypass path for the HPL, HPR, HPLCOM
   and HPRCOM outputs individually
 - route right line1 input to the left ADC channel
 - route left line1 input to the right ADC channel
 - route right mic3 input to left DAC channel
 - route left mic3 input to right DAC channel
 - route left line1 input to right line1 output
 - route right line1 input to left line1 output

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-26 18:30:59 +00:00
Mark Brown
414ff491b2 ASoC: Fix word wrapping in OMAP Kconfig
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-26 10:32:26 +00:00
Qinghuang Feng
9e0f1b7f6b ASoC: Clean up kernel-doc for snd_soc_dai_set_fmt
There is no argument named @clk_id in snd_soc_dai_set_fmt,
remove its' comment.

Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:51:12 +00:00
Dmitry Baryshkov
5c0d7bb797 ASoC: tosa: move gpio probing to machine callbacks
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:37:37 +00:00
Misael Lopez Cruz
4451582f7e ASoC: Add support for TI SDP3430
This patch add ASoC support for TI SDP3430. It's based on Gumstix
Overo SoC code by Steve Sakoman.

Signed-off-by: Misael Lopez Cruz <mesak82@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:28:57 +00:00
Arun KS
9c8f1a0e6e ASoC: Fix TWL4030 Kconfig dependency
Fixes Kconfig dependency of TWL4030 audio codec driver
with TWL4030 core driver on both overo and omap2evm
boards

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:28:47 +00:00
Jarkko Nikula
375e8a7c94 ASoC: OMAP: Add support for mono audio links in McBSP DAI
Patch adds support for mono audio links so that McBSP DAI can operate with
real mono codecs. In I2S, the signalling remains the same but only first
frame (left channel) is transmitting audio data and second frame having null
data. In DSP_A, only first frame is transmitted.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:21:26 +00:00
Jarkko Nikula
0be43050d4 ASoC: OMAP: Apply channel constrains to N810 machine driver
Prepare for upcoming McBSP DAI update adding support for mono links by
restricting number of channels to 2 in N810. This is due tlv320aic3x which
claims channels_min = 1 and playing pure mono audio over I2S would cause
it to be played only from left channel if both cpu and codec DAI's claim to
support mono.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-25 15:20:55 +00:00
Mark Brown
fde22f272d ASoC: Lower priority of resume work logging
Now that the ASoC resume has been punted to a workqueue for a release
cycle without attracting bug reports it should be safe to make the
log messages associated with it debug level, reducing noise and kernel
size in production configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:09:05 +00:00
Mark Brown
67c91513b8 ASoC: Flag AD1980 as an AC97 interface
Special handling is required for suspend and resume of AC97 codecs
due to the control path going over the data bus.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:01:37 +00:00
Mark Brown
3ba9e10a6d ASoC: Remove DAI type information
DAI type information is only ever used within ASoC in order to special
case AC97 and for diagnostic purposes. Since modern CPUs and codecs
support multi function DAIs which can be configured for several modes
it is more trouble than it's worth to maintain anything other than a
flag identifying AC97 DAIs so remove the type field and replace it with
an ac97_control flag.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 18:01:31 +00:00
Peter Ujfalusi
b0bd53a739 ASoC: TWL4030: Add helper function for output gain controls
Some of the gain controls in TWL (mostly those which are associated with
the outputs) are implemented in an interesting way:
 0x0 : Power down (mute)
 0x1 : 6dB
 0x2 : 0 dB
 0x3 : -6 dB
Inverting not going to help with these.
Custom volsw and volsw_2r get/put functions to handle these gains.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:40 +00:00
Peter Ujfalusi
0d33ea0b0f ASoC: TWL4030: Add CGAIN volume control
Add CGAIN (Coarse gain control) to TWL4030 codec.
The range of the CGAIN is:
0 dB to 12 dB in 6 dB steps.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:40 +00:00
Peter Ujfalusi
c10b82cf08 ASoC: TWL4030: Change the Master volume control to TLV
TWL4030 FGAIN volume control has a range:
-62 to 0 dB in 1 dB steps, 0 in the FGAIN means mute.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:39 +00:00
Peter Ujfalusi
f8d05bdbb0 ASoC: TWL4030: Disable soft-volume
Keep Soft-volume disabled for now, since if it is enabled
the FGAIN volume controls are not working in the current
configuration:
CODEC_MODE:OPT_MODE = 1
OPTION:ARXR2_EN = 1
OPTION:ARXL2_EN = 1
OPTION:ARXR1_EN = 0
OPTION:ARXL1_VRX_EN = 0
RX_PATH_SEL:RXL1_SEL = 0x0 (or 0x1)
RX_PATH_SEL:RXR1_SEL = 0x0 (or 0x1)

After the patch, FGAIN volume control works.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:39 +00:00
Mark Brown
55b8bac50a ASoC: Use supplied DAI for WM9713 rather than substream
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-24 14:05:34 +00:00
Mark Brown
39639faba9 ASoC: Improve error reporting for AC97 reset failures
Print something a bit more verbose to help make errors a little more
obvious.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:07 +00:00
Mark Brown
0e734ad5d1 ASoC: Staticise pxa2xx_pcm_ops
It's not exported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:07 +00:00
Jarkko Nikula
0c758bdd67 ASoC: OMAP: Fix preprocessor filled DAI name in McBSP DAI
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:06 +00:00
Mark Brown
2dac9217b2 ASoC: Add Marvell Zylonite machine support
Implement support for the Marvell Zylonite PXA3xx reference platform,
supporting standard AC97 stereo and AUX interfaces together with the
auxiliary I2S interface of the WM9713.

The board has two options for the MCLK of the WM9713: either the standard
AC97 system clock can be used or the 13MHz CLK_POUT output of the PXA3xx
can be used, selected via SW15 on the board. Currently only the AC97
system clock is supported by this driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:35:02 +00:00
Mark Brown
dee89c4d94 ASoC: Merge snd_soc_ops into snd_soc_dai_ops
Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.

This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:12:10 +00:00
Karl Beldan
5de27b6cc0 ASoC: ssm2602: Update supported stream formats
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:07 +00:00
Karl Beldan
faab5a32f4 ASoC: ssm2602: Fix priv substreams refs
Clean up our record of the active streams in shutdown(), fixing
subsequent failures of snd_pcm_hw_constraints_complete after closure of
a stream.

NOTE:
- The ssm2602 allows pairs of non-matching PB/REC rates.
- This is a fix for less evil:
  The logic is flawed (e.g. the slave might startup before the
  master's rate and sample_bits are set).

Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:07 +00:00
Mark Brown
875065491f ASoC: Rename snd_soc_card to snd_soc_machine
One of the issues with the ASoC v1 API which has been addressed in the
ASoC v2 work that Liam Girdwood has done is that the ALSA card provided
by ASoC is distributed around the ASoC structures. For example, machine
wide data such as the struct snd_card are maintained as part of the
CODEC data structure, preventing the use of multiple codecs. This has
been addressed by refactoring the data structures so that all the data
for the ALSA card is contained in a single structure snd_soc_card which
replaces the existing snd_soc_machine and snd_soc_device.

Begin the process of backporting this by renaming struct snd_soc_machine
to struct snd_soc_card, better reflecting its function and bringing it
closer to standard ALSA terminology.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-21 14:02:01 +00:00
Mark Brown
9b0db7e7fd ASoC: Convert blackfin machines to use DAI accessor functions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:25:32 +00:00
Mark Brown
d0c36631bb ASoC: s3c24xx_uda134x DAI accessor functions and static cleanup
Missed these during review.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:24:52 +00:00
Arun KS
df573d2fd1 ASoC: Add support for omap2evm board
This patch adds twl4030 audio support on omap2evm

Signed-off-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:18:59 +00:00
Hugo Villeneuve
08bd168696 ASoC: Add driver for the Lyrtech SFFSDR board
The PCM3008 is used on the Lyrtech SFFSDR board, in conjunction with an
FPGA that generates the bit clock and the master clock

[Downgraded the rate debug print to pr_debug() in hw_params, converted
asm/gpio.h to linux/gpio.h -- broonie]

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:18:42 +00:00
Hugo Villeneuve
1c0090c280 ASoC: Add PCM3008 ALSA SoC driver
The PCM3008 is a 16-bit stereo audio codec. It accepts
left-justified format for ADC, and right-justified format
for DAC. Independent power-down modes for ADC and DAC are
provided, as well as a digital de-emphasis filter (4 modes).

[Merged Makefile & Kconfig, changed asm/gpio.h to linux/gpio.h -- broonie]

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-19 13:16:38 +00:00
Mark Brown
72f2b89445 ASoC: Move uda134x_codec.h to uda134x.h
For consistency with other ASoC codec drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:33 +00:00
Mike Frysinger
a0bd65f45f ASoC: Blackfin: always set a default value for that GPIO range
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:33 +00:00
Bryan Wu
27b9be5a78 ASoC: Blackfin: Simplify the MMAP_SUPPORT macros protected code
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:32 +00:00
Mike Frysinger
caa45836d6 ASoC: Blackfin: do not force TWI bus for ssm2602 codec
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:32 +00:00
Michael Hennerich
0cade26e36 ASoC: Fix Blackfin AC97 DAI probe function return code
A probe function should have a clean return 0 path.

Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 12:32:11 +00:00