Age | Commit message (Collapse) | Author |
|
Without MCLK the sgtl5000 does not answer I2C reads.
So defere probing to later if no sgtl5000 is found.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
|
|
Since commit e5d80e82e32e (ASoC: sgtl5000: Convert to use regmap directly) a
kernel oops is observed after a suspend/resume sequence.
The kernel oops happens inside sgtl5000_restore_regs() as codec->reg_cache is no
longer a valid pointer.
Add the remaining register entries into sgtl5000_reg_defaults[] and remove
sgtl5000_restore_regs() completely, which allows suspend/resume to work fine and
make the code simpler.
Tested on a im53-qsb board.
Reported-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Tested-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 29aa37cddfb9b721013ff28608200d73a9426368)
|
|
GPIO number 0 *is* legal and must be accepted.
Set .ena_gpio to -ENODEV on regulators having no GPIO in preparation
of a code change to accept GPIO 0 in the config.
(cherry picked from commit c87ddbb1325a448d56a920513206592f03bca117)
Conflicts:
arch/arm/mach-imx/gpc.c
drivers/regulator/88pm8607.c
drivers/regulator/ab8500-ext.c
drivers/regulator/ab8500.c
drivers/regulator/ad5398.c
drivers/regulator/arizona-micsupp.c
drivers/regulator/isl6271a-regulator.c
drivers/regulator/lp3972.c
drivers/regulator/max1586.c
drivers/regulator/max8660.c
drivers/regulator/max8925-regulator.c
drivers/regulator/max8952.c
drivers/regulator/max8998.c
drivers/regulator/mc13783-regulator.c
drivers/regulator/s2mps11.c
drivers/regulator/tps65217-regulator.c
drivers/regulator/tps6524x-regulator.c
drivers/regulator/wm831x-dcdc.c
drivers/regulator/wm831x-ldo.c
|
|
Each spdif sample is qualified by the validity bit.
The bit shall be logic '0' if the audio sample is valid.
This commit configures the transmitter to always send '0' rather
than always send '1'.
|
|
For SAI master mode, when Tx(Rx) sync with Rx(Tx) clock, Rx(Tx) will
generate bclk and frame clock for Tx(Rx), we should set RCR4(TCR4),
RCR5(TCR5) and RMR(TMR) for playback(capture), or there will be
sync error sometimes.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 1b4f2c2b400dac1145970dde5588309f6504a50a)
|
|
Attempt to read volatile register when cache_only is set will return
EBUSY. After playback/record, wm8962_runtime_suspend function will set
cache_only flag, so the volitale register ALC2 can't be read from cache.
Separate ALC Coefficients to four reigsters, the volatile register ALC2
will be read from hardware instead of cache.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit 5ec8878be12530517b4c8ae307441a0ac16071a3)
|
|
After removing idle_bias_off, it will not set bias to off after playback,
it just set bias to standby, and will not power down codec VREF, so it can
decrease the obvious pop noise at the first second.
Only in suspend, it will set codec bias to off.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
(cherry picked from commit ca7958ba19f5cee32215894fc7664b3451f7e9e6)
|
|
There is a substantial amount of drivers that in go to SND_SOC_BIAS_OFF on
suspend and go back to SND_SOC_BIAS_SUSPEND on resume (Often this is even
the only thing done in the suspend and resume handlers). This patch
introduces a new suspend_bias_off flag, which when set by a driver will let
the ASoC core automatically put the device's DAPM context at the
SND_SOC_BIAS_OFF level during suspend. Once the device is resumed the DAPM
context will go back to SND_SOC_BIAS_STANDBY (if the context is idle,
otherwise to SND_SOC_BIAS_ON).
This will allow us to remove a fair bit of duplicated code from the drivers.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
(cherry picked from commit 86dbf2ac6fcb2d2932d4610f2dfe0954aa0633f7)
Conflicts:
sound/soc/soc-core.c
|
|
For lpsr mode, the codec will be power down, the register value will be lost,
so we should store the context at the end of codec suspend, and load the
registers at the beginning of codec resume.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
When codec sysclk is 24576000, the sample rate ratio can be 128, 192,
256, 384, 512, 768, 1024. So 32k, 48k, 64k, 96k, 192k can be support.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
the max register value of mic boost pga should be 3.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The input PGAs have a gain range from -17.25dB to +30dB in 0.75dB steps.
The boost stage can provide additional gain. For line inputs, -12dB to
+6dB gain is available on the boost mixer. For micphone inputs, it can
provide up to +29dB additional gain from the microphone PGA.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
The min gain is the corresponding gain value when the register value is 0
instead of 1, just correct it.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
|
|
Commit c9e065c27fe9 ("ASoC: dapm: Make sure to always update the DAPM graph
in _put_volsw()") stopped updating register values in those cases where
initial after boot state of kcontrol appears to not change but where
register value still needs update because it is not in sync with the
kcontrol state.
Fix this by doing snd_soc_test_bits() unconditionally as it was before but
by using separate flags for kcontrol and register state changes. This allow
both DAPM graph to be updated when disabling auto-muted control and update
register if it is out-of-sync in respect of kcontrol state.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit 18626c7ebc05e6486712cc129d8da83d07da9dc7)
|
|
Revert "MLK-10213-2: ASoC: dmaengine: Merge trigger RESUME to START and SUSPEND to STOP"
This reverts commit a21f8a846f653fe5415961fe8006f0f9688fe908.
commit 0e8928f has supported pause/resume interface in dma driver. So no
need to merge trigger RESUME to START and SUSPEND to STOP any more.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
The regcache_sync in fsl_sai_resume will write one data to FSL_SAI_TDR
register, which will cause one more data is pushed to FIFO, after resume,
the channel swap.
The reason for regcache_sync write volatile register is caused by there
is no default value for registers, then regcache_rbtree will work abnormal.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
restore pin setting for mqs in suspend/resume.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
add snd_soc_pm_ops for mqs machine driver to make the trigger
suspend/resume be called in suspend/resume.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
resume back
Revert "MLK-11410-1 ASoC: fsl_sai: restore pin setting for SAI"
This reverts commit 28fd246b81d9cb83c8b31edd829b53328cb46729.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
Revert "MLK-10359: ASoC: fsl_ssi: move pm runtime enable/disable to trigger function"
This reverts commit 6fe69c2ff824ddb2c260b31615641d7d942bf2d6.
commit 6fe69c2ff82 "MLK-10359: ASoC: fsl_ssi: move pm runtime
enable/disable to trigger function " calls the pm_runtime_ functions
from an unsafe context as shown when building a kernel
with CONFIG_DEBUG_ATOMIC_SLEEP=y:
root@freescale /$ aplay /home/clarinet.wav
BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:954
in_atomic(): 1, irqs_disabled(): 128, pid: 781, name: aplay
CPU: 0 PID: 781 Comm: aplay Not tainted 3.10.53-02670-g6fe69c2 #2
[<80013f98>] (unwind_backtrace+0x0/0xf8) from [<80011a2c>] (show_stack+0x10/0x14)
[<80011a2c>] (show_stack+0x10/0x14) from [<80313634>] (__pm_runtime_resume+0x84/0x8c)
[<80313634>] (__pm_runtime_resume+0x84/0x8c) from [<804cc4b4>] (fsl_ssi_trigger+0x54/0x200)
So revert such commit.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 16d24d435c2ce1ae6f8139af7fdcf627d9b32b72)
|
|
When building kernel with CONFIG_DEBUG_ATOMIC_SLEEP=y, there will be
kernel dump.
BUG: sleeping function called from invalid context at drivers/base/power/runtime.c:954
in_atomic(): 1, irqs_disabled(): 128, pid: 705, name: aplay
CPU: 0 PID: 705 Comm: aplay Not tainted 3.10.53-02755-gbee6071 #1472
[<80013f4c>] (unwind_backtrace+0x0/0xf8) from [<800119c0>] (show_stack+0x10/0x14)
[<800119c0>] (show_stack+0x10/0x14) from [<8031fd68>] (__pm_runtime_resume+0x88/0x90)
[<8031fd68>] (__pm_runtime_resume+0x88/0x90) from [<80509ba8>] (fsl_sai_trigger+0x98/0x300)
[<80509ba8>] (fsl_sai_trigger+0x98/0x300) from [<804fef9c>] (soc_pcm_trigger+0x90/0xa0)
[<804fef9c>] (soc_pcm_trigger+0x90/0xa0) from [<804eae60>] (snd_pcm_do_start+0x2c/0x30)
[<804eae60>] (snd_pcm_do_start+0x2c/0x30) from [<804eaad8>] (snd_pcm_action_single+0x38/0x78)
[<804eaad8>] (snd_pcm_action_single+0x38/0x78) from [<804eada8>] (snd_pcm_action_lock_irq+0x84/0xa4)
[<804eada8>] (snd_pcm_action_lock_irq+0x84/0xa4) from [<804eba58>] (snd_pcm_common_ioctl1+0x16c/0xd68)
[<804eba58>] (snd_pcm_common_ioctl1+0x16c/0xd68) from [<804ecc8c>] (snd_pcm_playback_ioctl1+0x158/0x4d0)
[<804ecc8c>] (snd_pcm_playback_ioctl1+0x158/0x4d0) from [<800d5bb8>] (do_vfs_ioctl+0x80/0x624)
[<800d5bb8>] (do_vfs_ioctl+0x80/0x624) from [<800d6198>] (SyS_ioctl+0x3c/0x5c)
[<800d6198>] (SyS_ioctl+0x3c/0x5c) from [<8000e200>] (ret_fast_syscall+0x0/0x30)
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 99095f3362bc53eb414dabbbe7da5778f3d54f25)
|
|
restore pin setting for SAI in suspend/resume.
Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
|
|
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>
|
|
There is occasion that dma callback come late after the substream is released.
Then there will be kernel dump.
[<805866b0>] (imx_pcm_dma_complete) from [<802fad9c>] (sdma_handle_channel_loop.isra.25+0x48/0x54)
[<802fad9c>] (sdma_handle_channel_loop.isra.25) from [<802fae48>] (sdma_tasklet+0xa0/0x1d4)
[<802fae48>] (sdma_tasklet) from [<800356e0>] (tasklet_action+0x64/0xf8)
[<800356e0>] (tasklet_action) from [<80034ea0>] (__do_softirq+0x104/0x218)
[<80034ea0>] (__do_softirq) from [<80035220>] (irq_exit+0xa8/0xec)
[<80035220>] (irq_exit) from [<8000ed44>] (handle_IRQ+0x3c/0x90)
[<8000ed44>] (handle_IRQ) from [<80008578>] (gic_handle_irq+0x28/0x5c)
[<80008578>] (gic_handle_irq) from [<80012100>] (__irq_svc+0x40/0x70)
The reason is the sdma tasklet is async with audio substream release. ALSA
think when terminate dma, the dma should be stopped and no callback be called.
This patch is to add new api dma_sync_wait_tasklet(), which is called in
snd_dmaengine_pcm_close(). It will make sure the callback not be called
after this funtion. Tasklet_kill is to wait scheduled tasklet end.
Tasklet_kill can't be added to terminate dma function, because terminate dma
function may be called in interrupt, but tasklet_kill can't be called in
interrupt context.
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
Enable ASRC p2p for ssi->wm8962, base on the new p2p script,
which support to select dualfifo for source/destination device.
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>
|
|
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>
|