Commit Graph

419 Commits

Author SHA1 Message Date
Troy Kisky
8b89e62c2a Several SGTL5000 fixes from BoundaryDevices 2011-09-12 10:20:19 -05:00
Matt Sealey
3cb82490ef sgtl5000: make register write errors (which are innocuous) less chatty 2011-05-19 07:38:24 -05:00
Matt Sealey
5e83174b31 sgtl5000: drag to latest BSP
includes patches:
ENGR00132153 sgtl5000: do not enforce symmetry if rate is unknown
ENGR00132525 sgtl5000: audio clock gating
ENGR00132580 allow prediv by 1 for ext1 clk

(audio clock gating on Efika will be patched in later)
2010-12-14 00:09:06 -06:00
William Lai
0662eac555 ENGR00125248 ALSA CS42888: Can only play/record multiple 44k streams
The CS42888 can only playback or record the multiple 44k streams,
as there is only the 22.579MHz Osc on the board. Enable the
ALSA plugin or ASRC when try to playback or record multiple 48k
streams.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:51:56 -05:00
William Lai
092c607bab ENGR00124740-2 ALSA: CS42888 codec driver support
Support CS42888 playback and recording.
ESAI_HCKT is used to drive CS42888 when recording, due to
hardware layout.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:51:26 -05:00
Alan Tull
01554a40cc ENGR00124955 sgtl5000: fix audio power down pop
Some boards need a longer delay after powering off VAG.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:51:25 -05:00
Alan Tull
3774400b5f Revert "ENGR00124852 sgtl5000: support nonstandard sample rates"
This reverts commit 33391f8b0a2ccda3a27d95dfe67846d5c60666f7.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:51:24 -05:00
Alan Tull
40df5dcbcc ENGR00124852 sgtl5000: support nonstandard sample rates
Supporting more sample rates that are not listed in pcm.h
(12KHz and 24KHz).

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:51:18 -05:00
Lionel Xu
392a524b3f ENGR00124085 MX23 ALSA: To reduce the start/stop/pause pop noise when playback
1)There is still pop noise sometimes when start/stop/pausing a playback,
   this patch is used to further reduce the pop noise.
2)Enter low power mode(power down DAC) when there is no playback for 5 seconds.
3)Modify amixer controls "Speaker Playback Switch" and "Headhpone Playback
   Switch"

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:51:10 -05:00
Alan Tull
cd0d4a23da ENGR00123770 sgtl5000: use rate_mode to support more sample rates
Use the RATE_MODE field to support more sample rates in hardware,
specifically 8000, 11025, 16000, and 22050 Hz.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:50:39 -05:00
Alan Tull
eb912bbb1f ENGR00119077 dac mux should not affect power and clocks
Changes such that DAC Mux will only affect whether the headphone
output gets connected to the DAC or Line in.

The previous implementation of the DAC Mux allowed the dapm power
level of the sgtl5000 to be affected whether audio was playing or
not.  It also controlled the an internal osc which had no effect
since it didn't affect whether mclk was turned on.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:49:45 -05:00
Frank Li
9eae1095e9 ENGR00117340 Add HEADPHONE short protection feature
Add HEADPHONE short protection,when headphone short,mute the
HP vol and pwrdn the headphone,and restore them when short gone.

   Signed-off-by: Frank Li <frank.li@freescale.com>
2010-08-10 11:49:34 -05:00
Lionel Xu
1ab8756272 ENGR00119146 MX23 ALSA: Audioout DMA stops after play/stop many times
DMA will stop working after playback/stop many times, especially for those
high bitrate wav sound, use another way to trigger the audioout playback
can resolve this issue.

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:49:24 -05:00
Alan Tull
bbbe3eb09e ENGR00117344 fix mono record during stereo playback
Starting a mono record stream and doing stereo playback resulted in
wrong sample rate.  Also starting stereo playback then doing mono
record.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:49:01 -05:00
Alan Tull
7296ab84b5 ENGR00122274 mx23: spdif playback
Support S/PDIF playback on the mx23evk.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:49:00 -05:00
Alan Tull
2875d0d86f ENGR00122025 mx28: support 24, 32 bit spdif
The data in memory is 24 bit little endian in a 32 bit word.
We need to shift the data in memory out one byte to get the proper
alignment.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:48:43 -05:00
Lionel Xu
024336a3b4 ENGR00117751 MX28 ALSA: Support audio record through saif
Support audio record through saif, support playback/record simultaneously

Signed-off-by: Lionel Xu <r63889@freescale.com>
(cherry picked from commit 18627873f6332e03ebd03691f51937559bbdf03d)
2010-08-10 11:48:40 -05:00
Jeremy.Yao
c6ece916d6 ENGR00121831:iMX23 ALSA Fix Audio Driver Quality
To fix 'pop' sound for playback and noise for mic record

Signed-off-by: Jeremy Yao <r65161@freescale.com>
2010-08-10 11:48:36 -05:00
Jeremy.Yao
328fb4f9a3 ENGR00121604: iMX23 Support Audio
Add Support for ADC/DAC Audio

Signed-off-by: Jeremy Yao <r65161@freescale.com>
(cherry picked from commit 172fc1bb738b2c83979ced6e918635d055529b43)
2010-08-10 11:48:20 -05:00
Alan Tull
9eda4a65f9 ENGR00117752 MX28: Support S/PDIF audio playback
Support S/PDIF audio playback

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:48:12 -05:00
Lionel Xu
7be2bc6209 ENGR00117750 MX28 ALSA:Support audio playback through SAIF
Porting from mxc sound asoc driver, to support audio playback on mx28 through
saif

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:48:06 -05:00
Lionel Xu
2f78735cb2 ENGR00119104 MX23 ALSA: Resolve the problem of record from line-in
Resolve the line-in record problem.

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:46:20 -05:00
Frank.Li
2e21083d70 ENGR00118544 iMX23 Clear dangerous macro stmp3xxx_setl(clearl)
No all regiser use _SCT. stmp3xxx_setl may write to wrong address.
please use __raw_write (value, REG_XXX_SET) to write date to SCT
register.  Only REG_XXX_SCT is defined when it exist at hardware.

Signed-off-by: Frank.Li <Frank.Li@freescale.com>
2010-08-10 11:45:57 -05:00
Alan Tull
d02a710fce ENGR00117456: fix dac_get_volsw
Fix shift direction.
Don't return left channel value for both channels.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:45:48 -05:00
Alan Tull
bf57f21ba4 ENGR00118016-3 wm8580: update to 2.6.31
wm8580 is using regulators that can't change state.  The
regulator driver doesn't handle this case well so it crashes
during regulator_bulk_enable.  Eventually this will be fixed in the
regulator driver.  For now, remove regulators from list in
wm8580 driver.

Fix spi_rw err. hw_write needs to return transferred data length.

Signed-off-by: Alan Tull <r80115@freescale.com>
Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:45:26 -05:00
Alan Tull
966f477642 ENGR00118016-2 wm8350: update to 2.6.31
In WM8350_FLL_CONTROL_1, keep FLL_RATE at default.
Don't mute outputs by default.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:45:25 -05:00
Alan Tull
52bf586bac ENGR00118016-1 ASoC : upgrade audio support to 2.6.31
Move regulator control into codec drivers.
Move codec platform data to machine layer.
Remove unused fields from mxc_audio_platform_data.
soc multiple audio cards support:
  dai_list is a list for all registered codec/cpu dais.
  One codec/cpu dais can't be registered twice, so move the
  cpu dai registering into imx-ssi.c/imx-esai.c
Fix ak4647_read_reg error.
Put ssi/esai mode in the cpu_dai private_data.
sgtl5000: Fix the power for MX35
  1. MX35 vddio and vddd are directly connected to
  external 3V3. It has no regulator control.
  2. sgtl5000 needs some time to be ready after vdda
  is switched on so msleep(1) is added before regiter
  read/write.
  3. On MX35 platform, vdda is from VCAM.

Signed-off-by: Alan Tull <r80115@freescale.com>
Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:45:24 -05:00
Mark Brown
42627bb095 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>
2010-08-10 11:45:16 -05:00
Mark Brown
444b8403a2 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>
2010-08-10 11:45:15 -05:00
Rob Herring
be0524d38f ENGR00117389 Port 5.0.0 release to 2.6.31
This is i.MX BSP 5.0.0 release ported to 2.6.31

Signed-off-by: Rob Herring <r.herring@freescale.com>
Signed-off-by: Alan Tull <r80115@freescale.com>
Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
2010-08-10 11:44:41 -05:00
Wallace Wang
5a14bc02b0 soc: add wm8580 spi support
Add spi interface support to wm8580 codec.

Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:44:31 -05:00
Eric Millbrandt
637cd43cef ASoC: Do not write to invalid registers on the wm9712.
commit 48e3cbb3f67a27d9c2db075f3d0f700246c40caa upstream.

This patch fixes a bug where "virtual" registers were being written to the ac97
bus.  This was causing unrelated registers to become corrupted (headphone 0x04,
touchscreen 0x78, etc).

This patch duplicates protection that was included in the wm9713 driver.

Signed-off-by: Eric Millbrandt <emillbrandt@dekaresearch.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-01-06 14:26:17 -08:00
Anuj Aggarwal
57ee10d030 ASoC: AIC23: Fixing infinite loop in resume path
commit e9ff5eb2ae018fe2298c68746c873bf828c6b10e upstream.

This patch fixes two issues:
a) Infinite loop in resume function
b) Writes to non-existing registers in resume function

Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-08 10:21:39 -08:00
Mark Brown
170fa2cc0c ASoC: WM8350 capture PGA mutes are inverted
commit 5b7dde346881b12246669ae97b3a2793c27b32b6 upstream.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-10-12 12:40:16 -07:00
Mark Brown
caa4489e9a ASoC: Fix WM835x Out4 capture enumeration
commit 87831cb660954356d68cebdb1406f3be09e784e9 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-24 08:43:58 -07: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
Chaithrika U S
06c71282a9 ASoC: tlv320aic3x: Enable PLL when not bypassed
PLL was not being enabled when it was not bypassed. This patch
enables the PLL when it is used. Additionally, it disables the PLL
when it is bypassed.

Without this patch, the audio on TI DM646x EVM and DM355 EVM
does not work properly. The bit clocks and the frame sync signals
from the codec are not correct and hence the playback/record are faster
than usual for most sample rates. The reason for this was that the PLL
was not enabled when it was not bypassed.

Tested on DM6467 EVM, playback tested on DM355 EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-23 08:14:29 +01:00
Greg Kroah-Hartman
864e1e8db4 Sound: remove direct access of driver_data
This is the last in-kernel direct usage of driver_data, replace it with
the proper dev_get/set_drvdata() calls.

Cc: Takashi Iwai <tiwai@suse.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-12 13:02:10 -07: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
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
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
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
Troy Kisky
ccff4b15e0 ASoC: codec tlv320aic23 fix bogus divide by 0 message
Some code analyzer software mistakenly gives
divide by 0 error messages for these lines.
This patch will end its confusion.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-06 09:24:48 +01:00
Takashi Iwai
d08664fdb5 ASoC: Fix build error in twl4030.c
Fix the (likely cut-n-paste) error by commit
16a30fbb0d, which causes the error below:
  sound/soc/codecs/twl4030.c: In function 'twl4030_read_reg_cache':
  sound/soc/codecs/twl4030.c:152: error: 'cache' undeclared (first use in this function)

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-04 10:01:11 +02:00
Cliff Cai
f692fce0cf ASoC: SSM2602: assign last substream to the master when shutting down
Fixes crash when shutting down.

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-03 11:38:23 +01:00
Cliff Cai
2552a710f4 ASoC: SSM2602: remove unsupported sample rates
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-03 11:25:51 +01:00
Peter Ujfalusi
eaf1ac8bb5 ASoC: TWL4030: Check the interface format for 4 channel mode
In addition to the operating mode check, also check the
codec's interface format in case of four channel mode.
If the codec is not in TDM (DSP_A) mode, return with error.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-01 23:46:08 +01:00
Peter Ujfalusi
16a30fbb0d ASoC: TWL4030: Use reg_cache in twl4030_init_chip
Use the codec->reg_cache instead of the array directly
in twl4030_init_chip for setting the default values.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-29 11:02:48 +01:00
Mark Brown
203350c1a8 ASoC: Initialise dev for the dummy S/PDIF DAI
Also include the header to make sure the DAI is prototyped.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28 18:54:52 +01:00
Chaithrika U S
be461ba836 ASoC: Add dummy S/PDIF codec support
McASP on DM646x can operate in DIT (S/PDIF) where no codec is needed.
This patch provides stub codec that can be used in these configurations.
On DM646x EVM the McASP1 is connected to the S/PDIF out.

Signed-off-by: Steve Chen <schen@mvista.com>
Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com>
Signed-off-by: Naresh Medisetty <naresh@ti.com>
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28 14:48:38 +01:00