Commit Graph

719 Commits

Author SHA1 Message Date
Takashi Iwai 395707212a Merge branch 'fix/asoc' into topic/asoc 2009-02-03 07:07:15 +01:00
Liam Girdwood 64ca0404ee ALSA: ASoC: email - update email addresses.
This just updates my email address on some drivers I'd forgotten in a
previous patch.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-03 07:05:23 +01:00
Timur Tabi a6c255e094 ASoC: fix message display in CS4270 codec driver
Replace printk calls with dev_xxx calls.  Set the 'dev' field of the codec
and codec_dai structures so that these calls work.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-02 21:34:06 +00:00
Timur Tabi d9fb7fbddc ASoC: fix build break in CS4270 codec driver
Fix a oversight in the CS4270 codec driver that caused a build break.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-02 21:34:05 +00:00
Mark Brown e50a7ea0eb Merge branch 'for-2.6.29' into for-2.6.30 2009-02-02 12:46:51 +00:00
Eero Nurkkala 21dff43456 OMAP: ASoC: Fix spinlock misuse in omap-pcm.c
omap_pcm_trigger is called also in interrupt context so CPU flags must
be restored when returning.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-02 12:41:25 +00:00
Grazvydas Ignotas 8f00806294 ASoC: Update OMAP3 pandora board file
Update pandora board file for recent TWL4030 codec changes.
Also move output related snd_soc_dapm_nc_pin() calls to
omap3pandora_out_init(), where they belong.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-31 14:59:19 +00:00
Timur Tabi ff7bf02f63 ASoC: fix documentation in CS4270 codec driver
Spruce up the documentation in the CS4270 codec.  Use kerneldoc where
appropriate.  Fix incorrect comments.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-31 14:59:08 +00:00
Timur Tabi 04eb093c7c ASoC: fix initialization order of the CS4270 codec driver
ASoC codec drivers typically serve two masters: the I2C bus and ASoC itself.
When a codec driver registers with ASoC, a probe function is called.  Most
codec drivers call ASoC first, and then register with the I2C bus in the ASoC
probe function.

However, in order to support multiple codecs on one board, it's easier if the
codec driver is probed via the I2C bus first.  This is because the call to
i2c_add_driver() can result in the I2C probe function being called multiple
times - once for each codec.  In the current design, the driver registers
once with ASoC, and in the ASoC probe function, it calls i2c_add_driver().
The results in the I2C probe function being called multiple times before the
driver can register with ASoC again.

The new design has the driver call i2c_add_driver() first.  In the I2C probe
function, the driver registers with ASoC.  This allows the ASoC probe function
to be called once per I2C device.

Also add code to check if the I2C probe function is called more than once,
since that is not supported with the current ASoC design.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-30 11:58:50 +00:00
Peter Ujfalusi 7393958f63 ASoC: TWL4030: Add analog loopback support
This patch adds the analog loopback/bypass support for twl4030 codec.

Details for the implementation:
It seams that the analog loopback needs the DAC powered on on the channel,
where the loopback is selected. The switch for the DACs has been moved from
the DAPM_DAC to the "Analog XX Playback Mixer". In this way the DAC will be
powered while the audio playback is used or/and the loopback is enabled for
the channel.

The twl4030 codec powering has been reworked. Now the codec will be powered as
long as it does not receives the SND_SOC_BIAS_OFF event. The exceptions are
when the given change in the registers needs the codec power down/up cycle in
order to take effect. Otherwise the codec is on.

When the codec enters to STANDBY state and none of the loopback paths are
enabled, than the amplifiers, which are no in the DAPM path are forced to turn
off and the PLL is disabled. When playback/capture starts the disabled gains
are restored and the PLL is enabled.

When one of the loopback enabled in STANDBY mode, the disabled gains are
restored and the PLL is enabled also.

In short: the codec always goes to the lowest power state based on the
bias_level and the bypass_state.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-29 13:58:04 +00:00
Mark Brown 0bf5460de9 Merge branch 'for-2.6.29' into for-2.6.30 2009-01-29 13:57:59 +00:00
Misael Lopez Cruz ef390c0b6e ASoC: OMAP: Initialize XCCR and RCCR registers in McBSP DAI driver
This patch explicitly initializes McBSP Transmit Configuration
Control Register (XCCR) and Receive Configuration Control
Register (RCCR) to their reset values. Reset values are 26 ns
of DX delay and Transmit DMA disabled for XCCR register;
receive full cycle mode enabled and Receive DMA disabled for
RCCR register.

This patch requires a counterpart in OMAP McBSP driver before
to apply it. The required changes in McBSP were sent and approved
in linux-omap mailing list and patch is going upstream
(commit 3127f8f859 from linux-omap-2.6
tree).

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
[ jarkko.nikula@nokia.com: Commit id for counterpart patch corrected ]
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-29 13:17:45 +00:00
Mark Brown 9e70c1f099 ASoC: Fix null string usage with WM8753 DAIs
The WM8753 driver multiplexes the DAI structures it exposes to the
outside world, leaving them uninitialised until the codec probes.  Since
the DAI name is used during the registration and setup process provide a
dummy name.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-29 13:14:21 +00:00
Takashi Iwai 67fcdead3c Merge branch 'topic/snd_card_new-err' into topic/asoc
Conflicts:
	sound/soc/soc-core.c
2009-01-28 08:08:32 +01:00
Peter Ujfalusi 006f367e38 ASoC: TWL4030: Move the twl4030_power_up and _power_down function
Move the twl4030_power_up and twl4030_power_down function
earlier to facilitate the analog bypass implementation.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:43:02 +00:00
Peter Ujfalusi fb2a2f8490 ASoC: TWL4030: Physical ADC and amplifier power switch change
Change the power switches for the physical ADC and for the
amplifiers for the analog capture path to map more closely
the actual path inside of the codec.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:43:02 +00:00
Peter Ujfalusi aad749e51a ASoC: TWL4030: Enable Headset Left anti-pop/bias ramp only if the Headset Left is in use
The Headset Left anti-pop and bias ramp does not need to be
enabled, if the headset is not in use.
Move the code to DAPM event handler for HeadsetL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:42:40 +00:00
Peter Ujfalusi db04e2c58a ASoC: TWL4030: Code clean up for codec power up and down
Merge the codec up and down functions to a simple one.
Codec is powered down by default (reg_cache change).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:42:39 +00:00
Peter Ujfalusi 3fc93030e5 ASoC: TWL4030: Syncronize the reg_cache for ANAMICL after the offset cancelation
The offset cancelation bit in ANAMICL register is self cleanig.
Make sure that the reg_cache holds the same value as the HW
register.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:42:39 +00:00
Mark Brown 6627a653bc ASoC: Push the codec runtime storage into the card structure
This is a further stage on the road to refactoring away the ASoC
platform device.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-27 10:30:54 +00:00
Timur Tabi 0db4d07052 ASoC: improve I2C initialization code in CS4270 driver
Further improvements in the I2C initialization sequence of the CS4270 driver.
All ASoC initialization is now done in the I2C probe function.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 23:00:39 +00:00
Mark Brown 070504ade7 ASoC: Fix L3 bus handling in Kconfig
It has no external dependencies but needs to be selected for L3 based
codecs to work.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 15:37:26 +00:00
Mark Brown 01e097d6c4 ASoC: Include header file in cs4270 and wm9705
Ensures that the DAI and socdev exported by the codec match up with
their exported prototype.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 15:07:45 +00:00
Mark Brown ef963dcf68 ASoC: Fix spurious codec driver dependencies
Kbuild ignores dependency from things that are themselves selected so
ASoC machine drivers need to ensure that the control bus is being built.
This also avoids issues where multiple buses are supported by a given
codec.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 14:53:58 +00:00
Mark Brown a435869cac ASoC: Configure SSP port PLL for Zylonite
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 11:49:45 +00:00
Mark Brown f6fca2e93c ASoC: Remove unneeded e7x0 inclusion of pxa-regs.h and hardware.h
pxa-regs.h and hardware.h are not intended for use directly in driver
code and references to them have been removed in other code - remove
them from the newly added e740 and e750 machine drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 11:40:26 +00:00
Mark Brown c91cf25ebf ASoC: Fix merge with PXA tree
Fix a merge issue caused by context overlap.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 11:23:32 +00:00
Timur Tabi ff637d38ea ASoC: remove stand-alone mode support from CS4270 codec driver
The CS4270 supports stand-alone mode, where the codec is not connect to the
I2C or SPI buses.  Instead, input voltages configure the codec at power-on.
The CS4270 ASoC device driver has partial support for this mode, but the
code was never tested, and partial support doesn't help anyone.  It also made
the rest of the code more complicated than necessary.

[Removed redundant CS4270 dependency on I2C -- broonie]

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-23 11:12:57 +00:00
Steve Sakoman 80c509fdd7 ASoC: Complete Beagleboard support
Commit dc06102a0c in the asoc tree
did not include the necessary Kconfig and Makefile changes.  This patch
completes the support for Beagleboard

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-21 13:43:52 +00:00
Mark Brown 5669239644 Merge branch 'for-2.6.29' into for-2.6.30 2009-01-20 20:37:19 +00:00
Ian Molton 927b0aea93 ASoC: Fix WM9705 capture switch name
This patch fixes the acpture switch name so that it better reflects its
purpose.

Signed-off-by: Ian Molton <iann@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-20 20:36:52 +00:00
Timur Tabi 75d91f9bc6 ASoC: Allow Freescale MPC8610 audio drivers to be compiled as modules
Change the Kconfig and Makefile options for Freescale MPC8610 audio drivers
so that they can be compiled as modules, and simplify the Kconfig choices
so that only the platform is selected.

Also fix the naming of the driver files to conform to ALSA standards.

[Removed extraneous SND_SOC dependency -- broonie]

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-20 20:30:59 +00:00
Timur Tabi 8a9dee59a3 ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers
The Freescale MPC8610 driver was defining two SOC card (snd_soc_card)
structures, partially initializing each one, but registering only one of
them with ASoC.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-20 20:29:39 +00:00
Mark Brown b2a19d0239 ASoC: Staticise PCM operations tables
The PCM operations tables are not exported directly but are instead
included in the platform structure so should be declared static.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-19 16:23:27 +00:00
Ian Molton 91432e976f ASoC: fixes to caching implementations
This patch takes fixes a number of bugs in the caching code used by
several ASoC codec drivers. Mostly off-by-one fixes.

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-19 16:23:13 +00:00
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