Age | Commit message (Collapse) | Author |
|
Volume 255 corresponding to register value 0, the value 0 is default
value. In regcache_sync(), when the cache value is equal to default
value, this register will be skipped. So volume 255 isn't set to
register successfully.
The correct fix is to add software reset in runtime_resume, but cs42xx8
has no software reset, the hardware reset gpio pin is used by all the
perpherial device in ARD base board. So need to use another method.
In order to fix it, need to cherry-pick two patch from master branch.
Which will sync all the registers include the register which cache value
equal the default value, And remove regcache_mark_dirty().
Add update value of one register to make the cache_dirty if user press
the hardware reset pin on the board, then need to regcache_sync.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
If the property "fsl,dma-buffer-size" is present, using the specified buffer size.
Otherwise, using the default audio buffer size.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Using special pcm config for IMX series.
The dafault pcm config is using 512K DMA Buffer which will cause
allocating from OCRAM failed. The special pcm config will using 64K
DMA buffer.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
If the mclk is 24.576MHz, mqs can't support 96k and 192kHz, because
the we can't get a proper clock divider for mqs.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
bit constraint list
wm8960 just support 8k 11.025k 16k 22.05k 32k 44.1k and 48k sample
rate. Change rate constraint list to support 8k 16k 32k and 48k for
SAI master mode.
After set SAI MCLK frequency to 36864000HZ, SAI master mode can full
support 16 24 and 32 bit word length and 8k 16k 32k, 48k sample rate.
No need to add sample bit constraint list to restrict physical length,
so remove it.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
The limitation is for the case that output sampling rate is between 8kHz
and 30kHz.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
The hw parameter is set failed for si476x if si476x is not powerup,
the codec use the default value of this module. So add startup/shutdown
to powerup/powerdown FM, then we can set parameter successfully.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Delete PWR widget, enable it in probe to fix pop noise
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Revert "ENGR00320678 ASoC: cs42xx8: Revert the DAPM routes to the old one"
When PWR is PGA widget, it is used by input route and output rate, there is
a circle route "AINxL -> PWR -> AOUTxL", alsa driver will open this audio
route in kernel boot up, and refcount of pm enable is set to 1 by soc-dapm,
which cause the codec can't enter pm_suspend.
This reverts commit 8256b071de4ce0971f00f819fae3defa44fe892d.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Add regcache mask dirty in suspend, otherwise the register is not
synced with cache in resume.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Add snd_soc_pm_ops in machine driver to make the trigger suspend/resume
be called in suspend/resume. Remove platform_set_drvdata for redundance,
When register card, it has been called.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
In imx6qp, there is no mega fast. After suspend, but before resume,
there will be spdif interrupt, if set cache only in suspend, then we
can't clear the interrupt, because regmap_write only write to cache.
So the system will hang for the interrupt can't be cleared.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
With componentization we no longer necessarily need a snd_soc_codec struct for a
card. Instead of checking if the card's CODEC list is empty just use
card->instantiated to check if the card has been instantiated yet.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit c5599b87a8317738a541d8893cb327df5d04b007)
|
|
detect error
Audio mclk should be enabled early to avoid jack detect error.
It will playback from speaker in the first 2 seconds, then switch to
headphone. Steps to reproduce this issue:
1. plug out headphone and playback a wav.
2. stop playback and wait for at least 5 seconds, then plug in headphone
and playback a wav.
And set TOCLKSEL (bit1 R23) to get faster jack detect response.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
machine driver
set codec mclk in device tree instead of machine driver.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
As busfreq head file name is changed from busfreq-imx6.h
to busfreq-imx.h, change the drivers which include this
head file accordingly.
Signed-off-by: Anson Huang <b20788@freescale.com>
|
|
Since different board will have different micphone, headphone and speaker
hardware connection, support parsing audio route from device tree, so that
we can configure audio route dynamically.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
It should be "RINPUT3" instead of "LINPUT3" in "RINPUT3" audio route.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add ASRC p2p support in sai<->wm8960.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
The clock disable has no chance to be called in set_bias_level_post,
because the dapm->bias_level is set by the codec driver, machine driver
should use the card->dapm.bias_level.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
In imx6ul, the mclk need to be enable by gpr.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
add constraint list for codec master mode.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
function
Move some basic register config to late_probe function.
Move hp detect config to late_probe function to avoid detect error.
imx6ul-evk using LINPUT2 and LINTPUT3 for hp MIC, and RINPUT1 and RINPUT2
for Main MIC. When using hp MIC, we should route left channel data to right
channel. When using Main MIC, we should route right channel data to left
channel.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
add headphone and micphone jack detect event.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
add wm8960 support for imx6ul-evk board.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
add asrc p2p support in sai->mqs
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
support sai in imx6ul.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Add 96k and 192k sample rate support for hdmi audio.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add 96k and 192k sample rate support.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
The root cause is hardware issue. In imx7d-sdb hdmi, wm8960 use the
same SAI interface. After playback with wm8960, the Frame clock voltage
doesn't become 0v, wm8960 will introduce noise to frame clock.
This patch is a workaround to set wm8960 to slave mode, remove
interference to I2S signal.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
According to the wm8958 referance manual, DAC sample rate 44.1k and 48k
are supported for 24 bit word length when it is 'simple' DAC-only
playback modes. But after test, we found that it would get big noise
which can't be eliminated by configuring codec register. It should be
the codec hardward limitation, and we can't support these sample rate.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
other device
imx7d-sdb board using one SAI for wm8960 and sii902x hdmi audio, wm8960 using
SAI as slave mode and sii902x hdmi audio using SAI as master mode, so SAI
can't be used at the same time.
Forbid palyback(capture) when SAI is being used capture(playback) by other
device.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
other device
imx7d-sdb board using one SAI for wm8960 and sii902x hdmi audio, wm8960
using SAI as slave mode and sii902x hdmi audio using SAI as master mode,
so SAI can't be used at the same time.
Forbid palyback(capture) when SAI is being used capture(playback) by other
device.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
the same SAI
Just one device can playback(captrue) when using the same SAI.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Hdmi audio depends on sii902x fb driver. And add missing back quote.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
At the end of playback and before power down time, audio master clk has
been disabled and cause i2c write failed, so headphone volume adjust will
failed.
Move clk enable/disable to set_bias_level() and set_bias_level_post()
function. When power state change from on to standby, it will enable
audio master clk. And disable it when power state change from standby
to off.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add 32 bit word length support.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add 32 bit word length support.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
The CODEC doesn't care how data is laid out in memory.
Signed-off-by: Mark Brown <broonie@linaro.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
(cherry picked from commit 39e9cc46469e1d56522e6de45a6b2468d4d7eb60)
|
|
At the end of playback and before power down time, write i2c will
failed.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
According to the RM of wm8958, BCLK DIV 348 doesn't exist, correct it
to 384.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
wm8958 codec support list below:
playback 16 bit: 8k, 11.025k, 16k, 22.050k, 32k, 44k, 48k, 88.2k, 96k.
playback 24 bit: 8k, 11.025k, 16k, 22.050k, 32k, 44k, 48k.
capture 16 bit: 8k, 11.025k, 16k, 22.050k, 32k, 44k, 48k.
capture 24 bit: 8k, 11.025k, 16k, 22.050k, 32k.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
rate for 24 bit word length
change AIF1CLK to 384fs to get accurate sample rate for 24 bit word length.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add machine driver for sii902x hdmi audio. Restricting by SAI master clock,
the hdmi audio just support 16bit 24bit sample width and 32k 48k sample rate.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Set tdm slot in hw_params() for sai master mode.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Add tdm slot operation for SAI master mode. When using SAI as master
mode, we should use set_tdm_slot() helper function to set tdm slots in
machine driver.
SAI will generate BCLK depends on sample rate, slots and slot width.
And there may be unused BCLK cycles before each LRCLK transition.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
wm8958 can't support dac sample rate 64kHZ, so add a constraint
list for it.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
change coding style for wm8960 machine driver.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
There is only one channel input in hardware connection. Route it to right
channel, then all 2 channel has sound.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
wm8958 doesn't support ADC sample rate 88.2k and 96k, so add a
constraint list for capture.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|