The definitions of S3C2412_IISMOD_SDF_MSB and S3C2412_IISMOD_SDF_LSB
are incorrect, being the same S3C2412_IISMOD_SDF_IIS which is the
only correct one in this series.
Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Mon, 9 Mar 2009 01:13:17 +0000 (02:13 +0100)]
ASoC: Add a driver for AK4104 S/PDIF transmitter
This adds a driver for the SPI connected AK4104 S/PDIF transmitter
device. Its features are fairly simple, but as there is need to set up
certain bits in the IEC958 information, this better goes into a real
driver.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Mark Brown <broonie@sirena.org.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Sun, 8 Mar 2009 16:51:52 +0000 (17:51 +0100)]
ASoC: bring cs4270 feature/limitations list in sync
Removes numbers from the list of features/limitations and makes it
reflect recent changes to the code.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Sat, 7 Mar 2009 00:39:34 +0000 (18:39 -0600)]
ASoC: Improve pause/unpause performance in Freescale 8610 drivers
Add support for true pause and unpause. Without this, mplayer will drop some
audio (less than one second, but still noticeable) when pausing playback.
Remove support for PM suspend and resume from the trigger function, since the
driver doesn't support PM anyway.
Optimize the delay after starting capture. Instead of delaying 1ms, the driver
now polls the hardware. The new delay is shorter by over 90% yet still
effective.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Fri, 6 Mar 2009 18:04:34 +0000 (18:04 +0000)]
ASoC: Re-remove hand-rolled pr_debug() macros
The recent set of S3C64xx patches re-added a lot of uses of DBG() that
had previously been removed - revert this so the standard pr_debug()
macro is used.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Fri, 6 Mar 2009 07:53:30 +0000 (15:53 +0800)]
ASoC: Blackfin: fix typo in MUTE definition
Reported-by: Rob Maris <maris.rob@vdi.de> 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>
Mike Frysinger [Fri, 6 Mar 2009 07:53:28 +0000 (15:53 +0800)]
ASoC: Blackfin: move gpio_err behind the define that is only user of it
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>
ASoC: Add headset jack detection for SDP3430 machine driver
Add headset jack detection for SDP3430 boards using SoC jack
reporting interface. Headset detection on SDP3430 board is
achieved through TWL4030 GPIO_2 pin.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Thu, 5 Mar 2009 23:23:37 +0000 (17:23 -0600)]
ASoC: add support for SSI asynchronous mode to the Freescale SSI drivers
Add a new device tree property for the SSI node: "fsl,ssi-asynchronous". If
defined, the SSI is programmed into asynchronous mode, otherwise it is
programmed into synchronous mode. In asynchronous mode, pin SRCK must be
connected to the same clock source as STFS, and pin SRFS must be connected to
the same signal as STFS. Asynchronous mode allows playback and capture to
use different sample sizes. It also technically allows different sample rates,
but the driver does not support that.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 5 Mar 2009 17:06:23 +0000 (17:06 +0000)]
ASoC: Fix memory allocation for snd_soc_dapm_switch names
snd_soc_dapm_switch ends up ends up in dapm_new_mixer() (since a switch
is a special case of a mixer with only one input) but this wasn't
correctly handled in the code.
Also fix the coding style for the switch below while we're here.
Reported-by: Joonyoung Shim <dofmind@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ben Dooks [Wed, 4 Mar 2009 00:49:30 +0000 (00:49 +0000)]
ASoC: Split s3c2412-i2s.c into core and SoC specific parts
The S3C2412 I2S (IIS) interface is replicated on further Samsung SoC
parts in a broadly compatible way, so split the common code out into
a core called s3c-i2s-v2.[ch] so that the newer SoCs such as the
S3C6410 can make use of it.
As such, all the original s3c2412 functions are currently being left
with their original names, and will be renamed later in the series.
Signed-off-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Add GPIO support for jack reporting interface
Add GPIO support to jack reporting framework in ASoC using gpiolib calls.
The gpio support exports two new functions: snd_soc_jack_add_gpios and
snd_soc_jack_free_gpios.
Client drivers using gpio feature must pass an array of jack_gpio pins
belonging to a specific jack to the snd_soc_jack_add_gpios function. The
framework will request the gpios, set the data direction and request irq.
The framework will update power status of related jack_pins when an event on
the gpio pins comes according to the reporting bits defined for each gpio.
All gpio resources allocated when adding jack_gpio pins can be released
using snd_soc_jack_free_gpios function.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Philipp Zabel [Tue, 3 Mar 2009 15:10:51 +0000 (16:10 +0100)]
ASoC: Use network mode with 2 slots for 16-bit stereo in pxa-ssp/Zylonite
For consistency with 24-bit and 32-bit modes, don't send 16-bit stereo
in one 32-bit transfer. Use 2 slots instead on Zylonite. It should result
in exactly the same behaviour.
Now it is possible to use 16-bit single slot transfers in pxa-ssp, which
are needed for Magician to get two frame clock pulses per sample
(one for each channel).
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Tested-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If the UDA1380's interpolator or decimator are set to be clocked from
the WSPLL (which syncs to the WSI signal), the DAI link must be running
to change the interpolator/decimator registers (which include volume
controls and digital mute setting).
* Queue work in the alsa PCM_START .trigger to flush registers
as soon as the link is running. This replaces the .prepare
and .digital_mute callbacks.
* Use the SILENCE override instead of MTM for muting and remove
its alsa control to avoid confusion.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Daniel Mack [Sat, 28 Feb 2009 12:21:03 +0000 (13:21 +0100)]
ASoC: fix typo and removed unneeded switch case for cs4270
This removes a misspelled comment and got rid of superfluous switch
case.
Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sat, 28 Feb 2009 21:14:20 +0000 (21:14 +0000)]
ASoC: Add SND_SOC_DAPM_PIN_SWITCH controls for exposing DAPM pins
On some systems it is desirable for control for DAPM pins to be provided
to user space. This is the case with things like GSM modems which are
controlled primarily from user space, for example. Provide a helper which
exposes the state of a DAPM pin to user space for use in cases like this.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 22 Feb 2009 20:04:41 +0000 (20:04 +0000)]
ASoC: Only write back non-default registers when resuming WM8753
This will reduce the number of writes done on resume, allowing that to
complete faster (especially on systems with very slow I2C like the
current Samsung driver).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Wed, 18 Feb 2009 12:39:05 +0000 (14:39 +0200)]
ASoC: TWL4030: Add digital loopback support
This patch adds the digital loopback/bypass support for twl4030 codec.
The digital loopback will let the digimic0 (routed in the TX1 capture path
inside of TWL4030) data to be routed back to the RX2 playback path
(I2S stereo). It can also route the analog capture date routed through the
TX1 back to RX2.
Effectively the digital loopback is routing the audio from the TX1 capture path
to the RX2 playback path.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 16 Feb 2009 20:49:16 +0000 (20:49 +0000)]
ASoC: Refactor WM8731 device registration
Move the WM8731 driver to use a more standard device registration
scheme where the device can be registered independantly of the ASoC
probe.
As a transition measure push the current manual code for registering
the WM8731 into the individual machine driver probes. This allows
separate patches to update the relevant architecture files with less
risk of merge issues.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 16 Feb 2009 17:51:54 +0000 (17:51 +0000)]
ASoC: Actively manage MCLK for AT91SAM9G20-EK
We have software control of the MCLK for the WM8731 so save a bit of
power by actively managing it within the machine driver, enabling it
only while the codec is active.
Once ASoC supports multiple boards and doesn't require the soc-audio
device the initial clock setup should be pushed down into the arch/arm
code but for now this reduces merge issues.
Tested-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Kevin Hilman [Fri, 13 Feb 2009 19:36:37 +0000 (11:36 -0800)]
ASoC: Fix DaVinci module unload error
Fix for the error when the audio module is unloaded. On unregistering
the platform_device, platform_device_release will free the platform
data.If platform data is static the kernel panics when it is freed.
Instead use the platform device helper function to add data.
This change has been tested on DM644x EVM, DM644x SFFSDR and DM355 EVM.
Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Thu, 12 Feb 2009 19:33:19 +0000 (19:33 +0000)]
ASoC: Only register AC97 bus if it's not done already
ASoC supports both explicit codec drivers for AC97 devices and a simple
driver which uses the standard ALSA AC97 framework for codec support.
When used with the generic AC97 codec support that will provide the
ad hoc AC97 device for drivers like touchscreens to attach to so the
core shouldn't do so.
Reported-by: Manuel Lauss <mano@roarinelk.homelinux.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Tue, 3 Feb 2009 17:09:32 +0000 (11:09 -0600)]
ASoC: add additional controls to the CS4270 codec driver
Update the CS4270 codec driver to allow applications to use the mixer to
control Digital Loopback, Soft Ramp, Zero Cross, Popguard, and Auto-Mute.
Soft Ramp, Zero Cross, and Auto-Mute are disabled by the driver when it first
initializes the hardware, but these features either don't work or interfere
with normal ALSA behavior. However, they can now be re-enabled by an
application if desired.
Remove CONFIG_SND_SOC_CS4270_HWMUTE and always allow ASoC to control the mute
bits. The driver previously and erroneously assumed that these bits
control only external muting circuitry, but they also control internal
muting circuitry, so they should always be used.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Update SDP3430 machine driver for snd_soc_card
This patch replaces "snd_soc_machine" structure by "snd_soc_card" in
SP3430 driver. This change is needed in SDP3430 driver to reflect
changes introduced by "ASoC: Rename snd_soc_card to snd_soc_machine" patch
(875065491fba8eb13219f16c36e79a6fb4e15c68).
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Mon, 9 Feb 2009 12:27:06 +0000 (14:27 +0200)]
ASoC: TLV320AIC3X: Fix volume ranges
This is a minor fix but helps to define dB ranges for volume controls.
Only DAC digital volume has full register value range from 0 to 127 but
ADC PGA gain and output stage volume controls don't.
For ADC PGA, maximum value is 119 and then it saturates to the same
gain value of 59.5 dB. For output stages, value 117 corresponds to -78.3 dB
and is muted for values 118 and above.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Philipp Zabel [Thu, 5 Feb 2009 16:48:21 +0000 (17:48 +0100)]
ASoC: pxa2xx-i2s: remove I2S pin setup
This removes the calls to pxa_gpio_mode from the pxa2xx-i2s driver.
Pin setup should be done during board init via pxa2xx_mfp_config
instead.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Philipp Zabel [Thu, 5 Feb 2009 16:48:20 +0000 (17:48 +0100)]
pxa/spitz: Setup I2S pins for pxa2xx-i2s
The spitz has a WM8750 codec connected as I2S slave but doesn't use the
PXA I2S system clock.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Philipp Zabel [Thu, 5 Feb 2009 16:48:19 +0000 (17:48 +0100)]
pxa/h5000: Setup I2S pins for pxa2xx-i2s
The iPAQ h5000 has an AK4535 codec connected as I2S slave,
PXA I2S providing SYSCLK.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Robert Jarzmik [Sat, 7 Feb 2009 13:01:58 +0000 (14:01 +0100)]
ASoC: Add initial support of Mitac mioa701 device SoC.
This machine driver enables sound functions on Mitac mio
a701 smartphone. Build upon ASoC v1, it handles :
- rear speaker
- front speaker
- microphone
- GSM
A global "Mio Mode" switch is not yet provided to cope with
audio path setup. As balance on audio chip line is no more
assured, an incorrect setup can produce a lot of heat and
even fry the battery behind the wm9713 and the speaker
amplifier.
It doesn't cope with :
- headset jack
- mio master mode
- master volume control
This driver is backported from ASoc v2, and amputated from
scenario setups and master volume control.
[Minor mods for terminology in comments -- broonie]
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Thu, 5 Feb 2009 23:56:02 +0000 (17:56 -0600)]
ASoC: optimize init sequence of Freescale MPC8610 sound drivers
In the Freescale MPC8610 sound drivers, relocate all code from the _prepare
functions into the corresponding _hw_params functions. These drivers assumed
that the sample size is known in the _prepare function and not in the
_hw_params function, but this is not true.
Move the code in fsl_dma_prepare() into fsl_dma_hw_param(). Create
fsl_ssi_hw_params() and move the code from fsl_ssi_prepare() into it.
Turn off snooping for DMA operations to/from I/O registers, since that's not
necessary.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mike Frysinger [Fri, 6 Feb 2009 10:12:35 +0000 (18:12 +0800)]
ASoC: Blackfin: drop unnecessary dma casts
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>
Mike Frysinger [Fri, 6 Feb 2009 10:12:34 +0000 (18:12 +0800)]
ASoC: Blackfin: cleanup sport handling in ASoC Blackfin AC97 code
- make sport number handling more dynamic as not all
Blackfins have a linear sport map starting at 0
- indexes can be macroed away too
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 6 Feb 2009 10:01:05 +0000 (12:01 +0200)]
ASoC: WM8990: Fix kcontrol's private value use in put callback
Function wm899x_outpga_put_volsw_vu misuses the kcontrol's private value
by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it
as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf.
This is very similar fix than fix to TLV320AIC3X codec made by
Eero Nurkkala <ext-eero.nurkkala@nokia.com>. This fix is compile tested
only.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Eero Nurkkala [Fri, 6 Feb 2009 10:01:04 +0000 (12:01 +0200)]
ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callback
Function snd_soc_dapm_put_volsw_aic3x misuses the kcontrol's private value
by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it
as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf.
This was causing arbitrary register writes when touching the controls
defined with SOC_DAPM_SINGLE_AIC3X.
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>
Philipp Zabel [Tue, 3 Feb 2009 20:18:26 +0000 (21:18 +0100)]
ASoC: pxa-ssp: fix SSP port request
PXA2xx/3xx SSP ports start from 1, not 0. Thus, the probe function
requested the wrong SSP port. Correcting this unveiled another bug
where ssp_init tries to request the already-requested SSP port again.
So this patch replaces the ssp_init/exit calls with their internals
from mach-pxa/ssp.c, leaving out the redundant ssp_request and the
unneeded IRQ request. Effectively, that leaves us with not much more
than enabling/disabling the SSP clock.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Philipp Zabel [Tue, 3 Feb 2009 16:19:40 +0000 (17:19 +0100)]
ASoC: uda1380: split set_dai_fmt into _both, _playback and _capture variants
This patch splits set_dai_fmt into three variants (single interface,
dual interface playback only, dual interface capture only) so that
data input and output formats can be configured separately for dual
interface setups.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ASoC: Don't unconditionally use the PLL in UDA1380
Without this fix driver switches to WSPLL in uda1380_pcm_prepare
even if SYSCLK was chosen (uda1380_pcm_prepare modifies UDA1380_CLK
register to disable R00_DAC_CLK before flushing reg cache)
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Eero Nurkkala [Mon, 2 Feb 2009 12:20:46 +0000 (14:20 +0200)]
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>
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>