summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2014-04-22ENGR00309468-3 ASoC: fsl_spdif: Print selected rate for debugNicolin Chen
It'd better to tell people what's the current rate from the clock selecting function against the required sample rate. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 468755326e5ab405e1567480d4c09c3387ce028a)
2014-04-22ENGR00309468-2 ASoC: fsl_spdif: Add sysclk_df divsor support for sysclk usageNicolin Chen
The sysclk, which could be connected to IPG clock, is one of the eight clocks on the inner clock mux of SPDIF. Previously we forbade the usage of this clock due to imperfect clock selecting function. This patch adds the sysclk_df divisor so as to complete sysclk function. [ In order to potect those clocks from other modules and the situation when SPDIF root clock is shared with other module (ASRC on imx6sx for example) that demands us to fix the clock and not to change its rate, starting from now on, we no longer use clk_round() and clk_set_rate(). ] Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 3092f062768d7c4312c54c7ec2c5f9acfbbf7e69)
2014-04-22ENGR00309468-1 ASoC: fsl_spdif: Add coreclk control for DMA accessNicolin Chen
Even if we assign regmap to manage the coreclk control, we still need to open the clock if we are going to run the driver because DMA access would not be detected by regmap. So this patch adds clock control for coreclk. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 7e9a6bb3eb4df21f96a6f3efd1f3a334a910b2ac)
2014-04-21ENGR00309566 ASoC: fsl: fix maxburst is not accurateShengjiu Wang
The src_maxburst and dst_maxburst means the watermark level for p2p, no need to be scaled. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-21ASoC: fsl_spdif: Fix wrong OFFSET of STC_SYSCLK_DIVNicolin Chen
It should use STC_SYSCLK_DIV_OFFSET. Thus fix it. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 6ae6698276ca36f37afc2ad38054092021519ad4)
2014-04-18ENGR00309297-1 ASoC: imx-cs42888: Error out if failed to get p2p paramsNicolin Chen
There's a possiblity that ASRC P2P would error out during its probe() due to missing some DT bindings for example. If that happens, this asrc_p2p would be a NULL pointer and accessing it would cause Kernel Panic. Thus this patch adds an error out here to keep it safe. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit cc678a578ef873127b8237680282f1cd55fe1873)
2014-04-17ENGR00309073-3 ASoC: fsl: Support recording with asrc p2pShengjiu Wang
update asrc p2p to support recording, which use ideal ratio mode. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-17ENGR00309073-2 ASoC: fsl: Add new p2p struct for code ligibilityShengjiu Wang
improve code ligibility. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-17ENGR00309073-1 ASoC: fsl: Naming of p2p item is not properShengjiu Wang
Change the output-rate, output-width to p2p-rate, p2p-width. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ASoC: fsl_sai: Use FSL_SAI_xXR() and regmap_update_bits() to simplify codeNicolin Chen
By doing this, the driver can drop around 50 lines and become neater. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 2a266f8b2ae790454edb79cb8c707c9305e0307a)
2014-04-16ASoC: fsl_sai: Fix incorrect condition check in trigger()Nicolin Chen
Patch ASoC: fsl_sai: Fix buggy configurations in trigger() doesn't entirely fix the condition: FRDE of the current substream direction is being cleared while the code is still using the non-updated one. Thus this patch fixes this issue by checking the opposite one's FRDE alone since the current one's is absolutely disabled. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit f84526cfae46672308a361333c76b724384b61ee)
2014-04-16ENGR00307835-4 ASoC: fsl: implement ASRC P2P xrun handlerShengjiu Wang
When ASRC P2P is working, it will check the xrun status of cpu dai in the back end bistream. then will do Whole route stop and restart. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00307835-3 ASoC: fsl: implement the ESAI xrun handler.Shengjiu Wang
When esai xrun happened, there is possibility of channel swap. So ESAI need to be reset. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00307835-2 ASoC: dmaengine: Add two function for dmaengine_pcmShengjiu Wang
Add check_xrun and device_reset for dmaengine_pcm Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00307835-1 ASoC: fsl: refine esai driver for sync modeShengjiu Wang
1. PCRC and PRRC should be set after the setting of control register according the RM. Then no need init TCCR and RCCR in init function. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00307635-6 ASoC: fsl: Enable SAI for imx-sgtl5000 and imx-wm8962Nicolin Chen
Since we are able to link SAI and sgtl5000 and wm8962, we should update the Kconfig to make it build-in if enabling their machine drivers. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00307635-5 ASoC: imx-wm8962: Add non-SSI cpu dai supportNicolin Chen
The current imx-wm8962 machine driver is designed for SSI as CPU DAI only while as its name we should make the driver more generic to any other CPU DAI on i.MX serires -- ESAI, SAI for example. So this patch makes the driver more general so as to support those non-SSI cases. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00307635-1 ASoC: fsl_sai: Specify buffer size for SAINicolin Chen
Add a new micro for SAI so as to make further define flexible. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Add clock controls for SAINicolin Chen
The SAI mainly has the following clocks: bus clock control and configure registers and to generate synchronous interrupts and DMA requests. mclk1, mclk2, mclk3 to generate the bit clock when the receiver or transmitter is configured for an internally generated bit clock. So this patch adds these clocks and their clock controls to the driver. [ To concern the old DTB cases, I've added a bit of extra code to make the driver compatible with them. And by marking clock NULL if failed to get, the clk_prepare() or clk_get_rate() would easily return 0 so no further path should be broken. -- by Nicolin ] Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Acked-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 17d1eb6628e70488c44c46003dcfe583696bb7b7)
2014-04-16ENGR00307592 ASoC: fsl_asrc: Add delay after enabling ASRC p2pNicolin Chen
When using ASRC p2p as a for-end with other back-end modules like ESAI, it'd be safer to add 1ms delay, less might be futile for extreme cases, after enabling ASRC so as to keep ASRC output FIFO with enough data to content the DMA burstsize of back-ends and accordingly prevent underrun that might happen to them. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Fix Bit Clock Polarity configurationsNicolin Chen
The BCP bit in TCR4/RCR4 register rules as followings: 0 Bit clock is active high with drive outputs on rising edge and sample inputs on falling edge. 1 Bit clock is active low with drive outputs on falling edge and sample inputs on rising edge. For all formats currently supported in the fsl_sai driver, they're exactly sending data on the falling edge and sampling on the rising edge. However, the driver clears this BCP bit for all of them which results click noise when working with SGTL5000 and big noise with WM8962. Thus this patch corrects the BCP settings for all the formats here to fix the nosie issue. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Acked-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit ef33bc3217c7aa9868f497c4f797cc50ad3ce357)
2014-04-16ENGR00306857 pulseaudio5.0 mute Headphone volume when Headphone pluggedShengjiu Wang
Pulseaudio will detect the Headphone Jack, then swith to Headphone. So register new Jack for Headphone, the iface=CARD. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-16ENGR00306875-1 Revert "ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl ↵Nicolin Chen
pointer" After change the pointer, ALSA lib would re-copy the initial data to DMA buffer because the pointer is pointing the zero position at the beginning, which results an audiable duplicated playback at the first eight periods. Even though dropping this patch would cause pointer being incorrectly estimated. But to maintain the sanity of basic playback, we revert the previous patch. This reverts commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit cb6cd68b00fbb52852101ca2f3bc93ae45310b66)
2014-04-16ASoC: fsl_sai: Add imx6sx platform supportNicolin Chen
The next coming i.MX6 Solo X SoC also contains SAI module while we use imp_pcm_init() for i.MX platform. So this patch adds one compatible route for imx6sx and updates the DT doc accordingly. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 30c35252aadb460e009ca8a3fdc8891903bdfc66) [ Added essential parameters to imx_pcm_init() calling due to build error, resulted from the define change of the function on the upstream. ] Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Separately enable interrupts for Tx and Rx streamsNicolin Chen
We only enable one side interrupt for each stream since over/underrun on the opposite stream would be resulted from what we previously did, enabling TERE but remaining FRDE disabled, even though the xrun on the opposite direction will not break the current stream. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Acked-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 20ea0d31528f7a461a4ecfb5924ca228bf3ca3c5)
2014-04-16ASoC: fsl_sai: Fix buggy configurations in trigger()Nicolin Chen
The current trigger() has two crucial problems: 1) The DMA request enabling operations (FSL_SAI_CSR_FRDE) for Tx and Rx are now totally exclusive: It would fail to run simultaneous Tx-Rx cases. 2) The TERE disabling operation depends on an incorrect condition -- active reference count that only gets increased in snd_pcm_open() and decreased in snd_pcm_close(): The TERE would never get cleared. So this patch overwrites the trigger function by following these rules: A) We continue to support tx-async-while-rx-sync-to-tx case alone, which's originally limited by this fsl_sai driver, but we make the code easy to modify for the further support of the opposite case. B) We enable both TE and RE for PLAYBACK stream or CAPTURE stream but only enabling the DMA request bit (FSL_SAI_CSR_FRDE) of the current direction due to the requirement of SAI -- For tx-async-while-rx-sync-to-tx case, the receiver is enabled only when both the transmitter and receiver are enabled. Tested cases: a) aplay test.wav -d5 b) arecord -r44100 -c2 -fS16_LE test.wav -d5 c) arecord -r44100 -c2 -fS16_LE -d5 | aplay d) (aplay test2.wav &); sleep 1; arecord -r44100 -c2 -fS16_LE test.wav -d1 e) (arecord -r44100 -c2 -fS16_LE test.wav -d5 &); sleep 1; aplay test.wav -d1 Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Acked-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d827786ea623da7ceadaa037f2574a19cbeb90e5)
2014-04-16ENGR00305624-2 ASoC: imx-hdmi-dma: Correct the appl pointerNicolin Chen
We might not be able to get appl_ptr, so we estimated it by using hw_ptr, while the distance between then should not be 2 * priv->period_bytes initially but 8 * priv->period_bytes as we pri-filled one entire buffer size at the beginning. The driver's memory access might be overlapped with ALSA's buffer updating. So this patch fixes this inaccurate distance. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 5d0d4e1558fa0c235691436e1c5d26d9c8950775)
2014-04-16ENGR00305624-1 ASoC: imx-hdmi-dma: Use neon data copy functionNicolin Chen
Use neon data copy function as default to improve data copy performance so that we can prevent some noise issue happening to HDMI audio due to the performance issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit aca6d0c4c96d658021bda4b5a4e454076e27e9f2)
2014-04-16ENGR00304914-1 ASoC: imx-hdmi-dma: Limit period size for 6DQNicolin Chen
The HDMI IP in i.MX6DQ has a bug that it limits the dma period size within 8K. Patch 'ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes' doubled the period size which works great with Dual Lite but broke the HDMI audio function on DQ. Thus fix it for 6DQ case. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 5b5f5e3f7b1dd41022e6e587460fd912fcd481d0)
2014-04-16ASoC: fsl_sai: Improve fsl_sai_isr()Nicolin Chen
This patch improves fsl_sai_isr() in these ways: 1, Add comment for mask fetching code. 2, Return IRQ_NONE if the IRQ is not for the device. 3, Use regmap_write() instead of regmap_update_bits(). Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 4a16d85ffa819902f595eac6677788eddc0e6628)
2014-04-16ASoC: fsl_sai: Add isr to deal with error flagNicolin Chen
It's quite cricial to clear error flags because SAI might hang if getting FIFO underrun during playback (I haven't confirmed the same issue on Rx overflow though). So this patch enables those irq and adds isr() to clear the flags so as to keep playback entirely safe. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit e2681a1bf5ae053426a6c5c1daaed17b2f95efe6)
2014-04-16ENGR00305648-6 ASoC: imx-cs42888: Merge imx6sx-arm2 configuration with old ↵Nicolin Chen
imx6qdl-sabreauto To simplify the code, we use one unified configuration for both imx6sx-arm2 and the old imx6qdl-sabreauto board. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00305648-1 ASoC: imx-sgtl5000: Support non-ssi cpu-daiNicolin Chen
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>
2014-04-16ENGR00300188-2 ASoC: imx-hdmi-dma: Clear offset in the trigger initNicolin Chen
The offset reflects the current position of DMA access in the ALSA ring buffer. So we should clear it before re-start DMA engine becasue the DMA access should re-start its job from the 0 position. If we don't do this, the driver might get a wrong idea about current position of DMA access. Thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizesNicolin Chen
We found HDMI Audio has a performance issue when playback 8 channels 192KHz files, CPU might lag its interrupt responsing while SDMA continues updating HDMI internal AHB DMA's address and restarting AHB DMA, which resulted the noise when AHB DMA access overlaps with the data copy procedures in this driver. Thus we here double the buffer size and period size of HDMI Audio to chop the CPU interrupt to its half in the same span of time so that we can keep the data copy procedures safe and provent it from overlapping access with AHB DMA. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl-sai: Add SND_SOC_DAIFMT_DSP_A/B support.Xiubo Li
o Add SND_SOC_DAIFMT_DSP_A support. o Add SND_SOC_DAIFMT_DSP_B support. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit a3f7dcc9cc0392528bff75b17adfcd74fb8a0ecd) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl-sai: fix Freescale SAI DAI format setting.Xiubo Li
o Fix some bugs of fsl_sai_set_dai_fmt_tr(). o Add SND_SOC_DAIFMT_LEFT_J support. o Add SND_SOC_DAIFMT_CBS_CFM support. o Add SND_SOC_DAIFMT_CBM_CFS support. o And SND_SOC_DAIFMT_RIGHT_J need to be done in the future. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 13cde090030c7d00e991c85b87c12891cc8e4df4) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: sgtl5000: Fix VAG_POWER enabling/disabling orderMarek Vasut
The VAG_POWER must be enabled after all other bits in CHIP_ANA_POWER and disabled before any other bit in CHIP_ANA_POWER. See the SGTL5000 datasheet (Table 31, BIT 7, page 42-43). Failing to follow this order will result in ugly loud "POP" noise at the end of playback. To achieve such order, use the _PRE and _POST DAPM widgets to trigger the power_vag_event, where the event type check has to be fixed accordingly as well. Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit dd4d2d6dfb49e8916064f2cb07f0ad7b32a82fb7) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl-sai: convert to use regmap API for Freeacale SAIXiubo Li
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 78957fc349bcf29d415a649601581a993ff25e4d) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl-sai: Clean up the codeXiubo Li
Makes the code slightly shorter. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 633ff8f8a4393b4a13b94eddd2613198c32035e6) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: fix the endianess for SAI fifo data.Xiubo Li
Revert the SAI's endianess for fifo data to/from DMA engine. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 72aa62bed3ea30635156fad95f123a0b665072bf) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Fix one bug for hardware limitation.Xiubo Li
This is maybe one bug or a limitation of the hardware that the {T,R}CR2's Synchronous Mode bits must be set as late as possible, or the SAI device maybe hanged up, and there has not any explaination about this limitation in the SAI Data Sheet. And the {T,R}CR2's Synchronous Mode bits must be set at the same time whether for Tx or Rx stream. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 496a39d9ec238569fac6daceac8f5420c5edc2f1) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Add disable operation for the corresponding data channel.Xiubo Li
Enables/Disables the corresponding data channel for tx/rx operation. A channel must be enabled before its FIFO is accessed, and then disable it when tx/rx is stopped or idle. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit e5d0fa9c3ec59a40e0285d96b65b7f62875acd42) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Move the global registers setting to _dai_probe()Xiubo Li
Because we cannot make sure which one of _dai_fmt() and _dai_sysclk() will be firstly called. So move the RCSR/TCSR and TCR1/RCR1's initialization to _dai_probe(), and this can make sure that before any of {T,R}CR{1~5} register to be set the RCSR/TCSR's RE/TE bit has been cleared for the hareware limitation. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit e6dc12d7198eddba2e3e7a13feab5c7edde7ba1d) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-16ASoC: fsl_sai: Sort local variable in general wayNicolin Chen
Generally we would write code for local variable like: static new_func() { struct xxx *yyy; ... int ret; } But this driver only follows this pattern for some functions, not all. Thus this patch sorts the local variable in the general way. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 4e3a99f5b004b30bc604d82e5498700649148e0d)
2014-04-16ASoC: fsl_sai: Make dev_err information neaterNicolin Chen
Since using dev_err() there's no need to mention SAI any more, it will print the full name of the driver -- fsl_sai. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 190af12dad975f2ea7d69d1c5c9d36fec64da767)
2014-04-16ASoC: fsl_sai: Drop useless ret in startup()Nicolin Chen
We can save this ret to make the code neater. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 15b29dae6604d2d2daf586429ff12f26272a868a)
2014-04-16ASoC: fsl_sai: Drop useless channels check in hw_params()Nicolin Chen
SAi only supports two data channels on hardware level and the driver also does register the min->1 and max->2, so no need to check channels. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit d22e28cce80a93578787d273bf1fa26a2be2636b)
2014-04-16ASoC: fsl_sai: Use snd_pcm_format_width()Nicolin Chen
Use common helper function snd_pcm_format_width() to make code neater. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 1d7003092771bd2feec30e2f3e5a06aa33479e08)
2014-04-16ASoC: fsl_sai: Keep symmetry for clk_enable() and clk_disable()Nicolin Chen
There are two functions haven't clk_disable_unprepare() if having error. Thus fix them. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 1fb2d9d7465bcbb519c582fa4a3bd04ff4fce2d2)