summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2016-09-29Revert "sgtl5000.c: HACK, defer probe when I2C not yet running"Stefan Agner
This reverts commit 150c9ee190ebd236f7693b82b9328d49440d0a33. Acked-by: Max Krummenacher <max.krummenacher@toradex.com>
2016-06-24MLK-12722: ASoC: fsl_spdif: clear the validity bit for TXShengjiu Wang
Validity bit is set in default, which means the data is not reliable, The receive device may drop this data. So clear it in default, and provide a mixer interface for user to control this bit. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 48293e6bf7793de01678ee1426cccc9119998ba1)
2016-06-24MLK-12607: ASoC: fsl-asrc: Add the support of 12kHz and 24kHzShengjiu Wang
Remove the pre-processing and post-processing table. use proc_autosel() to select proper parameters. Unify the supported input and output rate. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 8353ec20bd9950ec98d76423c62321a7ea0c7190)
2016-06-24MLK-12464-2: ASoC: wm8960: fix clock is not correct after suspend/resumeShengjiu Wang
After the suspend/resume, hw_params may be called in bias_level is not BIAS_ON, then the PLL is not disable/enabled, if the sample rate is changed, the output clock is not correct. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit cced8358c2202824dfdc1780609539655ae5fec5)
2016-06-24MLK-12464-1: ASoC: fsl: imx-wm8960: Fix no clock after suspend/resume randomlyShengjiu Wang
After suspend and resume, the wm8960 codec will change the state from BIAS_OFF to BIAS_ON, in this time, the hw_free is called, the PLL will be diabled, and next instance is started in rapid sequence, hw_params is called But PLL is not enabled, because the bias state is not BIAS_ON. As PLL is disabled in BIAS_ON->BIAS_STANDBY, so don't need to disable pll in hw_free of machine driver. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 9b6063efd3966266a1a7616c11b818139933497e)
2016-06-24ENGR00305648-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>
2016-06-24sgtl5000.c: HACK, defer probe when I2C not yet runningMax Krummenacher
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>
2016-03-04ASoC: cs42xx8: fix the noise in the right dac channel with mono playbackZidan Wang
When playback mono wav with record in background, there will be some nosie in the right dac channel. It seems that the ADC data has been routed to the dac channel. The cs42888 have 8 dac channels, it's appropriate to mute the unused dac channels, and the noise will disappear. Steps to reproduce this issue: arecord -D hw:0,0 -f S16_LE -r 48000 -c 1 a.wav & aplay -Dhw:0,0 audio48k16M.wav Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 1f1e60c9cdd573be271130e44a23efed48e0578d)
2016-02-04MLK-12374: ASoC: fsl_sai: Change the dev_warn to dev_dbgShengjiu Wang
When audio stop, it will first stop dma, then stop cpu_dai. If there is delay between dma stop and cpu dai stop, there will be underrun error, the print will cost time, then will cause another underrun error, it is a infinite loop. Which will cause the cpu dai can't stop. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 2b47facf5e2314838c5b6e583104ef92d39b6b77)
2016-02-04MLK-12366: ASoC: dmaengine: fix sai underrun issue after suspend/resumeShengjiu Wang
We use the devm_snd_dmaengine_pcm_register() for platform, don't use devm_snd_soc_register_platform(), their close funtion is different. One will release the dma channel, but another one won't release channel. When system enter suspend mode, alsa library is in draining state, it will not resume alsa driver in system resume, just call close directly. But the alsa driver is in state SNDRV_PCM_STATE_SUSPENDED, which is not a running state, so the trigger stop is not called, and dmaengine_terminate_all() is not called, then dma resource is not released. Which cause that in the next playback the sdma driver will not be started. Then there is a lot of SAI underrun error. If we use the devm_snd_soc_register_platform() for platfrom driver, there will be no issue, because it will release dma channel, release dma resource. But we use the devm_snd_dmaengine_pcm_register() for platform driver. So this patch is to add dmaengine_terminate_all() in the snd_dmaengine_pcm_close() to fix this issue. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit ff62968ea8c8b5414f3f049e61addcd4d2bec3b9)
2016-02-04MLK-12372: ASoC: fsl_asrc: fix dma task timeout after suspend/resumeShengjiu Wang
commit 743cead0f8c4ac6311ffb500efd6146c40124310 is not a complete fix. There is low possibility that this issue still occur. Last commit add init_completion() in the suspend function, but if the dma callback function is called after convert error, the complete is done, the init_completion will not be called, so the complete state is not correct in the next conversion. This patch is to move init_completion to the beginning of conversion to fix the issue. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit 752d0cd21dde90b607bef0467149fe7022bf0b15)
2016-01-20MLK-12244 ASoC: fsl: Set the sound card owner fieldZidan Wang
When load sound card, the pulseaudio will using the sound card to playback and record. It may be cause a kernel crash when the sound card is unloaded while the playback/record is active After setting the sound card owner field, when pulseaudio is running, the sound card module ref-count will not be 0 and the sound card will not be unloaded. So you should stop the pulseaudio when you want to unload the sound card. Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
2016-01-19MLK-12165: ASoC: fsl: imx-cs42888: remove 32k and 64k supportShengjiu Wang
Revert "MLK-11623 ASoC: imx-cs42888: add 32k and 64k sample rate support" This reverts commit 314a01f40599134086480ef3c5e89a54aeedbf1f. In Async mode, record and playback use different samplerate, one is 32k, another is 48kHz, there will be issue "unsupported sysclk ratio". example case is arecord -Dhw:0,1 -f S16_LE -r 32000 -c 2 | aplay -f S16_LE -r 32000 -c 2 Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2016-01-19MLK-12202: ASoC: fsl_asrc_m2m: fix dma timeout after suspend/resumeShengjiu Wang
In suspend function, the complete will be set to done in callback. After resuming, the convert will not spend time to wait the complete. which is a wrong complete. So in suspend function, the complete need to be reinited for next convert. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2016-01-14MLK-12210 ASoC: soc-dapm: resource leak when the event is unknownZidan Wang
resource leak when the event is unknown. Reported by coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com>
2016-01-14MLK-12057 ASoC: imx-wm8960: add headphone/micphone/headset jack supportZidan Wang
Add headphone/micphone/headset jack support for different board. There are headphone detect gpio and microphone detect gpio which can be configured from device tree. If headphone and microphone using the same gpio for jack detect, it suppose to be a headset and will register a headphone jack for it. If headphone and microphone using different gpio for jack detect, it suppose not to be a headset, and will register headphone jack and microphone jack respectively. Is't not appropriate to set the adc data output in machine driver. It will not be compatibly when we change hardware connection. wm8960 codec driver has added "ADC Data Output Select" kcontrol, so that we can set the ADC data output from user space. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 92f65b4bee51fabdfa3a3c191f511c2ec7cb18a1)
2016-01-14MLK-12055 ASoC: wm8960: add kcontrol to select ADC data outputZidan Wang
add kcontrol to select ADC data output. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit a8ee73df7668dbfe5e1de3e08c34b2c9adfe89d1)
2016-01-14MLK-12043: ASoC: fsl: imx-cs42888: Add return value checkShengjiu Wang
Report by coverity (CID 18428). The return value need be checked for snd_soc_dai_set_sysclk(). Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2016-01-14MLK-11948: ASoC: fsl_esai: fix the channel swap issue after bootupShengjiu Wang
Patch 11626b6a79e27c716f3731b7dc2208631afbc665 is not a complete workaround. The complete workaround is that: Each time playback/recording, firstly clear the xSMA/xSMB, then enable TE/RE, then enable xSMB and xSMA (xSMB must be enabled before xSMA). Because the xSMA and xSMB is in enabled state after reset, so in original fix the first time playback/recording after bootup, didn't follow the workaround flow. There maybe still have channel swap issue. The PDM ticket of this issue is TKT251104. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
2016-01-14MLK-11942 ASoC: fsl_asrc_m2m: free pair after allocating m2m failedZidan Wang
free pair after allocating m2m failed. Reported by coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 237a35db5b48b78250a019f891d9d746c3411d49)
2016-01-14ASoC: fsl: using params_width function to simplify codeZidan Wang
using params_width function to simplify code. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 4ca730436a676afebbe6b77d65b5b4c4d7d38b9c)
2016-01-14MLK-11915-12 ASoC: fsl_asrc_m2m: fix null check issue for variable m2m and pairZidan Wang
After allocating memory for m2m, we should null check for m2m instead of pair. In fsl_asrc_close(), null-checking pair suggests that it may be null, but it has already been dereferenced before the null check. pair will be alloceted in fsl_asrc_open(), pair is null means that open dev file failed, and close should not be called in user space. So remove null check for pair. buf_len should not greater than ASRC_DMA_BUFFER_SIZE, otherwith dma buffer will be overrun. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit b0dc15375b12b6c1bf46b9071b92267b827d8ce0)
2016-01-14MLK-11915-11 ASoC: fsl_asrc_dma: check the return value for ↵Zidan Wang
snd_pcm_hw_constraint_integer() check the return value for snd_pcm_hw_constraint_integer(). Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 26f8fea617fcebd8835f660534a988c58b9f0517)
2016-01-14MLK-11915-10 ASoC: imx_mqs: fix mqs_priv->name overrun issueZidan Wang
fix mqs_priv->name overrun issue. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit ef1c59f93981b15412a0207d5517a26901bb2ecd)
2016-01-14MLK-11915-09 ASoC: cs42xx8: remove the no effect comparisonZidan Wang
rate_tx and rate_rx are always greater than or equal to 0, so remove the no effect comparison. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit d5957250784a27cf6f6f421d8a6e0ba45b4bbc18)
2016-01-14MLK-11915-08 ASoC: imx-si476x: init fm_np to avoid wild pointerZidan Wang
init fm_np to avoid wild pointer. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit dea49f320f33e1f723301a0bfa18573c0f7b5fb1)
2016-01-14MLK-11915-07 ASoC: imx-audmux: fix missing break in switchZidan Wang
fix missing break in switch. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 302516a1dfca5758a34cbed939c9976679febb0c)
2016-01-14MLK-11915-06 ASoC: fsl_esai: fix missing break in switchZidan Wang
fix missing break in switch. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit ec9d74d9258e3320ec68a1f977932cb20ace4ca2)
2016-01-14MLK-11915-05 ASoC: imx-wm8958: init codec_np to avoid wild pointerZidan Wang
init codec_np to avoid wild pointer. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 76665930654867cf38a86ba747a9f8a5bf2665e2)
2016-01-14MLK-11915-04 ASoC: imx-cs42888: init asrc_np to avoid wild pointer and check ↵Zidan Wang
return value of set_fmt() init asrc_np to avoid wild pointer and check return value of set_fmt(). Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 4ccc87a93e180e09b6494fd6c6d81b07dc054e9b)
2016-01-14MLK-11915-03 ASoC: imx-sii902x: init sii902x_np to avoid wild pointerZidan Wang
init sii902x_np to avoid wild pointer. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 780e27683c38f785ea7f7e07e83b00ffd3c22d78)
2016-01-14MLK-11915-02 ASoC: imx-wm8962: init codec_np to avoid wild pointerZidan Wang
init codec_np to avoid wild pointer. Reported by Coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 8e27b90c9adf5033038a40e0b61a7ffe4c971290)
2016-01-14MLK-11915-01 ASoC: imx-wm8960: check return value and init codec_np to avoid ↵Zidan Wang
wild pointer check return value for set_fmt and set_sysclk function, and init codec_np to avoid wild pointer. Reported by coverity. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> (cherry picked from commit 68021ab9ada4a7f3037993a3887453e12271d4ed)
2016-01-14ASoC: fsl-sai: set xCR4/xCR5/xMR for SAI master modeZidan Wang
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> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 51659ca069ce5bdf20675a7967a39ef8419e87f2)
2016-01-14ASoC: fsl-sai: don't set bclk for Tx/Rx Synchronous with another SAI modeZidan Wang
In fsl_sai_set_bclk function, we should not set bclk for Tx/Rx Synchronous with another SAI mode. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 9cc58712358cbfe51248ef369fc50671149b60fc)
2016-01-14ASoC: fsl_sai: fix Rx synchrounous modeStefan Agner
When using the Rx clock for both, transmitter and receiver, the transmitter needs to be set to synchronous with receiver. This reverts 855675f6e6a6 ("ASoC: fsl_sai: Set SYNC bit of TCR2 to Asynchronous Mode"), which, judiging from the commit log, seems to mixed up between the two synchronous modes: The boolean sai->synchronous[TX] is indicating wheather the SAI should work in Rx synchronous mode (sync Tx with Rx), hence if the value is true, the SYNC field of TCR2 needs to be set to 0x1 ("Synchronous with receiver"). Signed-off-by: Stefan Agner <stefan@agner.ch> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 3cc7780b6fc04318ab08d84f739503989200cf55)
2016-01-14ASoC: wm8960: Fix the Input PGA Mute switchJongHo Kim
Change the xinvert value from 0 to 1 on the "Capture Switch" control WM8960 datasheet is shown as follows: Bit 7 at 00h and 01h register address 1 : Enable Mute, 0 : Disable Mute Signed-off-by: JongHo Kim <furmuwon@gmail.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 41a59cae585678136c28cdcbba9cb2faf27685f5)
2016-01-14ASoC: fsl: Use #ifdef instead of #if for CONFIG_PM_SLEEPNicolin Chen
Change them to #ifdef as CONFIG_PM_SLEEP might not be defined at all. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 739146b6144a6541cf94a668d6e7227b7882af30)
2016-01-14ASoC: fsl_sai: Fix module autoload for OF platform driverLuis de Bethencourt
This platform driver has a OF device ID table but the OF module alias information is not created so module autoloading won't work. Signed-off-by: Luis de Bethencourt <luis@debethencourt.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c759241fe2f16e6be43675abaa715f0da9d7a254)
2016-01-14ASoC: fsl_ssi: using macro for default register mapZidan Wang
using macro for default register map Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 43f20d51f4d5070f5e254119419ce2c98ab0c2bd)
2016-01-14ASoC: fsl_ssi: Add driver suspend and resume to support MEGA FastZidan Wang
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. The register SFCSR is volatile, but some bits in it need to be recovered after suspend/resume. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 05cf237972fe65eb537ea4f10e5627ceeb8f89b6)
2016-01-14ASoC: fsl_spdif: STL and STR registers are non volatileZidan Wang
STL and STR registers are writable and not readable. So they are non volatile. Remove them from volatile list, and add default register value for them. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 2a0035113a0f16305476083fc6bacdd0e29b1e5f)
2016-01-14ASoC: fsl_spdif: Add driver suspend and resume to support MEGA FastZidan Wang
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. The SRPC register should be volatile, LOCK bit is set by the hardware. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit f9f4fa61aab9417e40898cf6706fffa94005dc44)
2016-01-14ASoC: fsl_esai: ETDR and TX0~5 registers are non volatileZidan Wang
ETDR and TX0~5 registers are writable and not readable. So they are non volatile. Remove them from volatile list, and add default register value for them. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 9528f0b1e8b7249460700b4df53b9f6b61da8c60)
2016-01-14ASoC: fsl_esai: Add driver suspend and resume to support MEGA FastZidan Wang
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. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit c64c60763b4e3c72a3520c8d51be858cd67bacb5)
2016-01-14ASoC: fsl-sai: add default register map for regmap cacheZidan Wang
FSL_SAI_TDR register is writable and not readable. According to regmap_volatile() function, if FSL_SAI_TDR want to be volatile, it should be readable. So we should remove FSL_SAI_TDR from volatile register list. If the flat cache don't have default register map, when do regcache_sync operation, the non volatile and writable registers will be synchronised to 0. FSL_SAI_TDR reigster will be written a 0 and cause channel swap. So add default register map for flat cache, and such register will not be written. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit b9b21722ff2e431c85d33bcc950327093cf9a991)
2016-01-14ASoC: fsl_sai: Add driver suspend and resume to support MEGA FastZidan Wang
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. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> (cherry picked from commit 1fde5e83a17acbcfcce27f68be46a6da4344efbd)
2016-01-14MLK-10183 ASoC: wm8962: separate ALC Coefficients to four reigstersZidan Wang
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)
2016-01-14MLK-11570-02 ASoC: wm8994: store/restore context in codec driver suspend/resumeZidan Wang
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> (cherry picked from commit e35e15983e14caf48dadf235bc6b33014818c62e)
2016-01-14MLK-11623 ASoC: imx-cs42888: add 32k and 64k sample rate supportZidan Wang
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> (cherry picked from commit b436254cd55dc0d2ebb6d2ca7ce5f58520ea5dbc)