summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2018-08-24MLK-19168-3: ASoC: imx-pcm-rpmsg: register rpmsg wm8960 and cs42xx8 codecShengjiu Wang
register rpmsg wm8960 and cs42xx8 codec Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19168-2: ASoC: rpmsg_cs42xx8: support cs42xx8 over rpmsgShengjiu Wang
The difference of rpmsg_cs42xx8 and cs42xx8 driver is previous one will send command through rpmsg, others are same. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19168-1: ASoC: rpmsg_wm8960: port all function from wm8960Shengjiu Wang
The difference of rpmsg_wm8960 and wm8960 driver is previous one will send command through rpmsg, others are same. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19155: ASoC: fsl_rpmsg: fix the volume is low for S24_LEShengjiu Wang
The format send to M4 through rpmsg is wrong, that make the driver treat the data as S32_LE, it looks like data is right shift 8 bit. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19115-2: ASoC: fsl_spdif: add support for enabling raw capture modeViorel Suman
Since i.MX8 MQ SPDIF interface is able to capture raw data. Add support in SPDIF driver for this functionality. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-19115-1: ASoC: fsl_spdif: use snd_ctl_boolean_mono_infoViorel Suman
Remove redundant code and use snd_ctl_boolean_mono_info instead. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-19151: ASoC: fsl_asrc: fix dma timeout issue for imx8qxpShengjiu Wang
In the imx8qxp, the DMA is EDMA, which require the buffer size should be divided by burst size with no remainder, otherwise the remainder is not transferred by EDMA, so the input buffer is not consumed by ASRC, then there will be dma output timeout issue. This behavior is different with SDMA. This patch is to change the input burst size to be 1 to avoid the issue, and refine the last_period_size for output buffer. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> (cherry picked from commit 8e6b6939e7708c6ecd8f8a439a6f19b20cabfd07)
2018-08-24MLK-19118-3: ASoC: AK5558: add regulators for ak5558Shengjiu Wang
add regulators for ak5558 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19118-2: ASoC: AK4497: add regulators for ak4497Shengjiu Wang
add regulators for ak4497 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19118-1: ASoC: AK4458: add regulator for ak4458Shengjiu Wang
add regulator for ak4458 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19067-1: ASoC: imx-rpmsg: differentiate input and output directionShengjiu Wang
Some platform the rpmsg device only support playback or record. So Add a property to differentiate them. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19063: ASoC: fsl_hdmi: fix null pointer dereference issueShengjiu Wang
This issue is reported by coverity (4022712). Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19063: ASoC: fsl_dsp: Fix use after freeDaniel Baluta
Move client freeing later when no one needs it. This fixes Coverity Issue 3344686. Note that this also fixes a potential memory leak, if proxy happens to be NULL. Reported-by: Ioan-alexandru Palalau <ioan-alexandru.palalau@nxp.com> Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-17481-4: ASoC: fsl: Don't bail out on OFS_PERIPH errorDaniel Baluta
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-17481-3: ASoC: fsl: Fix DSP memory mappingsDaniel Baluta
We load DSP firmware from the ARM side at 0x556e8000 but because the compiler generated memory layout starts at 0x596e8000 we need to do some fixups. Thus, each address (in DSP local memory) generated by the compiler needs to be substracted an offset = 0x596e8000 - 0x556e8000 = 0x4000000. Because this only happens on QM we will use dts to specify the offset. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-19042-4: ASoC: imx-rpmsg: dummy codec support in imx8mmShengjiu Wang
In imx8mm, there is no controls for wm8524, so we use the dummy codec instead. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-19042-3: ASoC: rpmsg_wm8960: changes for receive messageShengjiu Wang
Update the read and write function for the send_message function changes Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-19042-2: ASoC: imx-pcm-rpmsg: support low power audioShengjiu Wang
Add ack function, which is to info M4 side how many data has been writen to buffer. Add timer, which is to get the position of hw pointer in m4. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-19042-1: ASoC: fsl_rpmsg_i2s: support low power audioShengjiu Wang
Add two new message command I2S_TX_POINTER and I2S_RX_POINTER, which are used to get the hw pointer in m4 side. For in low power audio mode, m4 won't send notification every period, the notification only be sent when hw pointer reach end of buffer, so we need these command to get the position of hw pointer, user can use it to calculate the timestamp. Restructure send message and recv message together for i2s_rpmsg, that every send message has a recv message. so the i2s_send_message can store the recv message indepedently. one reason is that the receive message is async withe send message. The low power audio is disabled in default, user need to enabled it by add "fsl,enable-lpa" in dts. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18874: ASoC: fsl_asrc: fix noise issue with 5 channel conversionShengjiu Wang
The dma_len is the size that how many data dma should transmit. As the asrc use channel as unit, so the dma_len should also in channel unit. Otherwise the output data is not align in channel, there will be noise. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> (cherry picked from commit ed8ee98002cac3ba0ba51aea3dca99344bc7e503)
2018-08-24MLK-18971: ASoC: fsl_asrc: fix record sound distortion issueShengjiu Wang
Fixes commit feb06839682c ("MLK-16839-1: ASoC: fsl_asrc: selec a proper clock source from the clock list") When inclk is INCLK_ASRCK1_CLK, the driver will config module to be non ideal ration mode, But the divider should be less than 1024 and exact division. otherwise there will be distortion. If the divider larger than 1024 or it is not exact division, asrc should switch to ideal ratio mode, which don't care about the divider. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> (cherry picked from commit 0659a4726136250a2fba1b8e105e2e9a04a9bf4d)
2018-08-24MLK-18875: ASoC: fsl_asrc_m2m: refine the last period sizeShengjiu Wang
The output size of asrc for a dedicate input is uncertain. For example, if the input size is 1k, the output ratio is 2, so the output size should be 2k. but the actual output size is not 2k, is less than 2k. if we set the dma size to be 2k, the dma can't get enough data that can't finish the transmission, then there will be "output DMA task timeout" So we need to set the dma size a proper value but we don't know how many data less than expected. so we defined the last period size for assumption of reduced size. The last period size should not be too large, if it is large there will be "input DMA task timeout" The reason is the output FIFO is full, which will block the input data comsumption. In this patch, the last period size is set to the difference of configured buffer size and the expected output size, plus a fix size. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> (cherry picked from commit e52f5e08624185919bc794106623e8defb1c4f0e)
2018-08-24MLK-18866: ASoC: imx-pcm-dma-v2: refine the callback functionShengjiu Wang
The commit 7f3ff14b7eb1 ("dmaengine: imx-sdma: add 1ms delay to ensure SDMA channel is stopped") add 1ms delay may cause the audio underrun/overrun. But ESAI has an hardware issue in older version which work abnormal after underrun/overrun, especially there will be channel swap. To workaround this issue, the ESAI need to be reset. in imx-pcm-dma.c we include a new callback function for DMA interrupt which will check the state of cpu dai and reset it in necessary. So inport same function to imx-pcm-dma-v2. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18863-2: ASoC: fsl: move imx-cdnhdmi to end of the listViorel Suman
Move imx-cdnhdmi to end of the list. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18863: ASoC: fsl: reorder the list of objectsViorel Suman
Reorder the list of objects in attempt to get a predictible audio card probe sequence. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18655-4 sound: asoc: add micfil hwvad amixer controlsCosmin-Gabriel Samoila
Add amixer controls for the following hardware voice activity detection parameters: initialization mode, initialization time, frame time, high-pass filter mode, input gain, sound gain, noise gain, noise filter adjustment, zero-crossing detector(zcd) enablement, zcd threshold, zcd auto-threshold, zcd filter adjustment All of those parameters are now saved into micfil private data and used when hardware voice detection is enabled. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-08-24MLK-18655-2 sound: asoc: add micfil hardware voice active detectionCosmin-Gabriel Samoila
Hardware Voice Activity Detector (HWVAD) is a block responsible for detect voice activity in a channel selected by the user and it can be configured in Envelope-based or Energy-based mode. Optionally, a Zero-Crossing Detector can be enabled to improve the voice detection. To enable hwvad from userspace there is a interface and you should write the number of channels in /sys/devices/platform/30080000.micfil/hwvad/enable to enable the hardware voice activity detection for micfil or 0 to disable it. When voice activity is detected, an udev event will be generated: "EVENT=PDM_VOICE_DETECT" and hwvad will be disabled afterwards. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-08-24MLK-18655-1 sound: asoc: fix regmap caching for micfilCosmin-Gabriel Samoila
Remove regmap_cache_only from probe since this should be done in suspend/resume or when hwvad is enabled/disabled. If regmap is cached in probe, all volatile registers cannot be read/write until caching is set to false (which in our case was done only in resume function). Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-08-24MLK-18955-3: ASoC: fsl_spdif: restore arate typeViorel Suman
Changing "arate" type to u64 makes 32-bit kernel build to fail, so restore the previous type. Fixes: bb7d18078220 ("MLK-18955-2: ASoC: fsl_spdif: fix sysclk_df type") Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com>
2018-08-24MLK-18955-2: ASoC: fsl_spdif: fix sysclk_df typeViorel Suman
According to SPDIF spec STC SYSCLK_DF field is 9 bits width, values being in 0..511 range. So use a proper type to handle sysclk_df. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-18737: move 'pair_streams' to 'struct fsl_asrc_pair'Viorel Suman
For multi p2p instance an ASRC device cannot be closed successfully when two threads plays streams simultaneously on same ASRC device. 'pair_streams' variable shall be moved to 'struct fsl_asrc_pair' for multi p2p instance in order to handle pair release properly. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Suggested-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-18682-6: ASoC: imx-ak4497: refine 1:1 bclk:mclk ratio supportViorel Suman
Use a specific compatible string for 850D in order to limit DSD MCLK frequency for platforms newer than 850D. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18682-3: ASoC: imx-ak: enable both 8k and 11k range of ratesViorel Suman
SAI interface now is able to change at runtime the pll parent of the master clock, so enable both 8k and 11k range of rates for AK codecs. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18682-2: ASoC: fsl: sai: allow dynamic pll switchingViorel Suman
Currently SAI master clock derives from an audio pll that cannot be changed at runtime. iMX8 SoC has 2 audio plls usually configured to support either 8000Hz (8k,16k,32k,48k,etc) or 11025Hz (11k,22k,44.1k,88.2k,etc) ranges of rates - thus at runtime a SAI interface is able to play only one range of rates. The patch allows dynamic SAI master clock reparenting to the appropriate audio pll as function of the audio stream rate to be played/recorded. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18682-1: ASoC: fsl: sai: use set_bclk_ratio to calculate BCLK freqViorel Suman
ALSA API has a standard way to configure DAI BCLK by calling "snd_soc_dai_set_bclk_ratio" function. So use it to set BCLK ratio and calculate SAI BCLK frequency. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18691: ASoC: imx-xtor: don't add ASRC audio routes if node is missingViorel Suman
ASRC audio routes introduce aditional log noise if ASRC OF node is missing in DTS, so add them if ASRC node is present only. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18691: ASoC: imx-xtor: let DAI calculate SYSCLK freq neededViorel Suman
Currently SAI interface sets MCLK rate if provisioned externally from machine driver through set_sysclk. Let SAI manage clock frequency without interfering from machine driver. Aside of this use channels number to set TDM tx and rx masks. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18646: ASoC: fsl_dsp: fix the license issueShengjiu Wang
correct the license issue Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
2018-08-24MLK-18574: ASoC: fsl_spdif: specify the spdif in imx8mmShengjiu Wang
specify the spdif in imx8mm for the ipg clock is higher that it can support 192kHz Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18574: ASoC: fsl_spdif: support 192kHz for rx in imx8Shengjiu Wang
The ipg clock is higher enough to support 192kHz in imx8 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18562 sound: asoc: remove micfil unsupported rates and formatsCosmin-Gabriel Samoila
This block implements the required digital interface to provide a 16-bit audio signal from a PDM microphone bitstream in a configurable output sampling rate 11025kHz - 48000kHz. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-16784 sound: asoc: mark micfil stat register volatileCosmin-Gabriel Samoila
Mark micfil stat register as volatile since status flags should not be read from cache. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-16784 sound: asoc: change micfil dma_maxburstCosmin-Gabriel Samoila
MICFIL is using multi-fifo dma and maxburst must be set proportional to number of channels. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-18528 sound: asoc: add amixer control widged for micfilCosmin-Gabriel Samoila
Add channels output gain and quality select controls. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-18534-1: ASoC: fsl: sai: introduce 1:1 bclk:mclk ratio supportViorel Suman
Since IP version 3.01 (845s) SAI has support for 1:1 bclk:mclk ratio. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2018-08-24MLK-18530: ASoC: wm8524: support S32_LEShengjiu Wang
support S32_LE Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-16784-5 sound: asoc: add machine driver for micfil in iMX8MMCosmin-Gabriel Samoila
Add machine driver for micfill IP in iMX8MM. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-08-24MLK-16784-4 sound: asoc: add micfil cpu-dai in iMX8MMCosmin-Gabriel Samoila
Add micfil cpu-dai for iMX8MM. The MICFIL digital interface provides a 16-bit audio signal from a PDM microphone bitstream in a configurable output sampling rate. Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
2018-08-24MLK-18463: ASoC: ak4497: add return value for ak4497_probeShengjiu Wang
There is ak4497 audio card even no audio board connected, which os caused by there is no error return value even the i2c access failed. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2018-08-24MLK-18368-2: ASoC: fsl: support hdmi rx in machine driverShengjiu Wang
support hdmi rx in machine driver Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>