08 Jun, 2017
8 commits
-
There is hard code for gpr address in machine driver, imx-wm8960
and imx-wm8958, when the sai interface changed to sai1 or sai3,
there will be issue, so remove the hard code, use the property
from the device tree.Signed-off-by: Shengjiu Wang
-
The calculation "runtime->status->hw_ptr * (runtime->frame_bits / 8)" may
exceed the integer scope, then appl_bytes is no correct.
This patch is to fix this issue.Signed-off-by: Shengjiu Wang
-
cs42xx8 is a 24 bit device, the maximum supported bit is 24bit.
So remove the S32_LE from the supported list.Signed-off-by: Shengjiu Wang
-
The test case is one p2p playback + two m2m converter running
simultaneously. There are three root cause for this issue:1. hw_free() of p2p may be called twice in the end, which cause
release twice of one pair, if another pair request is called between
this two release, there will be issue.2. In m2m close(), the asrc_priv->pair[i] will be set NULL twice,
which is same issue as 1.3. when output rate is more than eight multiple of input rate for m2m,
the last_period_size should be larger.Signed-off-by: Shengjiu Wang
-
mqs can't be used as recorder, the capture property need to be zero.
Signed-off-by: Shengjiu Wang
-
The maximum divider of asrc clock is 1024, but there is no judgement
for this limitaion in driver, which may cause the divider setting not
correct.When IDEAL_RATIO_RATE 200kHZ, the cost time of conversion from 192kHz
to 96kHz is 24ms every 1024 sample, but these sample's playback time
is 1024/96=11ms, so there will be underrun. So need to enlarge this RATE.Signed-off-by: Shengjiu Wang
-
Add codec-master property for imx-wm8962. If set this in device
tree, the codec will work as master, if don't set it, the cpu dai
will work as master.Signed-off-by: Shengjiu Wang
-
mclk0 is assigned through the device tree.
Signed-off-by: Shengjiu Wang
23 Feb, 2017
32 commits
-
In imx6ull, the esai errata ERR008000 for imx6q/dl is fixed, so remove the
workaround from imx6ull.Signed-off-by: Shengjiu Wang
-
Add codec master mode support, the default is slave mode.
Signed-off-by: Shengjiu 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
-
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
-
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
-
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
-
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
-
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
-
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 activeAfter 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
-
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 2Signed-off-by: Shengjiu 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
-
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
(cherry picked from commit 92f65b4bee51fabdfa3a3c191f511c2ec7cb18a1) -
Report by coverity (CID 18428). The return value need be checked
for snd_soc_dai_set_sysclk().Signed-off-by: Shengjiu 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
-
free pair after allocating m2m failed. Reported by coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit 237a35db5b48b78250a019f891d9d746c3411d49) -
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
(cherry picked from commit b0dc15375b12b6c1bf46b9071b92267b827d8ce0) -
check the return value for snd_pcm_hw_constraint_integer().
Reported by Coverity.Signed-off-by: Zidan Wang
(cherry picked from commit 26f8fea617fcebd8835f660534a988c58b9f0517) -
fix mqs_priv->name overrun issue. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit ef1c59f93981b15412a0207d5517a26901bb2ecd) -
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
(cherry picked from commit d5957250784a27cf6f6f421d8a6e0ba45b4bbc18) -
init fm_np to avoid wild pointer. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit dea49f320f33e1f723301a0bfa18573c0f7b5fb1) -
fix missing break in switch. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit 302516a1dfca5758a34cbed939c9976679febb0c) -
fix missing break in switch. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit ec9d74d9258e3320ec68a1f977932cb20ace4ca2) -
init codec_np to avoid wild pointer. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit 76665930654867cf38a86ba747a9f8a5bf2665e2) -
…urn 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) -
init sii902x_np to avoid wild pointer. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit 780e27683c38f785ea7f7e07e83b00ffd3c22d78) -
init codec_np to avoid wild pointer. Reported by Coverity.
Signed-off-by: Zidan Wang
(cherry picked from commit 8e27b90c9adf5033038a40e0b61a7ffe4c971290) -
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
(cherry picked from commit 68021ab9ada4a7f3037993a3887453e12271d4ed) -
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
Acked-by: Nicolin Chen
Signed-off-by: Mark Brown
(cherry picked from commit 51659ca069ce5bdf20675a7967a39ef8419e87f2) -
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
(cherry picked from commit 5ec8878be12530517b4c8ae307441a0ac16071a3) -
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
(cherry picked from commit e35e15983e14caf48dadf235bc6b33014818c62e) -
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
(cherry picked from commit b436254cd55dc0d2ebb6d2ca7ce5f58520ea5dbc) -
After playback audio with saiwm8960 sound card, is_slave_mode
will be set, but it will not be cleared. So playback audio with
saisii902x sound card will have no voice.Signed-off-by: Zidan Wang