- 10 Feb, 2015 2 commits
-
-
Shengjiu Wang authored
The register ASRCFG is volatile, but some bits need to be recovered after suspend/resume. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
The register SFCSR is volatile, but some bits in it need to be recovered after suspend/resume. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
- 16 Jan, 2015 38 commits
-
-
Xiubo Li authored
The 'big-endian-data' property is originally used to indicate whether the LSB firstly or MSB firstly will be transmitted to the CODEC or received from the CODEC, and there has nothing relation to the memory data. Generally, if the audio data in big endian format, which will be using the bytes reversion, Here this can only be used to bits reversion. So using the 'lsb-first' instead of 'big-endian-data' can make the code to be readable easier and more easy to understand what this property is used to do. This property used for configuring whether the LSB or the MSB is transmitted first for the fifo data. Signed-off-by:
Xiubo Li <Li.Xiubo@freescale.com> Acked-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit eadb0019)
-
Xiubo Li authored
Signed-off-by:
Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit 014fd22e)
-
Shengjiu Wang authored
Write initial words to SAI FIFO to reduce underrun error Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 7ba8ae883d84540fac5ed4147d124399537bc0b3)
-
Zidan Wang authored
We must ensure that the clocking configuration is valid as rapidly as possible. And do software reset before the others registers updates, or the registers will be reset to the default state. Signed-off-by:
Zidan Wang <b50113@freescale.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 3ad5e861)
-
Lars-Peter Clausen authored
Set the CODEC driver's suspend_bias_off flag rather than manually going to SND_SOC_BIAS_OFF in suspend and SND_SOC_BIAS_STANDBY in resume. This makes the code a bit shorter and cleaner. Since the ASoC core now takes care of setting the bias level to SND_SOC_BIAS_OFF when removing the CODEC there is no need to do it manually anymore either. The manual transition to SND_SOC_BIAS_STANDBY at the end of CODEC probe() can also be removed as the core will automatically do this after the CODEC has been probed. Signed-off-by:
Lars-Peter Clausen <lars@metafoo.de> Acked-by:
Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 0a87a6e1)
-
Zidan Wang authored
Document the device tree binding for the WM8960 codec, and modify the driver to extract the platform data from device tree, if present. Signed-off-by:
Zidan Wang <b50113@freescale.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit e2280c90)
-
Shengjiu Wang authored
If there is no codec device, the machine driver will not register the card. then alsa will not return RETRY error. update the error handling for machine driver. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
For p2p output, the output divider should align with the output sample rate, if use the Ideal sample rate, there will be a lot of overload, which will cause underrun. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
Merged from 49108fcf 1. Watermark level in sdma use byte as its unit. but asrc driver use word, there is mismatch between them. Here fix this issue and sdma can work more efficiency. 2. Enlarge the larst_period_size, when use small size, for some case, the dma task will timeout, because sdma has no much data for output. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
merge 7e1a620a The reason of crach is that some variables are not protected in function mxc_asrc_suspend(), when suspend, there is possibility to access one NULL pointer. Refine the spin lock usage, add protecting for pair_hold. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
Merge from c086d015 Return value -ERESTARTSYS is not visible for user space according to include/linux/errno.h. So use -EBUSY replace it. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
The latest asrc's channel bits is 4, bit the old asrc's channel bits is 3. So here add protection for when using the old version asrc. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com>
-
Shengjiu Wang authored
The default setting of sai is RX sync with TX, TX output the I2S clock. So When recording, we should set TCR2's divider, not RCR2's divider. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 9bfe1d33)
-
Shengjiu Wang authored
The bclk caculation should according to the slot num, not the channels. Because sometime we have two slots, but only one slot is enabled for mono channel. As when the codec wm8962 works on mono mode, it needs two slots I2S signal. So here set the default slots of sai to 2, and add function set_tdm_slots for future usage. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 991a1f26)
-
Jyri Sarha authored
Adds .ignore_pmdown_time = true to codec driver struct. HDMI codec is currently a dummy codec and doesn't benefit from pmdown delay. Even if in the future the codec would controll HDMI encoder, it would still be a digital to digital interface that should have no need for pmdown delay. Signed-off-by:
Jyri Sarha <jsarha@ti.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 69434097)
-
Jyri Sarha authored
HDMI audio can not have more than 24 bits even if on i2s bus there would be 32 bit samples. Mark this by adding .sig_bits = 24 to playback stream definition. Signed-off-by:
Jyri Sarha <jsarha@ti.com> Signed-off-by:
Mark Brown <broonie@kernel.org> (cherry picked from commit 74d813cf)
-
Shengjiu Wang authored
Implement machine driver for mqs, which use the sai as cpu dai. sai work on master mode. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit cac9eb41)
-
Shengjiu Wang authored
Implement codec driver for mqs. mqs is a very simple IP. which support: Word length: 16bit. DAI format: Left-Justified, slave mode. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 9da6bdd2)
-
Shengjiu Wang authored
After several open/close sai test with ctrl+c, there will be I/O error. The SAI can't work anymore, can't recover. There will be no frame clock. With adding the software reset in trigger stop, the issue can be fixed. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 5e74f951)
-
Shengjiu Wang authored
SAI has 4 mclk source, and the divider is 8bit. fsl_sai_set_bclk will select proper mclk source and calculate the divider. After fsl_sai_set_bclk, enable the selected mclk in hw_params(), and add hw_free() to disable the mclk. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 6dc91519)
-
Nicolin Chen authored
There is one design rule according to SAI's reference manual: If the transmitter bit clock and frame sync are to be used by both transmitter and receiver, the transmitter must be configured for asynchronous operation and the receiver for synchronous operation. And SYNC of TCR2 is a 2-width control bit: 00 Asynchronous mode. 01 Synchronous with receiver. 10 Synchronous with another SAI transmitter. 11 Synchronous with another SAI receiver. So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC bit of RCR2 to 0x1 (Synchronous with transmitter). Signed-off-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit 855675f6)
-
Nicolin Chen authored
The previous patch (ASoC: fsl_sai: Add asynchronous mode support) added new Device Tree bindings for Asynchronous and Synchronous modes support. However, these two shall not be present at the same time. So this patch just simply makes them exclusive so as to avoid incorrect Device Tree binding usage. Signed-off-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit ce7344a4)
-
Nicolin Chen authored
SAI supports these operation modes: 1) asynchronous mode Both Tx and Rx are set to be asynchronous. 2) synchronous mode (Rx sync with Tx) Tx is set to be asynchronous, Rx is set to be synchronous. 3) synchronous mode (Tx sync with Rx) Rx is set to be asynchronous, Tx is set to be synchronous. 4) synchronous mode (Tx/Rx sync with another SAI's Tx) 5) synchronous mode (Tx/Rx sync with another SAI's Rx) * 4) and 5) are beyond this patch because they are related with another SAI. As the initial version of this SAI driver, it supported 2) as default while the others were totally missing. So this patch just adds supports for 1) and 3). Signed-off-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit 08fdf65e)
-
Nicolin Chen authored
There is one design rule according to SAI's reference manual: If the transmitter bit clock and frame sync are to be used by both transmitter and receiver, the transmitter must be configured for asynchronous operation and the receiver for synchronous operation. And SYNC of TCR2 is a 2-width control bit: 00 Asynchronous mode. 01 Synchronous with receiver. 10 Synchronous with another SAI transmitter. 11 Synchronous with another SAI receiver. So the driver should have set SYNC bit of TCR2 to 0x0, and meanwhile set SYNC bit of RCR2 to 0x1 (Synchronous with transmitter). Signed-off-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit af96ff5b)
-
Nicolin Chen authored
This patch adds software reset code in dai_probe() so as to make a true init by clearing SAI's internal logic, including the bit clock generation, status flags, and FIFO pointers. Signed-off-by:
Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by:
Mark Brown <broonie@linaro.org> (cherry picked from commit 376d1a92)
-
Shengjiu Wang authored
Configure the aumux port to output SRCK and SRFS from STCK and STFS of internal port when use the SYN mode. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit f4428f56)
-
Shengjiu Wang authored
As the codec_name has a suffix, which is a index and is different for different platform or different kernel. So here change machine driver to use codec_of_node, which can be same for different platform/kernel, then we can maintain a same machine driver for fm. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit e87b135f)
-
Shengjiu Wang authored
In the frame_to_bytes(), when hw_ptr*frame_bits exceed the maxmum of unsigned long, the return value is saturated, so the appl_bytes is wrong. This patch is to correct the usage of frame_to_bytes(). Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 9e66132d)
-
Shengjiu Wang authored
There is very low possibility that channel swap happened in beginning when multi output/input pin is enabled. The issue is that hardware can't send data to correct pin in the begginning with the normal enable flow. Here use TSMA/TSMB as the trigger for sending data to workaround this issue. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 859b0fc4544bef30e269b4f6a81999db1d07a42d)
-
Shengjiu Wang authored
When test with case arecord -Dhw:0,1 | aplay -Dhw:0,0, xrun happened, the reset handler will be called, but for BE(backend) stream, the substream->ops is null. This patch is to fix this null pointer issue. Signed-off-by:
Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 4db112a8cd3caf5a553afea88cf7fe8d9781f459)
-
Nicolin Chen authored
The current imx-sgtl5000 driver always attaches the cpu-dai to ssi while in fact it could be attached to other cpu-dais like SAI. Thus this patch use a general code to support another cpu-dai. And meanwhile update the devicetree for i.MX6 Series. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit cb5dfaf44d2fdbce4329c2e4762e8450c8cd3b3c)
-
Shengjiu Wang authored
The SRPC register should be volatile, LOCK bit is set by the hardware. Signed-off-by:
Shengjiu Wang <b02247@freescale.com> (cherry picked from commit 35ac9096cbe158962e779fd9bc64aeb74abbc745)
-
Nicolin Chen authored
Not only SIS but also other read-only or write-only reigsters should be marked as volatile register so as not to let regcache cache them. So this patch just adds those missing registers. Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 56ad235ba23274fc05422ad4b13153d1c56801c4)
-
Nicolin Chen authored
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, AUDMUX needs to save all the values of registers before the system suspend and restore them after the system resume. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 3f3781143ba2800f7e3e46dbecc0c7a76d22a146)
-
Nicolin Chen authored
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SSI needs to save all the values of registers before the system suspend and restore them after the system resume. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 34c50abd9df28580b367070bc20b8bca6cd7655c)
-
Nicolin Chen authored
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SPDIF needs to save all the values of registers before the system suspend and restore them after the system resume. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit fd7d2c1a137c1b9d7adb58aaf06b90938172b964)
-
Nicolin Chen authored
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, ESAI needs to save all the values of registers before the system suspend and restore them after the system resume. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit fc69de0b0cc1d9a85ad7f7363da6dec02945964a)
-
Nicolin Chen authored
For i.MX6 SoloX, there is a mode of the SoC to shutdown all power source of modules during system suspend and resume procedure. Thus, SAI needs to save all the values of registers before the system suspend and restore them after the system resume. Acked-by:
Wang Shengjiu <b02247@freescale.com> Signed-off-by:
Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 88efde0cec71d7d70948eeaf1d22ab52b8bc8f2d)
-