Commit Graph

1006 Commits

Author SHA1 Message Date
Mark Brown 246d0a17f5 ASoC: Add power supply widget to DAPM
Many modern CODECs have shared resources on chip which must be enabled
for portions of the chip to work but which can be disabled at other times
in order to achieve power savings. Examples of such resources include
power supplies and some internal clocks.

Since these widgets are dependencies for the audio path but do not carry
audio signals they require slightly different handling to most widgets -
they do not contribute to the audio path and so should not be counted as
either inputs or outputs during path walks.

Cases where one supply provides a supply for another will require
additional work. There is also room for more optimisation of the graph
walking to avoid repeated checks for the same thing.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 19:10:13 +01:00
Joonyoung Shim 1b4246a1fc ASoC: OMAP: Add checking to detect bufferless pcms
Add checking in hw_params and prepare to detect bufferless pcms(i.e. BT
<--> codec).

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 16:57:18 +01:00
Mark Brown ccb077fd46 ASoC: Fix WM8580 volume update handling for large register changes
The driver is out of sync with the core functions it is using.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-22 10:52:18 +01:00
Mark Brown ce88168f5b ASoC: Fix offset of freqmode in WM8580 PLL configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-04-21 16:18:01 +01:00
Takashi Iwai f22d806b6c Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: Fix warning in wm9705
  ASoC: OMAP: Update contact addresses
  ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
2009-04-21 07:42:49 +02:00
Mark Brown b75576d76d ASoC: Make the DAPM power check an operation on the widget
Rather than having switch statements at point of use make the DAPM
power check a member of the widget structure and set it when we
instantiate the widget.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:48 +01:00
Mark Brown 6ea31b9f0a ASoC: Factor out DAPM power checks for DACs and ADCs
This also switches us to using a switch statement for the widget type
in dapm_power_widget().

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:41 +01:00
Mark Brown cd0f2d4736 ASoC: Factor out generic widget power checks
This will form a basis for further power check refactoring: the overall
goal of these changes is to allow us to check power separately to
applying it, allowing improvements in the power sequencing algorithms.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 18:09:33 +01:00
Russell King 64bd43a086 Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-04-20 14:03:04 +01:00
Mark Brown 9b5b0c0159 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-20 12:45:40 +01:00
Joonyoung Shim 7154b3e802 ASoC: TWL4030: Add support Voice DAI
Add Voice DAI to support the PCM voice interface of the twl4030 codec.

The PCM voice interface can be used with 8-kHz(voice narrowband) or
16-kHz(voice wideband) sampling rates, and 16bits, and mono RX and mono
TX or stereo TX.

The PCM voice interface has two modes
 - PCM mode1 : This uses the normal FS polarity and the rising edge of
               the clock signal.
 - PCM mode2 : This uses the FS polarity inverted and the falling edge
               of the clock signal.

If the system master clock is not 26MHz or the twl4030 codec mode is not
option2, the voice PCM interface is not available.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-20 12:44:24 +01:00
Marek Vasut e91fb9137d [ARM] pxa/palm27x: General fix for Palm27x aSoC driver
Firstly, this patch makes the palm27x asoc driver a little more sane. Also,
since all affected devices use GPIO95 as AC97_nRESET, this patch sets that
properly. Affected are PalmT5, TX and LifeDrive.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
2009-04-19 21:56:54 +08:00
Takashi Iwai 1e2ae4ddd3 Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
  ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
  ASoC: Fix include build error in s3c2412-i2s.c
  ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
  ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
  ASoC: Fix jive_wm8750.c build problems
  ASoC: pxa-ssp: allow setting of dai format 0
2009-04-19 11:39:38 +02:00
Russell King - ARM Linux 516ef69f16 ASoC: Fix warning in wm9705
I notice that the fixes were merged, minus one:

sound/soc/codecs/wm9705.c: At top level:
sound/soc/codecs/wm9705.c:445: warning: initialization from incompatible pointer type

so you might find this trivial patch useful.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-18 10:45:10 +01:00
Peter Ujfalusi 6b87a91f54 ASoC: TWL4030: Fix for the constraint handling
The original implementation of the constraints were good against sane
applications.
If the opening sequence is:
stream1_open, stream1_hw_params, stream2_open, stream2_hw_params -> the
constraints are set correctly for stream2.

But if the sequence is:
stream1_open, stream2_open, stream2_hw_params, stream1_hw_params -> than stream2
would receive constraint rate = 0, sample_bits = 0, since the stream1 has not
yet called hw_params...

The command to trigger this event:
gst-launch-0.10 alsasrc device=hw:0 ! alsasink device=hw:0 sync=false

This patch does some 'black magic' in order to always set the correct
constraints and sets it only when it is needed for the other stream.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 16:02:23 +01:00
Jarkko Nikula b08f7a62ca ASoC: OMAP: Update contact addresses
My email address is going to expire soon so update it. Adding also
Peter Ujfalusi <peter.ujfalusi@nokia.com> as a second contact to OMAP core
drivers since I won't have anymore access to non-public OMAP documentation
in the future and Peter is working with these drivers as well.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 15:55:09 +01:00
Philipp Zabel 1a29728686 ASoC: pxa-ssp: Don't use SSCR0_SerClkDiv and SSCR0_SCR
Those macros are just screwed as soon as CONFIG_PXA25x is enabled.

This patch
- changes ssp_set_scr to take an ssp_dev pointer instead of ssp_device
- adds a corresponding ssp_get_scr function.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-17 15:55:08 +01:00
Mark Brown 8d98f2246d Merge branch 'for-2.6.30' into for-2.6.31 2009-04-16 14:14:35 +01:00
Peter Ujfalusi 3ba191ce05 ASoC: OMAP: Add DSP_A mode support for mcbsp
DSP_A mode is similar to the DSP_B, but the MSB is delayed with
one bclk (appears after the FS pulse and not under it).

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 14:04:10 +01:00
Peter Ujfalusi c29b206ffd ASoC: OMAP: Use single-phase for DSP mode
Use single-phase mode for the DSP mode and keep the dual phase
mode for the I2S mode.

The mono (1 channel) mode already used single phase mode,
now it is more cleaner. There is no need to configure the
second phase, when the single phase is used.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 14:04:09 +01:00
Jarkko Nikula 002fbad829 ASoC: OMAP: Fix FS polarity in OSK5912 machine driver
Using inverted FS polarity in OSK5912 must be an error since TLV320AIC23
do not have support for inverted polarities. This is mostly due the hassle
with the DSP formats in OMAP McBSP DAI and inversion on OMAP side probably
just made this configuration working at some point.

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>
2009-04-16 13:37:26 +01:00
Jarkko Nikula 36ce858245 ASoC: OMAP: Fix DSP_B format in OMAP McBSP DAI driver
The DSP format wasn't still correct in OMAP McBSP DAI even after the commit
bd25867a6c.

Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being
part of the fix. Now the FS length definition is more clear by defining
it with  FWID(0).

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 76fff36802 ASoC: Fix include build error in s3c2412-i2s.c
Fix accidental change of <mach/regs-gpio.h> to
<plat/regs-gpio.h> in s3c2412-i2s.c

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 3715c6aaa9 ASoC: Fix s3c-i2s-v2.c snd_soc_dai changes
Fix the build error in s3c-i2s-v2.c caused by
a change to the snd_soc_dai ops field.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 1d2b7ae9a0 ASoC: s3c-i2s-v2.c fix for s3c_i2sv2_iis_calc_rate
The definition of s3c_i2sv2_iis_calc_rate was never
renamed from s3c2412_iis_calc_rate, so rename this
to allow the build to work.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:26 +01:00
Ben Dooks 01c4cad4f7 ASoC: Fix jive_wm8750.c build problems
Fix build errors in sound/soc/s3c24xx/jive_wm8750.c
from changes to ASoC.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:25 +01:00
Daniel Mack a5735b7ede ASoC: pxa-ssp: allow setting of dai format 0
pxa_ssp_set_dai_fmt() currently has an early exit if the desired format
equals the current configuration. This is correct behaviour unless this
function is called with a zero value parameter for the first time.
Zero is a valid value for this function, but the early exit is bogus in
this case.

Hence, set priv->dai_fmt to -1 in the beginning so we can configure the
port.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 13:37:25 +01:00
Mark Brown 0d960e8891 ASoC: Request shared rates for WM8903
It has a shared LRCLK.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:11 +01:00
Mark Brown fd5dfad9cf ASoC: Volume controls are never of boolean type
Some limited volume controls (mostly simple attenuations) have only two
settings so the ASoC info functions misreport them as booleans. Since
we currently have no better information check for " Volume" in the
control name and always report any controls matching as being integer.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:10 +01:00
Mark Brown 3f1a4d8267 ASoC: Check we have DAI ops when calling via accessor functions
Also make sure we're checking for the right operation while we're here.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-16 11:03:09 +01:00
Eric Miao 5e901b37e4 [ARM] pxa/magician: remove un-necessary #include of pxa-regs.h and hardware.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-15 10:53:45 +08:00
Mark Brown 6967963d6d Merge branch 'for-2.6.30' into for-2.6.31 2009-04-14 13:22:37 +01:00
Takashi Iwai 34e51ce60a Merge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-04-14 11:48:25 +02:00
Mark Brown 9b1a88c710 Merge branch 'for-2.6.30' into for-2.6.31 2009-04-13 15:12:48 +01:00
Mark Brown f2644a2c00 ASoC: Add WM8960 CODEC driver
The WM8960 is a low power, high quality stereo codec designed for
portable digital audio applications.

Stereo class D speaker drivers provide 1W per channel into 8W loads.
Guaranteed low leakage, excellent PSRR and pop/click suppression
mechanisms enable direct battery connection for the speaker supply.

The device also integrates a complete microphone interface and a stereo
headphone driver. External component requirements are drastically
reduced as no separate microphone, speaker or headphone amplifiers are
required. Advanced on-chip digital signal processing performs automatic
level control for the microphone or line input.

Stereo 24-bit sigma-delta ADCs and DACs are used with low power
over-sampling digital interpolation and decimation filters and a
flexible digital audio interface.

The master clock can be input directly or generated internally by an
onboard PLL, supporting most commonly-used clocking schemes.

This driver was originally written by Liam Girdwood, with substantial
subsequent additions and updates for feature completeness and changes in
the ASoC framework from me.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 15:11:46 +01:00
Daniel Ribeiro a820532002 ASoC: pxa-ssp.c fix clock/frame invert
SCMODE(0): Data Driven (Falling), Data Sampled (Rising), Idle State (Low)
SCMODE(1): Data Driven (Rising), Data Sampled (Falling), Idle State (Low)
SCMODE(2): Data Driven (Rising), Data Sampled (Falling), Idle State (High)
SCMODE(3): Data Driven (Falling), Data Sampled (Rising), Idle State (High)

SCMODE(3) does not invert the clock polarity compared to the default SCMODE(0).

This patch also adds all possible NF/IF, NB/IB combinations to the DSP_A and
DSP_B modes.

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 13:23:03 +01:00
Mark Brown 6bbcb459cd ASoC: Move the WM9713 voice DAC powerdown to a DAPM event
This ensures that we sync with the DAPM powerdown sequencing properly
and don't need to bounce the power on the voice DAC so often.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Mark Brown f6d655a6e6 ASoC: Support DAPM events for DACs and ADCs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Mark Brown 025756eca4 ASoC: Factor out application of power for generic widgets
This is simple code motion, intended to support future refactoring of
the DAPM algorithms and (more immediately) the additon of events for
DACs and ADCs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Mark Brown f4976116a9 ASoC: WM9713 requires symmetric rates on the voice DAI
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-13 11:59:01 +01:00
Alexander Beregalov f4c1724f34 ASoC: n810: replace BUG() with BUG_ON()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-12 10:33:15 +01:00
Mark Brown 6e498d5eb6 ASoC: Disable S3C64xx support in Kconfig
Due to the process and communications issues with the 2.6.30 S3C
platform merges none of the underlying arch/arm code for S3C64xx audio
support made it into mainline, rendering the drivers useless.  Disable
them in Kconfig to avoid user confusion - users patching in the required
support can always reenable this too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-09 16:40:41 +01:00
Peter Ujfalusi 894bf92fde ASoC: tlv320aic23: add DSP_A format support
Add DSP_A interface format support by setting the LRP bit in
DSP mode.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-09 13:36:54 +01:00
Eric Miao fd2bd98818 ASoC: magician: remove un-necessary #include of pxa-regs.h and hardware.h
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-09 13:24:19 +01:00
Mark Brown 299a759203 Merge branch 's6000' into for-2.6.31 2009-04-07 18:51:34 +01:00
Mark Brown 5409fb4e32 ASoC: Add WM8988 CODEC driver
The WM8988 is a low power, high quality stereo CODEC designed for
portable digital audio applications.

The device integrates complete interfaces to 2 stereo headphone or line
out ports. External component requirements are drastically reduced as no
separate headphone amplifiers are required. Advanced on-chip digital
signal processing performs graphic equaliser, 3-D sound enhancement and
automatic level control for the microphone or line input.

The WM8988 can operate as a master or a slave, with various master clock
frequencies including 12 or 24MHz for USB devices, or standard 256fs
rates like 12.288MHz and 24.576MHz. Different audio sample rates such as
96kHz, 48kHz, 44.1kHz are generated directly from the master clock
without the need for an external PLL.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-07 18:51:23 +01:00
Mark Brown 06f409d76f ASoC: Provide core support for symmetric sample rates
Many devices require symmetric configurations of capture and playback
data formats, often due to shared clocking but sometimes also due to
other shared playback and record configuration in the device. Start
providing core support for this by allowing the DAIs or the machine
to specify that the sample rates used should be kept symmetric.

A flag symmetric_rates is provided in the snd_soc_dai and
snd_soc_dai_link structures. If this is set in either of the DAIs or in
the machine then a constraint will be applied when a stream is already
open preventing any changes in sample rate.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-07 18:51:22 +01:00
Mark Brown 6553e192d4 ASoC: Display return code when failing to add a DAPM kcontrol
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-07 18:51:22 +01:00
Linus Torvalds 985c0cd3f7 Merge branch 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6
* 'for-2.6.30' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6:
  ASoC: TWL4030: Compillation error fix
2009-04-07 08:54:43 -07:00
Linus Torvalds 81d91acf8c 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: (36 commits)
  ALSA: hda - Add VREF powerdown sequence for another board
  ALSA: oss - volume control for CSWITCH and CROUTE
  ALSA: hda - add missing comma in ad1884_slave_vols
  sound: usb-audio: allow period sizes less than 1 ms
  sound: usb-audio: save data packet interval in audioformat structure
  sound: usb-audio: remove check_hw_params_convention()
  sound: usb-audio: show sample format width in proc file
  ASoC: fsl_dma: Pass the proper device for dma mapping routines
  ASoC: Fix null dereference in ak4535_remove()
  ALSA: hda - enable SPDIF output for Intel DX58SO board
  ALSA: snd-atmel-abdac: increase periods_min to 6 instead of 4
  ALSA: snd-atmel-abdac: replace bus_id with dev_name()
  ALSA: snd-atmel-ac97c: replace bus_id with dev_name()
  ALSA: snd-atmel-ac97c: cleanup registers when removing driver
  ALSA: snd-atmel-ac97c: do a proper reset of the external codec
  ALSA: snd-atmel-ac97c: enable interrupts to catch events for error reporting
  ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
  ALSA: snd-atmel-ac97c: do not overwrite OCA and ICA when assigning channels
  ALSA: snd-atmel-ac97c: remove dead break statements after return in switch case
  ALSA: snd-atmel-ac97c: cleanup register definitions
  ...
2009-04-07 08:53:38 -07:00
Yang Hongyang 284901a90a dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:11 -07:00
Peter Ujfalusi d6648da122 ASoC: TWL4030: Compillation error fix
Fix for compillation error introduced by the constrain patch.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-07 10:52:00 +01:00
Takashi Iwai e50a96e7c2 Merge branch 'topic/asoc' into for-linus 2009-04-07 04:17:31 +02:00
Anton Vorontsov 5c15a6869a ASoC: fsl_dma: Pass the proper device for dma mapping routines
The driver should pass a device that specifies internal DMA ops, but
substream->pcm is just a logical device, and thus doesn't have arch-
specific dma callbacks, therefore following bug appears:

  Freescale Synchronous Serial Interface (SSI) ASoC Driver
  ------------[ cut here ]------------
  kernel BUG at arch/powerpc/include/asm/dma-mapping.h:237!
  Oops: Exception in kernel mode, sig: 5 [#1]
  ...
  NIP [c02259c4] snd_malloc_dev_pages+0x58/0xac
  LR [c0225c74] snd_dma_alloc_pages+0xf8/0x108
  Call Trace:
  [df02bde0] [df02be2c] 0xdf02be2c (unreliable)
  [df02bdf0] [c0225c74] snd_dma_alloc_pages+0xf8/0x108
  [df02be10] [c023a100] fsl_dma_new+0x68/0x124
  [df02be20] [c02342ac] soc_new_pcm+0x1bc/0x234
  [df02bea0] [c02343dc] snd_soc_new_pcms+0xb8/0x148
  [df02bed0] [c023824c] cs4270_probe+0x34/0x124
  [df02bef0] [c0232fe8] snd_soc_instantiate_card+0x1a4/0x2f4
  [df02bf20] [c0233164] snd_soc_instantiate_cards+0x2c/0x68
  [df02bf30] [c0234704] snd_soc_register_platform+0x60/0x80
  [df02bf50] [c03d5664] fsl_soc_platform_init+0x18/0x28
  ...

This patch fixes the issue by using card's device instead.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-06 23:35:42 +01:00
Daniel Glöckner 80fbe6ac9b ASoC: correct s6000 I2S clock polarity
According to the data sheet data is clocked out on the falling edge
and latched on the rising edge of the bit clock. While the left sample
is transmitted the word clock line is low.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-06 11:18:39 +01:00
Dan Carpenter 09318c47b6 ASoC: Fix null dereference in ak4535_remove()
ak4535_remove() from sound/soc/codecs/ak4535.c calls
i2c_unregister_device() with a possibly null pointer.

This bug was found by smatch (http://repo.or.cz/w/smatch.git/).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-06 10:53:37 +01:00
Takashi Iwai b114701c0e Merge branch 'topic/asoc' into for-linus 2009-04-06 03:47:20 +02:00
Daniel Glöckner 2b7dbbe0c9 ASoC: s6105 IP camera machine specific ASoC code
This patch adds machine specific code for the audio part of the Stretch
s6105 IP camera reference design.

The device uses the tlv320aic31(01) codec to generate the clock for
both I2S ports of the soc. While the master clock is generated by a
configurable PLL chip, the code assumes the factory default settings.

An additional kcontrol has been added to handle the special routing of
the board, connecting both HPLCOM and HPROUT to the same pin of the audio
jack. One of these should always be switched off.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-04 15:29:01 +01:00
Daniel Glöckner 4b166da939 ASoC: Add driver for s6000 I2S interface
This patch adds a driver for the I2S interface found on Stretch s6000
family processors.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-04 15:28:22 +01:00
Peter Ujfalusi 103f211d0b ASoC: TWL4030: Add actual support for 96KHz playback support
Adds the needed code to be able to use 96KHz playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-03 12:48:40 +01:00
Mark Brown 0a11b16853 ASoC: Implement suspend and resume operations for WM9705
Without this the WM9705 driver fails badly when resuming.

Tested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:37 +01:00
Mark Brown 4ac5c61f0f ASoC: Set parent for AC97 devices we register
Ensure that any AC97 devices that bind to the CODEC are below the
ASoC device in the device tree so the suspend and resume code can
figure out what order to handle them in.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:37 +01:00
Mark Brown 64ab9baa00 ASoC: Don't defer resume work for AC97 codecs
AC97 devices may have other drivers hanging off them directly so need to
have resumed when the resume function returns meaning that we can't defer
the resume - complete it immediately for them. Non-AC97 devices should
not have other drivers hanging directly off the ASoC devices.

We only really need the deferral for non-AC97 devices - it's there since
some I2C buses are very slow and non-AC97 codecs often have large numbers
of registers to restore and require delays to bring the codec up cleanly
leading to a substantial impact on overall resume time.

Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:36 +01:00
Jarkko Nikula 6984992bf0 ASoC: OMAP: Set minimum buffer size constraint for McBSP2 in OMAP3
McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During
initial playback startup, this FIFO is keeping the DMA request active
until the FIFO is full.

So now if ALSA buffer size is smaller, DMA is looping around it while
filling up the HW FIFO, generating burst of interrupts as well and SW
doesn't have any change to fill enough data.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:17 +01:00
Peter Ujfalusi 7220b9f4bd ASoC: TWL4030: Add constrains for second stream
In case of duplex mode (capture and playback at the same time), the second
stream has to have the same parameters (rate, sample size) as the already
running stream.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:16 +01:00
Peter Ujfalusi 31ad0f31c3 ASoC: TWL4030: 96KHz playback support
TWL4030 supports 96KHz sample playback, but only playback.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:16 +01:00
Timur Tabi d5a908b27a ASoC: trim SSI sysfs statistics in Freescale MPC8610 sound drivers
Optimize the display of SSI statistics in the Freescale MPC8610 sound driver
to display the status count only of the interrupts that were actually enabled.
Previously, it would display the counts of all SISR status bits, even those
that were not enabled.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:15 +01:00
Timur Tabi a4d11fe50c ASoC: remove trigger delay in Freescale MPC8610 sound driver
Remove the delay from the trigger function in the Freescale MPC8610 sound
driver when capture is started.  This delay was used to ensure that the DMA
controller was active when ALSA call the .pointer function to request a
DMA transfer status.  A better approach is for the .pointer function to detect
that DMA has not started, and return zero instead.  This change eliminates
the need for the delay.

Also add some related code to check for a DMA programming error, and report
XRUN if it occurs.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:14 +01:00
Philipp Zabel 7377226c34 ASoC: Add Magician machine support
HTC Magician has a Philips UDA1380 codec connected via
SSP1 (playback) and I2S (capture).
There is a flip-flop between the SSP frame clock output
and the codec's word select input pin. To make the codec
see proper I2S input, the SSP has to send two frames per
sample.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:13 +01:00
Philipp Zabel 92429069d0 ASoC: pxa-ssp: Use 16-bit DMA for magician stereo
Now magician and similar boards can use network mode with only one
active slot to explicitly set 16 bit frame width, even for S16_LE
stereo sound.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-04-02 16:34:13 +01:00
Matt LaPlante 692105b8ac trivial: fix typos/grammar errors in Kconfig texts
Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2009-03-30 15:22:01 +02:00
Russell King ed40d0c472 Merge branch 'origin' into devel
Conflicts:
	sound/soc/pxa/pxa2xx-i2s.c
2009-03-28 20:29:51 +00:00
Lopez Cruz, Misael 632087748c ASoC: Declare Headset as Mic and Headphone widgets for SDP3430
Headset was declared previously as a Headphone widget connecting
HSMIC and HSOL/HSOR pins of TWL4030 codec in SDP430 machine driver.
The capture path becomes invalid as the Headphone widget is not a
valid input endpoint.

Instead of that, the Headset is declared as separate Microphone
and Headphone widgets. Current patch modifies audio map:

- Headset Mic: HSMIC with bias
- Headset Stereophone: HSOL, HSOR

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-19 11:56:16 +00:00
Jarkko Nikula f8d5fc924b ASoC: OMAP: N810: Add more jack functions
Add functions "Headset" and "Mic" to the control "Jack Function" for
activating and de-activating codec input pin LINE1L which is connected to
the mic pin of 4-pole Nokia AV connecter.

Note there is no mic bias voltage management here since bias is coming from
Nokia ASIC and driver for it is not in mainline.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-19 11:56:16 +00:00
Jarkko Nikula 13b9d2ab59 ASoC: OMAP: N810: Mark not connected input pins
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-19 11:56:15 +00:00
Mark Brown e8523b641c ASoC: Add FLL support for WM8400
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-19 11:56:11 +00:00
Mark Brown 24a51029fc ASoC: Add separate AVDD for WM8400
There is an AVDD supply as well, normally one or more of the other
upplies would be tied to it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-18 18:31:54 +00:00
Mark Brown e3598f6e42 ASoC: Further optimise WM8400 bias configuration sequence
The active discharge does not bring sufficient benefit to justify the
lengthy times involved so don't do that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-18 18:31:53 +00:00
Mark Brown da88b48b84 Merge branch 'pxa-ssp' into for-2.6.30 2009-03-17 19:07:26 +00:00
Atsushi Nemoto d2314e0e27 ASoC: Only deregister AC97 dev if it's name was not "AC97"
The commit 14fa43f53f ("ASoC: Only
register AC97 bus if it's not done already") added a condition for
calling of soc_ac97_dev_register() but not added for calling of
soc_ac97_dev_unregister().  This patch adds same condition for
soc_ac97_dev_unregister().  Without this fix, kernel crashes when
unloading an asoc driver.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-17 13:59:47 +00:00
Mark Brown 852fd9e50f ASoC: Each PXA AC97 DAI needs a separate ops
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-16 14:13:57 +00:00
Mark Brown f2a5d6a2ea ASoC: Fix some missing dai_ops conversions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-16 14:13:57 +00:00
Joonyoung Shim 10d9e3d99e ASoC: twl4030 - Fix build error
CC      sound/soc/codecs/twl4030.o
sound/soc/codecs/twl4030.c:1400: warning: braces around scalar initializer
sound/soc/codecs/twl4030.c:1400: warning: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1401: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1401: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1401: warning: initialization from incompatible pointer type
sound/soc/codecs/twl4030.c:1402: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1402: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1402: warning: excess elements in scalar initializer
sound/soc/codecs/twl4030.c:1402: warning: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1403: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1403: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1403: warning: excess elements in scalar initializer
sound/soc/codecs/twl4030.c:1403: warning: (near initialization for 'twl4030_dai.ops')

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-16 14:13:56 +00:00
Mark Brown 85fab7802a ASoC: Fix Zylonite for non-networked SSP mode
This also simplifies the code a bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-14 11:38:16 +00:00
Mark Brown 0ce36c5f7f ASoC: Fix non-networked I2S mode for PXA SSP
Two issues are fixed here:

 - I2S transmits the left frame with the clock low but I don't seem to
   get LRCLK out without SFRMDLY being set so invert SFRMP and set a
   delay.
 - I2S has a clock cycle prior to the first data byte in each channel
   so we need to delay the data by one cycle.

Tested-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-14 11:37:46 +00:00
Russell King 97fb44eb6b Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts:

	arch/arm/mach-at91/gpio.c
2009-03-13 21:44:51 +00:00
Daniel Mack 72d7466468 ASoC: switch PXA SSP driver from network mode to PSP
This switches the pxa ssp port usage from network mode to PSP mode.
Removed some comments and checks for configured TDM channels.
A special case is added to support configuration where BCLK = 64fs. We
need to do some black magic in this case which doesn't look nice but
there is unfortunately no other option than that.

Diagnosed-by: Tim Ruetz <tim@caiaq.de>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-13 13:23:34 +00:00
Lopez Cruz, Misael 77dd7e17b8 ASoC: Move headset jack registration to device initialization for SDP3430
Move headset jack registration to the codec/machine specific
initialization. Having the jack registration in machine init
causes that the jack device gets initialized but not registered
since the sound card is registered before the jack. Moving jack
registration to device initialization will register the jack
device along with all other devices associated to the card when
the card is registed. As a consequence of jack device registered
properly, the jack is detected as an input device.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-13 12:08:53 +00:00
Philipp Zabel eb5f6d753e ASoC: Replace remaining uses of snd_soc_cnew with snd_soc_add_controls.
The drivers are basically duplicating the same code over and over.
As snd_soc_cnew is going to be made static some time after the next
merge window, we might as well convert them now.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-12 15:43:30 +00:00
Mark Brown 6f7cb44ba1 ASoC: Move WM8580 to normal I2C device probe
Refactor the WM8580 device registration to probe via standard I2C device
registration, registering the DAIs once the device has probed via I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-12 15:43:24 +00:00
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