Commit Graph

1437 Commits

Author SHA1 Message Date
Mark Brown 7dea7c01da ASoC: Add regulator support for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-26 15:37:37 +00:00
Peter Ujfalusi 7a1fecf57f ASoC: TWL4030: Driver registration via twl4030_codec MFD
Change the way how the twl4030 soc codec driver is
loaded/probed.
Use the device probing via tlw4030_codec MFD device.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:15:10 +00:00
Peter Ujfalusi 1f0f9b67f9 ASoC: TWL4030: use the twl4030-codec.h for register descriptions
Remove the register descriptions from the twl4030.h file and use
the linux/mfd/twl4030-codec.h instead, which has the codec
related register descriptions also.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:15:10 +00:00
Janusz Krzysztofik b214f11fb9 ASoC: Amstrad Delta: add info about the line discipline requirement to Kconfig help text
I thought it could be usefull to add some information on how to get the device
fully supported by loading a line discipline on the modem line.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-25 17:10:59 +00:00
Janusz Krzysztofik 0ffc11800c ASoC: OMAP: Don't try to set unsupported OMAP_DMA_DATA_BURST_16 on OMAP1
After DMA burst mode has been introduced in sound/soc/omap/omap-pcm.c,
omap_pcm_prepare() unconditionally calls:

        omap_set_dma_src_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);
        omap_set_dma_dest_burst_mode(prtd->dma_ch, OMAP_DMA_DATA_BURST_16);

Current implementation of those two functions found in
arch/arm/plat-ompa/dma.c doesn't support OMAP_DMA_DATA_BURST_16 on OMAP1 at
all, so they both end with BUG() on that machine. That results in
ASoC being completely unusable, at least on my OMAP5910 based Amstrad Delta.

The patch corrects the problem by not calling those two functions when run on
OMAP1 class based machines.

Created against linux-2.6.32-rc5.
Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-22 11:47:14 +01:00
Peter Ujfalusi 017deee639 ASoC: tlv320dac33: typo fix in the header
Fix the definition of DAC33_LTM field, the LTM bits in
FIFO_IRQ_MODE_B register are starting at bit 6.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-21 19:08:21 +01:00
Janusz Krzysztofik 02624621a5 ASoC: Amstrad Delta minor cleanups
Hi Mark,

Here is a patch that corrects small omissions I have found in my code.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-21 19:08:21 +01:00
Tony Lindgren ce491cf854 omap: headers: Move remaining headers from include/mach to include/plat
Move the remaining headers under plat-omap/include/mach
to plat-omap/include/plat. Also search and replace the
files using these headers to include using the right path.

This was done with:

#!/bin/bash
mach_dir_old="arch/arm/plat-omap/include/mach"
plat_dir_new="arch/arm/plat-omap/include/plat"
headers=$(cd $mach_dir_old && ls *.h)
omap_dirs="arch/arm/*omap*/ \
drivers/video/omap \
sound/soc/omap"
other_files="drivers/leds/leds-ams-delta.c \
drivers/mfd/menelaus.c \
drivers/mfd/twl4030-core.c \
drivers/mtd/nand/ams-delta.c"

for header in $headers; do
	old="#include <mach\/$header"
	new="#include <plat\/$header"
	for dir in $omap_dirs; do
		find $dir -type f -name \*.[chS] | \
			xargs sed -i "s/$old/$new/"
	done
	find drivers/ -type f -name \*omap*.[chS] | \
		xargs sed -i "s/$old/$new/"
	for file in $other_files; do
		sed -i "s/$old/$new/" $file
	done
done

for header in $(ls $mach_dir_old/*.h); do
	git mv $header $plat_dir_new/
done

Signed-off-by: Tony Lindgren <tony@atomide.com>
2009-10-20 09:40:47 -07:00
Mark Brown 9927f32771 Merge branch 'for-2.6.32' into for-2.6.33 2009-10-19 16:15:35 +01:00
Barry Song 02a06d3042 ASoC: Fix possible codec_dai->ops NULL pointer problems
Some codec DAIs like stac9766, wm9712, wm9713, ad1980 don't register themselves
then it loses to the chance to be given a null_dai_ops in snd_soc_register_dai
if they have no ops. When functions like soc_pcm_open, soc_pcm_hw_params etc.
access the ops field in these DAIs, panic will happen.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:15:03 +01:00
Julia Lawall 4f066173fe ASoC: Move dereference after NULL test
If the NULL test on jack is needed, then the derefernce should be after the
NULL test.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:35 +01:00
Manuel Lauss 8d567b6b44 ASoC: au1x: psc-ac97: reorganize timeouts
Codec read/write functions: wait 21us between the pokings of hardware.
Add timeouts to unbounded loops waiting for bits to change.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:31 +01:00
Manuel Lauss e697cd410a ASoC: au1x: psc-ac97: verify correct codec register was read
Verify that the correct register has been received from the codec.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:30 +01:00
Peter Ujfalusi d8707cecdf ASoC: TWL4030: Only update the needed bits in *set_dai_sysclk
Do not rewrite the whole register, but only update the needed
bits in set_dai_sysclk functions.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-19 16:12:17 +01:00
Mark Brown 3da8e6885e Merge branch 'for-2.6.32' into for-2.6.33 2009-10-15 15:02:14 +01:00
Peter Ujfalusi c8bf93f0fe ASoC: Codec driver for Texas Instruments tlv320dac33 codec
Driver for Texas Instruments TLV320DAC33 (SLAS546) low power stereo
audio DAC.

TLV320DAC33 is a stereo audio codec with integrated 24KB FIFO for low
power audio playback.

The digital interface can use I2S, DSP (A or B), Right and Left
justified formats.
DAC33 has stereo analog input, which can be bypassed to the analog
outputs.

Regarding to the internal 24KB FIFO the driver implements 'FIFO bypass'
mode (default) and nSample mode (FIFO is in use).
a) In 'FIFO bypass' mode the internal FIFO is not in use, the codec is
working synchronously as a normal codec (it needs constant stream of
data on the digital interface).

b) The nSample mode implementation uses one interrupt line from DAC33 to
the host:
Alarm threshold is set to 10ms of audio data (limit by the driver
implementation).
DAC33 will signal an interrupt, when the FIFO level goes under the
Alarm threshold.
The host will write to nSample register a value (number of stereo
samples), to tell DAC33 how many samples it should read in a burst from
the host. When the DAC33 received the number of samples, it disables the
clocks on the I2S bus. When the FIFO use again goes under the Alarm
threshold, DAC33 signals the host with an interrupt, and the process is
repeated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:02:04 +01:00
Igor Grinberg 640fb39e38 ASoC: finally enable support for eXeda and CM-X300
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
CC: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC: alsa-devel@alsa-project.org
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:01:47 +01:00
Mark Brown d2058b0cd0 ASoC: Remove snd_soc_suspend_device()
The PM core will grow pm_link infrastructure in 2.6.33 which can be
used to implement the intended functionality of the ASoC-specific
device suspend and resume callbacks so drop them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-15 15:01:43 +01:00
Ben Dooks ed9d040d40 ASoC: S3C: Remove <plat/audio.h>
Remove the <plat/audio.h> include from arch/arm/plat-s3c/include/plat/audio.h
as it provides nothing to the current kernel and is not in any future plans
for the system.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-13 13:33:53 +01:00
Eero Nurkkala 8e8b2d676f ASoC: Serialize access to dapm_power_widgets()
Access to damp_power_widgets() is assumed to be single-threaded.
Concurrent accesses to dapm_power_widgets() may result in
unpredictable behavior.

Calls from:
close_delayed_work()
soc_codec_close()
soc_pcm_prepare()
soc_suspend()
soc_resume_deferred()
to snd_soc_dapm_stream_event() do not have the codec->mutex
taken to cover the call to dapm_power_widgets(). Thus, take
the mutex in these paths also to assure single-threaded use
of dapm_power_widgets().

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-13 13:33:02 +01:00
Peter Ujfalusi 814b7963e5 ASoC: TPA6130A2: Make tpa6130a2_power as static
The power for the amplifier should be handled internally
by the tpa6130a2 driver.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-12 13:40:54 +01:00
Mark Brown ebab1b1d07 ASoC: Minor fixups to tpa6130a2 driver
- Staticise ttpa6130a2_client.
- Remove unneeded cast from void.
- Use explict NULL rather than 0.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 19:13:47 +01:00
Peter Ujfalusi 493b67efff ASoC: TPA6130A2 amplifier driver
Driver for Texas Instruments TPA6130A2 stereo headphone
amplifier.

The driver provides playback gain control and also pre-defined
DAPM_HP widgets and DAPM routings for power management.

The DAPM_HP widget names are:
"TPA6130A2 Headphone Left"
"TPA6130A2 Headphone Right"

From soc machine drivers to use with the tpa6130a2 amplifier,
the tpa6130a2_add_controls has to be called, which adds the alsa
controls and the DAPM routing needed for the tpa6130a2.
After that the machine driver can connect the codec's output
with 'TPA6130A2 Left' and 'TPA6130A2 Right':

        {"TPA6130A2 Left", NULL, "CODEC LEFT OUT"},
        {"TPA6130A2 Right", NULL, "CODEC RIGHT OUT"},

Internally the left and right channels are powered separately.
When none of the channels are needed the amplifier is powered
down:
hard power: valid GPIO number is passed within platform data
soft power: Using the software shutdown of the amplifier

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 18:50:37 +01:00
Nicolas Ferre 69d2c2ae1d ASoC: at91sam9g20ek_2mmc board uses same audio connexion as at91sam9g20ek
The modified revision of at91sam9g20 Evaluation Kit rev. C and onwards share
with previous ones its audio connexion to Wolfson wm8731. Modify the SoC file
to extend the machine ID checking.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-09 12:41:55 +01:00
Mark Brown b727916a1f Merge branch 'for-2.6.32' into for-2.6.33 2009-10-08 10:45:09 +01:00
Mark Brown 6f775ba015 Merge branch 'upstream/wm8350' into for-2.6.32 2009-10-06 19:29:47 +01:00
Mark Brown 5b7dde3468 ASoC: WM8350 capture PGA mutes are inverted
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-10-06 19:27:56 +01:00
Mark Brown b266002abf ASoC: Remove absent SYNC and TDM DAI format options from i.MX SSI
These should be handled via set_tdm_slot() now and cause build
failures as-is.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 19:26:57 +01:00
Mark Brown 907bc6c7fc Merge branch 'for-2.6.32' into for-2.6.33 2009-10-06 16:01:27 +01:00
Mark Brown d2b247a8be ASoC: Add virtual enumeration support for DAPM muxes
Sometimes it is desirable to have a mux which does not reflect any
direct register configuration but which will instead only have an
effect implicitly (for example, as a result of changing which parts
of the device are powered up). Provide a virtual mux for this purpose.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 15:57:02 +01:00
Mark Brown 3a65577d21 ASoC: Push DAPM enumeration register change test out
Don't assume that enumerations are backed by registers when updating
mux power.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 13:04:41 +01:00
Mark Brown 1642e3d42a ASoC: Simplify code for DAPM widget updates
We don't need to check for an event callback since we also check for
an appropriate event flag when applying mux status changes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-06 13:04:30 +01:00
Mark Brown 2a0f5cb327 Merge branch 'for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into for-2.6.32 2009-10-06 12:11:09 +01:00
Mark Brown d4a8da910e Merge branch 'for-2.6.32' into for-2.6.33 2009-10-05 10:36:28 +01:00
Linus Torvalds f0a221ef47 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of ssh://master.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (21 commits)
  ALSA: usb - Use strlcat() correctly
  ALSA: Fix invalid __exit in sound/mips/*.c
  ALSA: hda - Fix / improve ALC66x parser
  ALSA: ctxfi: Swapped SURROUND-SIDE mute
  sound: Make keywest_driver static
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-B1VP
  ALSA: hda - Fix digita/analog mic auto-switching with IDT codecs
  ASoC: fix kconfig order of Blackfin drivers
  ALSA: hda - Added quirk to enable sound on Toshiba NB200
  ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
  ALSA: Don't assume i2c device probing always succeeds
  ALSA: intel8x0 - Mute External Amplifier by default for Sony VAIO VGN-T350P
  ALSA: echoaudio - Re-enable the line-out control for the Mia card
  ALSA: hda - Resurrect input-source mixer of ALC268 model=acer
  ALSA: hda - Analog Devices AD1984A add HP Touchsmart model
  ALSA: hda - Add HP Pavilion dv4t-1300 to MSI whitelist
  ALSA: hda - CD-audio sound for hda-intel conexant benq laptop
  ASoC: DaVinci: Correct McASP FIFO initialization
  ASoC: Davinci: Fix race with cpu_dai->dma_data
  ASoC: DaVinci: Fix divide by zero error during 1st execution
  ...
2009-10-03 11:25:30 -07:00
Takashi Iwai a1cb9cd697 Merge branch 'fix/asoc' into for-linus 2009-10-03 18:31:22 +02:00
Jonathan Cameron e655a43544 ASoC: wm8940: Fix check on error code form snd_soc_codec_set_cache_io
Fix for typo in commit 8d50e447d1
ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 16:10:55 +01:00
Peter Ujfalusi ce3e3737a3 ASoC: Improve the debugfs hierarchy
Change the way the debugfs entries are created:
If the codec->dev is valid, than use:
debugfs/asoc/{codec->name}.{dev_name(codec->dev)}/

if the codec->dev is NULL:
debugfs/asoc/{codec->name}/

as root for the debugfs entries.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 11:24:21 +01:00
Peter Ujfalusi eaeae5d9b7 ASoC: Fix SND_SOC_DAPM_LINE handling
Since the SND_SOC_DAPM_LINE can be input or output, additional check is
needed in order to determine if the widget is connected as input or
output.
When checking for connected outputs, if the widget is line, than check
if the sources list is not empty (line is connected as output)
For input endpoint check, when the widget is line, also check if the
sinks list is not empty (line is connected as input).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-02 11:23:21 +01:00
Peter Ujfalusi 88439ac793 ASoC: add support for multiple cards/codecs in debugfs
In order to support multiple codecs on the same system in the debugfs
the directory hierarchy need to be changed by adding directory per codec
under the asoc direcorty:

debugfs/asoc/{dev_name(socdev->dev)}-{codec->name}/codec_reg
                                                  /dapm_pop_time
                                                  /dapm/{widgets}

With the original implementation only the debugfs files are only
created for the first codec, other codecs loaded later would fail to
create the debugfs files (since they are already exist).
Furthermore in this situation any of the codecs has been removed, would
cause the debugfs entries to disappear, regardless if the codec, which
created them are still loaded (the one which loaded first).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-01 12:13:04 +01:00
Mark Brown 17c86a3207 Merge branch 'for-2.6.32' into for-2.6.33 2009-10-01 11:35:11 +01:00
Mark Brown f36c4045db Merge remote branch 'takashi/topic/asoc' into for-2.6.33 2009-10-01 11:33:37 +01:00
Mark Brown 834eb6c599 Merge remote branch 'takashi/fix/asoc' into for-2.6.32 2009-10-01 11:33:26 +01:00
Barry Song df1246d84a ASoC: fix kconfig order of Blackfin drivers
Some of the Blackfin options don't directly follow the kconfig options
they depend on, so kconfig is unable to display the proper tree.  So sort
the options such they expand/collapse properly.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-10-01 11:27:27 +01:00
Takashi Iwai 140318aaa9 ASoC: Fix snd_soc_dai_set_pll() calls in neo1973_*.c
Fix the missing argument of snd_soc_dai_set_pll() in neo1973_*.c,
which was forgotten in the commit 85488037bb.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 08:42:27 +02:00
Takashi Iwai c877c25170 ASoC: Fix dependency of CONFIG_SND_PXA2XX_SOC_IMOTE2
wm8940 requires I2C.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 08:33:47 +02:00
Takashi Iwai bb26276744 ASoC: Fix build errors of wm8711.c with SPI
Fix a couple of typos and a missing header file inclusion to build wm8711.c
properly with CONFIG_SPI_MASTER.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-01 07:39:45 +02:00
Mark Brown aa983d9d63 ASoC: Factor out analogue platform data from WM8993
This is also shared with newer CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 15:51:37 +01:00
Mark Brown 4c0bccbe66 Merge branch 'upstream/wm8974' into for-2.6.33 2009-09-30 15:48:38 +01:00
Mark Brown c36b2fc73a ASoC: Clean up WM8974 PLL configuration
Don't use a static for WM8974 PLL factors - we don't support more than
one device so it won't happen but no sense in leaving the race condition
hanging around.  Also, pre_div is a single bit and it's a bit simpler if
we move the handling of the factor of 4 in the output into the
coefficient setup.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 15:45:25 +01:00
Chaithrika U S 4fa9c1a595 ASoC: DaVinci: McASP FIFO related updates
The DMA params for McASP with FIFO has been updated so that it works for
various FIFO levels. A member- 'fifo_level' has been added to the DMA
params data structure. The fifo_level can be adjusted by the tx[rx]_numevt
platform data. This is relevant only for DA8xx/OMAP-L1xx platforms. This
implementation has been tested for numevt values 1, 2, 4, 8.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-30 13:43:55 +01:00
Graeme Gregory f34762b647 ASoC: pxa-ssp increase max_channels to 8
When running in TDM mode there can be more than 2 channels used. Datasheet has
figures for upto 8 channels so increase max_channels on all SSP interfaces to
this figure.

Signed-off-by: Graeme Gregory <dp@xora.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-25 10:17:33 -07:00
Mark Brown 2c9ee33d37 Merge branch 'for-2.6.32' into for-2.6.33 2009-09-23 10:54:06 -07:00
Chaithrika U S 539d3d8cbe ASoC: DaVinci: Correct McASP FIFO initialization
McASP write FIFO registers should be modified for playback and read FIFO
registers for capture. Check the PCM mode before manipulating the
FIFO registers. Currently, irrespective of playback/capture both the
FIFOs are enabled or disbaled. This resulted in errors in audio loopback
mode.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:37:08 -07:00
Troy Kisky 92e2a6f682 ASoC: Davinci: Fix race with cpu_dai->dma_data
This patch removes references to cpu_dai->dma_data.
It makes struct davinci_pcm_dma_params part of
struct davinci_mcbsp_dev or struct davinci_audio_dev.

It removes the unused name variable from davinci_pcm_dma_params.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:08:57 -07:00
Troy Kisky 81ac55aa14 ASoC: DaVinci: Fix divide by zero error during 1st execution
When both playback and capture stream were open
davinci_i2s_hw_params was setting parameters for
the wrong stream. The fix for davinci_i2s_hw_params
is sufficient, but it looks like a race still happens
in davici_pcm_open. This patch also makes the race smaller
but the next patch provides a better fix.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 10:08:56 -07:00
Linus Torvalds fe61c99a12 Merge branch 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
  ASoC: some minor changes for AD1836 and AD1938 codec drivers
  ASoC: DaVinci: Fixes to McASP configuration
  ASoC: Blackfin I2S: fix resuming when device hasn't been used
  ASoC: Blackfin I2S: add lost platform_device parameter to resume function
  ASoC: fix typos in Blackfin headers
  ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
  ASoC: Blackfin AC97: add a few missing multichannel define handling
2009-09-23 10:02:43 -07:00
Cliff Cai df0fd5e5e1 ASoC: Blackfin: fix inverted handling of SPORT0 on PORT F/G
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 09:10:01 -07:00
Barry Song 766df6d98f ASoC: Blackfin I2S: use dai state rather than local counter
Since the active field of the dai already tells us the stream activity,
the local counter variable is redundant and can be replaced.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-23 09:08:25 -07:00
Phil Vandry 877ae70763 ASoC: wm8753: fix mapping when MONOMIX is set to Stereo
When MONOMIX is set to Stereo, Left PGA was not powered on but should be.
Add a mapping from Capture Left Mux to Capture Left Mixer to fix the issue.

Signed-off-by: Phil Vandry <vandry@TZoNE.ORG>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:43 -07:00
Barry Song 98235a4bb0 ASoC: some minor changes for AD1836 and AD1938 codec drivers
1. delete redundant assignment to bus field in spi_driver structure
2. fix lost assignment to set_bias_level entry in ad1938 codec dai
3. change spi driver name of ad1836 from "ad1836-spi" to "ad1836"

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 16:58:33 -07:00
Joe Perches a419aef8b8 trivial: remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-09-21 15:14:58 +02:00
Mark Brown e0274b0a30 Merge branch 'upstream/wm8711' into for-2.6.33 2009-09-21 04:54:21 -07:00
Mark Brown d62ab35894 ASoC: Convert soc-cache to use C99 style initialisers for the table
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-21 04:21:47 -07:00
jassi brar d0f5fa17aa ASoC: Support WM8580 based audio subsystem on SMDK64xx machines
New machine driver for WM8580 I2S i/f on SMDK64XX.
By default SoC-Slave is set and WM8580 is configured to use it's
PLLA to generate clocks from a 12MHz crystal attached to WM8580.

[Added dependency on BROKEN since the IISv4 interface hasn't been merged
yet, fixed the PLL API usage and removed the disabling of the PLL in the
hw_free function since that'll break simultaneous playback and record
 -- broonie.]

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-19 16:28:54 +01:00
Linus Torvalds 6f128fa344 Merge branch 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci
* 'davinci-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-davinci: (62 commits)
  DaVinci: DM646x - platform changes for vpif capture and display drivers
  davinci: DM355 - platform changes for vpfe capture
  davinci: DM644x platform changes for vpfe capture
  davinci: audio: move tlv320aic33 i2c setup into board files
  DaVinci: EDMA: Adding 2 new APIs for allocating/freeing PARAMs
  DaVinci: DM365: Adding entries for DM365 IRQ's
  DaVinci: DM355: Adding PINMUX entries for DM355 Display
  davinci: Handle pinmux conflict between mmc/sd and nor flash
  davinci: Add NOR flash support for da850/omap-l138
  davinci: Add NAND flash support for DA850/OMAP-L138
  davinci: Add MMC/SD support for da850/omap-l138
  davinci: Add platform support for da850/omap-l138 GLCD
  davinci: Macro to convert GPIO signal to GPIO pin number
  davinci: Audio support for DA850/OMAP-L138 EVM
  davinci: Audio support for DA830 EVM
  davinci: Correct the number of GPIO pins for da850/omap-l138
  davinci: Configure MDIO pins for EMAC
  DaVinci: DM365: Add Support for new Revision of silicon
  DaVinci: DM365: Fix Compilation issue due to PINMUX entry
  DaVinci: EDMA: Updating default queue handling
  ...
2009-09-18 09:20:37 -07:00
Mark Brown 9f072b7b22 Merge branch 'for-2.6.32' into for-2.6.33 2009-09-18 15:09:44 +01:00
Jassi b1cd6b9ec7 ASoC: Return correct codec clock in s3c64xx-i2s
Instead of always returnig pointer to the 'audio-bus' clock,
check which clock is used to generate internal clocks and
then return it's pointer.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:09:37 +01:00
Chaithrika U S 0c31cf3e4a ASoC: DaVinci: Fixes to McASP configuration
McASP register settings are not correct for DSP mode of operation.
There is a channel swap initally. This patch provides fixes to
the register values for proper working.

Tested on DA830/OMAP-L137 EVM, DM6467 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:08:31 +01:00
Cliff Cai ad80efc469 ASoC: Blackfin I2S: fix resuming when device hasn't been used
If the sound system hasn't been utilized yet and we suspend, then we
attempt to save/restore using state that doesn't exist.  So use a global
handle instead to reconfigure properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-18 15:07:19 +01:00
Linus Torvalds b938fb6f49 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Fix MSI GX620 mixer
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ALSA: hda - Fix Dell S14 pin setup
  ALSA: hda - Fix IDT92HD83* codec setup
  ASoC: Fix display of stream name in DAPM debugfs
  ALSA: hda - Add support for HP dv6
  ALSA: hda - Fix HP/line-out initialization with IDT/STAC codecs
  ALSA: hda - Set default GPIO for IDT92HD71bxx
  ALSA: hda - Set default GPIO for STAC/IDT codecs
  ASoC: Clean up error handling in MPC5200 DMA setup
  ALSA: hda - Add missing model=auto entry for ALC269
2009-09-17 13:21:52 -07:00
Takashi Iwai 673bca1906 Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: remove unused #include <linux/version.h>
  ASoC: S3C lrsync function made to work with IRQs disabled.
  ASoC: Fix display of stream name in DAPM debugfs
  ASoC: Clean up error handling in MPC5200 DMA setup
2009-09-17 21:08:53 +02:00
Barry Song fab19bae0c ASoC: Blackfin I2S: add lost platform_device parameter to resume function
Commit dc7d7b830e trimmed the platform_device parameter from all of the
suspend functions, but it also accidentally removed it from the resume
function in the Blackfin I2S driver.  So restore it.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Barry Song 7d156a25bd ASoC: fix typos in Blackfin headers
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Mike Frysinger d75150d7c4 ASoC: bf5xx-sport: the irq save/restore funcs take an unsigned long
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:35 +01:00
Cliff Cai 79dfc96876 ASoC: Blackfin AC97: add a few missing multichannel define handling
Somewhere along the line, most of SND_BF5XX_MULTICHAN_SUPPORT handling was
merged, but two places were missed (the probe/resume functions).  Restore
handling of this option so it gets initialized properly.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-17 10:51:34 +01:00
Huang Weiyi d4e54e871f ASoC: remove unused #include <linux/version.h>
Remove unused #include <linux/version.h>('s) in
  sound/soc/codecs/ad1836.c
  sound/soc/codecs/ad1938.c
  sound/soc/codecs/wm8974.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-16 21:08:54 +01:00
Mark Brown 8bb0148955 ASoC: Add S3C64xx IIS CDCLK source selection
CDCLK can either be an output generated by the CPU, intended for use
as the CODEC master clock, or an input (probably from the CODEC)
providing a master clock for the IIS block.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-16 21:07:50 +01:00
Miguel Aguilar 9b95b16678 ASoC: Davinci: Add audio codec support for DM365 EVM
This patch enables tlv320aic3101 support on DM365 EVM and
it was tested on DM365 EVM rev c.

Note: this patch was created based on temp/asoc branch.

Signed-off-by: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 19:31:05 +01:00
Barry Song 08db48f1ee ASoC: use set_channel_map api to reorder channels for AD1938 and AD1836
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:33:59 +01:00
Jassi fd5ad654e6 ASoC: S3C I2S LRCLK polarity option.
1) Explicitly set LRCLK polarity for I2S Vs LSM/MSB modes.
2) Convert from numerical to bit-field values for BCLK selection.
3) Use proper error checking for return value from clk_get

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:33:55 +01:00
Jassi fa68e0025d ASoC: S3C lrsync function made to work with IRQs disabled.
s3c2412_snd_lrsync() maybe reached with IRQs disabled and if LRCLK
is dead due to improper initialization of CPU or CODEC, the system
gets stuck in the loop because jiffies may never get updated.
Implemented counter based wait mechanism for atleast the same
timeout period.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-15 13:26:14 +01:00
Linus Torvalds 2ca7d674d7 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (257 commits)
  [ARM] Update mach-types
  ARM: 5636/1: Move vendor enum to AMBA include
  ARM: Fix pfn_valid() for sparse memory
  [ARM] orion5x: Add LaCie NAS 2Big Network support
  [ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
  ARM: 5686/1: at91: Correct AC97 reset line in at91sam9263ek board
  ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board
  ARM: 5689/1: Update default config of HP Jornada 700-series machines
  ARM: 5691/1: fix cache aliasing issues between kmap() and kmap_atomic() with highmem
  ARM: 5688/1: ks8695_serial: disable_irq() lockup
  ARM: 5687/1: fix an oops with highmem
  ARM: 5684/1: Add nuc960 platform to w90x900
  ARM: 5683/1: Add nuc950 platform to w90x900
  ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform
  ARM: 5626/1: add suspend/resume functions to amba-pl011 serial driver
  ARM: 5625/1: fix hard coded 4K resource size in amba bus detection
  MMC: MMCI: convert realview MMC to use gpiolib
  ARM: 5685/1: Make MMCI driver compile without gpiolib
  ARM: implement highpte
  ARM: Show FIQ in /proc/interrupts on CONFIG_FIQ
  ...

Fix up trivial conflict in arch/arm/kernel/signal.c.

It was due to the TIF_NOTIFY_RESUME addition in commit d0420c83f ("KEYS:
Extend TIF_NOTIFY_RESUME to (almost) all architectures") and follow-ups.
2009-09-14 17:48:14 -07:00
Mark Brown 3eef08ba52 ASoC: Fix display of stream name in DAPM debugfs
Also display streams all the time while we're here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-14 16:56:25 +01:00
Barry Song 472df3cbae ASoC: Provide API for reordering channels
The patch adds an interface to set the relationship between audio
channel number and slot number. The interface should be really useful
because audio channel n doesn't always use slot n in all platforms. And
for some devices, the relationship even can change with sound mode
switch in 2.1,3.1,4.1,5.1,6.1,7.1 etc.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-13 12:37:53 +01:00
Julia Lawall 33d7f77850 ASoC: Clean up error handling in MPC5200 DMA setup
Error handling code following a kzalloc should free the allocated data.
Error handling code following an ioremap should iounmap the allocated data.

The semantic match that finds the first problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@r exists@
local idexpression x;
statement S;
expression E;
identifier f,f1,l;
position p1,p2;
expression *ptr != NULL;
@@

x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...x...+> }
(
x->f1 = E
|
 (x->f1 == NULL || ...)
|
 f(...,x->f1,...)
)
...>
(
 return \(0\|<+...x...+>\|ptr\);
|
 return@p2 ...;
)

@script:python@
p1 << r.p1;
p2 << r.p2;
@@

print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-12 13:41:50 +01:00
Russell King 87d721ad7a Merge branch 'master' into devel 2009-09-12 12:04:37 +01:00
Russell King ddd559b13f Merge branch 'devel-stable' into devel
Conflicts:
	MAINTAINERS
	arch/arm/mm/fault.c
2009-09-12 12:02:26 +01:00
Russell King cf7a2b4fb6 Merge branches 'arm', 'at91', 'bcmring', 'ep93xx', 'mach-types', 'misc' and 'w90x900' into devel 2009-09-12 12:01:34 +01:00
Takashi Iwai e0b3032bcd Merge branch 'topic/asoc' into for-linus
* topic/asoc: (226 commits)
  ASoC: au1x: PSC-AC97 bugfixes
  ASoC: Fix WM835x Out4 capture enumeration
  ASoC: Remove unuused hw_read_t
  ASoC: fix pxa2xx-ac97.c breakage
  ASoC: Fully specify DC servo bits to update in wm_hubs
  ASoC: Debugged improper setting of PLL fields in WM8580 driver
  ASoC: new board driver to connect bfin-5xx with ad1836 codec
  ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
  ASoC: davinci: i2c device creation moved into board files
  ASoC: Don't reconfigure WM8350 FLL if not needed
  ASoC: Fix s3c-i2s-v2 build
  ASoC: Make platform data optional for TLV320AIC3x
  ASoC: Add S3C24xx dependencies for Simtec machines
  ASoC: SDP3430: Fix TWL GPIO6 pin mux request
  ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
  ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
  ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
  OMAP: McBSP: Use textual values in DMA operating mode sysfs files
  ARM: OMAP: DMA: Add support for DMA channel self linking on OMAP1510
  ASoC: Select core DMA when building for S3C64xx
  ...
2009-09-10 15:32:40 +02:00
Joonyoung Shim 2312fd8f6b ASoC: AK4671: add ak4671 codec driver
The AK4671 is a stereo CODEC with a built-in Microphone-Amplifier,
Receiver-Amplifier and Headphone-Amplifier.

The datasheet for the ak4671 can find at the following url:
http://www.asahi-kasei.co.jp/akm/en/product/ak4671/ak4671_f01e.pdf

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-10 00:27:57 +01:00
Mark Brown 215edda3ad ASoC: Allow per-route connectedness checks for supplies
Some chips with complex internal supply (particularly clocking)
arragements may have multiple options for some of the supply
connections. Since these don't affect user-visible audio routing
the expectation would be that they would be managed automatically
by one of the drivers.

Support these users by allowing routes to have a connected function
which is queried before the connectedness of the path is checked as
normal. Currently this is only done for supplies, other widgets
could be supported but are not currently since the expectation for
them is that audio routing will be under the control of userspace.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-08 19:24:56 +01:00
Manuel Lauss cdc65fbe18 ASoC: au1x: PSC-AC97 bugfixes
This patch fixes the following bugs:

- only reprogram bitdepth if it has changed since last call to hw_params.
- add locking inside ac97_read/write functions:
  When reprogramming sample depth, the ac97 unit has to be disabled,
  which should not be done in the middle of codec register accesses.

- retry timed-out codec register accesses.

- wait for status bits to set/clear when starting/stopping various
  functional blocks; very important after reenabling AC97 unit else
  sound may be distorted (e.g. high-pitch noise in 1kHz sine wave).

- clear fifos before/after starting/stopping RX/TX.

- longer timeouts waiting for PSC/AC97 ready after cold reset
  with certain codecs this can take ridiculous amounts of time.

Run-tested on various Au1200 platforms with various codecs.

Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-08 19:21:27 +01:00
Mark Brown 87831cb660 ASoC: Fix WM835x Out4 capture enumeration
It's the 8th enum of a zero indexed array. This is why I don't let
new drivers use these arrays of enums...

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-09-07 18:56:24 +01:00
Joonyoung Shim 341c9b84bc ASoC: Factor out I2C 8 bit address 8 bit data I/O
This patch is for the AK4671 codec driver using this format.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-07 11:14:12 +01:00
Mark Brown 85488037bb ASoC: Add source argument to PLL configuration
More and more devices feature PLLs and FLLs with the ability to select
between multiple input clocks. In order to better support these devices
a new argument, source, has been added to the set_pll() configuration
API. Using set_clkdiv() is often difficult due to the need to stop the
PLL/FLL before any reconfiguration can be done.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-05 18:52:16 +01:00
Mark Brown 2eff31e809 ASoC: Fully specify DC servo bits to update in wm_hubs
Avoids potential issues if we read back unexpected values during
a read/modify/write cycle.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-02 19:36:22 +01:00
jassi brar 5c0d38c947 ASoC: Debugged improper setting of PLL fields in WM8580 driver
Bug was caught while trying to use WM8580 as I2S master on SMDK.
Symptoms were lesser LRCLK read by CRO(41.02 instead of 44.1 KHz) Solved
by referring to WM8580A manual and setting mask value correctly and
making the code to not touch 'reserved' bits of PLL4 register.

Signed-off-by: Jassi <jassi.brar@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-01 11:37:41 +01:00
Barry Song dce944dbb2 ASoC: new board driver to connect bfin-5xx with ad1836 codec
As discussed, the patch uses the original TDM order without rewriting.
For the match between TDM slot number and audio channel number, a new
API need be added.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-09-01 11:36:13 +01:00
Jarkko Nikula d2c0bdaa93 ASoC: OMAP: Add functionality to set CLKR and FSR sources in McBSP DAI
The McBSP1 port in OMAP3 processors (I believe OMAP2 too but I don't have
specifications to check it) have additional CLKR and FSR pins for McBSP1
receiver. Reset default is that receiver is using bit clock and frame
sync signal from those pins but it is possible to configure to use
also CLKX and FSX pins as well. In fact, other McBSP ports are doing that
internally that transmitter and receiver share the CLKX and FSX.

Add functionaly that machine drivers can set the CLKR and FSR sources by
using the snd_soc_dai_set_sysclk.

Thanks to "Aggarwal, Anuj" <anuj.aggarwal@ti.com> for reporting the issue.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-28 18:36:43 +01:00
Chaithrika U S f4890b5c04 ASoC: davinci: i2c device creation moved into board files
Also, the codec setup data structure has to remain for successful
probe.

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-08-28 10:33:10 +01:00
Mark Brown f1e887de2d ASoC: Don't reconfigure WM8350 FLL if not needed
If the requested FLL configuration is the one we're currently running
in it's at best pointless to reconfigure the FLL.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-26 15:27:57 +01:00
Mark Brown 5dc0748182 ASoC: Fix s3c-i2s-v2 build
We now need the PCM header to kick the DMA.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-26 15:27:57 +01:00
Mark Brown 977d49e00d ASoC: Make platform data optional for TLV320AIC3x
Now that we don't need the I2C address for the device the platform data
is redundant so allow it to be omitted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Chaithrika U S <chaithrika@ti.com>
2009-08-26 15:27:56 +01:00
Mark Brown bc36681fdc ASoC: Add S3C24xx dependencies for Simtec machines
No point in building them for S3C64xx, certainly no sense in running
into build issues there.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-26 15:27:56 +01:00
Sudhakar Rajashekhara 60902a2cb1 davinci: EDMA: multiple CCs, channel mapping and API changes
- restructure to support multiple channel controllers by using
  additional struct resources for each CC

- interface changes visible to EDMA clients

  Introduce macros to build IDs from controller and channel number,
  and to extract them. Modify the edma_alloc_slot function to take an
  extra argument for the controller.

  Also update ASoC drivers to use API.  ASoC changes
  Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

- Move queue related mappings to dm<soc>.c

  EDMA in DM355 and DM644x has two transfer controllers while DM646x
  has four transfer controllers. Moving the queue to tc mapping and
  queue priority mapping to dm<soc>.c will be helpful to probe these
  mappings from platform device so that the machine_is_* testing will
  be avoided.

- add channel mapping logic

  Channel mapping logic is introduced in dm646x EDMA. This implies
  that there is no fixed association for a channel number to a
  parameter entry number. In other words, using the DMA channel
  mapping registers (DCHMAPn), a PaRAM entry can be mapped to any
  channel. While in the case of dm644x and dm355 there is a fixed
  mapping between the EDMA channel and Param entry number.

Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Reviewed-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2009-08-26 10:56:56 +03:00
Candelaria Villareal, Jorge 30cd0c4ad5 ASoC: SDP3430: Fix TWL GPIO6 pin mux request
Fix the write to PMBR1 register through I2C. Also, the constant which
holds the value to write is now called TWL4030_GPIO6_PWM0_MUTE. This
name is based on TRM to avoid confusion.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25 19:30:32 +01:00
Shine Liu faf907c7ba ASoC: S3C platform: Fix s3c2410_dma_started() called at improper time
s3c24xx dma has the auto reload feature, when the the trnasfer is done,
CURR_TC(DSTAT[19:0], current value of transfer count) reaches 0, and DMA
ACK becomes 1, and then, TC(DCON[19:0]) will be loaded into CURR_TC. So
the transmission is repeated.

IRQ is issued while auto reload occurs. We change the DISRC and
DCON[19:0] in the ISR, but at this time, the auto reload has been
performed already. The first block is being re-transmitted by the DMA.

So we need rewrite the DISRC and DCON[19:0] for the next block
immediatly after the this block has been started to be transported.

The function s3c2410_dma_started() is for this perpose, which is called
in the form of "s3c2410_dma_ctrl(prtd->params->channel,
S3C2410_DMAOP_STARTED);" in s3c24xx_pcm_trigger().

But it is not correct. DMA transmission won't start until DMA REQ signal
arrived, it is the time s3c24xx_snd_txctrl(1) or s3c24xx_snd_rxctrl(1)
is called in s3c24xx_i2s_trigger().

In the current framework, s3c24xx_pcm_trigger() is always called before
s3c24xx_pcm_trigger(). So the s3c2410_dma_started() should be called in
s3c24xx_pcm_trigger() after s3c24xx_snd_txctrl(1) or
s3c24xx_snd_rxctrl(1) is called in this function.

However, s3c2410_dma_started() is dma related, to call this function we
should provide the channel number, which is given by
substream->runtime->private_data->params->channel. The private_data
points to a struct s3c24xx_runtime_data object, which is define in
s3c24xx_pcm.c, so s3c2410_dma_started() can't be called in s3c24xx_i2s.c

Fix this by moving the call to signal the DMA started to the DAI
drivers.

Signed-off-by: Shine Liu <liuxian@redflag-linux.com>
Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25 13:09:05 +01:00
Jarkko Nikula d09a2afc93 ARM: OMAP: McBSP: Merge two functions into omap_mcbsp_start/_stop
Functionality of functions omap_mcbsp_xmit_enable and omap_mcbsp_recv_enable
can be merged into omap_mcbsp_start and omap_mcbsp_stop since API of
those omap_mcbsp_start and omap_mcbsp_stop was changed recently allowing
to start and stop individually the transmitter and receiver.

This cleans up the code in arch/arm/plat-omap/mcbsp.c and in
sound/soc/omap/omap-mcbsp.c which was the only user for those removed
functions.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25 10:20:48 +01:00
Jarkko Nikula 32080af7a6 ASoC: OMAP: Fix setup of XCCR and RCCR registers in McBSP DAI
Commit ca6e2ce086 is setting up few XCCR and
RCCR bits for I2S and DPS_A formats. Part of the bits are already set
for all formats and I believe that XDISABLE and RDISABLE bits are
format independent.

As XCCR and RCCR are found only from OMAP2430 and OMAP34xx, I move setup
of XDISABLE and RDISABLE to where those cpu's are tested and remove format
dependent part for simplicity.

Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-25 10:20:48 +01:00
Mark Brown e4aa8dd5ca Merge branch 'topic/digital-mixing' into for-2.6.32 2009-08-24 20:44:41 +01:00
Mark Brown 239a22aaa9 ASoC: Select core DMA when building for S3C64xx
Ensure that the core DMA support is available when building for
S3C64xx.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-24 20:42:48 +01:00
Takashi Iwai c6ea2af76a ASoC: Remove unneeded inclusion of linux/regulator/consumer.h
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-24 09:41:32 +02:00
Takashi Iwai 20496ff378 ASoC: add missing inclusion of debugfs.h
To fix compile errors.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-08-24 09:41:05 +02:00
Marek Vasut e2365bf313 ASoC: Pass correct platform data from pxa2xx-ac97
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-23 18:18:01 +01:00
Roel Kluin 821ebc86ef ASoC: free socdev if init_card() fails in wm9705_soc_probe()
Free socdev if snd_soc_init_card() fails.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-23 10:41:06 +01:00
Mark Brown 79fb9387f8 ASoC: Add DAPM widget power decision debugfs files
Currently when built with DEBUG DAPM will dump information about
the power state decisions it is taking for each widget to dmesg.
This isn't an ideal way of getting the information - it requires
a kernel build to turn it on and off and for large hub CODECs the
volume of information is so large as to be illegible. When the
output goes to the console it can also cause a noticable impact
on performance simply to print it out.

Improve the situation by adding a dapm directory to our debugfs
tree containing a file per widget with the same information in
it. This still requires a decision to build with debugfs support
but is easier to navigate and much less intrusive.

In addition to the previously displayed information active streams
are also shown in these files.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 17:17:59 +01:00
Kuninori Morimoto b8e583f601 ASoC: Add FSI-AK4642 sound support for SuperH
This patch is tested by ms7724se

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 11:02:03 +01:00
Kuninori Morimoto a3a83d9a7c ASoC: Add ak4642/ak4643 codec support
This is very simple driver for ALSA
It supprt headphone output and stereo input only
This patch is tested by ms7724se

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 10:54:02 +01:00
Ben Dooks b2ec22e263 ASoC: S3C24XX: Support for Simtec Hermes boards
Add support for the tlv320aic3x CODEC on the Simtec Hermes board.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 10:53:06 +01:00
Ben Dooks aa6b904e66 ASoC: tlv320aic3x: fixup board device changes
Fixup the device changes by modifying the files that we just removed the
explicit device creation from with i2c_register_board_info() until this
can be moved into the relevant board files.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 10:52:57 +01:00
Ben Dooks cb3826f524 ASoC: tlv320aic3x: Change to use device model
The tlv320aic3x driver managed its own i2c device, instead of an extant
one created by the board support code. Change the code to make it so that
the driver binds to an extant (in this case i2c) device.

Add explict tlv320aic33 as well as tlv320aic3x to the supported device
table and remove the old driver bindings from the users of this code.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 10:52:49 +01:00
Ben Dooks 14412acde5 ASoC: S3C24XX: Add audio core and tlv320aic23 for Simtec boards
Add core support for the range of S3C24XX Simtec boards with TLV320AIC23
CODECs on them. Since there are also boards with similar IIS routing the
AMP and the configuration code is placed in a core file for re-use with
other CODEC bindings.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-21 10:52:42 +01:00
Eduardo Valentin a0a499c579 ASoC: OMAP: Use DMA operating mode of McBSP
Configures DMA sync mode depending on McBSP operating mode value.
The value is configurable by McBSP instance. So, depending
on McBSP operating mode, the DMA sync mode is passed from
omap-mcbsp to omap-pcm. Besides that, it also configures
McBSP threshold value depending on which McBSP mode is activated.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:29 +01:00
Eduardo Valentin caebc0cb3b ASoC: OMAP: Use McBSP threshold to playback and capture
This patch changes the way DMA is done in omap-pcm.c
in order to reduce power consumption. There is no need
to have so much SW control in order to have DMA in idle
state during audio streaming. Configuring McBSP threshold value
and DMA to FRAME_SYNC are sufficient.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:29 +01:00
Eero Nurkkala ca6e2ce086 ASoC: Always syncronize audio transfers on frames
All these steps are required for ASoC to behave correctly.
rccr and xccr are format dependent, for example TDM audio
has different values than I2S or DSP_A. Also the
omap_mcbsp_xmit_enable and/or omap_mcbsp_recv_enable must
be called right after the DMA has started.
This provides no longer L and R channels switching at random.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:29 +01:00
Eero Nurkkala c721bbdad7 ASoC: Add runtime check for RFIG and XFIG
This is, no RFIG or XFIG (Not defined in 34xx), correct
initiliazation of rccr and xccr.

Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:28 +01:00
Eduardo Valentin a152ff24b9 ASoC: OMAP: Make DMA 64 aligned
Align DMA address to DMA burst transaction sizes.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:28 +01:00
Eduardo Valentin 9599d485cb ASoC: OMAP: Enable DMA burst mode
Improve DMA transfers by enabling Burst transaction.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:10:28 +01:00
Kuninori Morimoto a4d7d550a9 ASoC: Add SuperH FSI driver support for ALSA
This driver is very simple.
It support playback only now.
This patch is tested by ms7724se board.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 20:01:42 +01:00
Shine Liu f61c890ec6 ASoC: S3C24XX : Align the peroid size to the buffer size
> Then it's a driver bug.  If unaligned period size is allowed, it means
> that the irq is really generated in that period, not at the buffer
> boundary.  Otherwise, it must have a proper hw-constraint to align the
> period size to the buffer size.

This patch will fix the bug metioned in the above mail. Force the peroid
size to be aligned with the buffer size.

Based and tested on linux-2.6.31-rc6.

Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-20 19:42:40 +01:00
Mark Brown 474e09ca01 ASoC: Provide default set_bias_level() implementation
If the CODEC does not provide a set_bias_level() then update the
bias_level variable for it since other parts of the system expect
that to be maintained.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-19 14:18:53 +01:00
Mark Brown b5ab887e6d ASoC: Add TLV information to WM8711
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 21:29:31 +01:00
Mark Brown 431f777177 ASoC: WM8711 minor cleanups
Coding style changes only.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 21:17:34 +01:00
Mark Brown 08aff8cd7a ASoC: Add SPI support to WM8711
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 21:15:14 +01:00
Mark Brown d97d2e35b9 ASoC: Factor out WM8711 cache I/O
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 21:12:30 +01:00
Mark Brown f72222c74b Merge branch 'topic/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 into upstream/wm8711 2009-08-18 20:59:01 +01:00
Mark Brown 318b0b8d90 ASoC: Update WM8711 to driver model registration method
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 20:57:33 +01:00
Mike Arthur bd6d417743 ASoC: Add WM8711 CODEC driver
The WM8711 or WM8711L (WM8711/L) is a low power stereo DAC with an
integrated headphone driver. The WM8711/L is designed specifically for
portable MP3 audio and speech players. The WM8711/L is also ideal for
MD, CD machines and DAT players.

Signed-off-by: Mike Arthur <Mike.Arthur@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 20:37:49 +01:00
Mark Brown 59ae07a580 ASoC: WM8993 digital mixing support
The WM8993 provides digital sidetone paths and also allows each
channel on the audio interface to be routed separtately to the
DACs and ADCs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 16:06:13 +01:00
Mark Brown 010ff26226 ASoC: Add input and output AIF widgets
Currently DAPM interfaces with the audio streams to and from the
processor at the DAC and ADC widgets. As the digital capabilities
of parts increases this is becoming a less and less able to meet
the needs of parts.

To meet the needs of these devices create new widgets interfacing
with the TDM bus but not integrated into any other functionality.
Audio can then be routed to and from these widgets using existing
routing widgets.

A slot number is provided in the definition but this is currently
not used yet. This is intended to support devices which can use
more than one TDM slot on a single interface.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 16:06:08 +01:00
Mark Brown d1a5e44b89 ASoC: Remove duplicate ADC/DAC widgets from wm_hubs.c
These need to be in the CODEC since the DAIs supported by the CODECs
aren't static.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 16:04:24 +01:00
Mark Brown b2472b1d4c ASoC: Reenable S3C64xx I2S support
Joonyoung Shim reports that S3C64xx I2S is working on the NCP boards so
allow it to be selected in Kconfig.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmciro.com>
2009-08-18 16:02:59 +01:00
Joonyoung Shim 0914b93f4f ASoC: Fix data format configuration for S3C64XX IISv2
The data format configuration for S3C64xx IISv2 was hardcoded for IISMOD
register. This patch changes to the defined values it.

And instead of bits 9 and 10 of IISMOD we should clear bits 13 and 14.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-18 16:02:36 +01:00
Mark Brown d3c9e9a139 ASoC: Implement TDM configuration for WM8993
Note that the number of slots used internally is specified in terms
of stereo slots while the external API works with mono slots.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 18:53:50 +01:00
Mark Brown 0182dcc52c ASoC: Fix WM8993 MCLK configuration for high frequency MCLKs
When used without the PLL we were accidentally clearing the MCLK/2
divider, resulting in a double rate SYSCLK when the divider should
have been used.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 18:53:44 +01:00
Mark Brown 1ca04065c3 ASoC: Power speakers and headphones simultaneously
Speaker and headphone outputs do not need to be handled separately
since they can't be part of the same path.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 16:26:59 +01:00
Mark Brown b14b76a56e ASoC: Fix handling of bias levels for non-DAPM codecs
If the system doesn't have any DAPM widgets then we can't use their
state to check if the bias level for the codec should be up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 12:57:59 +01:00
Shine Liu 0c093fb542 ASoC: UDA134X: Fix mistaken mute/unmute code
There is a mistake in current uda134x_mute function: mute_reg has been
changed in line 162 or line 164, so uda134x_write should write
"mute_reg" but not "mute_reg & ~(1<<2)" to
UDA134X_DATA010.

Signed-off-by: Shine Liu <shinel@foxmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 12:56:57 +01:00
Janusz Krzysztofik 471e3dec3a ASoC: OMAP: Enhance OMAP1510 DMA progress software counter
Enhance period_index accuracy, particularly just before buffer rewind, by
making use of DMA interrupt status flags in addition to simply counting up
interrupts.

Created against linux-2.6.31-rc5.

Tested on Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-17 11:00:34 +01:00