16 Apr, 2020
1 commit
23 Oct, 2019
1 commit
-
Modified parameter msg in dsp, make sure still can transfer right msg
between DSP and user, modified parameter msg in kernel.Signed-off-by: Zhang Peng
(cherry picked from commit ea234701fd310d822a8dd777e96f430ae0b70bc9)
29 Aug, 2019
4 commits
-
Fix the following KASAN reported issue:
==================================================================
[ 11.580278] BUG: KASAN: stack-out-of-bounds in find_next_bit+0x3c/0xc0
[ 11.586815] Read of size 8 at addr ffffffc8c8d4f760 by task swapper/0/1
[ 11.593440]
[ 11.594943] CPU: 4 PID: 1 Comm: swapper/0 Tainted: G W 4.19.35-05042-g. #157
[ 11.604259] Hardware name: Freescale i.MX8QM MEK (DT)
[ 11.609323] Call trace:
[ 11.611785] dump_backtrace+0x0/0x230
[ 11.615458] show_stack+0x14/0x20
[ 11.618787] dump_stack+0xbc/0xf4
[ 11.622118] print_address_description+0x60/0x270
[ 11.626830] kasan_report+0x230/0x360
[ 11.630505] __asan_load8+0x84/0xa8
[ 11.634005] find_next_bit+0x3c/0xc0
[ 11.637595] fsl_sai_calc_dl_off+0x1c/0x50
[ 11.641703] fsl_sai_read_dlcfg+0x184/0x368
[ 11.645898] fsl_sai_probe+0x3ec/0xb48
[ 11.649663] platform_drv_probe+0x70/0xd8
[ 11.653683] really_probe+0x24c/0x370
[ 11.657358] driver_probe_device+0x70/0x138
[ 11.661554] __driver_attach+0x124/0x128
[ 11.665489] bus_for_each_dev+0xe8/0x158
[ 11.669425] driver_attach+0x30/0x40
[ 11.673012] bus_add_driver+0x290/0x308
[ 11.676861] driver_register+0xbc/0x1d0
[ 11.680711] __platform_driver_register+0x7c/0x88
[ 11.685431] fsl_sai_driver_init+0x18/0x20
[ 11.689537] do_one_initcall+0xe8/0x5a8
[ 11.693387] kernel_init_freeable+0x6b0/0x760
[ 11.697759] kernel_init+0x10/0x120
[ 11.701255] ret_from_fork+0x10/0x18
....
==================================================================
[ 11.800186] Disabling lock debugging due to kernel taintSigned-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang -
Add multi context support for bps_iec958
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
(cherry picked from commit 131408cc5b9f7957502c01bf3bff18c9c4b4fca0) -
support configuration of channel status for IEC958
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
(cherry picked from commit 92aee54f844098080c878ae59878dadab28d8ea3) -
IEC958 is only supported for output according to the RM
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
(cherry picked from commit bf36888526c420776c18ca06548b9d3798200beb)
26 Aug, 2019
2 commits
-
Fix constant variable guards dead code which is reported by coverity.
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
Fix logically dead code which is reported by coverity
Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
16 Aug, 2019
5 commits
-
The rpmsg i2s audio is supported with codec wm8524 in imx8mn
Signed-off-by: Shengjiu Wang
(cherry picked from commit 68ad8218321cec6006acdb3df846da8bc6994792) -
In LPA drain state, if runtime->status->state is SUSPEND, after resume,
ALSA would exit drain mode directly, that cause some data in end
of song is missed.This patch is to enable ignore_suspend flags that
the runtime->status->state will be not in SUSPEND always.Signed-off-by: Shengjiu Wang
(cherry picked from commit f83787f252adb7cb0280c43ab0d428c66f9c63f9) -
Use the spin lock to protect the work_write_index and work_read_index,
Use the spin lock to protect the period_done_msg_enabled flag
That is to avoid the read and write flag confliction.Signed-off-by: Shengjiu Wang
(cherry picked from commit 6de0ce94dd9fe0010f71c508cd0b73bb8f0a51b0) -
For we have dropped the cmd I2S_TX_POINTER, and M4 will send
notification every period, so we don't need to enable timer
every period to get the position of TX pointer.But we need a timer to send the notification to M4 that is
to reduce the notificaition message number.Signed-off-by: Shengjiu Wang
(cherry picked from commit 900628f0d551c8d4faeb3fe3d33ef4646e13b2e1) -
There is error log for short period size:
[ 6977.102062] i2s_rpmsg virtio0.rpmsg-audio-channel.-1.1: rpmsg_send cmd 22 timeout!
We use the I2S_TX_POINTER(cmd 22) to get the consumed period
index from M4 every period time, and m4 should send feedback
to A53. When the period time is small, there will too much
cmd send to m4, m4 may not handle it quickly that cause
timeout.This patch is to remove the I2S_TX_POINTER cmd, m4 should
send notification to A53 every period time to be compatible
with this change. with the patch the loading of this rpmsg
channel is reduced.Signed-off-by: Shengjiu Wang
(cherry picked from commit babbc2cd8313fb5cf604b5ca93a86200df0e46b2)
29 Jul, 2019
1 commit
-
The audio float point data range is (-1, 1), the asrc would output
all zero for float point input and integer output case, that is to
drop the fractional part of the data directly.In order to support float to int conversion or int to float conversion
we need to do special operation on the coefficient to enlarge/reduce
the data to the expected range.For float to int case:
Up sampling:
1. Create a 1 tap filter with center tap (only tap) of 2^31
in 64 bits floating point.
double value = (double)(((uint64_t)1) << 31);
2. Program 1 tap prefilter with center tap above.Down sampling,
1. If the filter is single stage filter, add "shift" to the exponent of
stage 1 coefficients.
2. If the filter is two stage filter , add "shift" to the exponent of
stage 2 coefficients.The "shift" is 31, same for int16, int24, int32 case.
For int to float case:
Up sampling:
1. Create a 1 tap filter with center tap (only tap) of 2^-31
in 64 bits floating point.
2. Program 1 tap prefilter with center tap above.Down sampling,
1. If the filter is single stage filter, subtract "shift" to the
exponent of stage 1 coefficients.
2. If the filter is two stage filter , subtract "shift" to the
exponent of stage 2 coefficients.The "shift" is 15,23,31, different for int16, int24, int32 case.
Signed-off-by: Shengjiu Wang
(cherry picked from commit 8a18a7a2dd1184814c6c61cb116f4d868b003447)
23 Jul, 2019
2 commits
-
Fix build warning with CONFIG_PM_SLEEP=n, the message is
In file included from sound/soc/fsl/fsl_easrc.c:2204:0:
sound/soc/fsl/fsl_easrc_m2m.c:960:13: warning: ‘fsl_easrc_m2m_resume’ defined but not used [-Wunused-function]
static void fsl_easrc_m2m_resume(struct fsl_easrc *easrc)
^~~~~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_easrc_m2m.c:927:13: warning: ‘fsl_easrc_m2m_suspend’ defined but not used [-Wunused-function]
static void fsl_easrc_m2m_suspend(struct fsl_easrc *easrc)
^~~~~~~~~~~~~~~~~~~~~Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman
(cherry picked from commit 0b6e34f8aaac3a6e5a5e1459a9fc6a42d8a8c127) -
fix build warning with CONFIG_PM_SLEEP=n, the warning message is
In file included from sound/soc/fsl/fsl_asrc.c:968:0:
sound/soc/fsl/fsl_asrc_m2m.c:1021:13: warning: ‘fsl_asrc_m2m_resume’ defined but not used [-Wunused-function]
static void fsl_asrc_m2m_resume(struct fsl_asrc *asrc_priv)
^~~~~~~~~~~~~~~~~~~
sound/soc/fsl/fsl_asrc_m2m.c:990:13: warning: ‘fsl_asrc_m2m_suspend’ defined but not used [-Wunused-function]
static void fsl_asrc_m2m_suspend(struct fsl_asrc *asrc_priv)
^~~~~~~~~~~~~~~~~~~~Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman
(cherry picked from commit a3ec5433cfd6fd2b90113a78d5045e04f6a8328c)
19 Jul, 2019
16 commits
-
Fix issue reported by coverity:
a. Resource leak for ctx is not freed when m2m allocation
failed
b. Use of untrusted scalar valueSigned-off-by: Shengjiu Wang
-
Some definition of parameter's width is wrong, that cause the
failure of conversion for more than 16 channels.Signed-off-by: Shengjiu Wang
-
With multi-instance case, the fsl_easrc_config_slot will be called
in parallel, the fsl_easrc_slot is independent with context, so
we need to lock to protect the access of fsl_easrc_config_slot,
otherwise, the slot configuration will be fail for some instance
that cause "input DMA task timeout".Signed-off-by: Shengjiu Wang
-
The input audio float data range is normalized to (-1, 1), but
the hardware will drop to fractional part if output format
is integer format, so the output is all zero, which does not flow
the normal audio case, that to shift the output to Q15/Q31.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
The hardware don't support big endian format. which only
support bit reverse.Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
Support S24_3LE for m2m with SDMA, but add constraint
for EDMA case, for EDMA don't support 3bytes copy.Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
upport S24_3LE and S20_3LE for m2m.
Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
When error happen, user may not call STOP_CONV to stop the context,
then there will be "input DMA task timeout" issue for next m2m task.In this patch, fsl_easrc_stop_context is called in RELEASE_PAIR to
make sure context is stopped.Signed-off-by: Shengjiu Wang
-
Add error handler for format check, if the format is not supported
should return error, otherwise it cause "input DMA task timeout"Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman -
Support EASRC in this sound card with FE-BE structure
Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
Support EASRC in this sound card with FE-BE structure
Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
The constraint is not needed for back end bistream for
the sample rate is fixed by dts and the constraint
is propagate to front end bistream for they share same
snd_soc_pcm_runtime.Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
EASRC M2M function is not able to put upstream due to its self-designed
ioctl protocol. So make a single patch for it and make it merge
into P2P driver as simply as possible.The patch can only be maintained internally unless some one designs a
new protocol or implement the originally protocol by using some common
approach provided by Linux Kernel.Signed-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
EASRC (Enhanced ASRC) is a new IP module found on i.MX8 MN. It is
different from old ASRC module.The primary features for the EASRC are as follows:
1. 4 Contexts - groups of channels with an independent time base
2. Fully independent and concurrent context control
3. Simultaneous processing of up to 32 audio channels
4. Programmable filter charachteristics for each context
5. 32, 24, 20, and 16-bit fixed point audio sample support
6. 32-bit floating point audio sample support
7. 8kHz to 384kHz sample rate
8. 1/16 to 8x sample rate conversion ratio
9. Software control of fine conversion ratioSigned-off-by: Shengjiu Wang
Reviewed-by: Daniel Baluta
Reviewed-by: Viorel Suman -
Support mono channel for HDMI
Signed-off-by: Shengjiu Wang
-
Move the operation for sii902x module to mxsfb_sii902x_audio.c
platform driver. change codec from dummy to hdmi-codecSigned-off-by: Shengjiu Wang
18 Jul, 2019
2 commits
-
Base on latest power management design in MLK-17074, every driver
need to enter runtime suspend state in suspend, so the driver should
call the pm_runtime_force_suspend in suspend. with this implementation
the suspend function almost same as runtime suspend function. so remove
the suspend function, just use pm_runtime_force_suspend instead.Signed-off-by: Shengjiu Wang
(cherry picked from commit a5a16b226bf164826d6d977beb897cc4bf0bdc8f) -
In imx8 when systerm enter suspend state, the power of subsystem will be
off, The clock enable state will be lost after resume, but the runtime
resume function will be called after resume by pm, so need to move clock
enablement to runtime resume and clock disablement to runtime suspend.
Then after resume the clock enable state can be recovered.Signed-off-by: Shengjiu Wang
17 Jul, 2019
1 commit
-
There is warning log after switching to component in driver:
[ 2.135785] fsl-rpmsg-i2s rpmsg-i2s: ASoC: Failed to create component debugfs directory
The reason is there is two component attached with one device,
the components' name are same, then creating debugfs for second
component failed.This patch is to add debugfs_prefix for platform component to fix
the warning issue.Signed-off-by: Shengjiu Wang
16 Jul, 2019
1 commit
-
With command: arecord -D hw:$num,0 -f dat | aplay -D hw:0,0 -f dat &
There is error:
fsl-ssi-dai 202c000.ssi: invalid slot width: 32
fsl-ssi-dai 202c000.ssi: failed to set dai tdm slot
imx-tuner-si476x sound-fm: ASoC: machine hw_params failed: -22The reason is that slot width 32 is not valid and and set_sysclk
api is removed by commit b0a7043d5c2c ("ASoC: fsl_ssi: Caculate bit clock
rate using slot number and width").Signed-off-by: Shengjiu Wang
Reviewed-by: Viorel Suman
12 Jul, 2019
4 commits
-
HWVAD may be disabled from different context - from userspace
via SYSFS interface, and from VAD interrupt context on VAD event
detection. Synchronize HVWAD enable/disable in order to get a
proper HWVAD state after each operation.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
Replace "sleep" calls with corresponding "delay" equivalents
in order to prepare the code for running in atomic context.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
The HWVAD_OFF state must be restored and device put back
in runtime_suspend in case if fsl_set_clock_params, fsl_micfil_reset
and init_hwvad calls return an error.Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
Reviewed-by: Daniel Baluta -
Improve hwvad enable/disable related error logging messages.
Signed-off-by: Viorel Suman
Reviewed-by: Shengjiu Wang
Reviewed-by: Daniel Baluta