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)
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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>
Support audio record through saif, support playback/record simultaneously
Signed-off-by: Lionel Xu <r63889@freescale.com>
(cherry picked from commit 18627873f6332e03ebd03691f51937559bbdf03d)
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>