summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2013-07-19ENGR00271718 ASoC: Fix check for symmetric rate enforcementNicolin Chen
This patch is copied from commit 25b7679136fd85b1e5197e36a0ca126163e89590 Just unable to cherry-pick due to different file names. The ASoC core tries to not enforce symmetric rates when two streams open simultaneously. It does so by checking rtd->rate being zero. This works exactly once after booting because it is not set to zero again when the streams close. Fix this by setting rtd->rate when no active stream is left. [This leads to lots of warnings about not enforcing the symmetry in some situations as there's a race in the userspace API where we know we've got two applications but don't know what rates they want to set. -- broonie ] Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-07-19ENGR00268119 ASoC: WM8962: Fix tilted left-right volume setting for ADCNicolin Chen
In probe(), we set LEFT_ADC_VOLUME but failed to set RIGHT_ADC_VOLUME due to typo during coding, thus fix it. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com> (cherry picked from commit ae3eb591ed9f61579a4217c6ddfd19d32e8f3cc5)
2013-07-11ENGR00270401 ASoC: imx-wm8962: Add parameters checking for hw_paramsNicolin Chen
WM8962 doesn't support asymmetric parameters for playback and capture, so add hw_params check in machine driver to obviate some potential risks. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com> (cherry picked from commit 85059ec43e34662feca2c58b3a31cf93d79d00bc)
2013-06-04ENGR00265377 ASoC: fm: fix section mismatch during kernel compilingNicolin Chen
Use __devinit instead of __int to fix section mismatch issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-10ENGR00257755-4 ASoC: WM8962: Disable FLL when chip's not being usedNicolin Chen
There might be a case that SYSCLK_SRC is not FLL, but FLL's still open. If so, next time we use FLL as SYSCLK_SRC, it won't work normally. This patch disabled FLL if FLL's enabled no matter what SYSCLK_SRC is. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-10ENGR00257755-3 Revert "ENGR00256933 ASoC: WM8962: Add delay after FLL-enable"Nicolin Chen
This reverts commit 0ed997878dd59c1dac6bf8f9eda412790bdd1df6. We already reverted FLL-enable code in set_fll(), so we don't need delay any more. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-10ENGR00257755-2 Revert "ENGR00256310 ASoC: imx-wm8962: Fix playback abnormally"Nicolin Chen
This reverts commit 85c5c1eb91a25787f8cdefdb40bcd4735d37270e. With this patch, WM8962 couldn't work normally after SabreSD power-on. So revert it and find a better solution. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-10ENGR00257755-1 Revert "ASoC: wm8962: Don't automatically enable and disable"Nicolin Chen
This reverts commit 1fe3d0961814ad1fb1c1d691bfb85fc664caab05. With this patch, WM8962 couldn't work normally after SabreSD power-on. So revert it and find a better solution. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-02ENGR00256933 ASoC: WM8962: Add delay after FLL-enableNicolin Chen
There's a start-up time after FLL_ENA bit is set. While the driver didn't run the delay code which already exists in the set_fll() function. This patch let the driver run into the delay section, and made it work more perfectly. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-02ENGR00256310 ASoC: imx-wm8962: Fix playback abnormally slower issueNicolin Chen
Previously, we didn't close FLL after playback/capture, which might cause FLL work werid after a long time suspend. This patch manually disables FLL after playback/capture. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-02ASoC: wm8962: Don't automatically enable and disable FLLMark Brown
Only enable and disable the FLL when explicitly told to, supporting some additional use cases and making the driver behaviour more standard. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Nicolin Chen <b42378@freescale.com> (cherry picked from commit a968d9db3b3a9329587b09bd15f4981473c63a9d)
2013-04-02ENGR00255104 The opening time of cs42888 is very long, about 400msb02247
In this commit 957bc47ffbad8532f0e8f6463946e8c04bc3176f, add msleep(400) for reducing noise in the hw_params, but this time is very long for opening device. In this patch, remove this time and use the "Soft Ramp on Zero Crossings" to reduce the noise. Signed-off-by: b02247 <b02247@freescale.com>
2013-04-01ENGR00256820-2 ASoC: imx-wm8962: Fix incorrect setting of wm8962's FLL sourceNicolin Chen
WM8962's internal FLL is sourced from MCLK on SabreSD, while the machine driver set its source to OSC, which's definitely wrong. So This patch changed its source to MCLK to prevent some potential issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-04-01ENGR00256820-1 ASoC: WM8962: revert FLL-disable before FLL-settingNicolin Chen
The patch at the commit 30293bc6 dropped FLL-disabling code from wm8962 driver, which was a work around for CR 00209905. Since we fixed the issue in a better way(commit 018958f4), we don't need the work around any more. And in wm8962's datasheet, Wolfson suggests that driver should disable and re-enable the FLL after the other registers're updated. So it's better for us to revert the code to prevent some potential issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-03-22ENGR00255482 ASoC: HDMI-audio: Add error message for HDMI-video detect failureNicolin Chen
HDMI-audio depends on HDMI-video. If users want to use HDMI-audio function, they need to load HDMI-video first. Sometime users would forget to put video info into U-boot cmdline, "video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24" for example. That might cause HDMI-auido driver fail to detect HDMI-video. Previously, if this happened to system, driver only returned with "ENOMEM" and system would print "Can't allocate memory". This might confuse users due to the vague infomation. Users would be hard to figure out the root cause. So this patch just add some error message to give users a clear indication, and changed the "ENOMEM" error number to the more precise "ENODEV". Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-03-21ENGR00255029 ASoC: spdif: fix clk_enable/disable() mismatched issueNicolin Chen
The function might be returned if the CNEW wasn't detected, while in this case the code won't disable the clk. This patch just fixed the mismatch. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-03-12ENGR00234501 ASoC: spdif: fix Ubuntu reboot hang issueNicolin Chen
spdif driver registered kcontrol for ALSA subsystem controlling, while some of those kcontrol functions lack of clk_enable() before register-accessing. So system would definitely hang when those functions're called, which did happen during reboot test on Ubuntu due to its pulse-audio. This patch added paired clk_en/disable() to those functions so as to pevent system hang issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Tested-by: Anson Huang <b20788@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-03-08ENGR00253290-2 ASoC: imx-wm8962: fix continuous playback distortion issueNicolin Chen
If DAC volume's set to a value that's lower than 0xd8, contineously FLL setting of wm8962 in machine driver would cause playback distortion issue, which happens to ENGR219882. so we have to put some another code in machine driver to prevent distortion issue. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-03-08ENGR00253290-1 ASoC: wm8962: fix over-gained audio playback issueNicolin Chen
We put some code to set default volumes in codec driver, but later we found that one of volume was higher than 0db, which would cause over-gained volume. So this patch removed DAC default volume setting, and reverted the volume interface of it to let user control the register from user space. Acked-by: Wang Shengjiu <b02247@freescale.com> Signed-off-by: Nicolin Chen <b42378@freescale.com>
2013-01-05ENGR00238943 wm8962: add judgement for no det_pin caseGary Zhang
add judgement to avoid no detect pin case Signed-off-by: Gary Zhang <b13634@freescale.com>
2013-01-05ENGR00238809-2 mx6sl: ssi: add IRAM supportGary Zhang
locate SSI playback buffer into IRAM in mx6sl. because left IRAM room is not enough to contain record buffer, if IRAM allocation for record fails, record buffer will use external ram Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-12-19ENGR00236910 wm8962: use alsa jack mechanism to handle pin detectionGary Zhang
use alsa jack mechanism to handle pin detection Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-12-11ENGR00236020-2 wm8962: hp/speaker switching afer resumeGary Zhang
implement headphone and speaker automatically switch even if headphone is plugin/out during suspend Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-12-11ENGR00236020-1 ALSA: add calling of trigger in machine driverGary Zhang
soc_pcm_trigger() calls trigger functions of cpu_dai, codec_dai and platform, but the trigger function of machine is not called. add calling of trigger in machine driver in soc_pcm_trigger() Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-11-28ENGR00234111 wm8962: switch automatically between speaker and hpGary Zhang
when detect hp inserted, disable speaker; when hp is plugout, enable speaker. Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-11-15ENGR00233570-3 ASRC: Use function pointer to support ASRC loadableGe Lei
In ASoC ESAI machine driver, use ASRC ops instead of directly use ASRC function calling, so that it can support ASRC loadable. Signed-off-by: Ge Lei <b42127@freescale.com>
2012-11-15ENGR00233570-2 ASRC: Use function pointer and hook to support ASRC loadableGe Lei
In ASoC pcm platform driver, use function pointer(ASRC ops) and hook to call the APIs in ASRC driver, so that the ASoC platform driver can support ASRC loadable. Signed-off-by: Ge Lei <b42127@freescale.com>
2012-11-15ENGR00233731 ALSA: add DMABUF allocating for different driverNicolin Chen
Patch ENGR00233056 added DMABUF size setting for hw_param and changed SSI's buffer allocating size. But didn't add allocation for ESAI and SPDIF, which might cause some dma transmitting issue. This Patch add new allocation code that detects the driver before allocating its DMABUF. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2012-11-15ENGR00233663 HDMI: add support for ALSA DMIXChen Liangjun
when using DMIX for ALSA playback, ALSA would not update write index into driver but maintain it in ALSA LIB level. However, HDMI driver need write index for HDMI header packing. In this case, HDMI driver would fail to do HDMI header pack and user hear no sound when using DMIX in HDMI audio playback. In this patch, use read index(hw_ptr) for HDMI header packing. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-11-12ENGR00233056 ALSA: adjust dma wm & buffersize configuration strategyNicolin Chen
Previously SSI/ESAI/SPDIF used one same-sized buffers and watermark(the WM in the title) for every alsa driver. This patch allow each driver config its own buffer size and watermark, which is obviously more flexible. Also, it sets SSI's buffersize from 256k to 64k. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2012-11-02ENGR00231778 MX6 ESAI: Adjust channel support capability of cpu/codec daiLionel Xu
To adjust the channel support capability, codec dai does not support mono playback and record, while esai dai does, thus making the whole audio codec only support stereo and above channel playback/record. Signed-off-by: Lionel Xu <R63889@freescale.com>
2012-10-30ENGR00231595 spdif: improve spdif driverGary Zhang
add clk operation in mxc_pb_spdif_put function Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-10-29ENGR00231321-2 wm8962: enhance audio driverGary Zhang
1. correct indent issue 2. when driver is unloaded, remove disable clock operateion and free irq Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-10-24ENGR00230920-2 HDMI AUDIO: export gloable variable in platform driverChen Liangjun
Export gloable variable in HDMI AUDIO platform driver to support HDMI AUDIO codec driver's loadable build. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-10-24ENGR00230920-1 HDMI AUDIO: add support for HDMI audio module buildChen Liangjun
HDMI driver can be divided into 3 parts: machine driver, platform driver, codec driver.To support HDMI AUDIO loadable module build, HDMI machine driver should be built as loadable. In this patch, adjust HDMI audio driver's struct: move HDMI audio platform driver to snd-soc-imx-objs(snd-soc-imx-objs would always be build-in).In this case, user need only build HDMI AUDIO machine driver as loadable. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-09-27ENGR00226095-2 SPDIF: add HDMI AUDIO in device name in mx6_sl evkGary Zhang
because HDMI AUDIO in mx6sl evk comes from SPDIF TX, change to HDMI AUDIO in device name. Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-09-19ENGR00219882 wm8962: avoid the digital volume changed by userGary Zhang
Wolfson suggests that digital volume should not be changed by user to avoid affecting SNR and dynamic range, and user should adjust analog volume. Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-09-19ENGR00224938 HDMI audio: clear HDMI dma done bit before startChen Liangjun
HDMI hardware fix: signal of HDMI DMA DONE is hard connected to SDMA event line. SDMA event is triggered by edge. If the HDMI DMA done is already 1 before start, there would be no SDMA event being trigged after HDMI generates another HDMI DONE signal. In this patch, clear HDMI DONE bit before start HDMI audio DMA. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-09-14ENGR00224245 HDMI AUDIO: stop/start PCM while unplug,blank/plug, unblankChen Liangjun
When unplug, blank happens, HDMI audio can't play properly. So in driver, audio pcm would be disconnected when event above happens. However, pulse audio can't process disconnect event properly and if an blank or unplug event happens, HDMI sink would lost and can't be back again. In this patch, instead of disconnecting audio PCM stream, triggering stop audio pcm while unplug and blank, triggering start again while plug and unblank if the audio pcm is triggerd stop in the unplug/blank event. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-09-13ENGR00223816 HDMI AUDIO: fix kernel panic cause by accessing unavailable memoryChen Liangjun
HDMI audio driver is responsible for add IEC header into audio sample. In HDMI audio driver, a variable named rtd->appl_bytes is maintained to stand for how many audio sample have already processed. appl_bytes stands for how many audio sample the user space have already feed into kernel driver. So we use the connt = appl_bytes - rtd->appl_bytes to decide how many data need to be processed. And the processed data would be write into an preallocated buffer called hw_buf in driver. When doing seek operation, the appl_bytes changes in an wide range. So it is possible that the count value is far larger than the size of hw_buf and the memory access un-existed address error would happens. In this patch, Add check operation for count to avoid kernel panic. Kernel panic log: seeking: 0:00:18.000000000/0:03:0Unable to handle kernel paging request at virtual address ffdf0000 pgd = 80004000 [ffdf0000] *pgd=71e35811, *pte=00000000, *ppte=00000000 Internal error: Oops: 7 [#1] PREEMPT SMP Modules linked in: vivante drm galcore CPU: 0 Not tainted (3.0.35-2014-g7a9337b #1) PC is at hdmi_dma_mmap_copy+0x134/0x190 LR is at hdmi_dma_mmap_copy+0x5c/0x190 pc : [<803e1e4c>] lr : [<803e1d74>] psr: 800f0193 sp : 80a61e98 ip : ffdf0000 fp : ffdeffc0 r10: 00000055 r9 : ffdeff80 r8 : 0029b450 r7 : 00000060 r6 : ffdf0200 r5 : 00000240 r4 : 00000120 r3 : 00000000 r2 : ffdf0000 r1 : 00000000 r0 : 00000090 Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c53c7d Table: 6d28804a DAC: 00000015 Process swapper (pid: 0, stack limit = 0x80a602f0) Stack: (0x80a61e98 to 0x80a62000) 1e80: 00000002 000037f1 1ea0: 00006000 e1d3a7e4 a00f0193 e1d3a780 e1dcab00 00a83100 00a83100 00006000 1ec0: 00006000 803e24f4 413187b9 00000000 0073001a e1dd1e00 00000001 00000001 1ee0: 00000080 00000093 80ac7070 80a66a80 00000001 800a5ca8 8c80e568 efb3e7b9 1f00: 00000055 80a66a80 80a66acc e1ea9bc0 00000093 00000000 80a60000 00000000 1f20: 00000000 800a5e14 80a66a80 80a66acc 0000107f 800a8198 80a71cc0 80038c00 1f40: 80a60000 800a5610 000001f0 80040830 ffffffff f2a00100 00000093 00000002 1f60: 00000001 8003f9cc 80ac5f60 800f0093 00000001 00000000 80a60000 80abeb64 1f80: 804e1a54 80a74e7c 1000406a 412fc09a 00000000 00000000 00000000 80a61fb0 1fa0: 8004d52c 80040ac4 400f0013 ffffffff 80040aa0 80040cbc 00000001 80a71b3c 1fc0: 80abeac0 8002e3c4 8c80b140 80008868 800082f8 00000000 00000000 8002e3c4 1fe0: 00000000 10c53c7d 80a71a6c 8002e3c0 80a74e74 10008040 00000000 00000000 [<803e1e4c>] (hdmi_dma_mmap_copy+0x134/0x190) from [<803e24f4>] (hdmi_dma_isr+0x17c/0x1a0) [<803e24f4>] (hdmi_dma_isr+0x17c/0x1a0) from [<800a5ca8>] (handle_irq_event_percpu+0x50/0x180) [<800a5ca8>] (handle_irq_event_percpu+0x50/0x180) from [<800a5e14>] (handle_irq_event+0x3c/0x5c) [<800a5e14>] (handle_irq_event+0x3c/0x5c) from [<800a8198>] (handle_fasteoi_irq+0xbc/0x154) [<800a8198>] (handle_fasteoi_irq+0xbc/0x154) from [<800a5610>] (generic_handle_irq+0x28/0x3c) [<800a5610>] (generic_handle_irq+0x28/0x3c) from [<80040830>] (handle_IRQ+0x4c/0xac) [<80040830>] (handle_IRQ+0x4c/0xac) from [<8003f9cc>] (__irq_svc+0x4c/0xe8) [<8003f9cc>] (__irq_svc+0x4c/0xe8) from [<80040ac4>] (default_idle+0x24/0x28) [<80040ac4>] (default_idle+0x24/0x28) from [<80040cbc>] (cpu_idle+0xbc/0xfc) [<80040cbc>] (cpu_idle+0xbc/0xfc) from [<80008868>] (start_kernel+0x248/0x288) [<80008868>] (start_kernel+0x248/0x288) from [<10008040>] (0x10008040) Code: c1a0c009 c08b6005 c1a0200b da00000a (e0d230b2) Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-09-13ENGR00224112 wm8962: correct lrclk mismatchGary Zhang
lrclk trigger settings between ssi and wm8962 are different, which causes L/R channel swap. Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-09-12ENGR00223911 wm8962: correct typoGary Zhang
correct typo for wm8962 description in Kconfig Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-09-05ENGR00222900 HDMI AUDIO: fix kernel panic when doing suspend-resume testChen Liangjun
In MX6 series, HDMI audio driver is responsible for add IEC header to audio samples. Driver would maintain variables to cover this work. The old driver would cause memory access exceeding issue: 1. Resume from an playback. In this case, variable maintained by ALSA is updated while variable maintained by HDMI driver is not updated. The mmap copy operation would run into error state due to misalignment. 2. underrun!!! The same error would happens as the items above. In this patch, add variable check while adding IED header. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-09-03ENGR00222836 Fix Kern BUG during Susp/Resu caused by SPDIF debug codeNicolin Chen
dump_reg() in msc_spdif.c will cause kernel BUG during Suspend/Resume, because of calling clk_enable() in an interrupt for playback. There's also a simular issue in capture case. Capture'd be stopped after resume for suspending. Signed-off-by: Nicolin Chen <b42378@freescale.com>
2012-08-29ENGR00182456-2 HDMI AUDIO: register/unregister when audio pcm open/closeChen Liangjun
In this patch: 1. Register substream into HDMI core driver when HDMI audio PCM is open. 2. Unregister substream out of HDMI core driver when HDMI audio PCM is close. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-08-28ENGR00221298 Fix tuner clock frequency on SSIAlejandro Sierra
Fix clock frequency configuration on SSI interface for the Tuner driver. Signed-off-by: Alejandro Sierra <b18039@freescale.com>
2012-08-28ENGR00221689 wm8962: add wait time after enable power supplyGary Zhang
add 100ms wait time after enable power supply for power stability Signed-off-by: Gary Zhang <b13634@freescale.com>
2012-08-24ENGR00219933 CS42888: abort delay powerdown if codec is onChen Liangjun
CS42888 driver own 2 codec_dai for ESAI and ASRC P2P use. Due to the delay power down mechanism, if a ASRC P2P stream is played right after a finish of ESAI stream playback, ASRC P2P stream would be stop. In this patch, do nothing in the delay powerdown flow if CS42888 codec is on. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-08-24ENGR00221177 ESAI ASRC: add mutex protection between ESAI and ASRC P2PChen Liangjun
ESAI playback and ASRC P2P playback use difference codec_dai while using the same codec. Thus they can't work together. In this patch, add mutual protection between ESAI playback and ASRC P2P playback. Signed-off-by: Chen Liangjun <b36089@freescale.com>
2012-08-20ENGR00220446 ESAI: channel swapped occasionally when playing stereo wavLionel Xu
There is channel swap happened when playing stereo wav. According to the spec, the initial words should be written to the ETDR register, at least one word per enabled transmitter slot, to avoid any potential problem. Signed-off-by: Lionel Xu <Lionel.Xu@freescale.com>