Age | Commit message (Collapse) | Author |
|
correct typo for wm8962 description in Kconfig
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
In MX6 series, HDMI audio driver is responsible for add IEC header to
audio samples. Driver would maintain variables to cover this work.
The old driver would cause memory access exceeding issue:
1. Resume from an playback. In this case, variable maintained by ALSA is
updated while variable maintained by HDMI driver is not updated. The
mmap copy operation would run into error state due to misalignment.
2. underrun!!! The same error would happens as the items above.
In this patch, add variable check while adding IED header.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
dump_reg() in msc_spdif.c will cause kernel BUG during Suspend/Resume,
because of calling clk_enable() in an interrupt for playback.
There's also a simular issue in capture case.
Capture'd be stopped after resume for suspending.
Signed-off-by: Nicolin Chen <b42378@freescale.com>
|
|
In this patch:
1. Register substream into HDMI core driver when HDMI audio PCM is open.
2. Unregister substream out of HDMI core driver when HDMI audio PCM is
close.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
Fix clock frequency configuration on SSI
interface for the Tuner driver.
Signed-off-by: Alejandro Sierra <b18039@freescale.com>
|
|
add 100ms wait time after enable power supply for
power stability
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
CS42888 driver own 2 codec_dai for ESAI and ASRC P2P use. Due to the
delay power down mechanism, if a ASRC P2P stream is played right after
a finish of ESAI stream playback, ASRC P2P stream would be stop.
In this patch, do nothing in the delay powerdown flow if CS42888
codec is on.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
ESAI playback and ASRC P2P playback use difference codec_dai while using
the same codec. Thus they can't work together.
In this patch, add mutual protection between ESAI playback and ASRC P2P
playback.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
There is channel swap happened when playing stereo wav. According to the spec,
the initial words should be written to the ETDR register, at least one word
per enabled transmitter slot, to avoid any potential problem.
Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
|
|
add support for audio codec wm8962 in mx6sololite evk board
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
When use no ideal-ratio mode for ESAI playback, CPU should provide
accurate clock for input clock, which means input clock should be
divided by input sample rate. However, all our clock is from 24M crystal
and if the input sample rate equal to 44.1k or so, CPU can't provide
these clock.
In this patch, use ideal ratio mode thus CPU need not provide accurate
clock which can be divided by 44.1k.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
When play audio in the way of aplay *, shutdown function would not be
called and ASRC configuration would not be reconfigured. In this case,
playback would sound noise.
In this patch, put ASRC release operation into hw_free().
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
Channel swap caused by 2 reason:
1. To avoid ASRC underflow error, ASRC driver would prefill ASRC input
FIFO with 160 samples. However, 160 can't be divided by 6. In this case,
channel data miss alignment. In this patch, prefill ASRC input
FIFO with 120, which can be divided by 2,4,6,8.
2. While start P2P playback, ESAI driver would first start SDMA, then
ASRC, and last ESAI. While start ESAI, the data is not ready, thus ESAI
underrun would happens and channel data miss alignment. In this patch,
delay 1 ms between ASRC's start and ESAI's start.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
When use ASRC for ESAI P2P playback, ESAI driver would release ASRC pair
resource immediately after ASRC function's error return.It may
introduce risk that in ESAI machine driver's shutdown(), ASRC resource
release operation may be double called. In this case, system hang
happens due to ASRC register's operation with no clock.
In this patch, let all ASRC resource release operation in ESAI machine
driver's shutdown().
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
Issue: When playback HDMI audio in SDMA stress test, HDMI audio may stop
caused by SDMA channel's failing to work. While checking the SDMA register
and HDMI module stauts, we found that SDMA fall to an unknown error state.
The issue is detected both in RIGEL TO1.1 and ARIK TO1.2.
This patch introduces a workround for this issue: For the memory passed
to SDMA core, HDMI driver would allocate it with the attribute of C=0,
B=0 instead of C=0, B=1. This patch have be tested in RIGEL TO1.1 for
about 60 hours, no issue happens.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
In RIGEL TO1.1, the same HDMI_SDMA fix is introduced as ARIK TO1.2. Add
support for RIGEL TO1.1 for HDMI_SDMA functionality.
In this patch:
1.Add hdmi_SDMA_check() interface to judge whether MX6 chip
support HDMI_SDMA.
2.Replace mx6q_version() check with hdmi_SDMA_check() to support
both ARIK To1.2 and RIGEL TO1.1.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
HDMI use SDMA for buffer switch. Set HDMI audio's SDMA priority to the
same level as other audio device. This adjust can avoid noise due to
SDMA cpu race failing.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
In ESAI_ASRC, to use ASRC for p2p playback, ESAI driver would maintain
an variable to keep track of ASRC pair number allocated. So every time
ESAI driver want to use ASRC, he would first init the variable to a value
(0 in ESAI driver)stand for unvalid pair number and then request an valid
pair number. At last, open the ASRC clock for ASRC register access.
However, ASRC driver treat 0 as an valid pair number. Thus, if an ESAI ASRC
playback is failed, ESAI driver would check whether the pair number is valid.
If the pair number is valid, ESAI driver would access ASRC register to do some
clean work. Thus, the init 0 value would be treat as an valid pair number and
ASRC register would be access without ASRC clock. In the case, an system
hang happens.
In this patch, init pair number variable to -1 after its allocation.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
Fix two build warnings on wm8962
Signed-off-by: Xinyu Chen <Xinyu.chen@freescale.com>
|
|
To support p2p playback, ESAI driver would copy platform data to
esai_asrc struct. The platform data only exist on boards that supports
ESAI. However, for ARM2 board, it supports ESAI but not necessary
get the codec CS42888. Thus the probe() in ESAI driver would also try to
copy the platform data from board init file.
The p2p playback now only support ARD board, so the ESAI probe() for
ARM2 would access unexisted address and cause an kernel dump.
In the patch, check the platform data address before copy.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
In the origin code, ESAI driver supoprt audio p2p playback by setting
input PCM data's sample rate thought amixer interface.It is ugly and
request user application call amixer control interface everytime before
and playback.
In this patch, user can call the audio p2p playback by writing data to
an special virtual device. Driver would automatically get the params of
input PCM. At the same time, driver would get the output sample rate and
word data. With the data abover, driver can set ASRC properly and audio
p2p palyback is support.
This patch mainly focus on:
1 clean old p2p playback way for ESAI.
2 Setup the output sample rate and word width to virtual
device's substream_runtime's private data. Everytime the virtual
device is called, the data abover is used for config ASRC, ESAI,
and codec.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
For ESAI sound card, ESAI driver setup device 0 for raw ESAI playback
and capture.
In this patch, add ESAI virtual device 1 under ESAI sound card. Device 1
is for ESAI audio p2p playback. Every time user use device 1 for
playback, ASRC would be called defaultly. Thus for device 1, it can
support all sample rate between 8k ~ 192k.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
For chip version easily than TO1.1, HDMI use internel DMA enginue for
audio tranfer. Due to capability of HDMI module, FIFO underrun is
unavoidable.
For chip TO 1.2, introducing SDMA to help HDMI audio DMA. With the help
of SDMA, HDMI audio can use ping-pong buffer mechanism and FIFO underrun
can be avoid.
In this path: Add SDMA support for i.MX6Q later than TO1.2.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
remove unused variable
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
SSI driver improvement:
1. add parameter check in imx_ssi_set_dai_clkdiv(),
2. add TX/RX FIFO1 watermark settings,
3. remove the hardcode for watermark setting.
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
CA index table should followed CEA-861-D table 20.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
Add support for 4, 6 channels p2p playback in ESAI.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
support for continuously playback different sample bit audio
streams with -Dplughw:0,0 option
such as the command: 'aplay -Dplughw:0,0 16bit.wav 24bit.wav'
before prohibit reenter hw_params, now remove this limitation
to support this feature.
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
When ESAI call ASRC for p2p playback. The datawidth may be
changed. The cpu dai would configure the ESAI data width according
to the modified datawidth(output_bits). The type mismatch between output_bits
and cpu dai's switch branch cause cpu dai's hardware parameter set
fail.
Match the type of output_bits to the switch branch in cpu dai's hardware
parameter configuration function.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
The underrun warning appears when playback high bit-rate and multi-channel(
greater than 6) wav, increase DMA buffer size can resolve this issue.
Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
|
|
The origin ASRC driver did not support input and output wordwidth
config but an total wordwidth config instead. And the input wordwith
and output wordwidth are all fixed to 24 bit.
In this path, we do things below:
1 Update to use input wordwidth and output wordwidth config seperately
instead of an total wordwidth config.
2 Set corresponding DMA(input/output) buswidth according ASRC's input
and output wordwidth config.
3 Support 16/24 bit input wordwidth and 24 bit output wordwidth.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
set default volume for playback and record
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
To remove mono playback support for ESAI.
Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>
|
|
Fix HDMI build warining
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
If we want to use ESAI call ASRC, we need to know the input sample
rate as well as the output sample rate. however, cause of ALSA-LIB,
the input sample rate pass down to ALSA-DRIVER is not accurate. For
example, if the ALSA-DRIVER only support 48KHz playback and we want
to play an 16KHz audio file, the sample rate params the ALSA DRIVER
see is 48KHz but not 16KHz. So, the ALSA-DRIVER do not know the
original sample rate, and thus unable to config ASRC properly.
In this patch, we add an amixer control interface for alsa lib plugin to
config the input sample rate before playback. If no plugin, user
can call the amixer control interface to manually use ASRC for rate
convert.
For example, if we need to playback an 24bit_24K audio wav file without
call the plug. The sound card is 0.
1 Get the ASRC capability: amixer sget "ASRC"
1 Set the input samplerate: amixer sset "ASRC" "24KHz"
2 Play; aplay -Dhw:0 audio_24k24S-S24_LE.wav
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|
|
Now clock operation occurs in mxc_spdif_trigger(), and
because clock operation is forbidden to exist in interrupt
context, move disabling clock operation to mxc_spdif_shutdown()
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
It is a warning cause by HDMI driver irq enable count mismatch.
The purpose of maintain HDMI irq count is to disable hdmi_iahb_clk
when HDMI cable plugout.
But hdmi_iahb_clk parent ahb clock is always enabled when system run,
so hdmi_iabh_clk power consumption is very low.
The function clk_get_usecount introduce by irq count maintain
is not safety in SMP.
Remove HDMI irq count in HDMI driver, keep hdmi_iahb_clk always run.
and disable hdmi_iahb_clk and hdmi_isfr_clk when FB Blank.
Signed-off-by: Sandor Yu <R01008@freescale.com>
|
|
imx-pcm.h should not include imx-ssi.h, or else DRV_NAME is
redefined
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
if there are no amic_detect pin, by checking
DMIC pin status to get to know which mic is used
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
1. add support for mx6 sl
2. operate clock by callback
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
* Disable symbol error interrupt when rx dpll is unlocked
This means that no spdif Rx data had been identified and
driver will keep issuing sym_err interrupt request.
* Add check to only execute capture_start/stop
functions if rx_active is set.
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
move hp/mic detect pin handler from imx_wm8962_probe()
to imx_wm8962_init().
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
* Add capture/playback stop function
Stops capture/playback process
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
* Add start capture/playback function
Start sequence for capturing/playing audio data.
* Remove caprure/playback prepere function hwd initialization
handled by trigger function when user/app starts capture/play
process.
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
* Add trigger function in order to handle user
space events start/stop/pause playback/capture
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
BugLink: http://bugs.launchpad.net/bugs/882723
Disabling/re-enabling clocks is not necessary as it's done in *_startup()
and *_shutdown() functions, and shall be performed during suspend/resume.
This is causing warnings of un-matched clk_enable()/clk_disable()
Rework patch for imx_3.0.15 code base
Signed-off-by: Eric Miao <eric.miao@linaro.org>
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
* Fix read register access for debug info
* Read from spdif registers with a disabled
spdif core clock leads to kernel hang.
* Avoid it by enabling/diabling core clk.
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
* Add clk_enable return checks, if clocks aren't enabled
writting/reading from spdif register will cause
system to become unresponsive.
* Remove spdif_audio_clk enable/disable calls
this clock is not assigned and is reposible for making
the system unresposive.
Signed-off-by: Adrian Alonso <aalonso@freescale.com>
|
|
set default volume for headphone and speaker
Signed-off-by: Gary Zhang <b13634@freescale.com>
|
|
In ARIK, to prevent noise cause by false triggered burst, we reduce
the incr type to 4. and the change may cause bus_error because a
burst may unexpectly stop and thus an AHB bus error happens.
Reset HDMI Audio FIFO state to prevent AHB bus error.
Signed-off-by: Chen Liangjun <b36089@freescale.com>
|