Commit Graph

5734 Commits

Author SHA1 Message Date
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
Zeng Zhaoming
4d8879d67e ENGR00131932 upgrade SDMA scripts to 1.1, dual SSI FIFO support 2010-12-13 15:05:29 -06:00
William Lai
0021de74f1 ENGR00125396 ALSA CS42888: Remove the platform device from the bus
Use the platform_device_unregister instead of platform_device_put,
to remove the device from the audio subsystem, when it fails to reigster
the cs42888 card.

Signed-off-by: William Lai<b04597@freescale.com>
(cherry picked from commit b096820108269d4d67b44fd8652c475263ee8a18)
2010-08-10 11:52:03 -05:00
William Lai
88aa8e382a ENGR00125345 ALSA CS42888: Judge the codec member after initialization
Judge the codec memeber of the snd_soc_card_imx_3stack after the
platform_device_add function, as only after this function, the
cs42888_codec pointer will be passed to.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:52:01 -05: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
4b8658aca5 ENGR00125263 ALSA CS42888: System hangs when suspend and resume
Avoid of registering the audio sub-system when the codec does
not exist.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:51:55 -05:00
William Lai
7ee939a4e2 ENGR00124740-4 MX25/35 ALSA: Changes due to ESAI as platform device
Make ESAI as a platform device, and pass the audio data to use
the external memory by default.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:51:27 -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
William Lai
777a330e23 ENGR00124740-1 MX53 ALSA: Make ESAI as a platform device
Make ESAI a platform device and pass the register base address
by resource and then use ioremap.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:51:25 -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
Lionel Xu
2df29e84b6 ENGR00122302 MX23 ALSA: Resolve the failure when pausing and resuming playback
To reslove the problem when resuming a playback from pausing

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:51:10 -05:00
Alan Tull
c65e5f8992 ENGR00123838 alsa: fall back to external ram if iram fails
If iram_alloc fails, should warn and fall back to external ram.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:50:43 -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
Lionel Xu
dba7810ea8 ENGR00122307 MX23 ALSA: Speaker is muted after playback
Speak should not be muted after playback

Signed-off-by: Lionel Xu <r63889@freescale.com>
2010-08-10 11:50:34 -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
e6e20a48a3 ENGR00122462 mxs: support mmapped buffer for 24/32 bit spdif
Due to an apparent hw bug we have to shift data in the audio buffer by
one byte to play out S/PDIF.  ENGR00122025 and ENGR00122231 are a
workaround for playback with non-mmapped buffers.  This patch is
the workaround for mmapped buffers.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:49:11 -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
ee7cca6f7c ENGR00122231 mxs: support read in mxs_pcm_copy to fix record
Record was broken by the patch that fixed 24 bit S/PDIF.

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:48:57 -05:00
Lionel Xu
edd686fc2f ENGR00122136 MX28 ALSA: Fail to playback wavfiles with sample rate over 48 khz
To resolve the problem of playing back wavfile with sample rate over 48khz.

Signed-off-by: Lionel Xu <r63889@freescale.com>
(cherry picked from commit f1af83a27357d7da1a89d79f8ed2d74fbfb7dc34)
2010-08-10 11:48:54 -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
Xinyu Chen
bfe568fad9 ENGR00121454 SSI: correct the imx_ssi_irq handler's devid parameter
correct the imx_ssi_irq handler's devid parameter

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:47:19 -05:00
Rob Herring
7920b1cda7 ENGR00121386 imx spdif: get irq from platform resources
Pass the irq number in platform device resources.

Signed-off-by: Rob Herring <r.herring@freescale.com>
2010-08-10 11:47:16 -05:00
Alan Tull
4b91afc59c ENGR00120827 make ssi a platform device
- put base address and irq in platform data.
- use clk usecounts instead of ssi_active struct
- allow up to MAX_SSI_CHANNELS in hardware

Signed-off-by: Alan Tull <r80115@freescale.com>
2010-08-10 11:47:03 -05:00
Rob Herring
a45319ebdb ENGR00120394-1 imx: remove unneeded spba related code
The spba defaults to all masters enabled and this is fine as
all chips only have ARM and SDMA as masters.

Signed-off-by: Rob Herring <r.herring@freescale.com>
2010-08-10 11:46:54 -05:00
Rob Herring
4d30561066 ENGR00120393-3 imx asoc: use iram allocator
Convert i.MX ASoC driver to use iram allocator functions.

Signed-off-by: Rob Herring <r.herring@freescale.com>
2010-08-10 11:46:52 -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
Wallace Wang
e0754698a4 ENGR00119150 Bluetooth: Handsfree audio has noise
When bluetooth handsfree is enabled, sgtl5000 and bt
sound cards are both opened. BT sound card playback
can't use IRAM as sgtl5000 has used IRAM. The bt audio
platform data - ext_ram is not set when kernel porting
to 2.6.31.

Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:46:08 -05:00
Wallace Wang
f44d879824 ENGR00119005 ASRC: Remove unsupported sample rates from mixer
ASRC minmal output sample rate is 32000.  When ASRC
is used as ASRC-ESAI per_2_per mode, the unsupported
sample rates should not be included in ASRC mixer.

Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:46:01 -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
Wallace Wang
96cb1f226d ENGR00118790 ASoC AC97 codec driver
Add ac97 mode support for SSI module

Signed-off-by: Wallace Wang <r59996@freescale.com>
2010-08-10 11:45:51 -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
Guoqing Jiang
05c22fb06c ENGR00118701 MX25:Fix headphone plug-in caused system hang
To keep system runs well after plugin headphone, replace disable_irq with
disable_irq_nosync.

Signed-off-by: Guoqing Jiang <b22156@freescale.com>
2010-08-10 11:45:47 -05:00
William Lai
0069614e9f ENGR00118736 Mx35 ASoc: Trying to free already-free IRQ 240
Trying to free already-free IRQ 240 causes the warning dumped out
when boot up the kernel.
Return the error code in the probe function, which indicats the
failure of the platform driver probing. Then the platform driver remove
function will not be called, avoiding of freeing an already-free IRQ again.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:45:47 -05:00
William Lai
1a156d0a01 ENGR00118226 MX35 PM: System crashes when try to wake up from standby
The ak4647_codec is not initialized as there is no ak4647 codec existing
on MX35 board. In the 31 kernel, the card and codec drivers are
registered separately, and there is no check whether the codec is probed
successfully or not. On MX35 board, the card is sucessfully registered,
but there is no ak4647 codec. In this case, the system will crash if the
system try to invoke the codec's resume function.
To resolve the problem, add a check in registering the card. If the
codec does not exist, give up registering the card either.

Signed-off-by: William Lai <b04597@freescale.com>
2010-08-10 11:45:35 -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