Commit Graph

1148 Commits

Author SHA1 Message Date
Candelaria Villareal, Jorge
c5910a7038 ASoC: SDP3430: Add support for EXTMUTE using TWL GPIO6
Board sdp3430 has hardware support for EXTMUTE using TWL4030 GPIO6
line, controlled by register INTBR_PMBR1. Machine driver takes care
of enabling gpio line through i2c and codec driver manipulates the
line during headset ramp up/down sequence.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-17 10:32:39 +01:00
Takashi Iwai
416c8fe3cd ASoC: Kill direct accesses to driver_data
Replaced with dev_{get|set}_drvdata().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-17 07:48:03 +02:00
Barry Song
1274738d85 ASoC: new ad1938 codec driver based on asoc
Signed-off-by: Barry Song <21cnbao@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-16 11:14:39 +01:00
Kevin Hilman
3e46a44739 ASoC: davinci: don't use clock names
clock name strings are no longer passed on platform_data.  Instead,
we rely entirely on struct device and clkdev to find the right clock.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-16 10:59:52 +01:00
Joonyoung Shim
9db9ed977d ASoC: MAX9877: add MAX9877 amp driver
The MAX9877 combines a high-efficiency Class D audio power amplifier
with a stereo Class AB capacitor-less DirectDrive headphone amplifier.

The max9877_add_controls() is called to register the MAX9877 specific
controls on machine specific init() of the machine driver.

The datasheet for the MAX9877 can find at the following url:
http://datasheets.maxim-ic.com/en/ds/MAX9877.pdf

[Slight edit to sort the ALL_CODECS entries -- broonie.]

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15 16:59:31 +01:00
Mark Brown
4b75e94767 ASoC: Error out if we can't determine a suitable WM9081 sysclk
Due to the flexibility of the WM9081 FLL this should never happen
in a real system.

Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15 11:03:51 +01:00
Mark Brown
e465d544fa ASoC: Fix sample rate lookup in WM8993
We need to use the best value we picked, not the last value we
looked at.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-15 10:01:30 +01:00
Cliff Cai
82d76f4d9f ASoC: Blackfin I2S: fix resume handling
There is no need to manually start playback/capture ourselves as the PCM
driver will handle things for us.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-14 19:44:52 +01:00
Cliff Cai
18d02bc32c ASoC: Blackfin AC97: fix resume handling
There is no need to manually start playback/capture ourselves as the PCM
driver will handle things for us.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-14 19:44:52 +01:00
Kevin Hilman
0a0cf58d93 ASoC: spdif: set module licence to GPL
Without MODULE_LICENCE("GPL"), when built as a module it will fail
to load because it uses other GPL symbols from kernel.

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13 23:01:30 +01:00
Kevin Hilman
a27e304b5c ASoC: spdif codec: enable use by modules
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13 23:01:30 +01:00
Rongrong Cao
087d53ab11 ASoC: fix checking for external widgets bug
In SOC DAPM layer of SOUND subsystem, when add signal route (in the
function snd_soc_dapm_add_route() ), the original code has wrong logic
when dapm layer check each widget whether an external one.

Signed-off-by: Rongrong Cao <rrcao@ambarella.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13 23:01:29 +01:00
Roel Kluin
33e319fba7 ASoC: Keep index within stac9766_reg[]
Keep index within stac9766_reg[]

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-13 10:32:18 +01:00
Mark Brown
030c819e79 Merge branch 'tlv320aic3x' into reg-cache 2009-07-10 21:06:33 +01:00
Mark Brown
cc369cf504 ASoC: WM8510 has a single frame clock so needs symmetric rates
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-09 11:28:07 +01:00
Mark Brown
cb507e7e79 ASoC: Add pop delay debug at end of DAPM sequencing
Provide an interval after the end of DAPM sequencing so that we
can distinguish between a pop in the final step of the sequence
and a pop generated from some other source outside DAPM.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 18:54:57 +01:00
Mark Brown
96fd6d471b ASoC: Configure WM8731 SYSCLK at startup on AT91SAM9G20-EK
The system clock is currently fixed by the driver and this avoids
the need for us to handle errors with enabling and disabling MCLK
(which was incorrect previously so this fixes bugs in error
handling).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 18:41:05 +01:00
Mark Brown
22df8eb4fe ASoC: Disable microphone input for AT91SAM9G20-EK by default
As shipped the board does not have inputs but it is relatively
straightforward to modify the board to hook them up so support
is provided in the driver. When these modifications have not
been made enabling the microphone stage can cause problems.

Add an ifdef to disable this by default. Don't put it into
Kconfig since users will have to get their soldering irons
out to change things.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 18:18:19 +01:00
Mark Brown
2a01e5f358 ASoC: Use CODEC as clock master on AT91SAM9G20-EK
This simplifies the driver by removing the need to manually
configure dividers within the CPU and improve audio performance
by ensuring that the optimal phase relationships between the
clocks in the system are maintained.

Note that currently this means that for playback to work the
Output Mixer HiFi switch must be enabled since otherwise CODEC
will not generate the DAC clock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 18:05:51 +01:00
Mark Brown
4934482d93 ASoC: Limit WM8731 to symmetric rates
While the hardware is capable of some limited asynmmetric modes the
driver does not currently support those modes so tell applications
that only symmetric rates are available.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 17:48:12 +01:00
Mark Brown
942c435ba7 ASoC: Add WM8993 CODEC driver
The WM8993 is a highly integrated ultra-low power hi-fi CODEC designed
for portable devices such as multimedia phones.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 17:20:20 +01:00
Mark Brown
ff7d04b130 ASoC: DaVinci I2S needs mach/asp.h
Reported-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 17:18:30 +01:00
Mark Brown
ef38ed888e ASoC: Correct WM8731 Mic Capture Switch control name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 17:18:28 +01:00
Mark Brown
d00efa648d ASoC: Add TLV information for WM8731
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 17:08:40 +01:00
Troy Kisky
6e5414750a ASoC: DaVinci: pcm, don't play 1st sound period twice
Update the dma link with correct data as soon as
the master channel has copied it. Otherwise, the
1st period will play twice.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-08 16:00:20 +01:00
Mark Brown
3f405b46a9 Merge branch 'davinci' into for-2.6.32
Conflicts:
	sound/soc/davinci/davinci-i2s.c
2009-07-07 19:18:46 +01:00
Mark Brown
4ec5c9693b Merge branch 'for-2.6.31' into for-2.6.32 2009-07-06 21:49:35 +01:00
Mark Brown
f6f1eb1033 ASoC: Factor out WM8580 register cache code
Note the slightly tricky cache usage in the volume update function due
to the requirement for a separate write for the VU bit.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 17:57:57 +01:00
Mark Brown
5f345346dd ASoC: Remove use of hw_read from TLV320AIC3x driver
The TLV320AIC3x driver is currently the only user of the CODEC hw_read
operation and is jumping through some hoops in order to do so.  In order
to support future refactoring to make the hw_read operation more usable
unwrap the usage in this driver to avoid its use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 17:35:28 +01:00
Mark Brown
1e30a5828e ASoC: Remove unused AK4535 hardware read functionality
Nothing uses it and the existing hw_read operation needs to be
refectored so it's easier to remove it rather than work with it.
Support can be re-added if the code requires volatile registers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 17:28:41 +01:00
Mark Brown
17a52fd60a ASoC: Begin to factor out register cache I/O functions
A lot of CODECs share the same register data formats and therefore
replicate the code to manage access to and caching of the register
map. In order to reduce code duplication centralised versions of
this code will be introduced with drivers able to configure the use
of the common code by calling the new snd_soc_codec_set_cache_io()
API call during startup.

As an initial user the 7 bit address/9 bit data format used by many
Wolfson devices is supported for write only CODECs and the drivers
with straightforward register cache implementations are converted to
use it.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 17:24:50 +01:00
Mark Brown
5420f30723 ASoC: Fix leaks in WM8988 registration error handling
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 16:29:39 +01:00
Mark Brown
1a01417e85 ASoC: Fix WM8960 leaks on probe failure
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 15:47:03 +01:00
Mark Brown
fe5422fc4a ASoC: Fix leaks in WM8731 probe error handling
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 15:18:01 +01:00
Mark Brown
096e49d5e6 ASoC: Add CODEC volatile register operation
Add a volatile_register() operation to the CODEC structure providing a
standard operation to query if a register is volatile. This will be used
to factor out the register cache I/O operations for the CODECs.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 15:12:22 +01:00
Troy Kisky
af0adf3e81 ASoC: DaVinci: i2s, add davinci_i2s_prepare and shutdown
If the codec is master then prepare should call
mcbsp_start, not trigger.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 13:14:35 +01:00
Troy Kisky
f5cfa954e6 ASoC: DaVinci: i2s, fix mcbsp_word_length update
Code previously just "ors" in this field without clearing
first. Fix, by never reading this register.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:08 +01:00
Troy Kisky
9333b594a0 ASoC: DaVinci: i2s, minor cleanup of davinci_i2s_startup
Save a few lines of code.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:08 +01:00
Troy Kisky
1bef449989 ASoC: DaVinci: i2s, only start sample generator if needed
Only start sample generator if needed, and more
cleanup on davinci_mcbsp_start.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:07 +01:00
Troy Kisky
eba575c30b ASoC: DaVinci: i2s cleanup
Move variable declaration closer to use.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:07 +01:00
Troy Kisky
f9af37cc63 ASoc: DaVinci: i2s, minor cleanup
Add davinci_mcbsp_dev as argument to davinci_mcbsp_start
and davinci_mcbsp_stop.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:07 +01:00
Troy Kisky
c392bec716 ASoC: DaVinci: i2s toggle clock to complete reset
Add toggle_clock function to complete i2s reset earlier.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:06 +01:00
Troy Kisky
35cf63583d ASoC: DaVinci: i2s, remove MOD_REG_BIT macro
No functional changes. Rename variable w to something
more meaningful. Remove code obfuscating macro MOD_REG_BIT.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05 12:59:06 +01:00
Lars-Peter Clausen
637a935aab ASoC: Fix wm8753 register cache size and initialization
Register cache space was not being allocated for the final register,
causing bugs when it was used.  Allocate space for it.

Also ensure that the final register is displayed in sysfs.

[Commit message rewritten to document actual issue. -- broonie]

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 14:35:49 +01:00
Lopez Cruz, Misael
6814044324 ASoC: TWL4030: Add tristate callbacks for HiFi and Voice
Add "set_tristate" callbacks for HiFi and Voice DAIs.
Machine drivers can enable and disable tristate for each
DAI with "snd_soc_dai_set_tristate" function.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 11:01:05 +01:00
Candelaria Villareal, Jorge
1b6ebdd7bb ASoC: Zoom2: Update twl4030_setup_data parameters
Add support for EXTMUTE in Zoom2 machine driver. This is necessary
to further reduce pop noise problem. Signal EXTMUTE is connected to
signal GPIO 153 in Zoom2 board.

In addition, change ramp delay value to 3 (218/161/109 ms). With
previous ramp delay value, pop noise was louder. With a longer value
the beep tone can be observed.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 11:01:05 +01:00
Grant Likely
0827d6ba0b ASoC: add locking to mpc5200-psc-ac97 driver
AC97 bus register read/write hooks need to provide locking, but the
mpc5200-psc-ac97 driver does not.  This patch adds a mutex around
the register access routines.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 10:41:47 +01:00
Grant Likely
07573534b0 ASoC: Fix mpc5200-psc-ac97 to ensure the data ready bit is cleared
When doing register reads, it is possible for there to be a stale
data ready bit set which will cause subsequent reads to return
prematurely with incorrect data.  This patch fixes the issues by
ensuring stale data is cleared before starting another transaction.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03 10:41:46 +01:00
Mark Brown
1df892cba4 ASoC: Fix register cache initialisation for WM8753
The wrong register cache variable was being used to provide the size for
the memcpy(), resulting in a copy of only a void * of data.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-07-03 10:41:45 +01:00
Candelaria Villareal, Jorge
4e49ffd10f ASoC: TWL4030: Add EXTMUTE to reduce pop-noise effect
According to TRM, an external FET controlled by a 1.8V output signal
can be used to reduce the pop-noise heard when the audio amplifier is
switched on. It is suggested that GPIO6 of TWL4030 be used, but any
other gpio can be used instead. This is indicated in machine driver
with the following twl4030_setup_data members:

-hs_extmute. Set to 1 if board has support for EXTMUTE.

-set_hs_extmute. Set to a callback funcion to control an external gpio
line. Set to NULL if MUTE[GPIO6] pin is used.

Codec driver takes care of enabling and disabling this output during
the headset pop attenuation sequence.

Also add a delay to let VMID settle in ramp up sequence.

Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-02 11:06:26 +01:00
Mark Brown
2115d2c173 Merge branch 'for-2.6.31' into for-2.6.32 2009-07-01 21:45:47 +01:00
Mark Brown
1dcf98ff8e ASoC: Add WM8523 CODEC driver
The WM8523 is a high performance stereo DAC with integral charge
pump providing 2Vrms line driver outputs using a single 3.3V power
supply rail.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-01 18:47:45 +01:00
Mark Brown
da9ff1f796 ASoC: Only disable pxa2xx-i2s clocks if we enabled them
The clock API can't cope with unbalanced enables and disables and
we only enable in hw_params() but try to disable in shutdown.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-01 18:31:32 +01:00
Mark Brown
416356fcfa ASoC: Convert to dev_pm_ops
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 19:32:57 +01:00
Janusz Krzysztofik
1bdd741991 ASoC: OMAP: fix OMAP1510 broken PCM pointer callback
This patch tries to work around the problem of broken OMAP1510 PCM playback
pointer calculation by replacing DMA function call that incorrectly tries to
read the value form DMA hardware with a value computed locally from an
already maintained variable omap_runtime_data.period_index.

Tested on OMAP5910 based Amstrad Delta (E3) using work in progress ASoC
driver.

Based on linux-2.6-asoc.git v2.6.31-rc1.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Acked-by: Jarkko Nikula <jhnikula@gmail.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:39:12 +01:00
Grant Likely
40d9ec14e7 ASoC: remove BROKEN from Efika and pcm030 fabric drivers
The needed spin_event_timeout() macro is now merged in from the
powerpc tree, so these drivers are no longer broken.  This reverts
commit 0c0e09e21a (ASoC: Mark MPC5200
AC97 as BROKEN until PowerPC merge issues are resolved)

Tested against 2.6.31-rc1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:23:41 +01:00
Grant Likely
6a84c234da ASoC: Fix typo in MPC5200 PSC AC97 driver Kconfig
ALSA SoC drivers should be specify SND_SOC_AC97_BUS instead, not AC97_BUS.
Without SND_SOC_AC97_BUS defined, an AC97 device will not get correctly
registered on the AC97 bus, which prevents thinks like the WM9712
touchscreen driver from getting probed.

Tested against 2.6.31-rc1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jon Smirl <jonsmirl@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-30 10:23:40 +01:00
Mark Brown
9ea21ebca1 ASoC: Fix WM8961 suspend function type
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-29 16:34:57 +01:00
Mark Brown
c2caa4da46 ASoC: Fix widget powerdown on shutdown
We need to set the widget power state we want to implement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-26 15:36:56 +01:00
Lopez Cruz, Misael
e3c7dbb07c ASoC: Remove word "Switch" from Handsfree switch name
SoC dapm adds the suffix "Switch" to SND_SOC_DAPM_SWITCH controls,
removing word "Switch" from HandsfreeL/HandsfreeR widget name
for avoiding to duplicate it.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-26 10:39:52 +01:00
Atsushi Nemoto
647613e97f ASoC: txx9aclc: dynamically allocate dmaengine devname
Use kasprintf to allocate temporary devname string instead of a
fixed size string.
This fixes "FIXME" introduced on removal of BUS_ID_SIZE.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-25 21:06:30 +01:00
Takashi Iwai
62b1653e29 Merge branch 'for-2.6.32' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6 into topic/asoc 2009-06-25 15:28:39 +02:00
Mark Brown
d5fc3b5fe3 Merge branch 'for-2.6.31' into for-2.6.32 2009-06-25 13:58:37 +01:00
Mark Brown
e2f551dacb ASoC: Add core suspend and resume callbacks to WM8961
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-25 13:57:59 +01:00
Mark Brown
517374704d ASoC: Add a shutdown callback
Ensure that the audio subsystem is powered down cleanly when the system
shuts down by providing a shutdown operation. This ensures that all the
components have been returned to an off state cleanly which should avoid
audio issues from partially charged capacitors or noise on digital inputs
if the system is restarted quickly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Ben Dooks <ben-linux@fluff.org>
2009-06-23 23:48:53 +01:00
Linus Torvalds
c488eef815 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Make jack-plug notification selectable
  ALSA: ctxfi - Add PM support
  sound: seq_midi_event: fix decoding of (N)RPN events
  ALSA: hda - Add digital-mic support to ALC262 auto model
  ALSA: hda - Fix check of input source type for realtek codecs
  ALSA: hda - Add quirk for Sony VAIO Z21MN
  ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model
  ALSA: hda - Fix unsigned comparison in patch_sigmatel.c
  ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait
  sound: fix check for return value in snd_pcm_hw_refine
  ALSA: ctxfi - Allow unknown PCI SSIDs
  ASoC: Blackfin: update the bf5xx_i2s_resume parameters
  ASoC: Blackfin: keep better track of SPORT configuration state
2009-06-23 10:45:39 -07:00
Lopez Cruz, Misael
30808ca751 ASoC: TWL4030: Correct bypass event for voice sidetone
Event for voice sidetone was being interpreted as an
analog HiFi bypass event because VSTPGA register offset
is less than ARXR2_APGA_CTL offset. Reordering the
register checks allows to handle voice digital bypass
event properly.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-23 10:57:38 +01:00
Lopez Cruz, Misael
328d0a138e ASoC: TWL4030: Add AVADC Clock Priority
AVDAC clk priority allows to determine the path ADC must
be connected when the codec is in option2 and both HiFi
and Voice paths are enabled.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-23 10:57:37 +01:00
Linus Torvalds
9e268beb92 Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (49 commits)
  [ARM] idle: clean up pm_idle calling, obey hlt_counter
  [ARM] S3C: Fix gpio-config off-by-one bug
  [ARM] S3C64XX: add to_irq() support for EINT() GPIO
  [ARM] S3C64XX: clock.c: fix typo in usb-host clock ctrlbit
  [ARM] S3C64XX: fix HCLK gate defines
  [ARM] Update mach-types
  [ARM] wire up rt_tgsigqueueinfo and perf_counter_open
  OMAP2 clock/powerdomain: off by 1 error in loop timeout comparisons
  OMAP3 SDRC: set FIXEDDELAY when disabling SDRC DLL
  OMAP3: Add support for DPLL3 divisor values higher than 2
  OMAP3 SRAM: convert SRAM code to use macros rather than magic numbers
  OMAP3 SRAM: add more comments on the SRAM code
  OMAP3 clock/SDRC: program SDRC_MR register during SDRC clock change
  OMAP3 clock: add a short delay when lowering CORE clk rate
  OMAP3 clock: initialize SDRC timings at kernel start
  OMAP3 clock: remove wait for DPLL3 M2 clock to stabilize
  [ARM] Add old Feroceon support to compressed/head.S
  [ARM] 5559/1: Limit the stack unwinding caused by a kthread exit
  [ARM] 5558/1: Add extra checks to ARM unwinder to avoid tracing corrupt stacks
  [ARM] 5557/1: Discard some ARM.ex*.*exit.text sections when !HOTPLUG or !HOTPLUG_CPU
  ...
2009-06-22 14:56:13 -07:00
Lopez Cruz, Misael
c264301c77 ASoC: TWL4030: Fix voice interface clock masters
Voice interface of twl4030 codec supports: CBM_CFM and
CBS_CFS. It doesn't support CBS_CFM.

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-By: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-22 11:24:04 +01:00
Mark Brown
e370f45aeb Merge branch 'wm8961' into for-2.6.32 2009-06-22 11:08:26 +01:00
Linus Torvalds
413318444f Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: hda - Add model=6530g option
  ALSA: hda - Acer Inspire 6530G model for Realtek ALC888
  ALSA: snd_usb_caiaq: fix legacy input streaming
  ASoC: Kill BUS_ID_SIZE
  ALSA: HDA - Correct trivial typos in comments.
  ALSA: HDA - Name-fixes in code (tagra/targa)
  ALSA: HDA - Add pci-quirk for MSI MS-7350 motherboard.
  ALSA: hda - Fix memory leak at codec creation
2009-06-21 13:13:08 -07:00
Barry Song
f274143f12 ASoC: Blackfin: convert internal names from bf52x to bf5xx
These drivers aren't BF52x specific, so don't use bf52x in the names.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:47:56 +01:00
Barry Song
92a6ad3428 ASoC: Blackfin: update the bf5xx_i2s_resume parameters
Latest ASoC only passes snd_soc_dai to the resume function.

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:45:28 +01:00
Cliff Cai
895c9c0565 ASoC: Blackfin: keep better track of SPORT configuration state
Do not let the SPORT be reconfigured until there are no more active
streams.  Then we can let the system reprogram the SPORT state.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 19:45:28 +01:00
Mark Brown
423c238d71 ASoC: Staticise put_twl4030_opmode_enum_double()
It's an operation for a control and doesn't need to be exported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 13:58:09 +01:00
Mark Brown
b53109db5e ASoC: Fix shadowed variables in twl4030
No need to define second copies of mode and format, they're declared
with exactly the same type at the head of the function and there's no
conflict in their use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20 13:58:08 +01:00
Russell King
187f81b3d8 Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-06-18 23:09:52 +01:00
Mark Brown
a583cd5347 ASoC: Regulator support for WM8580
Add basic support for integration with the regulator API to WM8580.
Since the core cannot yet disable biases when the CODEC is idle we
simply request and enable the regulators for the entire time the
driver is active.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-17 17:33:01 +01:00
Takashi Iwai
ef39412622 ASoC: Kill BUS_ID_SIZE
Remove the use of BUS_ID_SIZE from txx9aclc.c, as BUS_ID_SIZE will be
removed soon later.

Also, use snprintf() instead of sprintf() as a safer operation.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-17 11:42:45 +02:00
Linus Torvalds
661adc423d Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
  ALSA: ctxfi - Fix deadlock with xfi-timer
  ALSA: intel8x0 - Fix PCM position craziness
  ALSA: usb-audio - rework quirk for TerraTec Aureon USB 5.1 MkII
  ASoC: magician: fix PXA SSP clock polarity
  ASoC: Instantiate any forgotten DAPM widgets
  ASoC: Revert duplicated code in SSM2602 driver
  ALSA: hda - Add quirk for Acer Aspire 6935G
  ALSA: ctxfi - Replace atc lock to mutex
  ASoC: Remove odd bit clock ratios for WM8903
2009-06-16 12:10:31 -07:00
Mark Brown
8776b268c6 [ARM] pxa: register wm8731 explicitly for corgi and poodle
The wm8731 driver has been converted to register using the standard I2C
device registration mechanism so we can now do the registration in the
arch/arm code as normal.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
2009-06-16 21:03:36 +08:00
Philipp Zabel
1abd918499 ASoC: UDA1380: refactor device registration
This patch mostly follows commit 5998102b90
"ASoC: Refactor WM8731 device registration" to make UDA1380 use standard
device instantiation. Similarly, the I2C device registration temporarily
moves into the magician machine driver before it will find its final
resting place in the board file.

At the same time, platform specific configuration is moved to platform data
and common power/reset GPIO handling moves into the codec driver.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-15 21:54:48 +01:00
Linus Torvalds
2cf4d4514d Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
  MAINTAINERS: EB110ATX is not ebsa110
  MAINTAINERS: update Eric Miao's email address and status
  fb: add support of LCD display controller on pxa168/910 (base layer)
  [ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
  [ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
  [ARM] 5544/1: Trust PrimeCell resource sizes
  [ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
  [ARM] pxa/sharpsl_pm: drop set_irq_type calls
  [ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
  [ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
  [ARM] sa1100: remove unused collie_pm.c
  [ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
  [ARM] 5550/1: Add default configure file for w90p910 platform
  [ARM] 5549/1: Add clock api for w90p910 platform.
  [ARM] 5548/1: Add gpio api for w90p910 platform
  [ARM] 5551/1: Add multi-function pin api for w90p910 platform.
  [ARM] Make ARM_VIC_NR depend on ARM_VIC
  [ARM] 5546/1: ARM PL022 SSP/SPI driver v3
  ARM: OMAP4: SMP: Update defconfig for OMAP4430
  ARM: OMAP4: SMP: Enable SMP support for OMAP4430
  ...
2009-06-14 13:42:43 -07:00
Philipp Zabel
33745fb344 ASoC: magician: fix PXA SSP clock polarity
Follow-up fix needed since "ASoC: pxa-ssp.c fix clock/frame invert".

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-14 16:15:07 +01:00
Mark Brown
6d5701b29e ASoC: Instantiate any forgotten DAPM widgets
With the recent changes to the DAPM power checks it has become important
to explicitly instantiate all widgets but some drivers were forgetting
to do that.  Since everything needs to do it add a call to instantiate
them immediately before the card registration - it does no harm when it
is called repeatedly and saves work in drivers.

Tested-by: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-14 16:14:53 +01:00
Russell King
4c31791c3d Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2009-06-14 11:00:16 +01:00
Mark Brown
b3b50b3f31 ASoC: Add suspend and resume callbacks to Wolfson CODEC drivers
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 22:30:18 +01:00
Mark Brown
831dc0f10f ASoC: Add stub suspend and resume calls for ASoC subdevices
Now that ASoC subdevices can be regular devices they can have normal
suspend and resume calls from their buses.  However, suspending them
individually is not desirable since this can lead to problems such as
pops and clicks from devices being suspended with their signals being
amplified or clocks being stopped suddenly.

This will be resolved by having the normal device model suspend and
resume calls call into ASoC which will suspend the entire card while any
of its components are suspended.  At present this is not yet implemented
but in order to aid the transition of drivers to the standard device
model this patch adds API calls for the notifications.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:28 +01:00
Mark Brown
619439998a ASoC: Automatically manage WM8350 sloping stopband filter
For best performance the DAC sloping stopband filter should be enabled
below 24kHz and not enabled above that so remove the user visible
control for this and do it autonomously in the driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:25 +01:00
Mark Brown
21002e2076 ASoC: Automatically manage WM8900 sloping stopband filter
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:23 +01:00
Mark Brown
9e79261f30 ASoC: Automatically control WM8903 sloping stopband filter
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 20:06:23 +01:00
Mark Brown
5ba73683ba ASoC: Revert duplicated code in SSM2602 driver
The Blackfin submission was done as a patch against a different tree
and contained a duplicate hunk which will cause us to loose track of the
substream pointers when shutting down.  Remove one of the duplicated
hunks.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13 19:35:24 +01:00
Lopez Cruz, Misael
df205936d5 ASoC: Zoom2: Add machine driver for Zoom2 board
Add support for Zoom2 board. Zoom2 machine driver
connects both codec DAIs (audio and voice) to omap3
McBSP ports in the following way:

  HiFi <-> McBSP2
 Voice <-> McBSP3

The zoom2 driver has the following DAPM widgets:
* Ext Mic: MAINMIC, SUBMIC (with bias)
* Ext Spk: HFL, HFR
* Headset Stereophone: HSOL, HSOR
* Headset Mic: HSMIC (with bias)
* Aux In: AUXL, AUXR

Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-12 21:57:07 +01:00
Mark Brown
ba2533a478 ASoC: Remove odd bit clock ratios for WM8903
These are not supported since performance can not be guaranteed
when they are in use.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2009-06-12 17:29:54 +01:00
Mark Brown
74dc55ed5b ASoC: Add WM8961 driver
The WM8961 is a low power, high quality stereo CODEC designed for
portable digital applications with headphone and stereo class D speaker
drivers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-12 17:16:06 +01:00
Mark Brown
0e09b67e58 Merge branch 'dapm' into for-2.6.32 2009-06-11 21:04:04 +01:00
Daniel Ribeiro
fa44c077eb ASoC: remove duplicated code on pxa-ssp.c
* We don't need to write the registers twice, remove the first write.
* DAIFMT_INV switch is duplicated inside DAIFMT_FORMAT switch, move it
  out.

(This patch is for Mark's for-2.6.32 branch, I have not checked if the
code is duplicated on current 2.6.30)

Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-11 21:03:19 +01:00
Russell King
547c32aeb5 Merge branch for-rmk-devel of git://aeryn.fluff.org.uk/bjdooks/linux into devel 2009-06-10 22:41:06 +01:00
Mark Brown
236e6723be ASoC: Fix lm4857 control
Commit 4eaa9819dc changed semantics of
private_value member of kcontrol. This resulted in inability to control
amplifier and subsequently in very low output volume.

Tested-by: Johannes Schauer <josch@pyneo.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-10 13:55:34 +01:00