summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2014-07-23ENGR00324009 Revert "ENGR00323404-1 ASoC: fsl_sai: Reset FIFOs after ↵Nicolin Chen
disabling TE/RE" Patch "ASoC: fsl_sai: Reset FIFOs after disabling TE/RE" may accidentally increase the underrun rate of SAI. To keep an equal quality as previous release, we decide to revert this patch and find a thorough way to reset the FIFO later. This reverts commit b85f840a60de8d0a5ca8fbe7eda15f611ff5b622. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-07-18ENGR00323404-2 ASoC: fsl_sai: Fix incorrect register writing in fsl_sai_isr()Nicolin Chen
In the rx irq handling part, we should clear the flags in RCSR not TCSR. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-07-18ENGR00323404-1 ASoC: fsl_sai: Reset FIFOs after disabling TE/RENicolin Chen
SAI will not clear their FIFOs after disabling TE/RE. Therfore, the driver should take care the task so as not to let useless data remain in the FIFO. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-07-14ALSA: usb-audio: Fix deadlocks at resumingTakashi Iwai
The recent addition of the USB audio mixer suspend/resume may lead to deadlocks when the driver tries to call usb_autopm_get_interface() recursively, since the function tries to sync with the finish of the other calls. For avoiding it, introduce a flag indicating the resume operation and avoids the recursive usb_autopm_get_interface() calls during the resume. Reported-and-tested-by: Bryan Quigley <gquigs@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14ALSA: usb-audio: Save mixer status only once at suspendTakashi Iwai
The suspend callback of usb-audio driver may be called multiple times per suspend when multiple USB interfaces are bound to a single sound card instance. In such a case, it's superfluous to save the mixer values multiple times. This patch fixes it by checking the counter. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14ALSA: usb-audio: Use SNDRV_DEV_CODEC for mixer objectsTakashi Iwai
Instead of SNDRV_DEV_LOWLEVEL, use SNDRV_DEV_CODEC type for mixer objects so that they are managed in a proper release order. No functional change at this point. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-14ALSA: usb-audio: Resume mixer values properlyTakashi Iwai
Implement reset_resume callback so that the mixer values are properly restored. Still no boot quirks are called, so it might not work well on some devices. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-09ENGR00321941 ASoC: fsl_spdif: fix that can't get the Rx Sample RateShengjiu Wang
The SRPC register should be volatile, LOCK bit is set by the hardware. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-07-03ENGR00320849-3 ASoC: dmaengine: Audio suspend/resume will be failed.Shengjiu Wang
SDMA suspend/resume is not good enough to support audio suspend/resume. So disable audio suspend/resume temporarily. Revert "ENGR00318773-5 ASoC: dmaengine: Merge trigger RESUME to START and SUSPEND to STOP" This reverts commit 29a807b337b0e74460fd3ec699e54eb61183279a. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-07-03ENGR00320849-2 ASoC: imx-cs42888: disable the delay powerdownShengjiu Wang
When test asrc p2p first, then test no asrc p2p, There is no sound after 5s. The reason is that the substream is not same for this two case, then delay powerdown will close the widget for cs42888. But the second will also use the cs42888. So set ignore_pmdown_time to 1. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-07-03ENGR00320849-1 ASoC: cs4xx8: fix the setting of Functional modeShengjiu Wang
Failed case: arecord -Dhw:0,1 -f S16_LE -r 96000 -c 2 -traw | aplay -Dhw:0,0 -f S16_LE -r 96000 -c 2 -traw. There is no sound when use this case.The reason is that the setting of Functional mode is not correct. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-07-01ENGR00320678 ASoC: cs42xx8: Revert the DAPM routes to the old oneNicolin Chen
The upstream version of DAPM routes results record noise issue due to its inappropriate power-up sequence. So we provisionally revert this change to the old stable one, and figure out why the sequence has problem later. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> (cherry picked from commit 3cda4b6d88aa7b40ac22652df92fa449063bc35a)
2014-06-27ENGR00320241 ASoC: fsl_spdif: Complete the volatile register listNicolin Chen
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)
2014-06-24ENGR00319687 ASoC: fsl_esai: esai reset can't work after adding regcacheShengjiu Wang
The reason is that PRRC and PCRC isn't cleared in restore_reg(), then update_bits for PCRC and PRRC will fail for cache is not updated. In other side, remove the store_reg() and restore_reg for adding regcache, and use regcache_sync to restore the registers. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-06-19ENGR00318773-10 ASoC: imx-audmux: Add driver suspend and resume to support ↵Nicolin Chen
MEGA Fast 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>
2014-06-19ENGR00318773-9 ASoC: fsl_ssi: Add driver suspend and resume to support MEGA FastNicolin Chen
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>
2014-06-19ENGR00318773-8 ASoC: fsl_spdif: Add driver suspend and resume to support ↵Nicolin Chen
MEGA Fast 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>
2014-06-19ENGR00318773-7 ASoC: fsl_esai: Add driver suspend and resume to support MEGA ↵Nicolin Chen
Fast 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>
2014-06-19ENGR00318773-6 ASoC: fsl_sai: Add driver suspend and resume to support MEGA FastNicolin Chen
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>
2014-06-19ENGR00318773-5 ASoC: dmaengine: Merge trigger RESUME to START and SUSPEND to ↵Nicolin Chen
STOP The SDMA driver doesn't support DMA_PAUSE and DMA_RESUME commands. So this patch use TRIGGER_START for TRIGGER_RESUME and TRIGGER_SUSPEND for TRIGGER_STOP as a work around so that Audio can normally stop and restart its corresponding DMA channels. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
2014-06-19ASoC: pcm: Fix incorrect condition check for case SNDRV_PCM_TRIGGER_SUSPENDNicolin Chen
The regular state before we execute SNDRV_PCM_TRIGGER_SUSPEND should be SNDRV_PCM_TRIGGER_START, not SNDRV_PCM_TRIGGER_STOP. Thus fix it. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 868a6ca84ee7e547ae01a5e04e232e4a392c50b8)
2014-06-10ENGR00317675-2 ASoC: fsl: cs42xx8: add support for DSP_AShengjiu Wang
Correct the definition of TDM and ONLINE_24 bit Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-06-10ENGR00317675-1 ASoC: fsl: esai: refine esai for tdm supportShengjiu Wang
Add parameter for slots, and caculate the number of TX/RX pins with slots. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-06-10ENGR00317636 ASoC: fsl: hdmi: Disable NEON optimizationShengjiu Wang
Enable NEON optimization will cause pulseaudio crash in the user space. Which is caused by using the NEON instruction, if only use "VPUSH, VPOP" in the function, crash will be happened also. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-05-15ENGR00313535-2 ASoC: fsl: Register two kcontrol for asrc p2pShengjiu Wang
Register p2p width amd p2p rate tow kcontrol for asrc p2p, use can get/change these parameter with amixer. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-05-15ENGR00313535-1 ASoC: fsl: Refine imx-cs42888 machine driverShengjiu Wang
Remove local parameter for p2p_width, p2p_rate, which will be get from the cpu driver of fe directly. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-05-13ASoC: cs42xx8: Check return value of regmap_read and report correct chipid valueAxel Lin
Fix checking return value of regmap_read(). Also fix reporting the chip_id value. CS42XX8_CHIPID_CHIP_ID_MASK is 0xF0, so the chip_id value is (val & CS42XX8_CHIPID_CHIP_ID_MASK) >> 4). Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Paul Handrigan <paul.handrigan@cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-13ENGR00313280-2 ASoC: fsl: Merge upsteamed cs42xx8 driver.Shengjiu Wang
The upsteamed commit is 0c516b4ff85c0be4cee5b30ae59c9565c7f91a00 ASoC: cs42xx8: Add codec driver support for CS42448/CS42888 This patch adds support for the Cirrus Logic CS42448/CS42888 Audio CODEC that has six/four 24-bit AD and eight 24-bit DA converters. [ CS42448/CS42888 supports both I2C and SPI control ports. As initial patch, this patch only adds the support for I2C. ] Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-05-13ENGR00313280-1 ASoC: fsl: refine cs42888 machine driverShengjiu Wang
Move rate constraint from codec driver to machine driver. Because fe and be use same runtime structure, so be needn't startup function. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-05-13ASoC: core: Add signed register volume control logicMarkus Pargmann
Some codecs use signed volume control representation with non standard register sizes, e.g. 6 or 7 bit signed integers. This patch adds generic signed register volume control logic to soc-core. Instead of a fixed width signed register control, this implementation uses a 'min' value and the signed bit location to translate it to an absolute volume. Using the 'sign_bit' we can calculate a correct mask for the register values and translate it back into signed integers of standard size. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit f227b88f0fce5f9b82aa934f8829a741c2e06d82)
2014-05-07ENGR00312217-1 ASoC: fsl: pop noise with wm8962Shengjiu Wang
The reason of pop noise is that we change the sysclk in hw_free, which is for another wm8962 issue. So in currently the pop noise can't be resolved with no confliction. So for Android, because the samplerate is fixed. we can use other workaround for this issue: change the sysclk in the set_bias(). Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-30ASoC: fsl-esai: fix ESAI TDM slot settingXiubo Li
Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Acked-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 236014ac7a6524f9f466139c2e47af70cb340ba3) Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
2014-04-30ENGR00311068 ASoC: fsl_hdmi: passthrough can't work for androidShengjiu Wang
Android need driver to export several kcontrol. "Support channels", "Support Rates", "Support Formats". Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-29ENGR00311007 ASoC: fsl: mclk changed for slxShengjiu Wang
mclk of cs42888 is changed for slx. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-29ENGR00310878-2 ASoC: fsl_esai: cherry-pick from upstream and merge to mainlineShengjiu Wang
cherry-picked commit is 43d24e76b69826ce32292f47060ad78cdd0197fa Header of this commit is "ASoC: fsl_esai: Add ESAI CPU DAI driver", use upstream driver to replace current one. Merged feature is: 1. Move setting of PRRC and PCRC to the end of hw_params, and disable it in shutdown function. 2. Merged the xrun handler with this commit. 3. Use dma init with NO_RESIDUE|NO_DT|COMPAT. 4. Add spba clock for ESAI Signed-off-by: Shengjiu Wang <b02247@freescale.com>
2014-04-29ENGR00310878-1 Asoc: fsl: refine clock tree for ESAIShengjiu Wang
There are three clock for ESAI, esai_extal, esai_ipg, esai_mem. Make the clock for ESAI more clear. Signed-off-by: Shengjiu Wang <b02247@freescale.com>
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>
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>
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>
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>
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>