Commit Graph

1016 Commits (8ed0a9d4e7cfff439f95d08c882841f25a12bf54)

Author SHA1 Message Date
Mark Brown 65ec1cd1e2 ASoC: Merge dai_ops factor out
Merge Eric Maio's patch to merge snd_soc_dai_ops out of line.  Fixed
merge issues and updated drivers, plus an issue with the ops for the two
s3c2443 AC97 DAIs having been merged.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 16:51:31 +00:00
Mark Brown 5314adc361 ASoC: Fix formats for s3c24xx-i2s register prints
The register values are all u32 so don't need the long format.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 16:28:29 +00:00
Mark Brown 02b7cbc399 ASoC: Remove version display from WM8580 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 14:40:41 +00:00
Mark Brown aaf1e176fa ASoC: Add initial driver for the WM8400 CODEC
The WM8400 is a highly integrated audio CODEC and power management unit
intended for mobile multimedia application.  This driver supports the
primary audio CODEC features, including:

 - 1W speaker driver
 - Fully differential headphone output
 - Up to 4 differential microphone inputs

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 13:49:46 +00:00
David Brownell 5706d50132 ASoC: buildfix for OSK
Buildfix:

  CC      sound/soc/omap/osk5912.o
  sound/soc/omap/osk5912.c: In function 'osk_soc_init':
  sound/soc/omap/osk5912.c:189: error: implicit declaration of function 'clk_get_usecount'
  make[3]: *** [sound/soc/omap/osk5912.o] Error 1

There's no such (standard) clock interface.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-11 12:49:28 +00:00
Daniel Mack cbf1146d5e ASoC: don't touch pxa-ssp registers when stream is running
In pxa_ssp_set_dai_fmt(), check whether there is anything to do at all.
If there would be but the SSP port is in use already, bail out.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-10 19:44:04 +00:00
Hugo Villeneuve 090cec81ae ALSA: ASoC: Davinci: Updated sffsdr_hw_params() function to new format
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-10 15:42:48 +00:00
Hugo Villeneuve 14cbba89ae ALSA: ASoC: Davinci: Replaced DAI format RIGHT_J by DSP_B for SFFSDR
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-10 15:42:48 +00:00
Mark Brown b3d7e3c99d Merge commit 'takashi/topic/asoc' into for-2.6.30 2009-03-10 15:42:03 +00:00
Mark Brown 6b849bcff0 ASoC: Convert PXA AC97 driver to probe with the platform device
This will break any boards that don't register the AC97 controller
device due to using ASoC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-09 18:19:01 +00:00
Eric Miao 5742964e91 [ARM] pxa: remove unnecessary #include of pxa-regs.h and hardware.h
pxa-regs.h and hardware.h are not intended for use directly in driver
code, remove those unnecessary references.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:38 +08:00
Eric Miao 7ebc8d56f4 [ARM] pxa: move DMA registers definitions into <mach/dma.h>
1. Driver code where pxa_request_dma() is called will most likely
   reference DMA registers as well,  and it is really unnecessary
   to include pxa-regs.h just for this. Move the definitions into
   <mach/dma.h> and make relevant drivers include it instead of
   <mach/pxa-regs.h>.

2. Introduce DMAC_REGS_VIRT as the virtual address base for these
   DMA registers. This allows later processors to re-use the same
   IP while registers may start at different I/O address.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-03-09 21:22:36 +08:00
Takashi Iwai 0a4e1c9069 Merge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-03-09 12:05:21 +01:00
Daniel Mack a381934e5f 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>
2009-03-09 10:46:17 +00:00
Takashi Iwai f271fa28fb ASoC: Fix Kconfig dependency of CONFIG_SND_S3C24XX_SOC_JIVE_WM8750
Remove a non-existing Kconfig CONFIG_SND_SOC_WM8750_SPI.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-09 00:52:17 +01:00
Mark Brown 055a49b0c9 ASoC: Remove unneeded forward reference to WM8753 SPI implementation
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-08 20:43:33 +00:00
Daniel Mack b191f63c4f 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>
2009-03-08 18:27:36 +00:00
Timur Tabi 3a638ff272 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>
2009-03-07 11:01:49 +00:00
Hugo Villeneuve 96deff6baf ASoC: Davinci: Fix incorrect machine type for SFFSDR board
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-07 11:01:40 +00:00
Mark Brown b52a5195ef ASoC: Fix logging severity for some S3C error messages
Upgrade the severity of some failure messages from debug level so
they're displayed by default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 18:13:43 +00:00
Mark Brown ee7d476714 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>
2009-03-06 18:04:34 +00:00
Mark Brown 26bd7b496c ASoC: Staticise workqueue function for GPIO jack detection
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:19 +00:00
Mike Frysinger 67a9c573b5 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>
2009-03-06 13:37:18 +00:00
Mike Frysinger 3465d93a12 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>
2009-03-06 13:37:17 +00:00
Lopez Cruz, Misael de0b988828 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>
2009-03-06 13:37:17 +00:00
Timur Tabi a454dad19e 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>
2009-03-06 13:37:16 +00:00
Mark Brown 499d8f4a52 ASoC: Update Kconfig for Samsung CPUs to reflect S3C64xx support
We now support the 64xx series as well as the 24xx series - make sure
people using Kconfig know this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:15 +00:00
Mark Brown 07495f3e5a 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>
2009-03-06 13:37:14 +00:00
Mark Brown 42aa3418eb ASoC: Factor out DAPM widget power check into separate function
Essentially simple code motion to facilitate refactoring of the power
decisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:13 +00:00
Daniel Mack 20a41eac4f ASoC: Fix name of register bit in pxa-ssp
A bit in PXA's SSCR0 register was erroneously named ADC but its name is
in fact ACS (audio clock select).

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:12 +00:00
Peter Ujfalusi 89492be886 ASoC: TWL4030: Make the HS ramp delay configurable
Enum type for selecting the desired ramp delay for the headset output.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:11 +00:00
Mark Brown a1b3eaeb14 ASoC: Refresh JIVE driver
Remove uneeded startup callback and use snd_soc_dapm_nc_pin()

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:10 +00:00
Ben Dooks c36623a754 ASoC: Select DMA if I2S is configured
Select the relevant DMA implementation when the
sound driver is selected.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:09 +00:00
Ben Dooks f8cf8176c7 ASoC: Add s3c64xx-i2s support
Add the initial code to support the S3C64XX I2S hardware using the
s3c-i2s-v2 core code.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:08 +00:00
Ben Dooks dc85447b19 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>
2009-03-06 13:37:08 +00:00
Ben Dooks 3093e48c48 ASoC: Add JIVE audio support
Add support for the Jive's WM8750 codec attached via the S3C2412 IIS.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:07 +00:00
Lopez Cruz, Misael 979c036e09 ASoC: Add DAPM machine widgets to SDP3430 driver
Add DAPM machine domain widgets to SDP3430 machine driver.
Interconnection:
* Ext Mic: MAINMIC, SUBMIC
* Ext Spk: HFL, HFR
* Headset Jack: HSMIC, HSOL, HSOR

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-06 13:37:06 +00:00
Mark Brown 4f5b31c3f2 Merge commit 's3c-iis-header' into HEAD 2009-03-06 13:36:44 +00:00
Ben Dooks 899e6cf5e6 S3C: Move <mach/audio.h> to <plat/audio.h>
The <mach/audio.h> file needs to be common to both ARCH_S3C2410 and
ARCH_S3C64XX as they share common driver code, so move it to <plat/audio.h>.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-05 12:01:00 +00:00
Ben Dooks 8150bc886b S3C24XX: Move and update IIS headers
Move the IIS headers to their correct place.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-05 12:00:59 +00:00
Eric Miao 6335d05548 ASoC: make ops a pointer in 'struct snd_soc_dai'
Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.

The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.

Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-04 22:29:47 +00:00
Jonas Andersson 86027ae78c ASoC: wm8510 pll settings
When setting WM8510_MCLKDIV the pll was turned off.

When setting pll frequency you got twice the expected freq, because
the  code calculated  with postscaler of 8,  but  the hardware divide by 4.

Signed-off-by: Jonas Andersson <jonas@microbit.se>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-04 14:47:39 +00:00
Lopez Cruz, Misael ec67624d33 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>
2009-03-04 14:47:38 +00:00
Philipp Zabel 5f2a9384a9 ASoC: UDA1380: DATAI is slave only
Only allow SND_SOC_DAIFMT_CBS_CFS for the playback DAI.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-03 15:58:51 +00:00
Philipp Zabel aa4ef01de5 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>
2009-03-03 15:54:11 +00:00
Philipp Zabel ef9e5e5c31 ASoC: UDA1380: change decimator/interpolator register handling
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>
2009-03-03 15:54:10 +00:00
Philipp Zabel a3c7729e6c ASoC: Remove version display from the UDA1380 driver
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-03 15:54:10 +00:00
Daniel Mack ff09d49ad0 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>
2009-03-02 14:39:23 +00:00
Mark Brown 8b37dbd2a1 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>
2009-02-28 21:31:21 +00:00
Daniel Mack 4eae080dda ASoC: Add cs4270 support for slave mode configurations
Added support for scenarios where the Cirrus CS4270 audio codec is slave
to the bitclk and lrclk. Mixed setups are unsupported.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-28 17:18:25 +00:00
Ben Dooks c8efef1745 ASoC: Fix copyright statements on Simtec files
Fix the copyright statements in two of the S3C24XX ASoC files
that have (c) when we require the full word.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-28 17:18:24 +00:00
Takashi Iwai 6d5643455c ASoC: wm8753 - Fix build error
sound/soc/codecs/wm8753.c: In function 'wm8753_probe':
sound/soc/codecs/wm8753.c:1577: error: implicit declaration of function 'wm8753_add_controls'

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-26 11:29:58 +01:00
Mark Brown e611bd8244 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>
2009-02-24 23:49:56 +00:00
Mark Brown c2bac1606a ASoC: Convert WM8753 to register via normal device probe
The base support for the only in-tree user, the GTA01, is out of tree
and will be updated separately.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24 23:49:53 +00:00
Mark Brown 69e169da5a ASoC: Shuffle WM8753 device registration code
This patch should be pure code motion, separating that out from the
functional changes to move to new style device registration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24 23:48:14 +00:00
Mark Brown d3b8942184 ASoC: Fix Zylonite voice interface stereo configurations
We always run in the first timeslot of one.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24 23:48:12 +00:00
Mark Brown 8056d9bbb5 ASoC: Improve WM9713 voice DAC shutdown procedure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24 23:48:11 +00:00
Mark Brown 93e051d277 ASoC: Only unregister drivers we registered for WM8753
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-22 14:24:00 +00:00
Mark Brown eeb1080b29 ASoC: Report I/O errors from WM8753 reset
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-22 14:19:23 +00:00
Mark Brown ce3bdaa871 ASoC: Disable WM8731 line bypass by default
This avoids temporarily enabling the ouput stages during startup which
can cause audible effets in the output stages.

Reported-by: Fredrik Redgård <rik@svep.se>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-19 14:30:57 +00:00
Mark Brown c6f2981170 ASoC: Add device init/exit annotations to new-style Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 21:26:58 +00:00
Mark Brown 519cf2df5f ASoC: Check for errors when writing WM8731 reset register
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 21:06:01 +00:00
Peter Ujfalusi 6bab83fd88 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>
2009-02-18 17:14:23 +00:00
Mark Brown 93b760b707 ASoC: Implement SPI device unregistration for WM8731
Completely untested.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 14:47:20 +00:00
Mark Brown fc99675768 ASoC: Fix build for corgi and poodle
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 14:46:58 +00:00
Mark Brown 59544d33ff ASoC: Remove version display from the WM8753 driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 11:55:26 +00:00
Mark Brown 5998102b90 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>
2009-02-18 11:55:22 +00:00
Mark Brown a8035c8f04 ASoC: Shuffle WM8731 SPI and I2C device registration
This is a pure code motion patch intended to improve reviewability of a
following patch moving WM8731 to use more standard device registration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 11:25:48 +00:00
Mark Brown 7ee7538041 ASoC: Rename AT91SAMG20-EK for applications
This is a bit more idiomatic and makes identifying a configuration
based on the board type work better.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 11:25:23 +00:00
Mark Brown 5de7f9b200 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>
2009-02-18 11:25:23 +00:00
Mark Brown 40135ea071 ASoC: Check machine type before loading on AT91SAM9G20-EK
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 11:25:22 +00:00
Mark Brown d694354115 ASoC: Improve diagnostics for AT91SAM9G20-EK probe
We should display an error by default if we fail to register.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18 11:25:21 +00:00
Mark Brown 22d22ee514 ASoC: Clean up WM8731 bias level configuration
The WM8731 bias level configuration function was written slightly
obscurely - streamline the code a little and refresh the comments.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-17 14:29:54 +00:00
Mark Brown 7b317b692a ASoC: Remove version display from the WM8731 driver
It makes boot a bit more noisy and I never remember to update it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-17 14:29:54 +00:00
Paul Fertser 31b59cf9ce ASoC: Fix WM8753 DAIs unregistering
WM8753 uses a tricky way to switch DAIs "on the fly", for that it
registers 2 dummy DAIs and substitutes them depending on mixer control.

List element of registered dummy DAIs should be preserved to allow
unregistering of DAIs on module unload.

Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-17 14:29:54 +00:00
Kevin Hilman bf3dbe5c8c 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>
2009-02-13 20:21:30 +00:00
Takashi Iwai f1464ede55 Merge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-02-13 15:10:35 +01:00
Mark Brown c85e5a4161 Merge branch 'for-2.6.29' into for-2.6.30 2009-02-13 14:02:08 +00:00
Mark Brown 14fa43f53f 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>
2009-02-13 13:50:22 +00:00
Timur Tabi d5e9ba1d58 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>
2009-02-13 13:32:51 +00:00
Takashi Iwai 9e30d7718b ASoC: Fix forgotten replacements of socdev->codec
The snd_soc_codec was moved into socdev->card, but this change wasn't
applied in some places.  Fixed now.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-11 08:28:04 +01:00
Mark Brown 9e32ebdb3a Merge branch 'for-2.6.29' into for-2.6.30 2009-02-10 21:37:01 +00:00
Lopez Cruz, Misael 272edb0049 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
(875065491f).

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>
2009-02-10 21:36:27 +00:00
Jarkko Nikula 7565fc38cc ASoC: TLV320AIC3X: Add TLV information for volume controls
TLV320AIC3X volume controls are logarithmic. Export their dB ranges.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-09 18:27:59 +00:00
Jarkko Nikula b93f74f604 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>
2009-02-09 18:27:59 +00:00
Philipp Zabel 44dd2b9168 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>
2009-02-08 20:40:26 +00:00
Roel Kluin 67137a5d46 ASoC: count reaches 10001, not 10000.
With a postfix increment count reaches 10001, not 10000.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-08 20:40:24 +00:00
Robert Jarzmik 8f0dc655f9 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>
2009-02-08 20:39:46 +00:00
Mark Brown e255265b47 Merge branch 'for-2.6.29' into for-2.6.30 2009-02-06 14:19:45 +00:00
Timur Tabi 85ef2375ef 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>
2009-02-06 12:08:15 +00:00
Mike Frysinger 8836c273e4 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>
2009-02-06 12:07:39 +00:00
Mike Frysinger 92a950ff2b 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>
2009-02-06 12:07:29 +00:00
Jarkko Nikula 397d5aeeb5 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
4eaa9819dc.

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>
2009-02-06 11:39:28 +00:00
Eero Nurkkala 4453dba54d 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
4eaa9819dc.

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>
2009-02-06 11:39:28 +00:00
Philipp Zabel 0664678a84 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>
2009-02-04 13:17:22 +00:00
Philipp Zabel 5b2474425e 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>
2009-02-04 13:15:15 +00:00
Vasily Khoruzhick 111f6fbeb7 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>
2009-02-03 17:12:16 +00:00
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
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
Cliff Cai a89e611a1d ASoC: Blackfin: Fix AD1980/1 build with MMAP support disabled
clean up redudent code and correct building problem in non-mmap mode

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>
2008-11-18 11:40:21 +00:00
Cliff Cai 67f854b910 ASoC: Blackfin: add multi-channel function support
This patch provides a option for users to enable multi-channel function support
in Blackfin ASoC driver. Because Blackfin is without MMU, it is easy for us and
the user to enable this function at compiling stage not dynamically on the fly.

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>
2008-11-18 11:40:19 +00:00
Cliff Cai 9905ed35fd ASoC: AD1980 codec: add multi-channel function support
We added multi-channel function to this codec driver and Blackfin ASoC driver as well.
It was tested on Blackfin hardware.

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>
2008-11-18 11:40:18 +00:00
Mike Frysinger a11311d71d ASoC: Blackfin: updates Kconfig for SPORT
tweak SPORT range for non-BF54x so we get proper behavior for BF52x parts

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 11:40:18 +00:00
Naresh Medisetty cb6e206369 ASoC: DaVinci: Fix audio stall when doing full duplex
Fix concurrent capture/playback issue.
The issue is caused by re-initialization of control registers used specifically
for capture or playback in both capture and playback operations.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-18 11:40:04 +00:00
Mark Brown 8d702f2376 ASoC: Build tlv320aic23 cleanly
Also merge down a couple of last minute style changes that got lost in the
shuffle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 21:46:24 +00:00
Mark Brown 2adb9833d1 ASoC: Manage VMID mode for WM8990
A small additional power saving can be achieved for the WM8990 by
maintaining VMID using a 2*250k divider when in standby mode.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 17:26:51 +00:00
Mark Brown be1b87c70a ASoC: Enable WM8990 ADC clocking workaround
Enable a hardware workaround which avoids problems with the clocking of
the ADCs in certain configurations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 17:24:54 +00:00
Mark Brown ba533e95b9 ASoC: Allow writes to uncached registers in WM8990
Only fully documented registers are cached in the WM8990 but additional
registers exist.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 17:24:50 +00:00
Christian Pellegrin 7ad933d7a6 ASoC: Machine driver for for s3c24xx with uda134x
Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 11:45:53 +00:00
Christian Pellegrin 1cad1de1b2 ASoC: UDA134x codec driver
Signed-off-by: Christian Pellegrin <chripell@fsfe.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 11:45:39 +00:00
Peter Ujfalusi 6e5d9db271 ASoC: Fix for master playback/capture volume range for TWL4030 codec
FGAIN for playback is in range of 0-0x3f, while for capture GAIN it
is in the range of 0-0x1f.
The original value of 128 (0x7f) would modify the CGAIN also for
playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-17 11:02:21 +00:00
Mark Brown 71cfc9028d ASoC: Add WM8728 codec driver
The WM8728 is a high performance stereo DAC designed for applications
such as DVD, home theatre and digital TV.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-14 14:44:53 +00:00
Mark Brown 2bef901071 ASoC: Revert "ASoC: Add new parameter to s3c24xx_pcm_enqueue"
This reverts commit 8dc840f88d.  Christian
Pellegrin <chripell@gmail.com> reported that on some systems the patch
caused DMA to fail which is much more serious than the original skipped
audio issue.  Further investigation by Dave shows that the behaviour
depends on the clock speed of the SoC - a better fix is neeeded.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-14 14:40:46 +00:00
Grant Likely 847cdf42d5 powerpc/mpc5200: fix bestcomm Kconfig dependencies
Without this patch it is possible to select drivers which require
bestcomm support without bestcomm support being selected.  This
patch reworks the bestcomm dependencies to ensure the correct
bestcomm tasks are always enabled.

Reported-by: Hans Lehmann <hans.lehmann@ritter-elektronik.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-11-13 22:37:27 -07:00
Jarkko Nikula 0b6048561d ASoC: OMAP: Add more supported sample rates into McBSP DAI driver
Originally it was put too tight limits to support only 44.1 kHz and 48 kHz
sample rates in McBSP DAI driver. Extend it now to 8 kHz - 96 kHz. With
96 kHz and 2*16 bits, bit clock is 3.072 MHz < 3.125 MHz (I2S max?).

Tested on Nokia N810 with TVL320AIC33 from rates 8 - 96 kHz and on Texas
Instruments Beagle with TWL4030 from rates 8 - 48 kHz.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Acked-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-13 10:31:44 +00:00
Jarkko Nikula bbba944410 ASoC: Fix supported sample rates of TWL4030 audio codec
TWL4030 currently supports rates between 8 kHz and 48 kHz and sets the codec
mode register accordingly in twl4030_hw_params. Expose this info so that
ASoC can match other rates than 44.1 kHz or 48 kHz as well.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-13 10:31:22 +00:00
Naresh Medisetty fb0ef645f2 ASoC: DaVinci: Audio: Fix swapping of channels at start of stereo playback
Fixes swapping of channels at start of stereo playback.

Channel swap can be observed while playing left-only or right-only audio data. The channel
swap is fixed by handling the XSYNCERR condition.

Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-11-12 11:50:29 +00:00