Commit Graph

493 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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 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 e4aa8dd5ca Merge branch 'topic/digital-mixing' into for-2.6.32 2009-08-24 20:44:41 +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
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
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 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
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 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 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
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
Mark Brown 1e97f50b70 ASoC: Factor out cache I/O from WM8974
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-15 12:15:10 +01:00
Mark Brown 37cfa1950e Merge branch 'wm8974-upstream' into for-2.6.32 2009-08-15 11:52:43 +01:00
Barry Song 2a708137fd ASoC: delete -spi suffix in ad1938 and free private data while registers fail
Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-14 17:53:02 +01:00
Peter Ujfalusi 9028935d75 ASoC: TWL4030: Fix for capture mixer strings
Change the strings related to capture in order to be
interpreted correctly by alsamixer and possible other
UI based mixer applications.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-14 17:52:59 +01:00
Mark Brown a2342ae325 ASoC: Factor out shared code from WM8993
The WM8993 analogue control is shared with other devices in the same
product line.  Since this is a very substantial proportion of the
driver move the definitions of these controls into a new wm_hubs module
which allows them to be shared between the two.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 22:19:31 +01:00
Mark Brown e9ade7f933 ASoC: Minor cleanups to AD1938 driver
- Build in SND_SOC_ALL_CODECS.
- Remove null suspend/resume stuff.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 15:19:42 +01:00
Barry Song 7eaae41ea5 new ad1836 codec driver based on asoc
There has been an ad1836 driver in sound/blackfin based on traditional alsa.
The new driver is based on asoc. The architecture of ad1836 codec driver is
very much like ad1938.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 15:18:53 +01:00
Peter Ujfalusi 9008adf9a9 ASoC: TWL4030: Introduce PGAs for outputs
Dynamically control and control only the needed output amplifier
muting/un-muting.

The original code was muting and un-muting the following output
amplifiers: Earpiece PreDrivL/R, CarkitL/R at the same time
regardless which pin is actually in use at the given moment.

Move these as separate PGA so only the needed amplifier will be touched.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 14:56:13 +01:00
Barry Song c4ff357ada ASoC: add output/input widgets in ad1938 to make dac/adc dynamic PM work
According to the function dapm_dac_check_power() in
sound/soc/soc-dapm.c, dac power can't be on/off stand-alone without any
output widget as sink. And according to dapm_adc_check_power(), adc
power can't be on/off stand-alone without any input widget as source. So
we can't only define some stand-alone SND_SOC_DAPM_DAC/SND_SOC_DAPM_ADC
to hope their power can be managed dynamically.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-13 10:47:22 +01:00
Mark Brown d2a382143b ASoC: Update AD1938 for new TDM slot API
It's only actually paying attention to the slot count anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-12 14:30:33 +01:00
Mark Brown e0026beac0 ASoC: Update WM9081 for tdm_slot() API change
Store the TDM slot width then if it's set use that rather than the
sample size to calculate BCLK. Leave imposing constraints to the
core (which should do this but doesn't yet) or machine driver.

Also allow 0 TDM slots to be configure (for use when disabling TDM).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-11 16:29:21 +01:00
Mark Brown 1921bab217 Merge commit 'a5479e389e989acfeca9c32eeb0083d086202280' into for-2.6.32 2009-08-11 13:09:27 +01:00
Mark Brown e0c48a18f7 ASoC: Drop unneeded declaration of removed wm8731 SPI write function
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-10 12:59:29 +01:00
Mark Brown 35b1207b34 ASoC: Convert WM8776 to use factored out register cache code
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-08 10:37:33 +01:00
Mark Brown 06cddefc1f Merge branch 'reg-cache' into for-2.6.32 2009-08-07 11:43:58 +01:00
Daniel Ribeiro a5479e389e ASoC: change set_tdm_slot api to allow slot_width override.
Extend set_tdm_slot to allow the user to arbitrarily set the frame width
and active TX/RX slots.

Updates magician.c and wm9081.c for the new set_tdm_slot(). wm9081.c
still doesn't handle the slot_width override.

While being there, correct an incorrect use of SlotsPerFrm(7) use in
bitmask on pxa-ssp.c (SSCR0_SlotsPerFrm(x) is (((x) - 1) << 24)) ).

(this series is meant for Mark's for-2.6.32 branch)

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-06 15:52:24 +01:00
Janusz Krzysztofik 9029bb316b ASoC: CX20442: simplify codec controller usage
This patch is a workaround for the problem of several subsequent control
statements not being applied correctly to the codec controller (modem).

In order to follow the hook switch state change from handset to handsfree
while
in full duplex mode, two consecutive +VLS control commands were sent to the
modem. The first one was M1 (microphone only), the seconds one was M1S1 (both
microphone and speaker). As there was no real modem handshaking procedure
implemented, neither in the codec nor in the machine driver part of the line
discipline, the modem was having the second command missed.

Since a possibility to switch to microphone only mode (and speaker only mode
as well) seams of no value, I have modified the code to issue single M1S1
command only for any of those cases.

Tested on my Amstrad Delta.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-06 11:36:46 +01:00
Janusz Krzysztofik 4977b03e3d ASoC: CX20442: add some debugging
This patch adds debugging statement that can help in tracing
how the driver is trying to control the codec device.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-06 11:36:45 +01:00
Mark Brown 924914ee95 ASoC: Add WM8776 CODEC driver
The WM8776 is a high performance, stereo audio CODEC with five channel
input selector. The WM8776 is ideal for surround sound processing
applications for home hi-fi, DVD-RW and other audio visual equipment.

This driver implements support for most WM8776 features - currently the
ADC automatic level control/limiter functionality is omitted.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-06 11:36:45 +01:00
Daniel Mack 15b5bdaeeb ALSA: ASoC: cs4270: move power management hooks to snd_soc_codec_device
Power management for the cs4270 codec is currently implemented as part
of the i2c_driver struct. The disadvantage of doing it this way is that
the callbacks registered in the snd_soc_card struct are called _before_
the codec's callbacks.

That doesn't work, because the snd_soc_card callbacks will most likely
switch down the codec's power domains or pull the reset GPIOs, and
hence make the i2c communication bail out.

Fix this by binding the suspend and resume code to the
snd_soc_codec_device driver model and let the I2C functions only call
the SoC core function for resume and suspend, which do nothing currently
but will do later.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-05 22:13:49 +01:00
Mark Brown 27ded041f0 ASoC: Factor out 7 bit register 9 bit data SPI write
This converts all the Wolfson drivers using this format (the only devices
that do) except WM8753 to use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-03 16:59:16 +01:00
Mark Brown 8d50e447d1 ASoC: Factor out I/O for Wolfson 8 bit data 16 bit register CODECs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-03 16:59:16 +01:00
Mark Brown 7084a42b96 ASoC: Add I/O control bus information to factored out cache setup
While writes tend to be able to use a fairly bus independant format to
do the writes reads are all bus specific. To allow us to factor out
this code include the bus type as a parameter when setting up the
cache.

Initially just use this to factor out hw_write_t for I2C.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-08-03 16:59:09 +01:00
Janusz Krzysztofik ad120dae12 ASoC: CX20442: push down machine independent line discipline bits
This corrected patch adds machine independent line discipline code, prevoiusly
exsiting inside my Amstrad Delta ASoC machine dirver, to the Conexant CX20442
codec driver. The code can be used as a standalone line discipline, or as a
set of codec specific functions called from machine's line discipline
callbacks. Anyway, the line discipline itself must be registered by a machine
driver.

Applies on top of the followup to my initial driver version:
http://mailman.alsa-project.org/pipermail/alsa-devel/2009-July/019757.html

Suggested by ASoC manintainer Mark Brown <broonie@opensource.wolfsonmicro.com>

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-31 22:38:44 +01:00
Barry Song 3a39f832a5 ASoC: Fix checkpatch issues and typos of ad1938 codec and bf5xx-tdm dai
1. fix "line over 80 characters" checkpatch warnings
2. ‘DMA_nnBIT_MASK’ is deprecated, use DMA_BIT_MASK instead
3. fix typos

Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-29 21:31:53 +01:00
Janusz Krzysztofik b84eab08a6 ASoC: CX20442: fix issues pointed out by subsystem maintainer
The patch fixes some checkpatch identified issues and adds a comment about
line discipline interaction to my driver code, as requested by Mark on my
inital submission (thank you Mark for applying my imperfect patch anyway).
It also fixes MODULE_ALIAS mismatch as used in my machine driver.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-28 22:15:23 +01:00
Takashi Iwai 7679d5c65b Merge branch 'fix/asoc' into for-linus
* fix/asoc:
  ASoC: tlv320aic3x: Enable PLL when not bypassed
2009-07-26 11:07:03 +02:00
Joonyoung Shim a7569afa8b ASoC: MAX9877: fix write operation for register
The MAX9877 needs an address of start register when we write values to
registers through i2c_master_send(), but the code for this was missed in
max9877_write_regs().

If the value of control is 0 in the max9877_set_out_mode(), the value is
not increased to 1, but actually the value to write to the register
should be 1.
And the register bits for out_mode and osc_mode should be cleared before
writing.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-23 11:08:30 +01:00